From 34a1b5cce758f20aa93e0c1654a450d3a64055e5 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Wed, 27 Jul 2022 04:41:45 +0530 Subject: [PATCH] Modified scripts jul 26 (#21223) * Modified sripts TC-CADMIN-1.13 TC-CC-3.* TC-CC-4.* TC-CC-5.* TC-CC-6.* TC-CC-7.* TC-CC-8.1 TC-CC-9.* TC-DGETH-2.2 TC-DRLK-2.7 TC-LVL-3.1 TC-LVL-4.1 TC-LVL-5.1 TC-LVL-6.1 TC-PCC-2.2 TC-SC-4.2 Removed tests TC-CADMIN-1.25 TC-CADMIN-1.26 * Added auto generated files * Modified CC scripts * auto generated files * Modified CC-5.2 test * Added auto generated files --- src/app/tests/suites/certification/PICS.yaml | 52 + .../certification/Test_TC_CADMIN_1_13.yaml | 2 +- .../certification/Test_TC_CADMIN_1_25.yaml | 93 - .../certification/Test_TC_CADMIN_1_26.yaml | 108 - .../suites/certification/Test_TC_CC_3_1.yaml | 35 +- .../suites/certification/Test_TC_CC_3_2.yaml | 18 +- .../suites/certification/Test_TC_CC_3_3.yaml | 14 +- .../suites/certification/Test_TC_CC_4_1.yaml | 54 +- .../suites/certification/Test_TC_CC_4_2.yaml | 22 +- .../suites/certification/Test_TC_CC_4_3.yaml | 14 +- .../suites/certification/Test_TC_CC_4_4.yaml | 23 +- .../suites/certification/Test_TC_CC_5_1.yaml | 21 +- .../suites/certification/Test_TC_CC_5_2.yaml | 29 +- .../suites/certification/Test_TC_CC_5_3.yaml | 27 +- .../suites/certification/Test_TC_CC_6_1.yaml | 7 + .../suites/certification/Test_TC_CC_6_2.yaml | 17 +- .../suites/certification/Test_TC_CC_6_3.yaml | 15 +- .../suites/certification/Test_TC_CC_7_1.yaml | 41 +- .../suites/certification/Test_TC_CC_7_2.yaml | 54 +- .../suites/certification/Test_TC_CC_7_3.yaml | 18 +- .../suites/certification/Test_TC_CC_7_4.yaml | 19 +- .../suites/certification/Test_TC_CC_8_1.yaml | 66 +- .../suites/certification/Test_TC_CC_9_1.yaml | 7 + .../suites/certification/Test_TC_CC_9_2.yaml | 7 + .../suites/certification/Test_TC_CC_9_3.yaml | 7 + .../certification/Test_TC_DGETH_2_2.yaml | 172 +- .../certification/Test_TC_DRLK_2_7.yaml | 7 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 7 + .../suites/certification/Test_TC_LVL_4_1.yaml | 7 + .../suites/certification/Test_TC_LVL_5_1.yaml | 7 + .../suites/certification/Test_TC_LVL_6_1.yaml | 7 + .../suites/certification/Test_TC_PCC_2_2.yaml | 34 +- .../suites/certification/Test_TC_SC_4_2.yaml | 67 +- .../tests/suites/certification/ci-pics-values | 12 + .../chip-tool/zap-generated/test/Commands.h | 4160 +++++++++------- .../zap-generated/test/Commands.h | 4355 +++++++++++------ 36 files changed, 6033 insertions(+), 3572 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index f5224138c1cc35..e6c2d741f465a3 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -4627,3 +4627,55 @@ PICS: - label: "Does device support optional key SII in operational discovery mDNS?" id: MCORE.SC.T_KEY + + - label: "Does the device support discovery over Bluetooth Low Power (BLE)?" + id: MCORE.SC.BLE + + - label: "Does the device support discovery over Wi-Fi?" + id: MCORE.SC.WIFI + + - label: "Does the device support discovery over Ethernet?" + id: MCORE.SC.ETH + + - label: "Does the device support discovery over Thread?" + id: MCORE.SC.THR + + - label: + "Does device support optional subtype _V in commissionable node + discovery mDNS?" + id: MCORE.SC.VENDOR_SUBTYPE + + - label: + "Does device support optional subtype _T in commissionable node + discovery mDNS?" + id: MCORE.SC.DEVTYPE_SUBTYPE + + - label: + "Does device support optional key VP in commissionable node discovery + mDNS?" + id: MCORE.SC.VP_KEY + + - label: + "Does device support optional key DT in commissionable node discovery + mDNS?" + id: MCORE.SC.DT_KEY + + - label: + "Does device support optional key DN in commissionable node discovery + mDNS?" + id: MCORE.SC.DN_KEY + + - label: + "Does device support optional key RI in commissionable node discovery + mDNS?" + id: MCORE.SC.RI_KEY + + - label: + "Does device support optional key PH in commissionable node discovery + mDNS?" + id: MCORE.SC.PH_KEY + + - label: + "Does device support optional key PI in commissionable node discovery + mDNS?" + id: MCORE.SC.PI_KEY diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 703bfd3d471c5a..c35bda367e1263 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 24.1.13. [TC-CADMIN-1.15] Open commissioning window twice on DUT using BCM + 24.1.13. [TC-CADMIN-1.13] Open commissioning window twice on DUT using BCM then ECM [DUT - Commissionee] config: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml deleted file mode 100644 index cc8880bab94dd5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_25.yaml +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 24.1.25. [TC-CADMIN-1.25] Open commissioning window - durations min and - min-1 [BCM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml deleted file mode 100644 index 8d07ea020db918..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_26.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 24.1.26. [TC-CADMIN-1.26] Open commissioning window - durations min and - min-1 [ECM] [DUT - Commissionee] - -config: - nodeId: 0x12344321 - timeout: 330 - endpoint: 0 - -tests: - - label: "Factory Reset the DUT_CE" - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Factory Reset the DUT_CE" - verification: | - Not implemented in YAML - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - - - label: "Wait for commissioning Window to 301 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 181000 - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "AdministratorCommissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 179 - - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - - name: "discriminator" - value: 3840 - - name: "iterations" - value: 1000 - - name: "salt" - value: "SPAKE2P Key Salt" - response: - error: INVALID_COMMAND - - - label: - "TH_CR1 reads the window status to verify the DUT_CE window is closed" - cluster: "AdministratorCommissioning" - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index 494d83bb93dd93..43fffa68aa63ab 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 @@ -19,6 +19,18 @@ 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" @@ -40,6 +52,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" @@ -58,7 +77,7 @@ tests: arguments: values: - name: "hue" - value: 150 + value: hueShortestDistance - name: "Direction" value: 0 - name: "TransitionTime" @@ -117,7 +136,7 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 150 + value: hueShortestDistance - label: "TH sends MoveToHue command to DUT another Hue with Direction Longest @@ -127,7 +146,7 @@ tests: arguments: values: - name: "hue" - value: 200 + value: hueLongestDistance - name: "Direction" value: 1 - name: "TransitionTime" @@ -186,7 +205,7 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 200 + value: hueLongestDistance - label: "TH sends MoveToHue command to DUT another Hue with Direction Up and @@ -196,7 +215,7 @@ tests: arguments: values: - name: "hue" - value: 250 + value: hueDirectionUp - name: "Direction" value: 2 - name: "TransitionTime" @@ -255,7 +274,7 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 250 + value: hueDirectionUp - label: "TH sends MoveToHue command to DUT another Hue with Direction Down and @@ -265,7 +284,7 @@ tests: arguments: values: - name: "hue" - value: 200 + value: hueDirectionDown - name: "Direction" value: 3 - name: "TransitionTime" @@ -324,7 +343,7 @@ tests: command: "readAttribute" attribute: "CurrentHue" response: - value: 200 + value: hueDirectionDown - label: "Turn off light that we turned on" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index 84daa2adbabb07..75f8db02ce10e0 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: ENUM8 + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F00 && CC.S.A0000 @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -125,7 +135,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -173,7 +183,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -241,7 +251,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" 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 68224f07229f27..f4fd0c58e073f9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: INT8U + defaultValue: 5 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" @@ -57,7 +67,7 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" @@ -92,7 +102,7 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: StepSizeConfigValue - name: "TransitionTime" value: 5 - name: "OptionsMask" 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 297c8c1c200177..8867ae02d7f323 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + SaturationConfigValue: + type: INT8U + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" @@ -55,21 +65,21 @@ tests: arguments: values: - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" - value: 15 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 500ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 1500 - label: "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." @@ -77,46 +87,12 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: type: uint8 minValue: 0 maxValue: 254 - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 500 - - - label: - "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: uint8 - minValue: 0 - maxValue: 254 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: - "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp - command: "readAttribute" - attribute: "CurrentSaturation" - response: - value: 90 - - label: "Turn off light that we turned on" cluster: "On/Off" command: "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 3ed36a5da6b041..25480f037c2808 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: INT8U + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 15 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -125,7 +135,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -195,7 +205,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 100 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -229,7 +239,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -279,7 +289,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -332,7 +342,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" 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 d66a60978a4a10..6b9e9e0a8dbffd 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: INT8U + defaultValue: 15 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" @@ -57,7 +67,7 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 15 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -92,7 +102,7 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 20 + value: StepSizeConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" 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 d2ae7c41b0d3eb..7562d93b6c38bb 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -19,6 +19,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + hueConfigValue: + type: INT8U + defaultValue: 40 + SaturationConfigValue: + type: INT8U + defaultValue: 160 tests: - label: "Wait for the commissioned device to be retrieved" @@ -40,6 +46,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentHue attribute from DUT." PICS: CC.S.F01 && CC.S.A0000 command: "readAttribute" @@ -66,9 +79,9 @@ tests: arguments: values: - name: "hue" - value: 40 + value: hueConfigValue - name: "Saturation" - value: 160 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -76,19 +89,20 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 1500 - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentHue" response: + value: hueConfigValue constraints: type: uint8 minValue: 0 @@ -100,6 +114,7 @@ tests: command: "readAttribute" attribute: "CurrentSaturation" response: + value: SaturationConfigValue constraints: type: uint8 minValue: 0 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 60db8c7c0dd9b6..e03a667ae40cec 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + colorXConfigValue: + type: INT16U + defaultValue: 400 + colorYConfigValue: + type: INT16U + defaultValue: 500 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +45,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 command: "readAttribute" @@ -65,9 +78,9 @@ tests: arguments: values: - name: "colorX" - value: 200 + value: colorXConfigValue - name: "colorY" - value: 300 + value: colorYConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -88,7 +101,7 @@ tests: command: "readAttribute" attribute: "CurrentX" response: - value: 200 + value: colorXConfigValue constraints: type: uint16 minValue: 0 @@ -99,7 +112,7 @@ tests: command: "readAttribute" attribute: "CurrentY" response: - value: 300 + value: colorYConfigValue constraints: type: uint16 minValue: 0 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 37a7803236b957..13cd8d94fc0037 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateXValue: + type: INT16S + defaultValue: 50 + RateYValue: + type: INT16S + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,11 +45,19 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: type: uint16 minValue: 0 @@ -54,6 +68,7 @@ tests: PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: type: uint16 minValue: 0 @@ -65,9 +80,9 @@ tests: arguments: values: - name: "rateX" - value: 15 + value: RateXValue - name: "rateY" - value: 20 + value: RateYValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -86,9 +101,10 @@ tests: command: "readAttribute" attribute: "CurrentX" response: + saveAs: CurrentXBeforeStopCommand constraints: type: uint16 - minValue: 0 + minValue: CurrentXValue maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" @@ -96,9 +112,10 @@ tests: command: "readAttribute" attribute: "CurrentY" response: + saveAs: CurrentYBeforeStopCommand constraints: type: uint16 - minValue: 0 + minValue: CurrentYValue maxValue: 65279 - label: "TH sends StopMoveStep command to DUT" @@ -118,7 +135,7 @@ tests: response: constraints: type: uint16 - minValue: 0 + minValue: CurrentXBeforeStopCommand maxValue: 65279 - label: "TH reads CurrentY attribute from DUT" @@ -128,7 +145,7 @@ tests: response: constraints: type: uint16 - minValue: 0 + minValue: CurrentYBeforeStopCommand maxValue: 65279 - label: "Turn off light that we turned on" diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml index 36da57449a9448..8b81f353104070 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepXConfigValue: + type: INT16S + defaultValue: 100 + StepYConfigValue: + type: INT16S + defaultValue: 100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,11 +45,19 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F03 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" PICS: CC.S.F03 && CC.S.A0003 attribute: "CurrentX" response: + saveAs: CurrentXValue constraints: type: uint16 minValue: 0 @@ -54,6 +68,7 @@ tests: PICS: CC.S.F03 && CC.S.A0004 attribute: "CurrentY" response: + saveAs: CurrentYValue constraints: type: uint16 minValue: 0 @@ -65,9 +80,9 @@ tests: arguments: values: - name: "stepX" - value: 15 + value: StepXConfigValue - name: "stepY" - value: 20 + value: StepYConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -75,13 +90,13 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 1500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 1500 - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp @@ -90,7 +105,7 @@ tests: response: constraints: type: uint16 - minValue: 0 + minValue: CurrentXValue maxValue: 65279 - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" @@ -100,7 +115,7 @@ tests: response: constraints: type: uint16 - minValue: 0 + minValue: CurrentYValue maxValue: 65279 - label: "Turn off light that we turned on" 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 2b068130234d2c..f9daaa512ea1e9 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" 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 3cc7effdef61b1..255e36389327f4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -40,6 +40,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -224,7 +231,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" @@ -242,11 +249,11 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTempPhysicalMaxMiredsValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -335,7 +342,7 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 10 + value: 20 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" 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 7b667e0ec601a2..3a4f902eff0c7e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -40,6 +40,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F04 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -128,13 +135,13 @@ tests: minValue: 0 maxValue: 65279 - - label: "Wait 500ms" + - label: "Wait 700ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 700 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp @@ -154,9 +161,9 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: 5 + value: 100 - name: "TransitionTime" - value: 50 + value: 10 - name: "ColorTemperatureMinimumMireds" value: ColorTempPhysicalMinMiredsValue - name: "ColorTemperatureMaximumMireds" 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 a20be46e8fcd99..df050ae7924d0c 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 @@ -19,6 +19,21 @@ 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" @@ -40,13 +55,20 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH sends EnhancedMoveToHue command to DUT" PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: 1025 + value: EnhancedHueConfigValue - name: "Direction" value: 0 - name: "TransitionTime" @@ -61,6 +83,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: + value: EnhancedHueConfigValue constraints: type: uint16 minValue: 0 @@ -72,7 +95,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1100 + value: EnhancedHueShortestDistanceConfigValue - name: "Direction" value: 0 - name: "TransitionTime" @@ -131,7 +154,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1100 + value: EnhancedHueShortestDistanceConfigValue constraints: type: uint16 minValue: 0 @@ -143,7 +166,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1150 + value: EnhancedHueLongestDistanceConfigValue - name: "Direction" value: 1 - name: "TransitionTime" @@ -202,7 +225,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1150 + value: EnhancedHueLongestDistanceConfigValue constraints: type: uint16 minValue: 0 @@ -214,7 +237,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueDirectionUpConfigValue - name: "Direction" value: 2 - name: "TransitionTime" @@ -273,7 +296,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1200 + value: EnhancedHueDirectionUpConfigValue constraints: type: uint16 minValue: 0 @@ -285,7 +308,7 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1300 + value: EnhancedHueDirectionDownConfigValue - name: "Direction" value: 3 - name: "TransitionTime" @@ -344,7 +367,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1300 + value: EnhancedHueDirectionDownConfigValue constraints: type: uint16 minValue: 0 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 8f872730f41126..7f946b8108d348 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: INT16U + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F01 && CC.S.A4000 @@ -57,7 +67,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -136,6 +146,26 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: + saveAs: EnhancedCurrentHueStep3b + constraints: + type: uint16 + minValue: 0 + maxValue: 65535 + + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: EnhancedCurrentHueStep3b constraints: type: uint16 minValue: 0 @@ -149,7 +179,7 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: 15 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -228,6 +258,26 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: + saveAs: EnhancedCurrentHueStep5b + constraints: + type: uint16 + minValue: 0 + maxValue: 65535 + + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT several times." + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: EnhancedCurrentHueStep5b constraints: type: uint16 minValue: 0 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 32a28ba65a1f09..18b1be3cece7fc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + StepSizeConfigValue: + type: INT16U + defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +42,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" PICS: CC.S.F01 && CC.S.A4000 @@ -57,9 +67,9 @@ tests: - name: "StepMode" value: 0 - name: "StepSize" - value: 50 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -91,9 +101,9 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: 75 + value: StepSizeConfigValue - name: "TransitionTime" - value: 1 + value: 10 - name: "OptionsMask" value: 0 - name: "OptionsOverride" 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 dac1cc25ce9a1f..7c747be7eb5575 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -20,6 +20,12 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + EnhancedHueConfigValue: + type: INT16U + defaultValue: 1200 + SaturationConfigValue: + type: INT8U + defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -41,6 +47,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F01 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 command: "readAttribute" @@ -57,9 +70,9 @@ tests: arguments: values: - name: "EnhancedHue" - value: 1200 + value: EnhancedHueConfigValue - name: "Saturation" - value: 90 + value: SaturationConfigValue - name: "TransitionTime" value: 10 - name: "OptionsMask" @@ -82,7 +95,7 @@ tests: command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: 1200 + value: EnhancedHueConfigValue constraints: type: uint16 minValue: 0 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 1d57ead0895230..e7411fb6c87cbf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -18,6 +18,21 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 + RateConfigValue: + type: INT8U + defaultValue: 50 + RateXConfigValue: + type: INT16S + defaultValue: 50 + RateYConfigValue: + type: INT16S + defaultValue: 50 + ColorTemperatureMinMiredsConfigValue: + type: INT16U + defaultValue: 1 + ColorTemperatureMaxMiredsConfigValue: + type: INT16U + defaultValue: 255 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,6 +54,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "TH sends MoveHue command to DUT" PICS: CC.S.C01.Rsp && CC.S.F00 command: "MoveHue" @@ -47,7 +69,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -111,7 +133,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 5 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -173,14 +195,22 @@ tests: arguments: values: - name: "rateX" - value: 15 + value: RateXConfigValue - name: "rateY" - value: 20 + value: RateYConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 + - label: "Wait 500ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 500 + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03 command: "readAttribute" @@ -233,13 +263,13 @@ tests: minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 @@ -271,16 +301,24 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 10 + value: RateConfigValue - name: "ColorTemperatureMinimumMireds" - value: 1 + value: ColorTemperatureMinMiredsConfigValue - name: "ColorTemperatureMaximumMireds" - value: 255 + value: ColorTemperatureMaxMiredsConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 + - label: "Wait 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + - label: "TH reads ColorTemperatureMireds attribute from DUT" PICS: CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04 command: "readAttribute" @@ -312,13 +350,13 @@ tests: minValue: 0 maxValue: 65279 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "Reads current color attribute value matched the value sent by the @@ -341,7 +379,7 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: 50 + value: RateConfigValue - name: "OptionsMask" value: 0 - name: "OptionsOverride" @@ -378,13 +416,13 @@ tests: minValue: 0 maxValue: 65535 - - label: "Wait 100ms" + - label: "Wait 500ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 500 - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 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 293bfbc24c1ada..be9e05812e5298 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 @@ -67,6 +67,13 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp 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 2e321454f04260..65cac0bef43279 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 @@ -68,6 +68,13 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp 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 8ad46f10d5fc30..3a38d1b23cc858 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 @@ -67,6 +67,13 @@ tests: - name: "ms" value: 1000 + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml index 87662dcb4c5717..94dcdb1ed6e524 100644 --- a/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGETH_2_2.yaml @@ -28,42 +28,182 @@ tests: - name: "nodeId" value: nodeId + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PHYRate attribute from DUT" + PICS: DGETH.S.A0000 + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 + command: "readAttribute" + attribute: "PacketRxCount" + response: + saveAs: PacketRxCount + + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 + command: "readAttribute" + attribute: "PacketTxCount" + response: + saveAs: PacketTxCount + + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 + command: "readAttribute" + attribute: "TxErrCount" + response: + saveAs: TxErrCount + + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 + command: "readAttribute" + attribute: "CollisionCount" + response: + saveAs: CollisionCount + + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 + command: "readAttribute" + attribute: "OverrunCount" + response: + saveAs: OverrunCount + #issue #13648 - label: "Sends ResetCounts command" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp + PICS: DGETH.S.C00.Rsp command: "ResetCounts" - - label: "Read the PacketRxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0002 + - label: "TH reads PacketRxCount attribute value from DUT" + PICS: DGETH.S.A0002 command: "readAttribute" attribute: "PacketRxCount" response: - value: 0 + constraints: + maxValue: PacketRxCount - - label: "Read the PacketTxCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0003 + - label: "TH reads PacketTxCount attribute value from DUT" + PICS: DGETH.S.A0003 command: "readAttribute" attribute: "PacketTxCount" response: - value: 0 + constraints: + maxValue: PacketTxCount - - label: "Read the TxErrCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0004 + - label: "TH reads TxErrCount attribute value from DUT" + PICS: DGETH.S.A0004 command: "readAttribute" attribute: "TxErrCount" response: - value: 0 + constraints: + maxValue: TxErrCount - - label: "Read the CollisionCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0005 + - label: "TH reads CollisionCount attribute value from DUT" + PICS: DGETH.S.A0005 command: "readAttribute" attribute: "CollisionCount" response: - value: 0 + constraints: + maxValue: CollisionCount - - label: "Read the OverrunCount attribute" - PICS: PICS_SKIP_SAMPLE_APP && DGETH.S.A0006 + - label: "TH reads OverrunCount attribute value from DUT" + PICS: DGETH.S.A0006 command: "readAttribute" attribute: "OverrunCount" response: - value: 0 + constraints: + maxValue: OverrunCount diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index e5b7de063a3908..6f8e48563d57c9 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -191,7 +191,8 @@ tests: - label: "send Get Year Day Schedule Command to DUT and verify FAILURE response" - PICS: DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx + PICS: + PICS_SKIP_SAMPLE_APP && DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: values: @@ -206,7 +207,7 @@ tests: - name: "userIndex" value: 5 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false @@ -242,7 +243,7 @@ tests: - name: "userIndex" value: 1 - name: "status" - value: 0x01 + value: 0x8B - name: "LocalStartTime" constraints: hasValue: false diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 2a7d58187ce14e..1aa89b6818082d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads the MinLevel attribute" PICS: LVL.S.A0002 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index cdd578263c8788..6b75b0c49bf8d5 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index 1b5dafe8052829..fbf31b9ab5dfc8 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index e6ae8db8f3d6ed..b6727afd4cc85c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -41,6 +41,13 @@ tests: response: value: 1 + - label: "TH writes 0 to the Options attribute" + PICS: LVL.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + - label: "Reads Minlevel attribute from DUT" PICS: LVL.S.A0002 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml index c24059997de3a4..9f716da6798c62 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml @@ -28,42 +28,58 @@ tests: - name: "nodeId" value: nodeId - - label: "Write 1 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 0 (Normal) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: - value: 1 + value: 0 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 + response: + value: 0 + + - label: "TH write 1 (Minimum) to the OperationMode attribute to DUT" + command: "writeAttribute" + attribute: "OperationMode" + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed + arguments: + value: 1 + + - label: "TH reads from the DUT the EffectiveOperationMode attribute" + command: "readAttribute" + attribute: "EffectiveOperationMode" + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 1 - - label: "Write 2 to the OperationMode attribute to DUT: OperationMode" + - label: + "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a + time." command: "writeAttribute" attribute: "OperationMode" - PICS: PCC.S.A0020 + PICS: PCC.S.A0020 && PCC.M.ControlModeConstSpeed arguments: value: 2 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" - PICS: PCC.S.A0011 + PICS: PCC.S.A0011 && PCC.M.ControlModeConstSpeed response: value: 2 - - label: "Write 3 to the OperationMode attribute to DUT: OperationMode" + - label: "TH write 3 (Local) to the OperationMode attribute to DUT" command: "writeAttribute" attribute: "OperationMode" PICS: PCC.S.A0020 arguments: value: 3 - - label: "Reads the attribute: EffectiveOperationMode" + - label: "TH reads from the DUT the EffectiveOperationMode attribute" command: "readAttribute" attribute: "EffectiveOperationMode" PICS: PCC.S.A0011 diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index 9ed1f75e4edc23..5f42808dd13eaf 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -70,7 +70,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -83,7 +83,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -113,7 +113,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -122,7 +122,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -135,7 +135,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -144,7 +144,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -154,7 +154,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -164,7 +164,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -182,7 +182,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -193,7 +193,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -203,7 +203,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -213,7 +213,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -223,7 +223,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -242,6 +242,7 @@ tests: minValue: 1 - label: "Stop target device" + PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "Stop" @@ -249,12 +250,26 @@ tests: "Start target device with the provided discriminator for basic commissioning advertisement" cluster: "SystemCommands" + PICS: PICS_SDK_CI_ONLY command: "Start" arguments: values: - name: "discriminator" value: discriminator + - label: "TH is rebooted" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the TH and enter 'y' after TH starts" + - name: "expectedValue" + value: "y" + - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -288,7 +303,7 @@ tests: #validate the service type and the service domain not implemented in CI - label: "Check Hostname" - PICS: "(WIFI || ETH) && !THREAD" + PICS: "( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR " cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -301,7 +316,7 @@ tests: isHexString: true - label: "Check Hostname" - PICS: "PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD" + PICS: "( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR" cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -330,7 +345,7 @@ tests: value: discriminator - label: "Check Vendor ID (_V)" - PICS: VENDOR_SUBTYPE + PICS: MCORE.SC.VENDOR_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByVendorId" arguments: @@ -339,7 +354,7 @@ tests: value: vendorId - label: "Check Device Type ID (_T)" - PICS: PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE cluster: "DiscoveryCommands" command: "FindCommissionableByDeviceType" arguments: @@ -352,7 +367,7 @@ tests: command: "FindCommissionableByCommissioningMode" - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -361,7 +376,7 @@ tests: value: vendorId - label: "TXT key for Vendor ID and Product ID (VP)" - PICS: VP_KEY + PICS: MCORE.SC.VP_KEY optional: true cluster: "DiscoveryCommands" command: "FindCommissionable" @@ -371,7 +386,7 @@ tests: value: productId - label: "Optional TXT key for MRP Retry Interval Idle (CRI)" - PICS: CRI_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SII_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -381,7 +396,7 @@ tests: maxValue: 3600000 - label: "Optional TXT key for MRP Retry Interval Active (CRA)" - PICS: CRA_COMM_DISCOVERY_KEY + PICS: MCORE.SC.SAI_OP_DISCOVERY_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -399,7 +414,7 @@ tests: value: 1 - label: "Optional TXT key for device type (DT)" - PICS: PICS_SKIP_SAMPLE_APP && DT_KEY + PICS: PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -410,7 +425,7 @@ tests: maxValue: 999 - label: "Optional TXT key for device name (DN)" - PICS: DN_KEY + PICS: MCORE.SC.DN_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -420,7 +435,7 @@ tests: maxLength: 32 - label: "Optional TXT key for rotating device identifier (RI)" - PICS: RI_KEY + PICS: MCORE.SC.RI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -430,7 +445,7 @@ tests: maxValue: 100 - label: "Optional TXT key for pairing hint (PH)" - PICS: PH_KEY + PICS: MCORE.SC.PH_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: @@ -440,7 +455,7 @@ tests: notValue: 0 - label: "Optional TXT key for pairing instructions (PI)" - PICS: PI_KEY + PICS: MCORE.SC.PI_KEY cluster: "DiscoveryCommands" command: "FindCommissionable" response: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 9f3a2e932806a7..1f968549abfb96 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1435,3 +1435,15 @@ DESC.C.A0004=1 MCORE.SC.SII_OP_DISCOVERY_KEY=1 MCORE.SC.SAI_OP_DISCOVERY_KEY=1 MCORE.SC.T_KEY=1 +MCORE.SC.BLE=1 +MCORE.SC.WIFI=1 +MCORE.SC.ETH=1 +MCORE.SC.THR=1 +MCORE.SC.VENDOR_SUBTYPE=1 +MCORE.SC.DEVTYPE_SUBTYPE=1 +MCORE.SC.VP_KEY=1 +MCORE.SC.DT_KEY=1 +MCORE.SC.DN_KEY=1 +MCORE.SC.RI_KEY=1 +MCORE.SC.PH_KEY=1 +MCORE.SC.PI_KEY=1 \ No newline at end of file diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 88dacd8960c2d0..6f64749a304b7b 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -3373,11 +3373,12 @@ class Test_TC_CC_2_1Suite : public TestCommand class Test_TC_CC_3_2Suite : public TestCommand { public: - Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 30, credsIssuerConfig) + Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3392,6 +3393,7 @@ 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; @@ -3425,6 +3427,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3434,14 +3439,14 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3451,11 +3456,11 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3465,11 +3470,11 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3479,14 +3484,14 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3497,11 +3502,11 @@ class Test_TC_CC_3_2Suite : public TestCommand CurrentHueValue = value; } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3509,14 +3514,14 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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)); { uint8_t value; @@ -3526,11 +3531,11 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3540,11 +3545,11 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3554,14 +3559,14 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3572,11 +3577,11 @@ class Test_TC_CC_3_2Suite : public TestCommand CurrentHueValueAfterStopmode = value; } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3584,10 +3589,10 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueAfterStopmode)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3630,18 +3635,27 @@ class Test_TC_CC_3_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends MoveHue command to DUT with MoveMode Up"); + case 5: { + LogStep(5, "TH sends MoveHue command to DUT with MoveMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3649,52 +3663,52 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 3000ms"); + case 6: { + LogStep(6, "Wait 3000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads CurrentHue attribute from DUT several times"); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 2000"); + case 8: { + LogStep(8, "Wait 2000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentHue attribute from DUT several times"); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 3000"); + case 10: { + LogStep(10, "Wait 3000"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads CurrentHue attribute from DUT several times"); + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends MoveHue command to DUT with MoveMode Stop"); + case 12: { + LogStep(12, "TH sends MoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3702,39 +3716,39 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 1000ms"); + case 13: { + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads CurrentHue attribute from DUT several times"); + case 14: { + LogStep(14, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads CurrentHue attribute from DUT several times"); + case 16: { + LogStep(16, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "TH sends MoveHue command to DUT with MoveMode Down"); + case 17: { + LogStep(17, "TH sends MoveHue command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(3); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3742,52 +3756,52 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 17: { - LogStep(17, "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 18: { - LogStep(18, "TH reads CurrentHue attribute from DUT several times"); + case 19: { + LogStep(19, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait 1000ms"); + case 20: { + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads CurrentHue attribute from DUT several times"); + case 21: { + LogStep(21, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "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 22: { - LogStep(22, "TH reads CurrentHue attribute from DUT several times"); + 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 23: { - LogStep(23, "TH sends MoveHue command to DUT with MoveMode Stop"); + case 24: { + LogStep(24, "TH sends MoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -3795,42 +3809,42 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } - case 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "TH reads CurrentHue attribute from DUT several times"); + case 26: { + LogStep(26, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Wait 1000ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "TH reads CurrentHue attribute from DUT several times"); + case 28: { + LogStep(28, "TH reads CurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Turn off light that we turned on"); + case 29: { + LogStep(29, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -3841,11 +3855,12 @@ 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", 12, credsIssuerConfig) + Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3860,6 +3875,7 @@ 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; } @@ -3890,6 +3906,9 @@ class Test_TC_CC_3_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3899,14 +3918,14 @@ class Test_TC_CC_3_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3916,14 +3935,14 @@ class Test_TC_CC_3_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3933,10 +3952,10 @@ class Test_TC_CC_3_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 249U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3979,18 +3998,27 @@ class Test_TC_CC_3_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends StepHue command to DUT with StepMode Up"); + case 5: { + LogStep(5, "TH sends StepHue command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(1); - value.stepSize = 5U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -3999,26 +4027,26 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends StepHue command to DUT with StepMode Down"); + case 8: { + LogStep(8, "TH sends StepHue command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(3); - value.stepSize = 5U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; value.transitionTime = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -4027,29 +4055,29 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 10: { + LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4060,11 +4088,12 @@ class Test_TC_CC_3_3Suite : public TestCommand class Test_TC_CC_4_1Suite : public TestCommand { public: - Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 13, credsIssuerConfig) + Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4079,6 +4108,7 @@ class Test_TC_CC_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4109,6 +4139,9 @@ class Test_TC_CC_4_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4118,53 +4151,29 @@ class Test_TC_CC_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 90U)); - } - break; - case 11: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4207,18 +4216,27 @@ class Test_TC_CC_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentSaturation attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends MoveToSaturation command to DUT"); + case 5: { + LogStep(5, "TH sends MoveToSaturation command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 90U; - value.transitionTime = 15U; + 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::MoveToSaturation::Id, @@ -4226,55 +4244,29 @@ class Test_TC_CC_4_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 500ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } case 6: { - LogStep(6, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 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, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Wait 1000ms"); + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); + case 7: { + LogStep(7, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4285,11 +4277,12 @@ class Test_TC_CC_4_1Suite : public TestCommand class Test_TC_CC_4_2Suite : public TestCommand { public: - Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 38, credsIssuerConfig) + Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4304,6 +4297,7 @@ 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; @@ -4338,6 +4332,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4347,14 +4344,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4364,11 +4361,11 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4378,11 +4375,11 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4392,14 +4389,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4409,11 +4406,11 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4423,11 +4420,11 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4437,14 +4434,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4454,14 +4451,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4472,11 +4469,11 @@ class Test_TC_CC_4_2Suite : public TestCommand CurrentSaturationStep4d = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4484,14 +4481,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep4d)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4502,11 +4499,11 @@ class Test_TC_CC_4_2Suite : public TestCommand CurrentSaturationStep5b = value; } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4516,14 +4513,14 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentSaturationStep5b)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4534,11 +4531,11 @@ class Test_TC_CC_4_2Suite : public TestCommand CurrentSaturationStep5d = value; } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4546,10 +4543,10 @@ class Test_TC_CC_4_2Suite : public TestCommand VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep5d)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4592,18 +4589,27 @@ class Test_TC_CC_4_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentSaturation attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends MoveSaturation command to DUT with MoveMode Up"); + case 5: { + LogStep(5, "TH sends MoveSaturation command to DUT with MoveMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 15U; + 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, @@ -4611,52 +4617,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads CurrentSaturation attribute from DUT several times"); + case 7: { + LogStep(7, "TH reads CurrentSaturation attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentSaturation attribute from DUT several times"); + case 9: { + LogStep(9, "TH reads CurrentSaturation attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads CurrentSaturation attribute from DUT several times"); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends MoveSaturation command to DUT with MoveMode Down"); + case 12: { + LogStep(12, "TH sends MoveSaturation command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 10U; + 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, @@ -4664,52 +4670,52 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 1000ms"); + case 13: { + LogStep(13, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads CurrentSaturation attribute from DUT several times."); + case 14: { + LogStep(14, "TH reads CurrentSaturation attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads CurrentSaturation attribute from DUT several times."); + case 16: { + LogStep(16, "TH reads CurrentSaturation attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads CurrentSaturation attribute from DUT several times."); + case 18: { + LogStep(18, "TH reads CurrentSaturation attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation"); + 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 = 100U; + 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, @@ -4717,26 +4723,26 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 1000ms"); + case 20: { + LogStep(20, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads CurrentSaturation attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); + case 22: { + LogStep(22, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 50U; + 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, @@ -4744,39 +4750,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Wait 1000ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "TH reads CurrentSaturation attribute from DUT."); + 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 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "CurrentSaturation value Stops incrementing"); + 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 26: { - LogStep(26, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); + case 27: { + LogStep(27, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 10U; + 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, @@ -4784,39 +4790,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 1000ms"); + case 28: { + LogStep(28, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "TH reads CurrentSaturation attribute from DUT several times."); + 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 29: { - LogStep(29, "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 30: { - LogStep(30, "TH reads CurrentSaturation attribute from DUT several times."); + case 31: { + LogStep(31, "TH reads CurrentSaturation attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); + case 32: { + LogStep(32, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 10U; + 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, @@ -4824,42 +4830,42 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 32: { - LogStep(32, "Wait 1000ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TH reads CurrentSaturation attribute from DUT"); + case 34: { + LogStep(34, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 1000ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "CurrentSaturation value Stops decrementing"); + case 36: { + LogStep(36, "CurrentSaturation value Stops decrementing"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -4870,11 +4876,12 @@ class Test_TC_CC_4_2Suite : public TestCommand class Test_TC_CC_4_3Suite : public TestCommand { public: - Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 12, credsIssuerConfig) + Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4889,6 +4896,7 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4919,6 +4927,9 @@ class Test_TC_CC_4_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4928,14 +4939,14 @@ class Test_TC_CC_4_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4945,14 +4956,14 @@ class Test_TC_CC_4_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -4962,10 +4973,10 @@ class Test_TC_CC_4_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5008,18 +5019,27 @@ class Test_TC_CC_4_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentSaturation attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends StepSaturation command to DUT with StepMode Up"); + case 5: { + LogStep(5, "TH sends StepSaturation command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(1); - value.stepSize = 15U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5028,26 +5048,26 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); + case 7: { + LogStep(7, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends StepSaturation command to DUT with StepMode Down"); + case 8: { + LogStep(8, "TH sends StepSaturation command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(3); - value.stepSize = 20U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5056,29 +5076,29 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); + case 10: { + LogStep(10, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5089,11 +5109,13 @@ class Test_TC_CC_4_3Suite : public TestCommand class Test_TC_CC_4_4Suite : public TestCommand { public: - Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 11, credsIssuerConfig) + Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5108,6 +5130,8 @@ class Test_TC_CC_4_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5138,6 +5162,9 @@ class Test_TC_CC_4_4Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -5147,7 +5174,7 @@ class Test_TC_CC_4_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -5157,37 +5184,40 @@ class Test_TC_CC_4_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, + mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5230,24 +5260,33 @@ class Test_TC_CC_4_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentHue attribute from DUT."); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentSaturation attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveToHueAndSaturation command to DUT."); + case 6: { + LogStep(6, "TH sends MoveToHueAndSaturation command to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 40U; - value.saturation = 160U; + value.hue = mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5256,35 +5295,35 @@ class Test_TC_CC_4_4Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5295,11 +5334,13 @@ class Test_TC_CC_4_4Suite : public TestCommand class Test_TC_CC_5_1Suite : public TestCommand { public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 11, credsIssuerConfig) + Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5314,6 +5355,8 @@ class Test_TC_CC_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5344,6 +5387,9 @@ class Test_TC_CC_5_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5353,7 +5399,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5363,39 +5409,39 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 200U)); + VerifyOrReturn(CheckValue("currentX", value, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 300U)); + VerifyOrReturn(CheckValue("currentY", value, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5438,24 +5484,33 @@ class Test_TC_CC_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveToColor command to DUT"); + case 6: { + LogStep(6, "TH sends MoveToColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; - value.colorX = 200U; - value.colorY = 300U; + value.colorX = mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U; + value.colorY = mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5464,35 +5519,35 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1500ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5503,11 +5558,13 @@ class Test_TC_CC_5_1Suite : public TestCommand class Test_TC_CC_5_2Suite : public TestCommand { public: - Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 14, credsIssuerConfig) + Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); + AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5522,8 +5579,15 @@ class Test_TC_CC_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + uint16_t CurrentXBeforeStopCommand; + uint16_t CurrentYBeforeStopCommand; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5552,6 +5616,9 @@ class Test_TC_CC_5_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5559,9 +5626,10 @@ class Test_TC_CC_5_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5569,62 +5637,65 @@ class Test_TC_CC_5_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXBeforeStopCommand = value; } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYBeforeStopCommand = value; } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5667,24 +5738,33 @@ class Test_TC_CC_5_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveColor command to DUT"); + case 6: { + LogStep(6, "TH sends MoveColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = 15; - value.rateY = 20; + value.rateX = mRateXValue.HasValue() ? mRateXValue.Value() : 50; + value.rateY = mRateYValue.HasValue() ? mRateYValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -5692,27 +5772,27 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "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 7: { - LogStep(7, "TH reads CurrentX attribute from DUT"); + case 8: { + LogStep(8, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads CurrentY attribute from DUT"); + case 9: { + LogStep(9, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH sends StopMoveStep command to DUT"); + case 10: { + LogStep(10, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -5723,28 +5803,28 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH reads CurrentX attribute from DUT"); + case 11: { + LogStep(11, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH reads CurrentY attribute from DUT"); + case 12: { + LogStep(12, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Turn off light that we turned on"); + case 13: { + LogStep(13, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "Check on/off attribute value is false after off command"); + case 14: { + LogStep(14, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5755,11 +5835,13 @@ class Test_TC_CC_5_2Suite : public TestCommand class Test_TC_CC_5_3Suite : public TestCommand { public: - Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 11, credsIssuerConfig) + Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); + AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5774,8 +5856,13 @@ class Test_TC_CC_5_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; + uint16_t CurrentXValue; + uint16_t CurrentYValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -5804,6 +5891,9 @@ class Test_TC_CC_5_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5811,9 +5901,10 @@ class Test_TC_CC_5_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentXValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5821,39 +5912,40 @@ class Test_TC_CC_5_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + CurrentYValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5896,24 +5988,33 @@ class Test_TC_CC_5_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentX attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads CurrentY attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends StepColor command to DUT"); + case 6: { + LogStep(6, "TH sends StepColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColor::Type value; - value.stepX = 15; - value.stepY = 20; + value.stepX = mStepXConfigValue.HasValue() ? mStepXConfigValue.Value() : 100; + value.stepY = mStepYConfigValue.HasValue() ? mStepYConfigValue.Value() : 100; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -5922,35 +6023,35 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 8: { + LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -5961,7 +6062,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", 11, credsIssuerConfig) + Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6013,6 +6114,9 @@ class Test_TC_CC_6_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6023,7 +6127,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6034,7 +6138,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6044,14 +6148,14 @@ class Test_TC_CC_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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; @@ -6062,10 +6166,10 @@ class Test_TC_CC_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6108,25 +6212,34 @@ class Test_TC_CC_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Move To Color Temperature command"); + case 7: { + LogStep(7, "Move To Color Temperature command"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; @@ -6139,29 +6252,29 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1500ms"); + case 8: { + LogStep(8, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature"); + case 9: { + LogStep(9, "Read current color temprature"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Turn off light that we turned on"); + case 10: { + LogStep(10, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Check on/off attribute value is false after off command"); + case 11: { + LogStep(11, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6172,7 +6285,7 @@ class Test_TC_CC_6_1Suite : public TestCommand class Test_TC_CC_6_2Suite : public TestCommand { public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 38, credsIssuerConfig) + Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 39, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6226,6 +6339,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6236,7 +6352,7 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6247,7 +6363,7 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6257,14 +6373,14 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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; @@ -6274,11 +6390,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6288,11 +6404,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6302,14 +6418,14 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6319,11 +6435,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6333,11 +6449,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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; @@ -6347,17 +6463,17 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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)); - 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)); { uint16_t value; @@ -6368,11 +6484,11 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTemperatureValue = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6383,11 +6499,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6398,17 +6514,17 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6419,11 +6535,11 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTemperatureMoveModeStop = value; } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6434,11 +6550,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6449,10 +6565,10 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6495,25 +6611,34 @@ class Test_TC_CC_6_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + case 7: { + LogStep(7, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6528,47 +6653,47 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Read current color temprature attribute from DUT several times"); + case 9: { + LogStep(9, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Read current color temprature attribute from DUT several times"); + case 11: { + LogStep(11, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Wait 1000ms"); + case 12: { + LogStep(12, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Read current color temprature attribute from DUT several times"); + case 13: { + LogStep(13, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + case 14: { + LogStep(14, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6583,52 +6708,52 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read current color temprature attribute from DUT several times"); + case 16: { + LogStep(16, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read current color temprature attribute from DUT several times"); + case 18: { + LogStep(18, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 1000ms"); + case 19: { + LogStep(19, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Read current color temprature attribute from DUT several times"); + case 20: { + LogStep(20, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); + case 21: { + LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(1); - value.rate = 10U; + value.rate = 20U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -6638,15 +6763,15 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 21: { - LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + case 22: { + LogStep(22, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(0); - value.rate = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; + value.rate = 20U; + value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; + value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, @@ -6654,47 +6779,47 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "Wait 1000ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read current color temprature attribute from DUT several times"); + case 24: { + LogStep(24, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 1000ms"); + case 25: { + LogStep(25, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Read current color temprature attribute from DUT several times"); + case 26: { + LogStep(26, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Wait 1000ms"); + case 27: { + LogStep(27, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "Read current color temprature attribute from DUT several times"); + case 28: { + LogStep(28, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); + case 29: { + LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; @@ -6709,13 +6834,13 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 29: { - LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); + case 30: { + LogStep(30, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; value.moveMode = static_cast(0); - value.rate = 10U; + value.rate = 20U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -6725,55 +6850,55 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 30: { - LogStep(30, "Wait 1000ms"); + case 31: { + LogStep(31, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read current color temprature attribute from DUT several times"); + case 32: { + LogStep(32, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Wait 1000ms"); + case 33: { + LogStep(33, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "Read current color temprature attribute from DUT several times"); + case 34: { + LogStep(34, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 1000ms"); + case 35: { + LogStep(35, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "Read current color temprature attribute from DUT several times"); + case 36: { + LogStep(36, "Read current color temprature attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 37: { + LogStep(37, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 38: { + LogStep(38, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -6784,7 +6909,7 @@ class Test_TC_CC_6_2Suite : public TestCommand class Test_TC_CC_6_3Suite : public TestCommand { public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 22, credsIssuerConfig) + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6836,6 +6961,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6846,7 +6974,7 @@ class Test_TC_CC_6_3Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6857,7 +6985,7 @@ class Test_TC_CC_6_3Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6867,14 +6995,14 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } 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; @@ -6884,11 +7012,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6898,11 +7026,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6912,14 +7040,14 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6929,11 +7057,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6943,11 +7071,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } 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; @@ -6957,10 +7085,10 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7003,25 +7131,34 @@ class Test_TC_CC_6_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); + 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; @@ -7037,53 +7174,53 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 500ms"); + case 8: { + LogStep(8, "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"); + case 9: { + LogStep(9, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 500ms"); + case 10: { + LogStep(10, "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"); + case 11: { + LogStep(11, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Wait 500ms"); + case 12: { + LogStep(12, "Wait 700ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 700UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH reads ColorTemperatureMireds attribute from DUT several times"); + case 13: { + LogStep(13, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); + case 14: { + LogStep(14, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; value.stepMode = static_cast(3); - value.stepSize = 5U; - value.transitionTime = 50U; + value.stepSize = 100U; + value.transitionTime = 10U; value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; value.optionsMask = 0U; @@ -7093,55 +7230,55 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 500ms"); + case 15: { + LogStep(15, "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"); + case 16: { + LogStep(16, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 500ms"); + case 17: { + LogStep(17, "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"); + case 18: { + LogStep(18, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 500ms"); + case 19: { + LogStep(19, "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"); + case 20: { + LogStep(20, "TH reads ColorTemperatureMireds attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Turn off light that we turned on"); + case 21: { + LogStep(21, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 21: { - LogStep(21, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7152,11 +7289,12 @@ class Test_TC_CC_6_3Suite : public TestCommand class Test_TC_CC_7_2Suite : public TestCommand { public: - Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 24, credsIssuerConfig) + Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7171,8 +7309,12 @@ 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; } // @@ -7201,6 +7343,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7210,14 +7355,14 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7227,11 +7372,11 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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; @@ -7241,11 +7386,11 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7255,10 +7400,10 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7266,11 +7411,9 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep3b = value; } 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; @@ -7280,6 +7423,7 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep3b)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); @@ -7287,9 +7431,12 @@ class Test_TC_CC_7_2Suite : public TestCommand 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)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7299,11 +7446,11 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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; @@ -7313,10 +7460,11 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7326,10 +7474,39 @@ class Test_TC_CC_7_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + EnhancedCurrentHueStep5b = value; + } + 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, EnhancedCurrentHueStep5b)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7372,18 +7549,27 @@ class Test_TC_CC_7_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedMoveHue command to DUT with MoveMode Up"); + 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -7391,47 +7577,47 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads EnhancedCurrentHue attribute from DUT several times."); + case 7: { + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT several times."); + case 9: { + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 10: { + LogStep(10, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT several times."); + case 11: { + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; @@ -7444,19 +7630,32 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT several times"); + case 13: { + LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); + case 14: { + LogStep(14, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(3); - value.rate = 15U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -7464,47 +7663,47 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 500ms"); + case 17: { + LogStep(17, "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 EnhancedCurrentHue attribute from DUT several times"); + case 18: { + LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 500ms"); + case 19: { + LogStep(19, "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 EnhancedCurrentHue attribute from DUT several times"); + case 20: { + LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 500ms"); + case 21: { + LogStep(21, "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 EnhancedCurrentHue attribute from DUT several times"); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT several times"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); + case 23: { + LogStep(23, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; @@ -7517,22 +7716,35 @@ class Test_TC_CC_7_2Suite : public TestCommand ); } - case 21: { - LogStep(21, "TH reads EnhancedCurrentHue attribute from DUT several times."); + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT several times."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Turn off light that we turned on"); + case 25: { + LogStep(25, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT several times."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 27: { + LogStep(27, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 23: { - LogStep(23, "Check on/off attribute value is false after off command"); + case 28: { + LogStep(28, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7543,11 +7755,12 @@ class Test_TC_CC_7_2Suite : public TestCommand class Test_TC_CC_7_3Suite : public TestCommand { public: - Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 12, credsIssuerConfig) + Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7562,6 +7775,7 @@ 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; } @@ -7592,6 +7806,9 @@ class Test_TC_CC_7_3Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7601,14 +7818,14 @@ class Test_TC_CC_7_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7618,14 +7835,14 @@ class Test_TC_CC_7_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7635,10 +7852,10 @@ class Test_TC_CC_7_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7681,19 +7898,28 @@ class Test_TC_CC_7_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedStepHue command to DUT with StepMode Up"); + case 5: { + LogStep(5, "TH sends EnhancedStepHue command to DUT with StepMode Up"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; value.stepMode = static_cast(0); - value.stepSize = 50U; - value.transitionTime = 1U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, @@ -7701,27 +7927,27 @@ class Test_TC_CC_7_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + case 7: { + LogStep(7, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends EnhancedStepHue command to DUT with StepMode Down"); + case 8: { + LogStep(8, "TH sends EnhancedStepHue command to DUT with StepMode Down"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; value.stepMode = static_cast(1); - value.stepSize = 75U; - value.transitionTime = 1U; + value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; + value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, @@ -7729,29 +7955,29 @@ class Test_TC_CC_7_3Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); + case 10: { + LogStep(10, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 12: { + LogStep(12, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7762,11 +7988,13 @@ class Test_TC_CC_7_3Suite : public TestCommand class Test_TC_CC_7_4Suite : public TestCommand { public: - Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 9, credsIssuerConfig) + Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7781,6 +8009,8 @@ class Test_TC_CC_7_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -7811,6 +8041,9 @@ class Test_TC_CC_7_4Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7820,28 +8053,29 @@ class Test_TC_CC_7_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1200U)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7884,18 +8118,27 @@ class Test_TC_CC_7_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends EnhancedMoveToHueAndSaturation command to DUT"); + 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 = 1200U; - value.saturation = 90U; + value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U; + value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; value.transitionTime = 10U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -7904,29 +8147,29 @@ class Test_TC_CC_7_4Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 1500ms"); + case 6: { + LogStep(6, "Wait 1500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); + case 7: { + LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Turn off light that we turned on"); + case 8: { + LogStep(8, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 8: { - LogStep(8, "Check on/off attribute value is false after off command"); + case 9: { + LogStep(9, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -7937,11 +8180,16 @@ class Test_TC_CC_7_4Suite : public TestCommand class Test_TC_CC_8_1Suite : public TestCommand { public: - Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 38, credsIssuerConfig) + Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 41, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -7956,6 +8204,11 @@ class Test_TC_CC_8_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; uint8_t CurrentHueValue; @@ -7996,6 +8249,9 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8005,10 +8261,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8019,11 +8275,11 @@ class Test_TC_CC_8_1Suite : public TestCommand CurrentHueValue = value; } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8034,10 +8290,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8047,10 +8303,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8061,11 +8317,11 @@ class Test_TC_CC_8_1Suite : public TestCommand CurrentSaturationValue = value; } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8076,10 +8332,14 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8089,7 +8349,7 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8099,10 +8359,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8113,7 +8373,7 @@ class Test_TC_CC_8_1Suite : public TestCommand CurrentXValue = value; } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8124,11 +8384,11 @@ class Test_TC_CC_8_1Suite : public TestCommand CurrentYValue = value; } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8139,7 +8399,7 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 23: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8150,10 +8410,14 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8163,10 +8427,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 26: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8177,11 +8441,11 @@ class Test_TC_CC_8_1Suite : public TestCommand ColorTemperatureMiredsValue = value; } break; - case 28: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8192,10 +8456,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 30: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8205,10 +8469,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 32: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8219,11 +8483,11 @@ class Test_TC_CC_8_1Suite : public TestCommand EnhancedCurrentHueValue = value; } break; - case 34: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8234,10 +8498,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 36: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8280,12 +8544,21 @@ class Test_TC_CC_8_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH sends MoveHue command to DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH sends MoveHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -8293,14 +8566,14 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH reads CurrentHue attribute from DUT"); + case 5: { + LogStep(5, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends StopMoveStep command to DUT"); + case 6: { + LogStep(6, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -8311,32 +8584,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH reads CurrentHue attribute from DUT"); + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Wait 100ms"); + case 8: { + LogStep(8, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentHue attribute from DUT"); + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH sends MoveSaturation command to DUT"); + case 10: { + LogStep(10, "TH sends MoveSaturation command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -8344,14 +8617,14 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH reads CurrentSaturation attribute from DUT"); + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends StopMoveStep command to DUT"); + case 12: { + LogStep(12, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -8362,32 +8635,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH reads CurrentSaturation attribute from DUT"); + case 13: { + LogStep(13, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait 100ms"); + case 14: { + LogStep(14, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads CurrentSaturation attribute from DUT"); + case 15: { + LogStep(15, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH sends MoveColor command to DUT"); + case 16: { + LogStep(16, "TH sends MoveColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = 15; - value.rateY = 20; + value.rateX = mRateXConfigValue.HasValue() ? mRateXConfigValue.Value() : 50; + value.rateY = mRateYConfigValue.HasValue() ? mRateYConfigValue.Value() : 50; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -8395,20 +8668,27 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH reads CurrentX attribute from DUT"); + case 17: { + LogStep(17, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "TH reads CurrentY attribute from DUT"); + case 19: { + LogStep(19, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH sends StopMoveStep command to DUT"); + case 20: { + LogStep(20, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -8419,61 +8699,70 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "TH reads CurrentX attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH reads CurrentY attribute from DUT"); + case 22: { + LogStep(22, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 100ms"); + case 23: { + LogStep(23, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH reads CurrentY attribute from DUT"); + case 24: { + LogStep(24, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads CurrentY attribute from DUT"); + case 25: { + LogStep(25, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH sends MoveColorTemperature command to DUT"); + case 26: { + LogStep(26, "TH sends MoveColorTemperature command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = 10U; - value.colorTemperatureMinimumMireds = 1U; - value.colorTemperatureMaximumMireds = 255U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.moveMode = static_cast(1); + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.colorTemperatureMinimumMireds = + mColorTemperatureMinMiredsConfigValue.HasValue() ? mColorTemperatureMinMiredsConfigValue.Value() : 1U; + value.colorTemperatureMaximumMireds = + mColorTemperatureMaxMiredsConfigValue.HasValue() ? mColorTemperatureMaxMiredsConfigValue.Value() : 255U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional ); } - case 25: { - LogStep(25, "TH reads ColorTemperatureMireds attribute from DUT"); + case 27: { + LogStep(27, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 28: { + LogStep(28, "TH reads ColorTemperatureMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends StopMoveStep command to DUT"); + case 29: { + LogStep(29, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -8484,32 +8773,32 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "TH reads ColorTemperatureMireds attribute from DUT"); + case 30: { + LogStep(30, "TH reads ColorTemperatureMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Wait 100ms"); + case 31: { + LogStep(31, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Reads current color attribute value matched the value sent by the last attribute"); + case 32: { + LogStep(32, "Reads current color attribute value matched the value sent by the last attribute"); VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "TH sends EnhancedMoveHue command to DUT."); + case 33: { + LogStep(33, "TH sends EnhancedMoveHue command to DUT."); VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 50U; + value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -8517,14 +8806,14 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 31: { - LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT"); + case 34: { + LogStep(34, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "TH sends StopMoveStep command to DUT"); + case 35: { + LogStep(35, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -8535,35 +8824,35 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT"); + case 36: { + LogStep(36, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait 100ms"); + case 37: { + LogStep(37, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "TH reads EnhancedCurrentHue attribute from DUT"); + case 38: { + LogStep(38, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Turn off light that we turned on"); + case 39: { + LogStep(39, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 40: { + LogStep(40, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -10193,7 +10482,7 @@ class Test_TC_DGETH_2_1Suite : public TestCommand class Test_TC_DGETH_2_2Suite : public TestCommand { public: - Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 7, credsIssuerConfig) + Test_TC_DGETH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_2_2", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10214,6 +10503,12 @@ class Test_TC_DGETH_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint64_t PacketRxCount; + uint64_t PacketTxCount; + uint64_t TxErrCount; + uint64_t CollisionCount; + uint64_t OverrunCount; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -10232,45 +10527,185 @@ class Test_TC_DGETH_2_2Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetRxCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("packetTxCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("txErrCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint64_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("collisionCount", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); + } + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("overrunCount", value, 0ULL)); + PacketRxCount = value; + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + PacketTxCount = value; + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TxErrCount = value; + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CollisionCount = value; + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + OverrunCount = value; + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketRxCount)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, PacketTxCount)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, TxErrCount)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, CollisionCount)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMaxValue("value", value, OverrunCount)); } break; default: @@ -10296,8 +10731,98 @@ class Test_TC_DGETH_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sends ResetCounts command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads PHYRate attribute from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PHYRate::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads PacketRxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads PacketTxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads TxErrCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads CollisionCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads OverrunCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, + EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "Sends ResetCounts command"); + VerifyOrDo(!ShouldSkip("DGETH.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, @@ -10305,33 +10830,33 @@ class Test_TC_DGETH_2_2Suite : public TestCommand ); } - case 2: { - LogStep(2, "Read the PacketRxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "TH reads PacketRxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Read the PacketTxCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "TH reads PacketTxCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the TxErrCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads TxErrCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the CollisionCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads CollisionCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the OverrunCount attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH reads OverrunCount attribute value from DUT"); + VerifyOrDo(!ShouldSkip("DGETH.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), EthernetNetworkDiagnostics::Id, EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, true, chip::NullOptional); } @@ -13771,7 +14296,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 20, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13820,6 +14345,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13829,7 +14357,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13839,14 +14367,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13854,14 +14382,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13869,14 +14397,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 100U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13884,7 +14412,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 128U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -13894,14 +14422,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -13909,10 +14437,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -13957,19 +14485,28 @@ class Test_TC_LVL_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads the MinLevel attribute"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads the MinLevel attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Reads the MaxLevel attribute"); + case 5: { + LogStep(5, "Reads the MaxLevel attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "sends a MoveToLevelWithOnOff command"); + case 6: { + LogStep(6, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -13980,21 +14517,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 100ms"); + case 7: { + LogStep(7, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Reads CurrentLevel attribute from DUT"); + case 8: { + LogStep(8, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "sends a Move to level command"); + case 9: { + LogStep(9, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -14007,21 +14544,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Wait 100 ms"); + case 10: { + LogStep(10, "Wait 100 ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "sends a Move to level command"); + case 12: { + LogStep(12, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -14034,28 +14571,28 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 11000ms"); + case 13: { + LogStep(13, "Wait 11000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads the OnOffTransitionTime attribute from the DUT"); + case 15: { + LogStep(15, "Reads the OnOffTransitionTime attribute from the DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "sends a Move to level command"); + case 16: { + LogStep(16, "sends a Move to level command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -14068,21 +14605,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "Wait 1000ms"); + case 17: { + LogStep(17, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Reads CurrentLevel attribute from DUT"); + case 18: { + LogStep(18, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Precondition send Off Command"); + case 19: { + LogStep(19, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14090,8 +14627,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "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); } @@ -14103,7 +14640,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand class Test_TC_LVL_4_1Suite : public TestCommand { public: - Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 20, credsIssuerConfig) + Test_TC_LVL_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_4_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14156,6 +14693,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14166,10 +14706,10 @@ class Test_TC_LVL_4_1Suite : public TestCommand MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14180,18 +14720,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand MaxlevelValue = value; } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14199,18 +14739,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, MaxlevelValue)); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14220,7 +14760,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -14231,12 +14771,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand DefaultMoveRateValue = value; } break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -14244,8 +14780,12 @@ class Test_TC_LVL_4_1Suite : public TestCommand break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14290,13 +14830,22 @@ class Test_TC_LVL_4_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "sends a MoveToLevelWithOnOff command"); + case 5: { + LogStep(5, "sends a MoveToLevelWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -14307,14 +14856,14 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "reads max level attribute from DUT"); + case 6: { + LogStep(6, "reads max level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "sends a Move up command"); + case 7: { + LogStep(7, "sends a Move up command"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -14327,8 +14876,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate " "and completes moving to its maximum level"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -14339,21 +14888,21 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Wait 9000ms"); + case 9: { + LogStep(9, "Wait 9000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Reads CurrentLevel attribute from DUT"); + case 10: { + LogStep(10, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "sends a Move command"); + case 11: { + LogStep(11, "sends a Move command"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -14366,8 +14915,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate " "and complete moving to its minimum level"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -14378,27 +14927,27 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "reads CurrentLevel attribute from DUT"); + case 14: { + LogStep(14, "reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "reads default move rate attribute from DUT"); + case 15: { + LogStep(15, "reads default move rate attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "sends a Move up command at default move rate"); + case 16: { + LogStep(16, "sends a Move up command at default move rate"); VerifyOrDo(!ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -14411,15 +14960,15 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "Wait 500ms"); + case 17: { + LogStep(17, "Wait 500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, + case 18: { + LogStep(18, "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum " "level"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014"), @@ -14431,8 +14980,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Precondition send Off Command"); + case 19: { + LogStep(19, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14440,8 +14989,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "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); } @@ -14453,7 +15002,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand class Test_TC_LVL_5_1Suite : public TestCommand { public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 17, credsIssuerConfig) + Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14505,6 +15054,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14515,13 +15067,13 @@ class Test_TC_LVL_5_1Suite : public TestCommand MinlevelValue = value; } break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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; @@ -14533,7 +15085,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand CurrentlevelValue = value; } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14544,14 +15096,14 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14561,14 +15113,14 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 68U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14576,7 +15128,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14584,10 +15136,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 2U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14632,13 +15184,22 @@ class Test_TC_LVL_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -14649,8 +15210,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); + case 6: { + LogStep(6, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -14661,20 +15222,20 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Reads current level attribute from DUT"); + case 7: { + LogStep(7, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Reads current level attribute from DUT"); + case 8: { + LogStep(8, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Sends step up command to DUT"); + case 9: { + LogStep(9, "Sends step up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; @@ -14688,22 +15249,22 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Wait 4000ms"); + case 10: { + LogStep(10, "Wait 4000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads current level attribute from DUT"); + case 11: { + LogStep(11, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends a StepWithOnOff command"); + case 12: { + LogStep(12, "Sends a StepWithOnOff command"); VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; @@ -14715,29 +15276,29 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 4000ms"); + case 13: { + LogStep(13, "Wait 4000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Reads current level attribute from DUT"); + case 14: { + LogStep(14, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads current level attribute from DUT"); + case 15: { + LogStep(15, "Reads current level attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Precondition send Off Command"); + case 16: { + LogStep(16, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -14745,8 +15306,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 16: { - LogStep(16, "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); } @@ -14758,7 +15319,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 18, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14810,6 +15371,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14820,10 +15384,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand MinlevelValue = value; } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14833,21 +15397,21 @@ class Test_TC_LVL_6_1Suite : public TestCommand CurrentLevelValue = value; } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14857,21 +15421,21 @@ class Test_TC_LVL_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -14881,10 +15445,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -14929,13 +15493,22 @@ class Test_TC_LVL_6_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads Minlevel attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Reads Minlevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Sends MoveToLevelWithOnOff command to DUT"); + case 5: { + LogStep(5, "Sends MoveToLevelWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -14946,14 +15519,14 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Reads CurrentLevel attribute from DUT"); + case 6: { + LogStep(6, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Sends a move up command to DUT"); + case 7: { + LogStep(7, "Sends a move up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -14966,15 +15539,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 5000ms"); + case 8: { + LogStep(8, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Sends stop command to DUT"); + case 9: { + LogStep(9, "Sends stop command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; @@ -14985,8 +15558,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Physically verify that the device has stopped transitioning"); + case 10: { + LogStep(10, "Physically verify that the device has stopped transitioning"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -14995,15 +15568,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends a move up command to DUT"); + case 12: { + LogStep(12, "Sends a move up command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; @@ -15016,15 +15589,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Sends StopWithOnOff command to DUT"); + case 14: { + LogStep(14, "Sends StopWithOnOff command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type value; @@ -15033,8 +15606,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Physically verify that the device has stopped transitioning"); + case 15: { + LogStep(15, "Physically verify that the device has stopped transitioning"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -15043,15 +15616,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Reads CurrentLevel attribute from DUT"); + case 16: { + LogStep(16, "Reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Precondition send Off Command"); + case 17: { + LogStep(17, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -15059,8 +15632,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 17: { - LogStep(17, "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); } @@ -25189,7 +25762,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand class Test_TC_PCC_2_2Suite : public TestCommand { public: - Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 7, credsIssuerConfig) + Test_TC_PCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_2_2", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25234,7 +25807,7 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); } break; case 3: @@ -25245,13 +25818,24 @@ class Test_TC_PCC_2_2Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; @@ -25282,39 +25866,55 @@ class Test_TC_PCC_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Write 1 to the OperationMode attribute to DUT: OperationMode"); + LogStep(1, "TH write 0 (Normal) to the OperationMode attribute to DUT"); VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; - value = static_cast(1); + value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "Reads the attribute: EffectiveOperationMode"); + LogStep(2, "TH reads from the DUT the EffectiveOperationMode attribute"); VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Write 2 to the OperationMode attribute to DUT: OperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH write 1 (Minimum) to the OperationMode attribute to DUT"); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; - value = static_cast(2); + value = static_cast(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "Reads the attribute: EffectiveOperationMode"); - VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(4, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Write 3 to the OperationMode attribute to DUT: OperationMode"); + LogStep(5, "TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time."); + VerifyOrDo(!ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads from the DUT the EffectiveOperationMode attribute"); + VerifyOrDo(!ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH write 3 (Local) to the OperationMode attribute to DUT"); VerifyOrDo(!ShouldSkip("PCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; @@ -25323,8 +25923,8 @@ class Test_TC_PCC_2_2Suite : public TestCommand PumpConfigurationAndControl::Attributes::OperationMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Reads the attribute: EffectiveOperationMode"); + case 8: { + LogStep(8, "TH reads from the DUT the EffectiveOperationMode attribute"); VerifyOrDo(!ShouldSkip("PCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, true, chip::NullOptional); @@ -26295,7 +26895,7 @@ class Test_TC_RH_2_1Suite : public TestCommand class Test_TC_SC_4_2Suite : public TestCommand { public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 46, credsIssuerConfig) + Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26563,8 +27163,12 @@ class Test_TC_SC_4_2Suite : public TestCommand break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26577,7 +27181,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26589,7 +27193,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26601,7 +27205,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26609,7 +27213,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26617,7 +27221,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26625,7 +27229,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26633,7 +27237,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26641,7 +27245,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26650,7 +27254,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 34: + case 35: if (IsUnsupported(status.mStatus)) { shouldContinue = true; @@ -26664,7 +27268,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26677,7 +27281,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26690,7 +27294,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26699,7 +27303,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26709,7 +27313,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26718,7 +27322,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26727,7 +27331,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26736,7 +27340,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26745,7 +27349,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; @@ -26754,11 +27358,11 @@ class Test_TC_SC_4_2Suite : public TestCommand } shouldContinue = true; break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -26805,14 +27409,15 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 3: { LogStep(3, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 4: { LogStep(4, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; @@ -26834,7 +27439,7 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 7: { LogStep(7, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; @@ -26842,7 +27447,8 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 8: { LogStep(8, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 5ULL; @@ -26856,28 +27462,28 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 10: { LogStep(10, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 11: { LogStep(11, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 12: { LogStep(12, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 13: { LogStep(13, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); @@ -26890,35 +27496,35 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 15: { LogStep(15, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 16: { LogStep(16, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 17: { LogStep(17, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 18: { LogStep(18, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 19: { LogStep(19, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); @@ -26931,12 +27537,14 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 21: { LogStep(21, "Stop target device"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Stop::Type value; return Stop(kIdentityAlpha, value); } case 22: { LogStep(22, "Start target device with the provided discriminator for basic commissioning advertisement"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Start::Type value; value.discriminator.Emplace(); @@ -26944,14 +27552,25 @@ class Test_TC_SC_4_2Suite : public TestCommand return Start(kIdentityAlpha, value); } case 23: { - LogStep(23, "Wait for the commissioned device to be retrieved"); + LogStep(23, "TH is rebooted"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please reboot the TH and enter 'y' after TH startsgarbage: not in length on purpose", 50); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Open Commissioning Window"); + case 25: { + LogStep(25, "Open Commissioning Window"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -26961,140 +27580,142 @@ class Test_TC_SC_4_2Suite : public TestCommand ); } - case 25: { - LogStep(25, "Check Instance Name"); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 26: { - LogStep(26, "Check Hostname"); - VerifyOrDo(!ShouldSkip("(WIFI || ETH) && !THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Check Instance Name"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 27: { LogStep(27, "Check Hostname"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (!WIFI && !ETH) && THREAD"), + VerifyOrDo(!ShouldSkip("( MCORE.SC.WIFI || MCORE.SC.ETH ) && !MCORE.SC.THR "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 28: { - LogStep(28, "Check Long Discriminator _L"); + LogStep(28, "Check Hostname"); + VerifyOrDo(!ShouldSkip("( !MCORE.SC.WIFI && !MCORE.SC.ETH ) && MCORE.SC.THR"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 29: { + LogStep(29, "Check Long Discriminator _L"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Check Short Discriminator (_S)"); + case 30: { + LogStep(30, "Check Short Discriminator (_S)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); } - case 30: { - LogStep(30, "Check Vendor ID (_V)"); - VerifyOrDo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "Check Vendor ID (_V)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; return FindCommissionableByVendorId(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Check Device Type ID (_T)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DEVTYPE_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 32: { + LogStep(32, "Check Device Type ID (_T)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DEVTYPE_SUBTYPE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type value; value.value = mDeviceType.HasValue() ? mDeviceType.Value() : 5ULL; return FindCommissionableByDeviceType(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Check Commissioning Mode (_CM)"); + case 33: { + LogStep(33, "Check Commissioning Mode (_CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; return FindCommissionableByCommissioningMode(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; - return FindCommissionable(kIdentityAlpha, value); - } case 34: { LogStep(34, "TXT key for Vendor ID and Product ID (VP)"); - VerifyOrDo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 35: { - LogStep(35, "Optional TXT key for MRP Retry Interval Idle (CRI)"); - VerifyOrDo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(35, "TXT key for Vendor ID and Product ID (VP)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 36: { - LogStep(36, "Optional TXT key for MRP Retry Interval Active (CRA)"); - VerifyOrDo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(36, "Optional TXT key for MRP Retry Interval Idle (CRI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.SII_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 37: { - LogStep(37, "TXT key for commissioning mode (CM)"); + LogStep(37, "Optional TXT key for MRP Retry Interval Active (CRA)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.SAI_OP_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 38: { - LogStep(38, "Optional TXT key for device type (DT)"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(38, "TXT key for commissioning mode (CM)"); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 39: { - LogStep(39, "Optional TXT key for device name (DN)"); - VerifyOrDo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(39, "Optional TXT key for device type (DT)"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MCORE.SC.DT_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 40: { - LogStep(40, "Optional TXT key for rotating device identifier (RI)"); - VerifyOrDo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(40, "Optional TXT key for device name (DN)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 41: { - LogStep(41, "Optional TXT key for pairing hint (PH)"); - VerifyOrDo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(41, "Optional TXT key for rotating device identifier (RI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 42: { - LogStep(42, "Optional TXT key for pairing instructions (PI)"); - VerifyOrDo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(42, "Optional TXT key for pairing hint (PH)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 43: { - LogStep(43, "Check IPs"); + LogStep(43, "Optional TXT key for pairing instructions (PI)"); + VerifyOrDo(!ShouldSkip("MCORE.SC.PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; return FindCommissionable(kIdentityAlpha, value); } case 44: { - LogStep(44, "TH adds an unknown key/value pair in the advertised data"); + LogStep(44, "Check IPs"); + ListFreer listFreer; + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); + } + case 45: { + LogStep(45, "TH adds an unknown key/value pair in the advertised data"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -27105,8 +27726,8 @@ class Test_TC_SC_4_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 45: { - LogStep(45, "Scan for DNS-SD commissioner advertisements from TH"); + case 46: { + LogStep(46, "Scan for DNS-SD commissioner advertisements from TH"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -62962,7 +63583,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 10U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 5U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } @@ -62977,7 +63598,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); VerifyOrReturn(CheckConstraintHasValue("value.localEndTime", value.localEndTime, false)); } @@ -63126,7 +63747,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand } case 9: { LogStep(9, "send Get Year Day Schedule Command to DUT and verify FAILURE response"); - VerifyOrDo(!ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; @@ -82589,12 +83210,16 @@ 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", 34, credsIssuerConfig) + Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 35, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("hueShortestDistance", 0, UINT8_MAX, &mHueShortestDistance); + AddArgument("hueLongestDistance", 0, UINT8_MAX, &mHueLongestDistance); + AddArgument("hueDirectionUp", 0, UINT8_MAX, &mHueDirectionUp); + AddArgument("hueDirectionDown", 0, UINT8_MAX, &mHueDirectionDown); } ~Test_TC_CC_3_1Suite() {} @@ -82606,6 +83231,10 @@ 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; } @@ -82635,6 +83264,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82644,14 +83276,14 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82661,11 +83293,11 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82675,26 +83307,27 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 150U)); + VerifyOrReturn( + CheckValue("currentHue", value, mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82704,11 +83337,11 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82718,26 +83351,27 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 200U)); + VerifyOrReturn( + CheckValue("currentHue", value, mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82747,11 +83381,11 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82761,26 +83395,26 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 250U)); + VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82790,11 +83424,11 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -82804,22 +83438,22 @@ class Test_TC_CC_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 200U)); + VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -82862,17 +83496,26 @@ class Test_TC_CC_3_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads CurrentHue attribute from DUT"); + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH sends MoveToHue command to DUT another Hue with Direction Shortest distance and TransitionTime 300"); + case 5: { + LogStep(5, "TH sends MoveToHue command to DUT another Hue with Direction Shortest distance and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 150U; + value.hue = mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U; value.direction = static_cast(0); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82882,51 +83525,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 5000ms"); + case 6: { + LogStep(6, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + 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 7: { - LogStep(7, "Wait 5000ms"); + case 8: { + LogStep(8, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 9: { + LogStep(9, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 20s"); + case 10: { + LogStep(10, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 11: { + LogStep(11, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends MoveToHue command to DUT another Hue with Direction Longest distance and TransitionTime 300"); + case 12: { + LogStep(12, "TH sends MoveToHue command to DUT another Hue with Direction Longest distance and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; + value.hue = mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U; value.direction = static_cast(1); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82936,51 +83579,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 5000ms"); + case 13: { + LogStep(13, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + case 14: { + LogStep(14, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait 5000ms"); + case 15: { + LogStep(15, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + case 16: { + LogStep(16, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 20s"); + case 17: { + LogStep(17, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); + case 18: { + LogStep(18, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH sends MoveToHue command to DUT another Hue with Direction Up and TransitionTime 300"); + case 19: { + LogStep(19, "TH sends MoveToHue command to DUT another Hue with Direction Up and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 250U; + value.hue = mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U; value.direction = static_cast(2); value.transitionTime = 300U; value.optionsMask = 0U; @@ -82990,51 +83633,51 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 5000ms"); + case 20: { + LogStep(20, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 21: { + LogStep(21, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait 5000ms"); + case 22: { + LogStep(22, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 23: { + LogStep(23, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait 20s"); + case 24: { + LogStep(24, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 25: { + LogStep(25, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "TH sends MoveToHue command to DUT another Hue with Direction Down and TransitionTime 300"); + case 26: { + LogStep(26, "TH sends MoveToHue command to DUT another Hue with Direction Down and TransitionTime 300"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; + value.hue = mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U; value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83044,55 +83687,55 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "Wait 5000ms"); + case 27: { + LogStep(27, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 27: { - LogStep(27, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 28: { + LogStep(28, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Wait 5000ms"); + case 29: { + LogStep(29, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 30: { + LogStep(30, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait 20s"); + case 31: { + LogStep(31, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); + case 32: { + LogStep(32, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Turn off light that we turned on"); + case 33: { + LogStep(33, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 33: { - LogStep(33, "Check on/off attribute value is false after off command"); + case 34: { + LogStep(34, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -83103,12 +83746,17 @@ 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", 35, credsIssuerConfig) + Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 36, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); + AddArgument("EnhancedHueShortestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueShortestDistanceConfigValue); + AddArgument("EnhancedHueLongestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueLongestDistanceConfigValue); + AddArgument("EnhancedHueDirectionUpConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionUpConfigValue); + AddArgument("EnhancedHueDirectionDownConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionDownConfigValue); } ~Test_TC_CC_7_1Suite() {} @@ -83120,6 +83768,11 @@ 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; } @@ -83152,23 +83805,28 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83178,11 +83836,11 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83192,29 +83850,31 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1100U)); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83224,11 +83884,11 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83238,29 +83898,31 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1150U)); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83270,11 +83932,11 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83284,29 +83946,31 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + 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, 1200U)); + VerifyOrReturn( + CheckValue("enhancedCurrentHue", value, + mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83316,11 +83980,11 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83330,25 +83994,27 @@ class Test_TC_CC_7_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 1300U)); + VerifyOrReturn(CheckValue( + "enhancedCurrentHue", value, + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -83391,11 +84057,20 @@ class Test_TC_CC_7_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH sends EnhancedMoveToHue command to DUT"); + 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"); 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 = 1025U; + value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U; value.direction = static_cast(0); value.transitionTime = 0U; value.optionsMask = 0U; @@ -83405,18 +84080,19 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); + 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 5: { - LogStep(5, "TH sends EnhancedMoveToHue command to DUT"); + case 6: { + LogStep(6, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1100U; + value.enhancedHue = + mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U; value.direction = static_cast(0); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83426,51 +84102,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 5500ms"); + case 7: { + LogStep(7, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 8: { + LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Wait 5500ms"); + case 9: { + LogStep(9, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 10: { + LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Wait 20s"); + case 11: { + LogStep(11, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 12: { + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH sends EnhancedMoveToHue command to DUT"); + case 13: { + LogStep(13, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1150U; + value.enhancedHue = + mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U; value.direction = static_cast(1); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83480,52 +84157,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 5500ms"); + case 14: { + LogStep(14, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait 5500ms"); + case 16: { + LogStep(16, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 17: { + LogStep(17, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 20s"); + case 18: { + LogStep(18, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 19: { + LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "TH sends EnhancedMoveToHue command to DUT"); + case 20: { + LogStep(20, "TH sends EnhancedMoveToHue command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1200U; - value.direction = static_cast(2); + value.enhancedHue = mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U; + value.direction = static_cast(2); value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -83534,51 +84211,52 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 20: { - LogStep(20, "Wait 5500ms"); + case 21: { + LogStep(21, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait 5500ms"); + case 23: { + LogStep(23, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait 20s"); + case 25: { + LogStep(25, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends EnhancedMoveToHue command to DUT "); + case 27: { + LogStep(27, "TH sends EnhancedMoveToHue command to DUT "); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 1300U; + value.enhancedHue = + mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U; value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; @@ -83588,55 +84266,55 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 5500ms"); + case 28: { + LogStep(28, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 29: { + LogStep(29, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Wait 5500ms"); + case 30: { + LogStep(30, "Wait 5500ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5500UL; return WaitForMs(kIdentityAlpha, value); } - case 30: { - LogStep(30, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 31: { + LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Wait 20s"); + case 32: { + LogStep(32, "Wait 20s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 20000UL; return WaitForMs(kIdentityAlpha, value); } - case 32: { - LogStep(32, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 33: { + LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT periodically"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Turn off light that we turned on"); + case 34: { + LogStep(34, "Turn off light that we turned on"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 34: { - LogStep(34, "Check on/off attribute value is false after off command"); + case 35: { + LogStep(35, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -83647,7 +84325,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", 72, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 73, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -83712,6 +84390,9 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83719,10 +84400,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83730,10 +84411,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83741,10 +84422,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83752,10 +84433,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83763,7 +84444,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83771,11 +84452,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83783,7 +84464,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep5d = value; } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83793,11 +84474,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83807,10 +84488,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83818,7 +84499,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83826,7 +84507,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep6c = value; } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83834,10 +84515,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83845,10 +84526,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83856,7 +84537,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83864,11 +84545,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83876,7 +84557,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep8d = value; } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83886,11 +84567,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83900,10 +84581,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83911,7 +84592,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83919,7 +84600,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep9c = value; } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83927,14 +84608,14 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83942,10 +84623,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83953,10 +84634,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -83964,7 +84645,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83972,11 +84653,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83984,7 +84665,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep12d = value; } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -83994,11 +84675,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84008,10 +84689,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84019,7 +84700,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 54: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84027,7 +84708,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep13c = value; } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84035,10 +84716,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); } break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 57: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84046,10 +84727,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84057,7 +84738,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84065,11 +84746,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84077,7 +84758,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep15d = value; } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84087,11 +84768,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84101,10 +84782,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 66: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 67: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84112,7 +84793,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 68: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84120,7 +84801,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep16b = value; } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84128,10 +84809,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); } break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 71: + case 72: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -84196,7 +84877,16 @@ class Test_TC_CC_9_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84212,15 +84902,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Sends ColorLoopSet Command - Set all Attributes"); + case 8: { + LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84236,15 +84926,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT"); + case 9: { + LogStep(9, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Sends ColorLoopSet Command - Set all Attributes"); + case 10: { + LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84260,15 +84950,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Read ColorLoopTime attribute from DUT"); + case 11: { + LogStep(11, "Read ColorLoopTime attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends ColorLoopSet Command - Set all Attributes"); + case 12: { + LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84284,15 +84974,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 13: { + LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Sends ColorLoopSet Command - Set all Attributes"); + case 14: { + LogStep(14, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84308,57 +84998,57 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Read ColorLoopActive attribute from DUT"); + case 15: { + LogStep(15, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 16: { + LogStep(16, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 18: { + LogStep(18, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); + case 19: { + LogStep(19, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait for 30S"); + case 20: { + LogStep(20, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); + case 21: { + LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Sends ColorLoopSet Command - Set all Attributes"); + case 22: { + LogStep(22, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84374,29 +85064,29 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 22: { - LogStep(22, "Read ColorLoopActive attribute from DUT"); + case 23: { + LogStep(23, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 24: { + LogStep(24, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); + case 25: { + LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Sends ColorLoopSet Command - Set all Attributes"); + case 26: { + LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84412,15 +85102,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopDirection attribute from DUT"); + case 27: { + LogStep(27, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Sends ColorLoopSet Command - Set all Attributes"); + case 28: { + LogStep(28, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84436,57 +85126,57 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "Read ColorLoopActive attribute from DUT"); + case 29: { + LogStep(29, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 30: { + LogStep(30, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait for 30S"); + case 31: { + LogStep(31, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 32: { + LogStep(32, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Read EnhancedCurrentHue attribute from DUT"); + case 33: { + LogStep(33, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Wait for 30S"); + case 34: { + LogStep(34, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 34: { - LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); + case 35: { + LogStep(35, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Sends ColorLoopSet Command - Set all Attributes"); + case 36: { + LogStep(36, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84502,29 +85192,29 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 36: { - LogStep(36, "Read ColorLoopActive attribute from DUT"); + case 37: { + LogStep(37, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 38: { + LogStep(38, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read EnhancedCurrentHue attribute from DUT"); + case 39: { + LogStep(39, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Enhanced Move To Hue command"); + case 40: { + LogStep(40, "Enhanced Move To Hue command"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; @@ -84538,22 +85228,22 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "Wait 1000ms"); + case 41: { + LogStep(41, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 41: { - LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); + case 42: { + LogStep(42, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Sends ColorLoopSet Command - Set all Attributes"); + case 43: { + LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84569,15 +85259,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "Read ColorLoopDirection attribute from DUT"); + case 44: { + LogStep(44, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Sends ColorLoopSet Command - Set all Attributes"); + case 45: { + LogStep(45, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84593,57 +85283,57 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 45: { - LogStep(45, "Read ColorLoopActive attribute from DUT"); + case 46: { + LogStep(46, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 47: { + LogStep(47, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Wait for 30S"); + case 48: { + LogStep(48, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 48: { - LogStep(48, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 49: { + LogStep(49, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Read EnhancedCurrentHue attribute from DUT"); + case 50: { + LogStep(50, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Wait for 30S"); + case 51: { + LogStep(51, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 51: { - LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); + case 52: { + LogStep(52, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "Sends ColorLoopSet Command - Set all Attributes"); + case 53: { + LogStep(53, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84659,29 +85349,29 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 53: { - LogStep(53, "Read ColorLoopActive attribute from DUT"); + case 54: { + LogStep(54, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 55: { + LogStep(55, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Read EnhancedCurrentHue attribute from DUT"); + case 56: { + LogStep(56, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 56: { - LogStep(56, "Sends ColorLoopSet Command - Set all Attributes"); + case 57: { + LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84697,15 +85387,15 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 57: { - LogStep(57, "Read ColorLoopDirection attribute from DUT"); + case 58: { + LogStep(58, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "Sends ColorLoopSet Command - Set all Attributes"); + case 59: { + LogStep(59, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84721,57 +85411,57 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 59: { - LogStep(59, "Read ColorLoopActive attribute from DUT"); + case 60: { + LogStep(60, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 61: { + LogStep(61, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Wait for 30S"); + case 62: { + LogStep(62, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 62: { - LogStep(62, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 63: { + LogStep(63, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, "Read EnhancedCurrentHue attribute from DUT"); + case 64: { + LogStep(64, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 64: { - LogStep(64, "Wait for 30S"); + case 65: { + LogStep(65, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 65: { - LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); + case 66: { + LogStep(66, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 66: { - LogStep(66, "Sends ColorLoopSet Command - Set all Attributes"); + case 67: { + LogStep(67, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -84787,37 +85477,37 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 67: { - LogStep(67, "Read ColorLoopActive attribute from DUT"); + case 68: { + LogStep(68, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 68: { - LogStep(68, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 69: { + LogStep(69, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 69: { - LogStep(69, "Read EnhancedCurrentHue attribute from DUT"); + case 70: { + LogStep(70, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 70: { - LogStep(70, "Turn Off light for color control tests"); + case 71: { + LogStep(71, "Turn Off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 71: { - LogStep(71, "Check on/off attribute value is false after off command"); + case 72: { + LogStep(72, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -84828,7 +85518,7 @@ class Test_TC_CC_9_1Suite : public TestCommand class Test_TC_CC_9_2Suite : public TestCommand { public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 32, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -84888,6 +85578,9 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84895,7 +85588,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84903,7 +85596,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84911,7 +85604,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84919,10 +85612,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84930,7 +85623,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84938,11 +85631,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84950,7 +85643,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84960,11 +85653,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84974,10 +85667,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -84985,11 +85678,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -84997,7 +85690,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHue = value; } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85007,11 +85700,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85021,10 +85714,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85032,7 +85725,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85040,7 +85733,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85048,10 +85741,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -85116,7 +85809,16 @@ class Test_TC_CC_9_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85132,36 +85834,36 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 10: { + LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Color Loop Set Command - Set all Attributes"); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85177,57 +85879,57 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); + case 12: { + LogStep(12, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 13: { + LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait for 30S"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 15: { + LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); + case 16: { + LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Color Loop Set Command - Start Color Loop"); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85243,50 +85945,50 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopDirection attribute from DUT."); + case 20: { + LogStep(20, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Wait for 30S"); + case 21: { + LogStep(21, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 22: { + LogStep(22, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); + case 23: { + LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait for 30S"); + case 24: { + LogStep(24, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); + case 25: { + LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Color Loop Set Command - Start Color Loop"); + case 26: { + LogStep(26, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85302,37 +86004,37 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); + case 27: { + LogStep(27, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 28: { + LogStep(28, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); + case 29: { + LogStep(29, "Read EnhancedCurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Turn off light for color control tests"); + case 30: { + LogStep(30, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); + case 31: { + LogStep(31, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -85343,7 +86045,7 @@ class Test_TC_CC_9_2Suite : public TestCommand class Test_TC_CC_9_3Suite : public TestCommand { public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85402,6 +86104,9 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85409,7 +86114,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85417,7 +86122,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85425,7 +86130,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85433,10 +86138,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85444,7 +86149,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85452,11 +86157,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85464,7 +86169,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85474,11 +86179,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85488,10 +86193,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85499,11 +86204,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85513,11 +86218,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85527,10 +86232,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85538,7 +86243,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85546,7 +86251,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -85554,10 +86259,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -85622,7 +86327,16 @@ class Test_TC_CC_9_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85638,36 +86352,36 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 6: { - LogStep(6, "Read ColorLoopActive attribute from DUT"); + case 7: { + LogStep(7, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 10: { + LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Color Loop Set Command - Set all Attributes"); + case 11: { + LogStep(11, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85683,57 +86397,57 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopActive attribute from DUT."); + case 12: { + LogStep(12, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 13: { + LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Wait for 30S"); + case 14: { + LogStep(14, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 15: { + LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); + case 16: { + LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for 30S"); + case 17: { + LogStep(17, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Color Loop Set Command - Start Color Loop"); + case 19: { + LogStep(19, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85749,43 +86463,43 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 19: { - LogStep(19, "Read ColorLoopTime attribute from DUT."); + case 20: { + LogStep(20, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Wait for 60S"); + case 21: { + LogStep(21, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); + case 22: { + LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait for 60S"); + case 23: { + LogStep(23, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Color Loop Set Command - Start Color Loop"); + case 25: { + LogStep(25, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -85801,37 +86515,37 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 25: { - LogStep(25, "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 26: { - LogStep(26, "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 27: { - LogStep(27, "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 28: { - LogStep(28, "Turn off light for color control tests"); + case 29: { + LogStep(29, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } 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 9f831b1515913e..454b55704e797c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -4750,6 +4750,7 @@ 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) @@ -4791,172 +4792,180 @@ class Test_TC_CC_3_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveHue command to DUT with MoveMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeUp_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 3000ms\n"); - err = TestWait3000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveHueCommandToDutWithMoveModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); + err = TestWait3000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 2000\n"); - err = TestWait2000_7(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 2000\n"); + err = TestWait2000_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 3000\n"); - err = TestWait3000_9(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 3000\n"); + err = TestWait3000_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_10(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + 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")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeStop_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentHue attribute from DUT several times\n"); + 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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_15(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends MoveHue command to DUT with MoveMode Down\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends MoveHue command to DUT with MoveMode Down\n"); if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeDown_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); - err = TestWait1000ms_17(); + err = TestThSendsMoveHueCommandToDutWithMoveModeDown_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); + err = TestWait1000ms_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentHue attribute from DUT several times\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); - err = TestWait1000ms_19(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentHue attribute from DUT several times\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 1000ms\n"); - err = TestWait1000ms_21(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); + err = TestWait1000ms_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentHue attribute from DUT several times\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_22(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_23(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends MoveHue command to DUT with MoveMode Stop\n"); + 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")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeStop_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + err = TestThSendsMoveHueCommandToDutWithMoveModeStop_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); - err = TestWait1000ms_26(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_28(); + err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); break; } @@ -5059,6 +5068,9 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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. @@ -5072,11 +5084,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 30; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5125,7 +5138,29 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5148,7 +5183,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeUp_4() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5158,7 +5193,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -5173,14 +5209,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000ms_5() + CHIP_ERROR TestWait3000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5203,14 +5239,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait2000_7() + CHIP_ERROR TestWait2000_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5233,14 +5269,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000_9() + CHIP_ERROR TestWait3000_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 3000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5263,7 +5299,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_11() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5273,7 +5309,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -5288,7 +5325,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait1000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -5296,7 +5333,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5322,14 +5359,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5353,7 +5390,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeDown_16() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeDown_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5363,7 +5400,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -5378,14 +5416,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_17() + CHIP_ERROR TestWait1000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5408,14 +5446,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_19() + CHIP_ERROR TestWait1000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_20() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5438,14 +5476,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_21() + CHIP_ERROR TestWait1000ms_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_22() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5468,7 +5506,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_23() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5478,7 +5516,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -5493,7 +5532,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -5501,7 +5540,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValueAfterStopmode; - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_25() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5527,14 +5566,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_26() + CHIP_ERROR TestWait1000ms_27() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_27() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5558,7 +5597,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_28() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5575,7 +5614,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_29() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5608,6 +5647,7 @@ 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) @@ -5649,60 +5689,68 @@ class Test_TC_CC_3_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends StepHue command to DUT with StepMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThSendsStepHueCommandToDutWithStepModeUp_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepHueCommandToDutWithStepModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_6(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepHue command to DUT with StepMode Down\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepHue command to DUT with StepMode Down\n"); if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestThSendsStepHueCommandToDutWithStepModeDown_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + err = TestThSendsStepHueCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); + 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")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -5751,6 +5799,9 @@ class Test_TC_CC_3_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -5764,11 +5815,12 @@ class Test_TC_CC_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5817,7 +5869,29 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5840,7 +5914,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeUp_4() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5850,7 +5924,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + 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]; @@ -5866,14 +5941,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5896,7 +5971,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeDown_7() + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5906,7 +5981,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + 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]; @@ -5922,14 +5998,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5952,7 +6028,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5969,7 +6045,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6002,6 +6078,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -6043,65 +6120,48 @@ class Test_TC_CC_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveToSaturation command to DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveToSaturationCommandToDut_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 500ms\n"); - err = TestWait500ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); - err = TestWait500ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 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 5 : TH sends MoveToSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8(); + err = TestThSendsMoveToSaturationCommandToDut_5(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_10(); + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_11(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); break; } @@ -6144,15 +6204,6 @@ 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; } // Go on to the next test. @@ -6166,11 +6217,12 @@ class Test_TC_CC_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6219,7 +6271,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6227,54 +6279,21 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveToSaturationCommandToDut_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:15U]; - 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); + 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 TestWait500ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6283,7 +6302,7 @@ 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)); @@ -6297,14 +6316,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6312,29 +6324,32 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:90U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_10() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6349,16 +6364,21 @@ class Test_TC_CC_4_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 90U)); + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); } + VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6375,7 +6395,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6408,6 +6428,7 @@ 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) @@ -6449,232 +6470,240 @@ class Test_TC_CC_4_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentSaturation attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentSaturation attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentSaturation attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_10(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); + err = TestWait1000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentSaturation attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_17(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18(); break; - case 18: + case 19: ChipLogProgress(chipTool, - " ***** Test Step 18 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " + " ***** Test Step 19 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " "Saturation\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); - err = TestWait1000ms_19(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); + err = TestWait1000ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_20(); + err = TestThReadsCurrentSaturationAttributeFromDut_21(); break; - case 21: + case 22: ChipLogProgress(chipTool, - " ***** Test Step 21 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + " ***** Test Step 22 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " "Maximum allowed.\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentSaturation attribute from DUT.\n"); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentSaturation attribute from DUT.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + err = TestThReadsCurrentSaturationAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : CurrentSaturation value Stops incrementing\n"); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : CurrentSaturation value Stops incrementing\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsIncrementing_25(); + err = TestCurrentSaturationValueStopsIncrementing_26(); break; - case 26: + case 27: ChipLogProgress(chipTool, - " ***** Test Step 26 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " + " ***** Test Step 27 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " "Saturation\n"); if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentSaturation attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 1000ms\n"); + err = TestWait1000ms_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentSaturation attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 1000ms\n"); - err = TestWait1000ms_29(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentSaturation attribute from DUT several times.\n"); + 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_30(); + err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31(); break; - case 31: + case 32: ChipLogProgress(chipTool, - " ***** Test Step 31 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " + " ***** 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); - err = TestWait1000ms_32(); + err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); - err = TestWait1000ms_34(); + err = TestThReadsCurrentSaturationAttributeFromDut_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : CurrentSaturation value Stops decrementing\n"); + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : CurrentSaturation value Stops decrementing\n"); if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsDecrementing_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + err = TestCurrentSaturationValueStopsDecrementing_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -6801,6 +6830,9 @@ class Test_TC_CC_4_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. @@ -6814,11 +6846,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6867,7 +6900,29 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6890,7 +6945,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_4() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6900,7 +6955,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:15U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -6915,14 +6971,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6945,14 +7001,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6975,14 +7031,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7005,7 +7061,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_11() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7015,7 +7071,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7030,14 +7087,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait1000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7060,14 +7117,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7090,14 +7147,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7120,7 +7177,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_18() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7130,7 +7187,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:100U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster @@ -7147,14 +7205,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_19() + CHIP_ERROR TestWait1000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7177,7 +7235,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_21() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7187,7 +7245,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7204,7 +7263,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_22() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7212,7 +7271,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep4d; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_23() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7238,14 +7297,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_25() + CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7269,7 +7328,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_26() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7279,7 +7338,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster @@ -7297,7 +7357,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_27() + CHIP_ERROR TestWait1000ms_28() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7305,7 +7365,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep5b; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_28() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7331,14 +7391,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_29() + CHIP_ERROR TestWait1000ms_30() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_30() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7362,7 +7422,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_31() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7372,7 +7432,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:10U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -7389,7 +7450,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_32() + CHIP_ERROR TestWait1000ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -7397,7 +7458,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationStep5d; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_33() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7423,14 +7484,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_34() + CHIP_ERROR TestWait1000ms_35() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_35() + CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7454,7 +7515,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7471,7 +7532,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7504,6 +7565,7 @@ 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) @@ -7545,60 +7607,68 @@ class Test_TC_CC_4_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends StepSaturation command to DUT with StepMode Up\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeUp_4(); + err = TestThReadsCurrentSaturationAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepSaturation command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepSaturationCommandToDutWithStepModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,TH read CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_6(); + err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepSaturation command to DUT with StepMode Down\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepSaturation command to DUT with StepMode Down\n"); if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeDown_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + err = TestThSendsStepSaturationCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,TH reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); + 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")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -7647,6 +7717,9 @@ class Test_TC_CC_4_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -7660,11 +7733,12 @@ class Test_TC_CC_4_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -7713,7 +7787,29 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7736,7 +7832,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_4() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7746,7 +7842,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:15U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -7762,14 +7859,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7792,7 +7889,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_7() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7802,7 +7899,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedChar:20U]; + params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:15U]; params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -7818,14 +7916,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7848,7 +7946,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7865,7 +7963,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7898,6 +7996,8 @@ 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) @@ -7939,56 +8039,64 @@ class Test_TC_CC_4_4 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentHue attribute from DUT.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_4(); + err = TestThReadsCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToHueAndSaturation command to DUT.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveToHueAndSaturationCommandToDut_5(); + err = TestThReadsCurrentSaturationAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToHueAndSaturation command to DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToHueAndSaturationCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_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")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); + err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT\n"); + 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")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -8034,6 +8142,9 @@ class Test_TC_CC_4_4 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8047,11 +8158,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8100,7 +8213,29 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8123,7 +8258,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8146,7 +8281,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_5() + CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8155,8 +8290,10 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:40U]; - params.saturation = [NSNumber numberWithUnsignedChar:160U]; + 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]; @@ -8172,14 +8309,14 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8192,6 +8329,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + } + VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); @@ -8202,7 +8344,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8215,6 +8357,12 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue( + "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + } + VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); @@ -8225,7 +8373,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8242,7 +8390,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8275,6 +8423,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("colorXConfigValue", 0, UINT16_MAX, &mColorXConfigValue); + AddArgument("colorYConfigValue", 0, UINT16_MAX, &mColorYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -8316,56 +8466,64 @@ class Test_TC_CC_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); - err = TestWait1500ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToColorCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7(); + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -8411,6 +8569,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8424,11 +8585,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mColorXConfigValue; + chip::Optional mColorYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8477,7 +8640,29 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8500,7 +8685,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8523,7 +8708,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_5() + CHIP_ERROR TestThSendsMoveToColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8532,8 +8717,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.colorX = [NSNumber numberWithUnsignedShort:200U]; - params.colorY = [NSNumber numberWithUnsignedShort:300U]; + params.colorX = mColorXConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorXConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:400U]; + params.colorY = mColorYConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mColorYConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:500U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -8549,14 +8736,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8571,7 +8758,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 200U)); + VerifyOrReturn( + CheckValue("CurrentX", actualValue, mColorXConfigValue.HasValue() ? mColorXConfigValue.Value() : 400U)); } VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); @@ -8584,7 +8772,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8599,7 +8787,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 300U)); + VerifyOrReturn( + CheckValue("CurrentY", actualValue, mColorYConfigValue.HasValue() ? mColorYConfigValue.Value() : 500U)); } VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); @@ -8612,7 +8801,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8629,7 +8818,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8662,6 +8851,8 @@ 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) @@ -8703,80 +8894,88 @@ class Test_TC_CC_5_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_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")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveColorCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); + err = TestWait1000ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_7(); + err = TestThReadsCurrentXAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentY attribute from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_8(); + err = TestThReadsCurrentYAttributeFromDut_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends StopMoveStep command to DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends StopMoveStep command to DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_9(); + err = TestThSendsStopMoveStepCommandToDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentX attribute from DUT\n"); + 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")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_10(); + err = TestThReadsCurrentXAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentY attribute from DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_12(); + err = TestThReadsCurrentYAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); break; } @@ -8831,6 +9030,9 @@ class Test_TC_CC_5_2 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8844,11 +9046,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateXValue; + chip::Optional mRateYValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8897,7 +9101,30 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentXValue; + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8913,14 +9140,18 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8936,6 +9167,9 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -8943,7 +9177,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_5() + CHIP_ERROR TestThSendsMoveColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8952,8 +9186,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; + 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 @@ -8968,14 +9202,15 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1000ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentXBeforeStopCommand; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8989,16 +9224,20 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXBeforeStopCommand = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYBeforeStopCommand; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9012,8 +9251,11 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYBeforeStopCommand = value; + } NextTest(); }]; @@ -9021,7 +9263,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_9() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9044,7 +9286,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9058,7 +9300,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); @@ -9067,7 +9309,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9081,7 +9323,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYBeforeStopCommand)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); @@ -9090,7 +9332,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_12() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9107,7 +9349,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9140,6 +9382,8 @@ 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) @@ -9181,56 +9425,64 @@ class Test_TC_CC_5_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThSendsStepColorCommandToDut_5(); + err = TestThReadsCurrentYAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepColorCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); + err = TestWait1500ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7(); + err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + 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")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -9276,6 +9528,9 @@ class Test_TC_CC_5_3 : 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. @@ -9289,11 +9544,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepXConfigValue; + chip::Optional mStepYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -9342,7 +9599,30 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentXValue; + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9358,14 +9638,18 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + CurrentXValue = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9381,6 +9665,9 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + CurrentYValue = value; + } NextTest(); }]; @@ -9388,7 +9675,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorCommandToDut_5() + CHIP_ERROR TestThSendsStepColorCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9397,8 +9684,10 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.stepX = [NSNumber numberWithShort:15]; - params.stepY = [NSNumber numberWithShort:20]; + 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]; @@ -9414,14 +9703,14 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait1500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_7() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9435,7 +9724,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentX", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); NextTest(); @@ -9444,7 +9733,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_8() + CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9458,7 +9747,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentY", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); NextTest(); @@ -9467,7 +9756,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9484,7 +9773,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9558,56 +9847,64 @@ class Test_TC_CC_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Move To Color Temperature command\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestMoveToColorTemperatureCommand_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); - err = TestWait1500ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Move To Color Temperature command\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { + NextTest(); + return; + } + err = TestMoveToColorTemperatureCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1500ms\n"); + err = TestWait1500ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_9(); + err = TestReadCurrentColorTemprature_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); break; } @@ -9653,6 +9950,9 @@ class Test_TC_CC_6_1 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -9666,7 +9966,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -9718,9 +10018,31 @@ class Test_TC_CC_6_1 : public TestCommandBridge { 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_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9748,7 +10070,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9775,7 +10097,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9800,7 +10122,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToColorTemperatureCommand_6() + CHIP_ERROR TestMoveToColorTemperatureCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9825,14 +10147,14 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_7() + CHIP_ERROR TestWait1500ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_8() + CHIP_ERROR TestReadCurrentColorTemprature_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9862,7 +10184,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9879,7 +10201,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9953,228 +10275,236 @@ class Test_TC_CC_6_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_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")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 1000ms\n"); - err = TestWait1000ms_11(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); - err = TestWait1000ms_18(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); + err = TestWait1000ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); - err = TestWait1000ms_26(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + 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_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); - err = TestWait1000ms_30(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 1000ms\n"); + err = TestWait1000ms_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); - err = TestWait1000ms_32(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); + err = TestWait1000ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); - err = TestWait1000ms_34(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read current color temprature attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); + err = TestWait1000ms_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read current color temprature attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); break; } @@ -10301,6 +10631,9 @@ 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. @@ -10314,7 +10647,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 39; chip::Optional mNodeId; chip::Optional mCluster; @@ -10366,9 +10699,31 @@ class Test_TC_CC_6_2 : public TestCommandBridge { 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_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10396,7 +10751,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10423,7 +10778,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10448,7 +10803,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10475,14 +10830,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10507,14 +10862,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10539,14 +10894,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_11() + CHIP_ERROR TestWait1000ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10571,7 +10926,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10598,14 +10953,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait1000ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10630,14 +10985,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10662,14 +11017,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_18() + CHIP_ERROR TestWait1000ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10694,7 +11049,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10704,7 +11059,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -10721,7 +11076,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10731,9 +11086,9 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; + params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; + params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params @@ -10748,7 +11103,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_22() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -10756,7 +11111,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureValue; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10784,14 +11139,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_24() + CHIP_ERROR TestWait1000ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10821,14 +11176,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_26() + CHIP_ERROR TestWait1000ms_27() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10858,7 +11213,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10885,7 +11240,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10895,7 +11250,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; + params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -10912,7 +11267,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_30() + CHIP_ERROR TestWait1000ms_31() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -10920,7 +11275,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureMoveModeStop; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10948,14 +11303,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_32() + CHIP_ERROR TestWait1000ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10985,14 +11340,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_34() + CHIP_ERROR TestWait1000ms_35() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11022,7 +11377,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11039,7 +11394,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11113,124 +11468,132 @@ class Test_TC_CC_6_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); - err = TestWait500ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 500ms\n"); + err = TestWait500ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 500ms\n"); - err = TestWait500ms_9(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 500ms\n"); + err = TestWait500ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 500ms\n"); - err = TestWait500ms_11(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 700ms\n"); + err = TestWait700ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); + 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_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); - err = TestWait500ms_14(); + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 500ms\n"); + err = TestWait500ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); - err = TestWait500ms_18(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_20(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -11309,6 +11672,9 @@ 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. @@ -11322,7 +11688,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -11374,9 +11740,31 @@ class Test_TC_CC_6_3 : public TestCommandBridge { 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_3() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11404,7 +11792,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11431,7 +11819,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11456,7 +11844,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11484,14 +11872,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_7() + CHIP_ERROR TestWait500ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11514,14 +11902,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_9() + CHIP_ERROR TestWait500ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11544,14 +11932,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_11() + CHIP_ERROR TestWait700ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 700UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11574,7 +11962,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11584,8 +11972,8 @@ class Test_TC_CC_6_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedShort:5U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; + params.stepSize = [NSNumber numberWithUnsignedShort:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; @@ -11602,14 +11990,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_14() + CHIP_ERROR TestWait500ms_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11632,14 +12020,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11662,14 +12050,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_18() + CHIP_ERROR TestWait500ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11692,7 +12080,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11709,7 +12097,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11742,6 +12130,7 @@ 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) @@ -11783,87 +12172,87 @@ class Test_TC_CC_7_2 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : 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 5 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_6(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_6(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_8(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); + err = TestWait1000ms_8(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_10(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); + err = TestWait1000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_11(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 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 12 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_12(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_13(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); - err = TestWait500ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); + err = TestWait1000ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; @@ -11871,52 +12260,84 @@ class Test_TC_CC_7_2 : public TestCommandBridge { err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_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_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); - err = TestWait500ms_18(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); + err = TestWait500ms_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_19(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 500ms\n"); + err = TestWait500ms_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_20(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_21(); + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_22(); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); + err = TestWait1000ms_25(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23(); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); break; } @@ -12001,6 +12422,21 @@ class Test_TC_CC_7_2 : public TestCommandBridge { case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -12014,11 +12450,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12067,7 +12504,29 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12090,7 +12549,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_4() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12100,7 +12559,8 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -12115,14 +12575,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_6() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12145,14 +12605,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait1000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_8() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12175,14 +12635,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait1000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_10() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12205,7 +12665,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_11() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12229,8 +12689,9 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep3b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12246,6 +12707,9 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep3b = value; + } NextTest(); }]; @@ -12253,7 +12717,42 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestWait1000ms_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep3b)); + } + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12263,7 +12762,8 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:15U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -12278,14 +12778,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_14() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12308,14 +12808,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR TestWait500ms_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_17() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12338,14 +12838,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_18() + CHIP_ERROR TestWait500ms_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12368,7 +12868,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_20() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12392,8 +12892,42 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull EnhancedCurrentHueStep5b; + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + { + EnhancedCurrentHueStep5b = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_25() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_21() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12406,6 +12940,11 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep5b)); + } + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); @@ -12416,7 +12955,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_22() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12433,7 +12972,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12466,6 +13005,7 @@ 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) @@ -12507,60 +13047,68 @@ class Test_TC_CC_7_3 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1000ms\n"); - err = TestWait1000ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); + err = TestWait1000ms_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")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6(); + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); + err = TestWait1000ms_9(); + 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")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_10(); + err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); break; } @@ -12609,6 +13157,9 @@ class Test_TC_CC_7_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; } // Go on to the next test. @@ -12622,11 +13173,12 @@ class Test_TC_CC_7_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -12675,7 +13227,29 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12698,7 +13272,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_4() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12708,8 +13282,9 @@ class Test_TC_CC_7_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = [NSNumber numberWithUnsignedShort:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort: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 @@ -12724,14 +13299,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_5() + CHIP_ERROR TestWait1000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12754,7 +13329,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_7() + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12764,8 +13339,9 @@ class Test_TC_CC_7_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedShort:75U]; - params.transitionTime = [NSNumber numberWithUnsignedShort: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 @@ -12780,14 +13356,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9() + CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12810,7 +13386,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12827,7 +13403,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12860,6 +13436,8 @@ 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) @@ -12901,41 +13479,49 @@ class Test_TC_CC_7_4 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A000f")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 1500ms\n"); - err = TestWait1500ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); + err = TestWait1500ms_6(); + break; + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); + " ***** 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")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_7(); + err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); break; } @@ -12975,6 +13561,9 @@ class Test_TC_CC_7_4 : 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. @@ -12988,11 +13577,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mEnhancedHueConfigValue; + chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13041,7 +13632,29 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13064,7 +13677,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_4() + CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13073,8 +13686,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.saturation = [NSNumber numberWithUnsignedChar:90U]; + 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]; @@ -13090,14 +13705,14 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_5() + CHIP_ERROR TestWait1500ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() + CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13112,7 +13727,8 @@ class Test_TC_CC_7_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 1200U)); + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, + mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); } VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); @@ -13125,7 +13741,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13142,7 +13758,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13175,6 +13791,11 @@ class Test_TC_CC_8_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); + AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); + AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); + AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); + AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -13216,257 +13837,273 @@ class Test_TC_CC_8_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends MoveHue command to DUT\n"); - if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveHue command to DUT\n"); + if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_4(); + err = TestThSendsMoveHueCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_5(); + err = TestThReadsCurrentHueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_6(); + err = TestThSendsStopMoveStepCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_8(); + err = TestThReadsCurrentHueAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 100ms\n"); + err = TestWait100ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends MoveSaturation command to DUT\n"); - if (ShouldSkip("CC.S.C04.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDut_9(); + err = TestThReadsCurrentHueAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends MoveSaturation command to DUT\n"); + if (ShouldSkip("CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_10(); + err = TestThSendsMoveSaturationCommandToDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_11(); + err = TestThReadsCurrentSaturationAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_12(); + err = TestThSendsStopMoveStepCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT\n"); if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_14(); + err = TestThReadsCurrentSaturationAttributeFromDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends MoveColor command to DUT\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends MoveColor command to DUT\n"); if (ShouldSkip("CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_15(); + err = TestThSendsMoveColorCommandToDut_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentX attribute from DUT\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_16(); + err = TestThReadsCurrentXAttributeFromDut_18(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentY attribute from DUT\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_17(); + err = TestThReadsCurrentYAttributeFromDut_19(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends StopMoveStep command to DUT\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends StopMoveStep command to DUT\n"); if (ShouldSkip("CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_18(); + err = TestThSendsStopMoveStepCommandToDut_20(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentX attribute from DUT\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_19(); + err = TestThReadsCurrentXAttributeFromDut_21(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 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.A0004 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_20(); + err = TestThReadsCurrentYAttributeFromDut_22(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 100ms\n"); - err = TestWait100ms_21(); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); + err = TestWait1000ms_23(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentY attribute from DUT\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_22(); + err = TestThReadsCurrentYAttributeFromDut_24(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentY attribute from DUT\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_23(); + err = TestThReadsCurrentYAttributeFromDut_25(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends MoveColorTemperature command to DUT\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); if (ShouldSkip("CC.S.C4B.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDut_24(); + err = TestThSendsMoveColorTemperatureCommandToDut_26(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads ColorTemperatureMireds attribute from DUT\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); + err = TestWait1000ms_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads ColorTemperatureMireds attribute from DUT\n"); if (ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_25(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_28(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends StopMoveStep command to DUT\n"); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends StopMoveStep command to DUT\n"); if (ShouldSkip("CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_26(); + err = TestThSendsStopMoveStepCommandToDut_29(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads ColorTemperatureMireds attribute from DUT\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads ColorTemperatureMireds attribute from DUT\n"); if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_27(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_30(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 100ms\n"); - err = TestWait100ms_28(); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 500ms\n"); + err = TestWait500ms_31(); break; - case 29: + case 32: ChipLogProgress(chipTool, - " ***** Test Step 29 : Reads current color attribute value matched the value sent by the last attribute\n"); + " ***** Test Step 32 : Reads current color attribute value matched the value sent by the last attribute\n"); if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { NextTest(); return; } - err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29(); + err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends EnhancedMoveHue command to DUT.\n"); + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends EnhancedMoveHue command to DUT.\n"); if (ShouldSkip("CC.S.C41.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDut_30(); + err = TestThSendsEnhancedMoveHueCommandToDut_33(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads EnhancedCurrentHue attribute from DUT\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_31(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_34(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH sends StopMoveStep command to DUT\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends StopMoveStep command to DUT\n"); if (ShouldSkip("CC.S.C47.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_32(); + err = TestThSendsStopMoveStepCommandToDut_35(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads EnhancedCurrentHue attribute from DUT\n"); + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_33(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_36(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 100ms\n"); - err = TestWait100ms_34(); + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Wait 500ms\n"); + err = TestWait500ms_37(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads EnhancedCurrentHue attribute from DUT\n"); + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_35(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_38(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); - err = TestTurnOffLightThatWeTurnedOn_36(); + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Turn off light that we turned on\n"); + err = TestTurnOffLightThatWeTurnedOn_39(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40(); break; } @@ -13593,6 +14230,15 @@ class Test_TC_CC_8_1 : 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; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -13606,11 +14252,16 @@ class Test_TC_CC_8_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 41; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mRateConfigValue; + chip::Optional mRateXConfigValue; + chip::Optional mRateYConfigValue; + chip::Optional mColorTemperatureMinMiredsConfigValue; + chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13659,7 +14310,29 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDut_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveHueCommandToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13669,7 +14342,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params @@ -13684,7 +14358,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13707,7 +14381,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_5() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13731,7 +14405,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentHueValue; - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_6() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13757,14 +14431,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_7() + CHIP_ERROR TestWait100ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13792,7 +14466,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDut_9() + CHIP_ERROR TestThSendsMoveSaturationCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13802,7 +14476,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedChar:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params @@ -13817,7 +14492,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13840,7 +14515,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_11() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13864,7 +14539,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentSaturationValue; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_12() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13890,14 +14565,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_13() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_14() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13925,7 +14600,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_15() + CHIP_ERROR TestThSendsMoveColorCommandToDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13934,8 +14609,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = [NSNumber numberWithShort:15]; - params.rateY = [NSNumber numberWithShort:20]; + params.rateX + = mRateXConfigValue.HasValue() ? [NSNumber numberWithShort:mRateXConfigValue.Value()] : [NSNumber numberWithShort:50]; + params.rateY + = mRateYConfigValue.HasValue() ? [NSNumber numberWithShort:mRateYConfigValue.Value()] : [NSNumber numberWithShort:50]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params @@ -13950,7 +14627,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_16() + CHIP_ERROR TestWait500ms_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13973,7 +14657,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_17() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13996,7 +14680,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_18() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14020,7 +14704,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_19() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14047,7 +14731,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14073,14 +14757,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_21() + CHIP_ERROR TestWait1000ms_23() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14108,7 +14792,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_23() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14136,7 +14820,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_24() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14146,9 +14830,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; + params.colorTemperatureMinimumMireds = mColorTemperatureMinMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMinMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + params.colorTemperatureMaximumMireds = mColorTemperatureMaxMiredsConfigValue.HasValue() + ? [NSNumber numberWithUnsignedShort:mColorTemperatureMaxMiredsConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:255U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params @@ -14163,7 +14852,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_25() + CHIP_ERROR TestWait1000ms_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14186,7 +14882,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_26() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14210,7 +14906,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureMiredsValue; - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_27() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14236,14 +14932,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_28() + CHIP_ERROR TestWait500ms_31() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29() + CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14271,7 +14967,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_30() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14281,7 +14977,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:50U]; + params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] + : [NSNumber numberWithUnsignedShort:50U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveHueWithParams:params @@ -14296,7 +14993,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_31() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14319,7 +15016,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_32() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14343,7 +15040,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull EnhancedCurrentHueValue; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_33() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14369,14 +15066,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_34() + CHIP_ERROR TestWait500ms_37() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_35() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14404,7 +15101,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -14421,7 +15118,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15284,52 +15981,172 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetCounts command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestSendsResetCountsCommand_1(); + err = TestThReadsPHYRateAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the PacketRxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadThePacketRxCountAttribute_2(); + err = TestThReadsPHYRateAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the PacketTxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadThePacketTxCountAttribute_3(); + err = TestThReadsPHYRateAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the TxErrCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheTxErrCountAttribute_4(); + err = TestThReadsPHYRateAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the CollisionCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheCollisionCountAttribute_5(); + err = TestThReadsPHYRateAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the OverrunCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DGETH.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { NextTest(); return; } - err = TestReadTheOverrunCountAttribute_6(); + err = TestThReadsPHYRateAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads PHYRate attribute from DUT\n"); + if (ShouldSkip("DGETH.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsPHYRateAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOverrunCountAttributeValueFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Sends ResetCounts command\n"); + if (ShouldSkip("DGETH.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsResetCountsCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads PacketRxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsPacketRxCountAttributeValueFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads PacketTxCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsPacketTxCountAttributeValueFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads TxErrCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsTxErrCountAttributeValueFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CollisionCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsCollisionCountAttributeValueFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads OverrunCount attribute value from DUT\n"); + if (ShouldSkip("DGETH.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOverrunCountAttributeValueFromDut_21(); break; } @@ -15363,6 +16180,51 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -15376,7 +16238,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -15390,25 +16252,258 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendsResetCountsCommand_1() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ResetCounts command Error: %@", err); + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThePacketRxCountAttribute_2() + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPHYRateAttributeFromDut_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull PacketRxCount; + + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15416,13 +16511,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketRxCount attribute Error: %@", err); + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketRxCount", actualValue, 0ULL)); + PacketRxCount = value; } NextTest(); @@ -15430,8 +16524,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull PacketTxCount; - CHIP_ERROR TestReadThePacketTxCountAttribute_3() + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15439,13 +16534,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketTxCount attribute Error: %@", err); + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketTxCount", actualValue, 0ULL)); + PacketTxCount = value; } NextTest(); @@ -15453,8 +16547,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull TxErrCount; - CHIP_ERROR TestReadTheTxErrCountAttribute_4() + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15462,13 +16557,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the TxErrCount attribute Error: %@", err); + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("TxErrCount", actualValue, 0ULL)); + TxErrCount = value; } NextTest(); @@ -15476,8 +16570,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CollisionCount; - CHIP_ERROR TestReadTheCollisionCountAttribute_5() + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15485,13 +16580,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the CollisionCount attribute Error: %@", err); + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("CollisionCount", actualValue, 0ULL)); + CollisionCount = value; } NextTest(); @@ -15499,8 +16593,9 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull OverrunCount; - CHIP_ERROR TestReadTheOverrunCountAttribute_6() + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterEthernetNetworkDiagnostics * cluster = @@ -15508,13 +16603,12 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the OverrunCount attribute Error: %@", err); + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValue("OverrunCount", actualValue, 0ULL)); + OverrunCount = value; } NextTest(); @@ -15522,6 +16616,124 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestSendsResetCountsCommand_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPacketRxCountAttributeValueFromDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("packetRxCount", [value unsignedLongLongValue], PacketRxCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsPacketTxCountAttributeValueFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("packetTxCount", [value unsignedLongLongValue], PacketTxCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTxErrCountAttributeValueFromDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("txErrCount", [value unsignedLongLongValue], TxErrCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCollisionCountAttributeValueFromDut_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("collisionCount", [value unsignedLongLongValue], CollisionCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOverrunCountAttributeValueFromDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterEthernetNetworkDiagnostics * cluster = + [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMaxValue("overrunCount", [value unsignedLongLongValue], OverrunCount)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_FLW_1_1 : public TestCommandBridge { @@ -21786,124 +22998,132 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_4(); + err = TestReadsTheMinLevelAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_5(); + err = TestReadsTheMaxLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 100ms\n"); - err = TestWait100ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveToLevelWithOnOffCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_7(); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : sends a Move to level command\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 100 ms\n"); - err = TestWait100Ms_9(); + err = TestSendsAMoveToLevelCommand_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100 ms\n"); + err = TestWait100Ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 11000ms\n"); - err = TestWait11000ms_12(); + err = TestSendsAMoveToLevelCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 11000ms\n"); + err = TestWait11000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the OnOffTransitionTime attribute from the DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnOffTransitionTime attribute from the DUT\n"); if (ShouldSkip("LVL.S.A0010")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14(); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move to level command\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move to level command\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); + err = TestSendsAMoveToLevelCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); + err = TestWait1000ms_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_17(); + err = TestReadsCurrentLevelAttributeFromDut_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_18(); + err = TestPreconditionSendOffCommand_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 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_19(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -21976,6 +23196,9 @@ class Test_TC_LVL_3_1 : 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. @@ -21989,7 +23212,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -22042,7 +23265,29 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMinLevelAttribute_3() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheMinLevelAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22065,7 +23310,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMaxLevelAttribute_4() + CHIP_ERROR TestReadsTheMaxLevelAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22088,7 +23333,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22111,14 +23356,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_6() + CHIP_ERROR TestWait100ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22142,7 +23387,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_8() + CHIP_ERROR TestSendsAMoveToLevelCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22167,14 +23412,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_9() + CHIP_ERROR TestWait100Ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22198,7 +23443,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_11() + CHIP_ERROR TestSendsAMoveToLevelCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22223,14 +23468,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait11000ms_12() + CHIP_ERROR TestWait11000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 11000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22254,7 +23499,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_14() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22277,7 +23522,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_15() + CHIP_ERROR TestSendsAMoveToLevelCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22302,14 +23547,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_16() + CHIP_ERROR TestWait1000ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_17() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22333,7 +23578,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_18() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22350,7 +23595,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22432,134 +23677,142 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads max level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : sends a MoveToLevelWithOnOff command\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsMaxLevelAttributeFromDut_5(); + err = TestSendsAMoveToLevelWithOnOffCommand_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Move up command\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : reads max level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { NextTest(); return; } - err = TestSendsAMoveUpCommand_6(); + err = TestReadsMaxLevelAttributeFromDut_6(); break; case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move up command\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveUpCommand_7(); + break; + case 8: ChipLogProgress(chipTool, - " ***** Test Step 7 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " + " ***** Test Step 8 : Physically verify that the DUT moves at a rate of 32 units per second or as close as " "possible to this rate and completes moving to its maximum level\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 9000ms\n"); - err = TestWait9000ms_8(); + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 9000ms\n"); + err = TestWait9000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.A0003")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_9(); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : sends a Move command\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move command\n"); if (ShouldSkip("LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestSendsAMoveCommand_10(); + err = TestSendsAMoveCommand_11(); break; - case 11: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 11 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " + " ***** Test Step 12 : Physically verify that the DUT moves at a rate of 64 units per second or as close as " "possible to this rate and complete moving to its minimum level\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + err = TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads default move rate attribute from DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : reads default move rate attribute from DUT\n"); if (ShouldSkip("LVL.S.A0014")) { NextTest(); return; } - err = TestReadsDefaultMoveRateAttributeFromDut_14(); + err = TestReadsDefaultMoveRateAttributeFromDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : sends a Move up command at default move rate\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move up command at default move rate\n"); if (ShouldSkip("LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestSendsAMoveUpCommandAtDefaultMoveRate_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_16(); break; case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); + err = TestWait500ms_17(); + break; + case 18: ChipLogProgress(chipTool, - " ***** Test Step 17 : Physically verify that the device moves at the rate recorded in step 3a and completes " + " ***** Test Step 18 : Physically verify that the device moves at the rate recorded in step 3a and completes " "moving to its maximum level\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17(); + err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Precondition send Off Command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_18(); + err = TestPreconditionSendOffCommand_19(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 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_19(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -22632,6 +23885,9 @@ class Test_TC_LVL_4_1 : 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. @@ -22645,7 +23901,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -22697,9 +23953,31 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22725,7 +24003,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_4() + CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22749,7 +24027,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_5() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22775,7 +24053,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_6() + CHIP_ERROR TestSendsAMoveUpCommand_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22801,7 +24079,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_7() + TestPhysicallyVerifyThatTheDutMovesAtARateOf32UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompletesMovingToItsMaximumLevel_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22810,14 +24088,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait9000ms_8() + CHIP_ERROR TestWait9000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22841,7 +24119,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveCommand_10() + CHIP_ERROR TestSendsAMoveCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22867,7 +24145,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } CHIP_ERROR - TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_11() + TestPhysicallyVerifyThatTheDutMovesAtARateOf64UnitsPerSecondOrAsCloseAsPossibleToThisRateAndCompleteMovingToItsMinimumLevel_12() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22876,14 +24154,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22911,7 +24189,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_14() + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22940,7 +24218,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_15() + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -22965,14 +24243,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR TestWait500ms_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_17() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22981,7 +24259,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestPreconditionSendOffCommand_18() + CHIP_ERROR TestPreconditionSendOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22998,7 +24276,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23080,108 +24358,116 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002")) { + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0002")) { NextTest(); return; } err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && !LVL.S.A0002")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_6(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp")) { + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends step up command to DUT\n"); - if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads current level attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && !LVL.S.A0002 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsStepUpCommandToDut_8(); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); - err = TestWait4000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends step up command to DUT\n"); + if (ShouldSkip("LVL.S.C02.Rsp && LVL.S.M.VarRate")) { + NextTest(); + return; + } + err = TestSendsStepUpCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 4000ms\n"); + err = TestWait4000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads current level attribute from DUT\n"); if (ShouldSkip("LVL.S.A0000 && LVL.S.C02.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a StepWithOnOff command\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a StepWithOnOff command\n"); if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAStepWithOnOffCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 4000ms\n"); - err = TestWait4000ms_12(); + err = TestSendsAStepWithOnOffCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads current level attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 4000ms\n"); + err = TestWait4000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads current level attribute from DUT\n"); if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_13(); + err = TestReadsCurrentLevelAttributeFromDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads current level attribute from DUT\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads current level attribute from DUT\n"); if (ShouldSkip("LVL.S.C06.Rsp && LVL.S.A0000 && !LVL.S.A0002 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_14(); + err = TestReadsCurrentLevelAttributeFromDut_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Precondition send Off Command\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_15(); + err = TestPreconditionSendOffCommand_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : 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_16(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); break; } @@ -23245,6 +24531,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -23258,7 +24547,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -23310,9 +24599,31 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23338,7 +24649,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23361,7 +24672,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23385,7 +24696,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentlevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23416,7 +24727,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23444,7 +24755,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepUpCommandToDut_8() + CHIP_ERROR TestSendsStepUpCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23470,14 +24781,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_9() + CHIP_ERROR TestWait4000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23500,7 +24811,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepWithOnOffCommand_11() + CHIP_ERROR TestSendsAStepWithOnOffCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23524,14 +24835,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_12() + CHIP_ERROR TestWait4000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23555,7 +24866,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23579,7 +24890,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_15() + CHIP_ERROR TestPreconditionSendOffCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23596,7 +24907,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_16() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23678,116 +24989,124 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads Minlevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestReadsMinlevelAttributeFromDut_3(); + err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Sends MoveToLevelWithOnOff command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads Minlevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { NextTest(); return; } - err = TestSendsMoveToLevelWithOnOffCommandToDut_4(); + err = TestReadsMinlevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends MoveToLevelWithOnOff command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_5(); + err = TestSendsMoveToLevelWithOnOffCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a move up command to DUT\n"); - if (ShouldSkip("LVL.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_6(); + err = TestReadsCurrentLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 5000ms\n"); - err = TestWait5000ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a move up command to DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestSendsAMoveUpCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends stop command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 5000ms\n"); + err = TestWait5000ms_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_8(); + err = TestSendsStopCommandToDut_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads CurrentLevel attribute from DUT\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_10(); + err = TestReadsCurrentLevelAttributeFromDut_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends a move up command to DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a move up command to DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp")) { NextTest(); return; } - err = TestSendsAMoveUpCommandToDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5000ms\n"); - err = TestWait5000ms_12(); + err = TestSendsAMoveUpCommandToDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sends StopWithOnOff command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5000ms\n"); + err = TestWait5000ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends StopWithOnOff command to DUT\n"); if (ShouldSkip("LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestSendsStopWithOnOffCommandToDut_13(); + err = TestSendsStopWithOnOffCommandToDut_14(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Physically verify that the device has stopped transitioning\n"); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Physically verify that the device has stopped transitioning\n"); if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C07.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads CurrentLevel attribute from DUT\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.C07.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_15(); + err = TestReadsCurrentLevelAttributeFromDut_16(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Precondition send Off Command\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_16(); + err = TestPreconditionSendOffCommand_17(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : 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_17(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -23854,6 +25173,9 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -23867,7 +25189,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -23919,9 +25241,31 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinlevelAttributeFromDut_3() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23947,7 +25291,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_4() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23971,7 +25315,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23996,7 +25340,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_6() + CHIP_ERROR TestSendsAMoveUpCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24021,14 +25365,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_7() + CHIP_ERROR TestWait5000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_8() + CHIP_ERROR TestSendsStopCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24051,7 +25395,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -24060,7 +25404,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24083,7 +25427,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_11() + CHIP_ERROR TestSendsAMoveUpCommandToDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24108,14 +25452,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_12() + CHIP_ERROR TestWait5000ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopWithOnOffCommandToDut_13() + CHIP_ERROR TestSendsStopWithOnOffCommandToDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24134,7 +25478,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_14() + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -24143,7 +25487,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_15() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -24166,7 +25510,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_16() + CHIP_ERROR TestPreconditionSendOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24183,7 +25527,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -41589,52 +42933,69 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write 1 to the OperationMode attribute to DUT: OperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH write 0 (Normal) to the OperationMode attribute to DUT\n"); if (ShouldSkip("PCC.S.A0020")) { NextTest(); return; } - err = TestWrite1ToTheOperationModeAttributeToDutOperationMode_1(); + err = TestThWrite0NormalToTheOperationModeAttributeToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_2(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write 2 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH write 1 (Minimum) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite2ToTheOperationModeAttributeToDutOperationMode_3(); + err = TestThWrite1MinimumToTheOperationModeAttributeToDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the attribute: EffectiveOperationMode\n"); - if (ShouldSkip("PCC.S.A0011")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_4(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Write 3 to the OperationMode attribute to DUT: OperationMode\n"); - if (ShouldSkip("PCC.S.A0020")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time.\n"); + if (ShouldSkip("PCC.S.A0020 && PCC.M.ControlModeConstSpeed")) { NextTest(); return; } - err = TestWrite3ToTheOperationModeAttributeToDutOperationMode_5(); + err = TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the attribute: EffectiveOperationMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads from the DUT the EffectiveOperationMode attribute\n"); + if (ShouldSkip("PCC.S.A0011 && PCC.M.ControlModeConstSpeed")) { + NextTest(); + return; + } + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH write 3 (Local) to the OperationMode attribute to DUT\n"); + if (ShouldSkip("PCC.S.A0020")) { + NextTest(); + return; + } + err = TestThWrite3LocalToTheOperationModeAttributeToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads from the DUT the EffectiveOperationMode attribute\n"); if (ShouldSkip("PCC.S.A0011")) { NextTest(); return; } - err = TestReadsTheAttributeEffectiveOperationMode_6(); + err = TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8(); break; } @@ -41668,6 +43029,12 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41681,7 +43048,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -41695,7 +43062,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() + CHIP_ERROR TestThWrite0NormalToTheOperationModeAttributeToDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41703,10 +43070,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41716,7 +43083,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41724,13 +43091,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); } NextTest(); @@ -41739,7 +43106,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_3() + CHIP_ERROR TestThWrite1MinimumToTheOperationModeAttributeToDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41747,10 +43114,10 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41760,7 +43127,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_4() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41768,7 +43135,53 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWrite2MaximumToTheOperationModeAttributeToDutOneAtATime_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id operationModeArgument; + operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; + [cluster + writeAttributeOperationModeWithValue:operationModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPumpConfigurationAndControl * cluster = + [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41783,7 +43196,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_5() + CHIP_ERROR TestThWrite3LocalToTheOperationModeAttributeToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41794,7 +43207,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the OperationMode attribute to DUT: OperationMode Error: %@", err); + NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41804,7 +43217,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_6() + CHIP_ERROR TestThReadsFromTheDutTheEffectiveOperationModeAttribute_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterPumpConfigurationAndControl * cluster = @@ -41812,7 +43225,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); + NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109985,7 +111398,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 9: ChipLogProgress( chipTool, " ***** Test Step 9 : send Get Year Day Schedule Command to DUT and verify FAILURE response\n"); - if (ShouldSkip("DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && DRLK.S.F04 && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx")) { NextTest(); return; } @@ -110449,7 +111862,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -110515,7 +111928,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false));