From 6c3f648d019c280c351e13dc50b457aa2a815f06 Mon Sep 17 00:00:00 2001 From: ManjunathRA Date: Thu, 24 Mar 2022 21:56:14 +0530 Subject: [PATCH] Test modified Mar 21 (#16492) * Updated Scripts : Test_TC_BOOL_1_1.yaml Test_TC_BOOL_2_1.yaml Test_TC_BRAC_1_1.yaml Test_TC_ILL_1_1.yaml Test_TC_LVL_1_1.yaml Test_TC_LVL_3_1.yaml Test_TC_LVL_4_1.yaml Test_TC_LVL_5_1.yaml Test_TC_LVL_6_1.yaml Test_TC_MC_3_11.yaml Test_TC_MC_3_7.yaml Test_TC_OCC_2_1.yaml Test_TC_OCC_2_2.yaml Test_TC_OO_2_1.yaml Test_TC_PCC_1_1.yaml Test_TC_PCC_2_1.yaml Test_TC_PRS_2_1.yaml Test_TC_PS_1_1.yaml Test_TC_RH_1_1.yaml Test_TC_RH_2_1.yaml Test_TC_RH_2_2.yaml Test_TC_TM_1_1.yaml Test_TC_TM_2_2.yaml Test_TC_TSTAT_1_1.yaml Test_TC_TSTAT_2_1.yaml Test_TC_TSUIC_1_1.yaml Test_TC_TSUIC_2_1.yaml Test_TC_TSUIC_2_2.yaml Test_TC_WIFIDIAG_1_1.yaml * Auto generated files * Modified scripts rebase * Auto generated files after rebase * Modified scripts after rebase * Auto generated files after rebase * modified after Rebased * auto generated rebaesed --- .../certification/Test_TC_BOOL_1_1.yaml | 27 - .../certification/Test_TC_BOOL_2_1.yaml | 15 - .../certification/Test_TC_BRAC_1_1.yaml | 30 + .../suites/certification/Test_TC_ILL_1_1.yaml | 30 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 7 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 32 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 68 +- .../suites/certification/Test_TC_LVL_5_1.yaml | 33 +- .../suites/certification/Test_TC_LVL_6_1.yaml | 4 +- .../suites/certification/Test_TC_MC_3_11.yaml | 14 +- .../suites/certification/Test_TC_MC_3_7.yaml | 12 +- .../suites/certification/Test_TC_OCC_2_1.yaml | 208 + .../suites/certification/Test_TC_OCC_2_2.yaml | 22 +- .../suites/certification/Test_TC_PCC_1_1.yaml | 9 +- .../suites/certification/Test_TC_PCC_2_1.yaml | 82 +- .../suites/certification/Test_TC_PS_1_1.yaml | 34 - .../suites/certification/Test_TC_RH_1_1.yaml | 52 +- .../suites/certification/Test_TC_RH_2_1.yaml | 36 +- .../suites/certification/Test_TC_RH_2_2.yaml | 33 +- .../suites/certification/Test_TC_TM_1_1.yaml | 25 - .../suites/certification/Test_TC_TM_2_1.yaml | 2 - .../suites/certification/Test_TC_TM_2_2.yaml | 30 +- .../certification/Test_TC_TSTAT_1_1.yaml | 41 - .../certification/Test_TC_TSTAT_2_1.yaml | 1202 +---- .../certification/Test_TC_TSTAT_2_2.yaml | 23 + .../certification/Test_TC_TSUIC_1_1.yaml | 50 - .../certification/Test_TC_TSUIC_2_1.yaml | 63 +- .../certification/Test_TC_TSUIC_2_2.yaml | 3 - .../certification/Test_TC_WIFIDIAG_1_1.yaml | 7 +- .../Framework/CHIPTests/CHIPClustersTests.m | 3116 +++++------ .../zap-generated/test/Commands.h | 3552 +++++-------- .../chip-tool/zap-generated/test/Commands.h | 4689 ++++++----------- 32 files changed, 4814 insertions(+), 8737 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index 57ac79db0cb867..22d0f995647186 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -41,22 +41,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -74,7 +58,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -82,18 +65,8 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - - #Disabled due to issue #13442 - - label: "Read the optional global attribute : FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index cb3b6eb42adb51..e997fae45f22b5 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -40,18 +40,3 @@ tests: response: constraints: type: bool - - - label: - "Write the default value to mandatory non-global attribute: StateValue" - command: "writeAttribute" - attribute: "StateValue" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "Reads back the mandatory non-global attribute: StateValue" - command: "readAttribute" - attribute: "StateValue" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml index eea942c4607424..547bf39db86803 100644 --- a/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml @@ -40,3 +40,33 @@ tests: response: constraints: type: uint16 + + - label: "Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + + #issue #11053 disabled steps below Global attributes missing from YAML framework + - label: "Read the global attribute: EventList" + disabled: true + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 41cd89aa9e641c..50544be9e7a145 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -28,11 +28,13 @@ tests: - name: "nodeId" value: nodeId + #issue #12190 as per spec default value is 3 but expecting 2 - label: "read the global attribute: ClusterRevision" + disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 2 + value: 3 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -41,22 +43,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 2 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -74,7 +60,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -82,17 +67,8 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - - - label: "Read the optional global attribute : FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 4147475a71ef2e..5a12491b2ef7fb 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -74,7 +74,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -82,7 +81,6 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -90,7 +88,6 @@ tests: type: list - label: "read the optional global attribute: FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: @@ -112,8 +109,8 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: - value: 3 + constraints: + type: map32 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 608e9376446732..0416617a970345 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 @@ -32,19 +32,22 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 254 + constraints: + type: uint8 - label: "Reads the MinLevel attribute" command: "readAttribute" attribute: "min level" response: - value: 0 + constraints: + type: uint8 - label: "Reads the MaxLevel attribute" command: "readAttribute" attribute: "max level" response: - value: 254 + constraints: + type: uint8 - label: "sends a Move to level command" command: "MoveToLevel" @@ -53,7 +56,7 @@ tests: - name: "level" value: 64 - name: "transitionTime" - value: 0 + value: 65535 - name: "optionMask" value: 1 - name: "optionOverride" @@ -78,40 +81,41 @@ tests: arguments: values: - name: "level" - value: 128 + value: 100 - name: "transitionTime" - value: 1 + value: 100 - name: "optionMask" value: 1 - name: "optionOverride" value: 1 - - label: "Wait a second" + - label: "Wait 11000 second" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 11000 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 128 + value: 100 - label: "reads On Off Transition Time attribute from DUT" command: "readAttribute" attribute: "On Off Transition Time" response: - value: 0 + constraints: + type: uint16 - label: "sends a Move to level command" command: "MoveToLevel" arguments: values: - name: "level" - value: 254 + value: 128 - name: "transitionTime" value: 65535 - name: "optionMask" @@ -119,19 +123,19 @@ tests: - name: "optionOverride" value: 1 - - label: "Wait 10ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 1000 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 254 + value: 128 - label: "Reset level to 254" command: "MoveToLevel" 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 212efdde6f2e4f..6a3abbc3e0962d 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 @@ -28,17 +28,13 @@ tests: - name: "nodeId" value: nodeId - - label: "reads CurrentLevel attribute from DUT" - command: "readAttribute" - attribute: "current level" - response: - value: 254 - - label: "reads max level attribute from DUT" command: "readAttribute" attribute: "max level" response: - value: 254 + saveAs: MaxlevelValue + constraints: + type: uint8 - label: "sends a Move up command" command: "Move" @@ -47,12 +43,23 @@ tests: - name: "moveMode" value: 0 - name: "rate" - value: 200 + value: 32 - name: "optionMask" value: 1 - name: "optionOverride" value: 1 + - label: "user prompt message" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "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" + - label: "Wait 3000ms" cluster: "DelayCommands" command: "WaitForMs" @@ -65,13 +72,15 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 254 + value: MaxlevelValue - label: "reads min level attribute from DUT" command: "readAttribute" attribute: "min level" response: - value: 0 + saveAs: MinlevelValue + constraints: + type: uint8 - label: "sends a Move down command" command: "Move" @@ -80,40 +89,48 @@ tests: - name: "moveMode" value: 1 - name: "rate" - value: 250 + value: 64 - name: "optionMask" value: 1 - name: "optionOverride" value: 1 - - label: "Wait 3000ms" + - label: "user prompt message" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "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" + + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 3000 + value: 5000 # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: + value: 1 constraints: minValue: 0 maxValue: 1 - - label: "Write default move rate attribute from DUT" - command: "writeAttribute" - attribute: "default move rate" - arguments: - value: 20 - - label: "reads default move rate attribute from DUT" command: "readAttribute" attribute: "default move rate" response: - value: 20 + saveAs: DefaultMoveRateValue + constraints: + type: uint8 - label: "sends a Move up command at default move rate" command: "Move" @@ -143,6 +160,17 @@ tests: constraints: notValue: 255 + - label: "user prompt message" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Physically verify that the device moves at the rate + recorded in step 3a and completes moving to its maximum + level." + - label: "Reset level to 254" command: "MoveToLevel" arguments: 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 66099613d60683..4fd1359b7d0719 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 @@ -32,14 +32,14 @@ tests: cluster: "On/Off" command: "on" - - label: "Precondition: DUT level is set to 0x80" + - label: "Precondition: DUT level is set to its lowest point" command: "Step" arguments: values: - name: "stepMode" value: 1 - name: "stepSize" - value: 126 + value: 100 - name: "transitionTime" value: 20 - name: "optionMask" @@ -47,59 +47,62 @@ tests: - name: "optionOverride" value: 0 - - label: "Wait 4000ms" + - label: "Wait 3000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 3000 - label: "Reads current level attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 128 + saveAs: CurrentlevelValue + constraints: + type: uint8 - - label: "Sends step down command to DUT" + - label: "Sends step up command to DUT" command: "Step" arguments: values: - name: "stepMode" - value: 1 + value: 0 - name: "stepSize" value: 64 - name: "transitionTime" - value: 20 + value: 2 - name: "optionMask" value: 0 - name: "optionOverride" value: 0 - - label: "Wait 4000ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 4000 + value: 5000 - label: "Reads current level attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 64 + constraints: + notValue: CurrentlevelValue - - label: "Sends a Step up command" + - label: "Sends a Step down command" command: "Step" arguments: values: - name: "stepMode" - value: 0 + value: 1 - name: "stepSize" value: 64 - name: "transitionTime" - value: 20 + value: 2 - name: "optionMask" value: 0 - name: "optionOverride" @@ -117,7 +120,7 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 128 + value: CurrentlevelValue - label: "Reset level to 254" command: "MoveToLevel" 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 bc9644b72ec7e0..f0c31c8184c2af 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 @@ -58,6 +58,7 @@ tests: command: "readAttribute" attribute: "current level" response: + saveAs: CurrentLevelValue constraints: minValue: 0 maxValue: 1 @@ -97,8 +98,7 @@ tests: attribute: "current level" response: constraints: - minValue: 2 - maxValue: 3 + notValue: CurrentLevelValue - label: "Reset level to 254" command: "MoveToLevel" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml index cb7b4a56da2abb..601235bf6e92ca 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml @@ -29,6 +29,16 @@ tests: value: nodeId # Remove disable flag when SDK supports command. + - label: "Read attribute media input list" + disabled: true + command: "readAttribute" + attribute: "InputList" + response: + constraints: + type: list + saveAs: InputListValues + + # Remove disable flag when SDK supports command. #13029 - label: "Rename Input Command" disabled: true command: "RenameInput" @@ -38,7 +48,7 @@ tests: value: 1 - name: "name" value: "A1" - # Remove disable flag when SDK supports command. + # Remove disable flag when SDK supports command. #13029 - label: "Rename Input Command" disabled: true command: "RenameInput" @@ -48,7 +58,7 @@ tests: value: 1 - name: "name" value: "A2" - # Remove disable flag when SDK supports command. + # Remove disable flag when SDK supports command. #13029 - label: "Read attribute media input list" disabled: true command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml index c4127c210766f2..90c0fe395074df 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml @@ -41,6 +41,14 @@ tests: - name: "applicationId" value: "HelloWorldApp" + - label: "Reads the Status attribute" + disabled: true + cluster: "Application Basic" + command: "readAttribute" + attribute: "Status" + response: + value: 1 + # TODO: Update the corresponding values when feature is supported - label: "Stop an app with the provided application ID" disabled: true @@ -63,7 +71,7 @@ tests: - name: "applicationId" value: "NonAvailableApp" response: - error: UNSUPPORTED_WRITE + error: APP_NOT_AVAILABLE # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" @@ -91,4 +99,4 @@ tests: - name: "applicationId" value: "HelloWorldApp2" response: - error: INVALID_COMMAND + error: SYSTEM_BUSY diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 01f38f84cad857..4296b71a5b3e11 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -122,3 +122,211 @@ tests: attribute: "occupancy sensor type bitmap" response: value: 1 + + #disabled due to issue #15377 + - label: "Reads optional attribute: PIROccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIROccupiedToUnoccupiedDelay" + response: + value: 0 + + - label: "Reads optional attribute constrains: PIROccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIROccupiedToUnoccupiedDelay" + response: + constraints: + type: uint16 + + - label: + "Writes the respective default value to optional attribute: + PIROccupiedToUnoccupiedDelay" + disabled: true + command: "writeAttribute" + attribute: "PIROccupiedToUnoccupiedDelay" + arguments: + value: 0 + + - label: "Reads back optional attribute: PIROccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIROccupiedToUnoccupiedDelay" + response: + value: 0 + + - label: "Reads optional attribute: PIRUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedDelay" + response: + value: 0 + + - label: "Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedDelay" + response: + constraints: + type: uint16 + + - label: + "Writes the respective default value to optional attribute: + PIRUnoccupiedToOccupiedDelay" + disabled: true + command: "writeAttribute" + attribute: "PIRUnoccupiedToOccupiedDelay" + arguments: + value: 0 + + - label: "Reads back optional attribute: PIRUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedDelay" + response: + value: 0 + + - label: "Reads optional attribute: PIRUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedThreshold" + response: + value: 1 + + - label: + "Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedThreshold" + response: + constraints: + type: uint8 + minValue: 1 + maxValue: 254 + + - label: + "Writes the respective default value to optional attribute: + PIRUnoccupiedToOccupiedThreshold" + disabled: true + command: "writeAttribute" + attribute: "PIRUnoccupiedToOccupiedThreshold" + arguments: + value: 1 + + - label: "Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PIRUnoccupiedToOccupiedThreshold" + response: + value: 1 + + - label: + "Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactOccupiedToUnoccupiedDelay" + response: + value: 0 + + - label: + "Reads optional attribute constrains: + PhysicalContactOccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactOccupiedToUnoccupiedDelay" + response: + constraints: + type: uint16 + + - label: + "Writes the respective default value to optional attribute: + PhysicalContactOccupiedToUnoccupiedDelay" + disabled: true + command: "writeAttribute" + attribute: "PhysicalContactOccupiedToUnoccupiedDelay" + arguments: + value: 0 + + - label: + "Reads back optional attribute: + PhysicalContactOccupiedToUnoccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactOccupiedToUnoccupiedDelay" + response: + value: 0 + + - label: + "Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedDelay" + response: + value: 0 + + - label: + "Reads optional attribute constrains: + PhysicalContactUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedDelay" + response: + constraints: + type: uint16 + + - label: + "Writes the respective default value to optional attribute: + PhysicalContactUnoccupiedToOccupiedDelay" + disabled: true + command: "writeAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedDelay" + arguments: + value: 0 + + - label: + "Reads back optional attribute: + PhysicalContactUnoccupiedToOccupiedDelay" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedDelay" + response: + value: 0 + + - label: + "Reads optional attribute: + PhysicalContactUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" + response: + value: 1 + + - label: + "Reads optional attribute constrains: + PhysicalContactUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" + response: + constraints: + type: uint8 + minValue: 1 + maxValue: 254 + + - label: + "Writes the respective default value to optional attribute: + PhysicalContactUnoccupiedToOccupiedThreshold" + disabled: true + command: "writeAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" + arguments: + value: 1 + + - label: + "Reads back optional attribute: + PhysicalContactUnoccupiedToOccupiedThreshold" + disabled: true + command: "readAttribute" + attribute: "PhysicalContactUnoccupiedToOccupiedThreshold" + response: + value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml index 5a86edb7c3af87..eb6e00abccf6a8 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml @@ -28,41 +28,23 @@ tests: - name: "nodeId" value: nodeId - #Issue #10816 Disabled as values needs to be stored for comparison - label: "Reads Occupancy attribute from DUT" - disabled: true command: "readAttribute" attribute: "occupancy" PICS: A_OCCUPANCY response: value: 0 - - - label: "Reads Occupancy attribute from DUT" - command: "readAttribute" - attribute: "occupancy" - PICS: A_OCCUPANCY - response: - constraints: - type: map8 + saveAs: OccupancyValue #Issue #10815 Disabled as UI prompts required for user action - label: "Operate on DUT to change the occupancy status" disabled: true PICS: MANUAL_OCCUPANCY_CHANGE - #Issue #10816 Disabled as values needs to be compared with the value read in step 2 - label: "Reads back Occupancy attribute from DUT after few seconds" - disabled: true - command: "readAttribute" - attribute: "occupancy" - PICS: A_OCCUPANCY - response: - value: 0 - - - label: "Reads Occupancy attribute from DUT" command: "readAttribute" attribute: "occupancy" PICS: A_OCCUPANCY response: constraints: - type: map8 + notvalue: OccupancyValue diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index 6c246db193b3f9..6bca9268c35e8c 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -58,7 +58,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 1 + value: 3 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -77,7 +77,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -85,7 +84,6 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -93,7 +91,6 @@ tests: type: list - label: "read the optional global attribute: FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: @@ -107,7 +104,6 @@ tests: type: map32 - label: "write the default values to optional global attribute: FeatureMap" - disabled: true command: "writeAttribute" attribute: "FeatureMap" arguments: @@ -116,8 +112,9 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: value: 0 + constraints: + type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index 850e789712fbec..05250e107b249a 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -28,13 +28,6 @@ tests: - name: "nodeId" value: nodeId - - label: "read the mandatory attribute: MaxPressure" - disabled: true - command: "readAttribute" - attribute: "MaxPressure" - response: - value: null - - label: "read the mandatory attribute: MaxPressure" command: "readAttribute" attribute: "MaxPressure" @@ -42,13 +35,6 @@ tests: constraints: type: int16 - - label: "read the mandatory attribute: MaxSpeed" - disabled: true - command: "readAttribute" - attribute: "MaxSpeed" - response: - value: null - - label: "read the mandatory attribute: MaxSpeed" command: "readAttribute" attribute: "MaxSpeed" @@ -56,13 +42,6 @@ tests: constraints: type: uint16 - - label: "read the mandatory attribute: MaxFlow" - disabled: true - command: "readAttribute" - attribute: "MaxFlow" - response: - value: null - - label: "read the mandatory attribute: MaxFlow" command: "readAttribute" attribute: "MaxFlow" @@ -70,13 +49,6 @@ tests: constraints: type: uint16 - - label: "read the mandatory attribute: EffectiveOperationMode" - disabled: true - command: "readAttribute" - attribute: "EffectiveOperationMode" - response: - value: desc - - label: "read the mandatory attribute: EffectiveOperationMode" command: "readAttribute" attribute: "EffectiveOperationMode" @@ -84,13 +56,6 @@ tests: constraints: type: enum8 - - label: "read the mandatory attribute: EffectiveControlMode" - disabled: true - command: "readAttribute" - attribute: "EffectiveControlMode" - response: - value: desc - - label: "read the mandatory attribute: EffectiveControlMode" command: "readAttribute" attribute: "EffectiveControlMode" @@ -98,13 +63,6 @@ tests: constraints: type: enum8 - - label: "read the mandatory attribute: Capacity" - disabled: true - command: "readAttribute" - attribute: "Capacity" - response: - value: null - - label: "read the mandatory attribute: Capacity" command: "readAttribute" attribute: "Capacity" @@ -253,7 +211,6 @@ tests: #issue #11670 Null check is not implemented in YAML framework. - label: "read the optional attribute: MinConstPressure" disabled: true - optional: true command: "readAttribute" attribute: "MinConstPressure" response: @@ -269,7 +226,6 @@ tests: - label: "read the optional attribute: MaxConstPressure" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstPressure" response: @@ -285,7 +241,6 @@ tests: - label: "read the optional attribute: MinCompPressure" disabled: true - optional: true command: "readAttribute" attribute: "MinCompPressure" response: @@ -301,7 +256,6 @@ tests: - label: "read the optional attribute: MaxCompPressure" disabled: true - optional: true command: "readAttribute" attribute: "MaxCompPressure" response: @@ -317,7 +271,6 @@ tests: - label: "read the optional attribute: MinConstSpeed" disabled: true - optional: true command: "readAttribute" attribute: "MinConstSpeed" response: @@ -333,7 +286,6 @@ tests: - label: "read the optional attribute: MaxConstSpeed" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: @@ -349,7 +301,6 @@ tests: - label: "read the optional attribute: MinConstFlow" disabled: true - optional: true command: "readAttribute" attribute: "MinConstFlow" response: @@ -365,7 +316,6 @@ tests: - label: "read the optional attribute: MaxConstFlow" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstFlow" response: @@ -381,7 +331,6 @@ tests: - label: "read the optional attribute: MinConstTemp" disabled: true - optional: true command: "readAttribute" attribute: "MinConstTemp" response: @@ -398,7 +347,6 @@ tests: - label: "read the optional attribute: MaxConstTemp" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstTemp" response: @@ -430,7 +378,6 @@ tests: - label: "read the optional attribute: Speed" disabled: true - optional: true command: "readAttribute" attribute: "Speed" response: @@ -461,7 +408,6 @@ tests: - label: "read the optional attribute: Power" disabled: true - optional: true command: "readAttribute" attribute: "Power" response: @@ -492,7 +438,6 @@ tests: - label: "write to the optional attribute: MinConstPressure" disabled: true - optional: true command: "writeAttribute" attribute: "MinConstPressure" arguments: @@ -502,7 +447,6 @@ tests: - label: "write to the optional attribute: MaxConstPressure" disabled: true - optional: true command: "writeAttribute" attribute: "MaxConstPressure" arguments: @@ -512,7 +456,6 @@ tests: - label: "write to the optional attribute: MinCompPressure" disabled: true - optional: true command: "writeAttribute" attribute: "MinCompPressure" arguments: @@ -522,7 +465,6 @@ tests: - label: "write to the optional attribute: MaxCompPressure" disabled: true - optional: true command: "writeAttribute" attribute: "MaxCompPressure" arguments: @@ -532,7 +474,6 @@ tests: - label: "write to the optional attribute: MinConstSpeed" disabled: true - optional: true command: "writeAttribute" attribute: "MinConstSpeed" arguments: @@ -542,7 +483,6 @@ tests: - label: "write to the optional attribute: MaxConstSpeed" disabled: true - optional: true command: "writeAttribute" attribute: "MaxConstSpeed" arguments: @@ -552,7 +492,6 @@ tests: - label: "write to the optional attribute: MinConstFlow" disabled: true - optional: true command: "writeAttribute" attribute: "MinConstFlow" arguments: @@ -562,7 +501,6 @@ tests: - label: "write to the optional attribute: MaxConstFlow" disabled: true - optional: true command: "writeAttribute" attribute: "MaxConstFlow" arguments: @@ -572,7 +510,6 @@ tests: - label: "write to the optional attribute: MinConstTemp" disabled: true - optional: true command: "writeAttribute" attribute: "MinConstTemp" arguments: @@ -582,7 +519,6 @@ tests: - label: "write to the optional attribute: MaxConstTemp" disabled: true - optional: true command: "writeAttribute" attribute: "MaxConstTemp" arguments: @@ -592,7 +528,6 @@ tests: - label: "write to the optional attribute: PumpStatus" disabled: true - optional: true command: "writeAttribute" attribute: "PumpStatus" arguments: @@ -602,7 +537,6 @@ tests: - label: "write to the optional attribute: Speed" disabled: true - optional: true command: "writeAttribute" attribute: "Speed" arguments: @@ -612,7 +546,6 @@ tests: - label: "write to the optional attribute: LifetimeRunningHours" disabled: true - optional: true command: "writeAttribute" attribute: "LifetimeRunningHours" arguments: @@ -620,7 +553,6 @@ tests: - label: "write to the optional attribute: Power" disabled: true - optional: true command: "writeAttribute" attribute: "Power" arguments: @@ -637,7 +569,6 @@ tests: - label: "read the optional attribute: MinConstPressure" disabled: true - optional: true command: "readAttribute" attribute: "MinConstPressure" response: @@ -653,7 +584,6 @@ tests: - label: "read the optional attribute: MaxConstPressure" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstPressure" response: @@ -669,7 +599,6 @@ tests: - label: "read the optional attribute: MinCompPressure" disabled: true - optional: true command: "readAttribute" attribute: "MinCompPressure" response: @@ -685,7 +614,6 @@ tests: - label: "read the optional attribute: MaxCompPressure" disabled: true - optional: true command: "readAttribute" attribute: "MaxCompPressure" response: @@ -701,7 +629,6 @@ tests: - label: "read the optional attribute: MinConstSpeed" disabled: true - optional: true command: "readAttribute" attribute: "MinConstSpeed" response: @@ -717,7 +644,6 @@ tests: - label: "read the optional attribute: MaxConstSpeed" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstSpeed" response: @@ -733,7 +659,6 @@ tests: - label: "read the optional attribute: MinConstFlow" disabled: true - optional: true command: "readAttribute" attribute: "MinConstFlow" response: @@ -749,7 +674,6 @@ tests: - label: "read the optional attribute: MaxConstFlow" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstFlow" response: @@ -765,7 +689,6 @@ tests: - label: "read the optional attribute: MinConstTemp" disabled: true - optional: true command: "readAttribute" attribute: "MinConstTemp" response: @@ -779,10 +702,10 @@ tests: constraints: type: int16 minValue: -27315 + maxValue: 32767 - label: "read the optional attribute: MaxConstTemp" disabled: true - optional: true command: "readAttribute" attribute: "MaxConstTemp" response: @@ -796,6 +719,7 @@ tests: constraints: type: int16 minValue: -27315 + maxValue: 32767 - label: "read the optional attribute: PumpStatus" optional: true @@ -814,7 +738,6 @@ tests: - label: "read the optional attribute: Speed" disabled: true - optional: true command: "readAttribute" attribute: "Speed" response: @@ -844,7 +767,6 @@ tests: - label: "read the optional attribute: Power" disabled: true - optional: true command: "readAttribute" attribute: "Power" response: diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index d260d9dbddcfe4..bcb6f0990f6b8e 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -34,29 +34,6 @@ tests: response: value: 1 - - label: "Read the global attribute constraints: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - constraints: - type: uint16 - - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -74,7 +51,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -82,18 +58,8 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - - #disabled due to issue #13442 - - label: "Read the optional global attribute : FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 8fc39d682d643d..539203a2829f1b 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -35,7 +35,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 1 + value: 3 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -44,23 +44,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - disabled: true - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -78,7 +61,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -86,40 +68,8 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - - - label: "read the optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - - - label: "Read the optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 - - - label: "write the default values to optional global attribute: FeatureMap" - disabled: true - command: "writeAttribute" - attribute: "FeatureMap" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml index 9c610309583d93..475f27782fb633 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_1.yaml @@ -28,60 +28,34 @@ tests: - name: "nodeId" value: nodeId - - label: "Reads the mandatory attribute: MeasuredValue" - disabled: true - command: "readAttribute" - attribute: "measured value" - response: - value: 65535 - - label: "Reads constraints of attribute: MeasuredValue" command: "readAttribute" attribute: "measured value" response: constraints: - type: uint16 - - - label: "Reads the mandatory attribute: MinMeasuredValue" - disabled: true - command: "readAttribute" - attribute: "min measured value" - response: - value: 65535 + type: int16 + minValue: 0 + maxValue: 10000 - label: "Reads constraints of attribute: MinMeasuredValue" command: "readAttribute" attribute: "min measured value" response: constraints: - type: uint16 + type: int16 minValue: 0 maxValue: 9999 - - label: "Reads the mandatory attribute: MaxMeasuredValue" - disabled: true - command: "readAttribute" - attribute: "max measured value" - response: - value: 65535 - - label: "Reads constraints of attribute: MaxMeasuredValue" disabled: true command: "readAttribute" attribute: "max measured value" response: constraints: - type: uint16 + type: int16 minValue: 1 maxValue: 10000 - - label: "Reads the optional attribute: Tolerance" - optional: true - command: "readAttribute" - attribute: "tolerance" - response: - value: 0 - - label: "Reads constraints of attribute: Tolerance" optional: true command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml index 977acd69776aa0..bae47dc7d5e16f 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_2_2.yaml @@ -28,14 +28,24 @@ tests: - name: "nodeId" value: nodeId - #Disabled as values needs to be stored for comparison - - label: "Reads MeasuredValue attribute from DUT" + - label: "Reads constraints of attribute: MinMeasuredValue" + command: "readAttribute" + attribute: "min measured value" + response: + constraints: + type: int16 + minValue: 0 + maxValue: 9999 + + - label: "Reads constraints of attribute: MaxMeasuredValue" disabled: true command: "readAttribute" - attribute: "measured value" - PICS: A_RELATIVEHUMIDITY + attribute: "max measured value" response: - value: 0 + constraints: + type: int16 + minValue: 1 + maxValue: 10000 - label: "Reads MeasuredValue attribute from DUT" command: "readAttribute" @@ -43,22 +53,15 @@ tests: PICS: A_RELATIVEHUMIDITY response: constraints: - type: uint16 + type: int16 + minValue: 0 + maxValue: 10000 #Disabled as UI prompts required for user action - label: "Operate on device to change the relative humidity significantly" disabled: true PICS: MANUAL_RELATIVEHUMIDITY_CHANGE - #Disabled as values needs to be compared with the value read in step 2 - - label: "Reads back MeasuredValue attribute from DUT after few seconds" - disabled: true - command: "readAttribute" - attribute: "measured value" - PICS: A_RELATIVEHUMIDITY - response: - value: 0 - - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "measured value" diff --git a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml index 49c54803abc0d9..cacf105243a499 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml @@ -43,23 +43,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 4 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - disabled: true - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 4 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -91,11 +74,3 @@ tests: response: constraints: type: list - - - label: "Read the optional global attribute : FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml index 77dad07826ef45..0505319f0e37ff 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_2_1.yaml @@ -36,7 +36,6 @@ tests: type: int16 - label: "read the mandatory attribute: MinMeasuredValue" - disabled: true command: "readAttribute" attribute: "MinMeasuredValue" response: @@ -46,7 +45,6 @@ tests: maxValue: 32766 - label: "read the mandatory attribute: MaxMeasuredValue" - disabled: true command: "readAttribute" attribute: "MaxMeasuredValue" response: diff --git a/src/app/tests/suites/certification/Test_TC_TM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TM_2_2.yaml index 56f45e811f1c8e..d19221203d01cc 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_2_2.yaml @@ -28,14 +28,23 @@ tests: - name: "nodeId" value: nodeId - #Disabled as values needs to be stored for comparison - - label: "Reads MeasuredValue attribute from DUT" - disabled: true + - label: "read the mandatory attribute: MinMeasuredValue" command: "readAttribute" - attribute: "MeasuredValue" - PICS: A_TEMPERATURE + attribute: "MinMeasuredValue" response: - value: 0 + constraints: + type: int16 + minValue: -27315 + maxValue: 32766 + + - label: "read the mandatory attribute: MaxMeasuredValue" + command: "readAttribute" + attribute: "MaxMeasuredValue" + response: + constraints: + type: int16 + minValue: -27314 + maxValue: 32767 - label: "Reads MeasuredValue attribute from DUT" command: "readAttribute" @@ -50,15 +59,6 @@ tests: disabled: true PICS: MANUAL_TEMPERATURE_CHANGE - #Disabled as values needs to be compared with the value read in step 2 - - label: "Reads back MeasuredValue attribute from DUT after few seconds" - disabled: true - command: "readAttribute" - attribute: "MeasuredValue" - PICS: A_TEMPERATURE - response: - value: 0 - - label: "Read the mandatory attribute: MeasuredValue" command: "readAttribute" attribute: "MeasuredValue" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 38e3d38f21dfc5..40e88cd7e71e33 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -43,23 +43,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 5 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - disabled: true - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -92,33 +75,9 @@ tests: constraints: type: list - #issue #12089 Value mismatch for FeatureMap attribute expecting 11 - - label: "read the optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - - label: "Read the optional global attribute constraints: FeatureMap" command: "readAttribute" attribute: "FeatureMap" response: constraints: type: map32 - - - label: "write the default values to optional global attribute: FeatureMap" - disabled: true - command: "writeAttribute" - attribute: "FeatureMap" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 6b6dee6c8cc57a..206b584cda5ad5 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -28,13 +28,7 @@ tests: - name: "nodeId" value: nodeId - #issue #11524 disabled steps are for attributes not supported in YAML framework - - label: "Reads mandatory attributes from DUT: LocalTemperature" - disabled: true - command: "readAttribute" - attribute: "local temperature" - response: - value: null + #issue #11524 below disabled steps are for attributes not supported in YAML framework - label: "Reads constraints of mandatory attributes from DUT: LocalTemperature" @@ -44,30 +38,6 @@ tests: constraints: type: int16 - - label: - "Writes the respective default value to mandatory attributes to DUT: - LocalTemperature" - disabled: true - command: "writeAttribute" - attribute: "local temperature" - arguments: - value: null - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: LocalTemperature" - disabled: true - command: "readAttribute" - attribute: "local temperature" - response: - value: null - - - label: "Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit" - command: "readAttribute" - attribute: "abs min heat setpoint limit" - response: - value: 700 - - label: "Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit" @@ -79,28 +49,6 @@ tests: minValue: 700 maxValue: 3000 - - label: - "Writes the respective default value to mandatory attributes to DUT: - AbsMinHeatSetpointLimit" - command: "writeAttribute" - attribute: "abs min heat setpoint limit" - arguments: - value: 700 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit" - command: "readAttribute" - attribute: "abs min heat setpoint limit" - response: - value: 700 - - - label: "Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit" - command: "readAttribute" - attribute: "abs max heat setpoint limit" - response: - value: 3000 - - label: "Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit" @@ -113,30 +61,9 @@ tests: maxValue: 3000 - label: - "Writes the respective default value to mandatory attributes to DUT: - AbsMaxHeatSetpointLimit" - command: "writeAttribute" - attribute: "abs max heat setpoint limit" - arguments: - value: 3000 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit" - command: "readAttribute" - attribute: "abs max heat setpoint limit" - response: - value: 3000 - - - label: "Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit" - command: "readAttribute" - attribute: "abs min cool setpoint limit" - response: - value: 1600 - - - label: - "Reads constraints of mandatory attributes from DUT: + "Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit" + optional: true command: "readAttribute" attribute: "abs min cool setpoint limit" response: @@ -146,30 +73,9 @@ tests: maxValue: 3200 - label: - "Writes the respective default value to mandatory attributes to DUT: - AbsMinCoolSetpointLimit" - command: "writeAttribute" - attribute: "abs min cool setpoint limit" - arguments: - value: 1600 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit" - command: "readAttribute" - attribute: "abs min cool setpoint limit" - response: - value: 1600 - - - label: "Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit" - command: "readAttribute" - attribute: "abs max cool setpoint limit" - response: - value: 3200 - - - label: - "Reads constraints of mandatory attributes from DUT: + "Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit" + optional: true command: "readAttribute" attribute: "abs max cool setpoint limit" response: @@ -178,22 +84,6 @@ tests: minValue: 1600 maxValue: 3200 - - label: - "Writes the respective default value to mandatory attributes to DUT: - AbsMaxCoolSetpointLimit" - command: "writeAttribute" - attribute: "abs max cool setpoint limit" - arguments: - value: 3200 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit" - command: "readAttribute" - attribute: "abs max cool setpoint limit" - response: - value: 3200 - - label: "Reads constraints of mandatory attributes from DUT: PICoolingDemand" disabled: true @@ -205,24 +95,6 @@ tests: minValue: 0 maxValue: 100 - - label: - "Writes the respective default value to mandatory attributes to DUT: - PICoolingDemand" - disabled: true - command: "writeAttribute" - attribute: "PICoolingDemand" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: PICoolingDemand" - disabled: true - command: "readAttribute" - attribute: "PICoolingDemand" - response: - value: 0 - - label: "Reads constraints of mandatory attributes from DUT: PIHeatingDemand" disabled: true @@ -235,32 +107,9 @@ tests: maxValue: 100 - label: - "Writes the respective default value to mandatory attributes to DUT: - PIHeatingDemand" - disabled: true - command: "writeAttribute" - attribute: "PIHeatingDemand" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back mandatory attributes from DUT: PIHeatingDemand" - disabled: true - command: "readAttribute" - attribute: "PIHeatingDemand" - response: - value: 0 - - - label: "Reads mandatory attributes from DUT: OccupiedCoolingSetpoint" - command: "readAttribute" - attribute: "occupied cooling setpoint" - response: - value: 2600 - - - label: - "Reads constraints of mandatory attributes from DUT: + "Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint" + optional: true command: "readAttribute" attribute: "occupied cooling setpoint" response: @@ -269,26 +118,6 @@ tests: minValue: 1600 maxValue: 2600 - - label: - "Writes the respective default value to mandatory attributes to DUT: - OccupiedCoolingSetpoint" - command: "writeAttribute" - attribute: "occupied cooling setpoint" - arguments: - value: 2600 - - - label: "Read back mandatory attributes from DUT: OccupiedCoolingSetpoint" - command: "readAttribute" - attribute: "occupied cooling setpoint" - response: - value: 2600 - - - label: "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint" - command: "readAttribute" - attribute: "occupied heating setpoint" - response: - value: 2000 - - label: "Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint" @@ -300,27 +129,6 @@ tests: minValue: 700 maxValue: 2600 - - label: - "Writes the respective default value to mandatory attributes to DUT: - OccupiedHeatingSetpoint" - command: "writeAttribute" - attribute: "occupied heating setpoint" - arguments: - value: 2000 - - - label: "Read back mandatory attributes from DUT: OccupiedHeatingSetpoint" - command: "readAttribute" - attribute: "occupied heating setpoint" - response: - value: 2000 - - - label: "Reads mandatory attributes from DUT: UnoccupiedCoolingSetpoint" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedCoolingSetpoint" - response: - value: 2600 - - label: "Reads constraints of mandatory attributes from DUT: UnoccupiedCoolingSetpoint" @@ -333,30 +141,6 @@ tests: minValue: 1600 maxValue: 2600 - - label: - "Writes the respective default value to mandatory attributes to DUT: - UnoccupiedCoolingSetpoint" - disabled: true - command: "writeAttribute" - attribute: "UnoccupiedCoolingSetpoint" - arguments: - value: 2600 - - - label: - "Read back mandatory attributes from DUT: UnoccupiedCoolingSetpoint" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedCoolingSetpoint" - response: - value: 2600 - - - label: "Reads mandatory attributes from DUT: UnoccupiedHeatingSetpoint" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedHeatingSetpoint" - response: - value: 2000 - - label: "Reads constraints of mandatory attributes from DUT: UnoccupiedHeatingSetpoint" @@ -369,29 +153,6 @@ tests: minValue: 700 maxValue: 2000 - - label: - "Writes the respective default value to mandatory attributes to DUT: - UnoccupiedHeatingSetpoint" - disabled: true - command: "writeAttribute" - attribute: "UnoccupiedHeatingSetpoint" - arguments: - value: 2000 - - - label: - "Read back mandatory attributes from DUT: UnoccupiedHeatingSetpoint" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedHeatingSetpoint" - response: - value: 2000 - - - label: "Reads mandatory attributes from DUT: MinHeatSetpointLimit" - command: "readAttribute" - attribute: "min heat setpoint limit" - response: - value: 700 - - label: "Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit" @@ -403,26 +164,6 @@ tests: minValue: 700 maxValue: 3000 - - label: - "Writes the respective default value to mandatory attributes to DUT: - MinHeatSetpointLimit" - command: "writeAttribute" - attribute: "min heat setpoint limit" - arguments: - value: 700 - - - label: "Read back mandatory attributes from DUT: MinHeatSetpointLimit" - command: "readAttribute" - attribute: "min heat setpoint limit" - response: - value: 700 - - - label: "Reads mandatory attributes from DUT: MaxHeatSetpointLimit" - command: "readAttribute" - attribute: "max heat setpoint limit" - response: - value: 3000 - - label: "Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit" @@ -435,28 +176,9 @@ tests: maxValue: 3000 - label: - "Writes the respective default value to mandatory attributes to DUT: - MaxHeatSetpointLimit" - command: "writeAttribute" - attribute: "max heat setpoint limit" - arguments: - value: 3000 - - - label: "Read back mandatory attributes from DUT: MaxHeatSetpointLimit" - command: "readAttribute" - attribute: "max heat setpoint limit" - response: - value: 3000 - - - label: "Reads mandatory attributes from DUT: MinCoolSetpointLimit" - command: "readAttribute" - attribute: "min cool setpoint limit" - response: - value: 1600 - - - label: - "Reads constraints of mandatory attributes from DUT: + "Reads constraints of optional attributes from DUT: MinCoolSetpointLimit" + optional: true command: "readAttribute" attribute: "min cool setpoint limit" response: @@ -466,28 +188,9 @@ tests: maxValue: 3200 - label: - "Writes the respective default value to mandatory attributes to DUT: - MinCoolSetpointLimit" - command: "writeAttribute" - attribute: "min cool setpoint limit" - arguments: - value: 1600 - - - label: "Read back mandatory attributes from DUT: MinCoolSetpointLimit" - command: "readAttribute" - attribute: "min cool setpoint limit" - response: - value: 1600 - - - label: "Reads mandatory attributes from DUT: MaxCoolSetpointLimit" - command: "readAttribute" - attribute: "max cool setpoint limit" - response: - value: 3200 - - - label: - "Reads constraints of mandatory attributes from DUT: + "Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit" + optional: true command: "readAttribute" attribute: "max cool setpoint limit" response: @@ -496,26 +199,6 @@ tests: minValue: 1600 maxValue: 3200 - - label: - "Writes the respective default value to mandatory attributes to DUT: - MaxCoolSetpointLimit" - command: "writeAttribute" - attribute: "max cool setpoint limit" - arguments: - value: 3200 - - - label: "Read back mandatory attributes from DUT: MaxCoolSetpointLimit" - command: "readAttribute" - attribute: "max cool setpoint limit" - response: - value: 3200 - - - label: "Reads mandatory attributes from DUT: ControlSequenceOfOperation" - command: "readAttribute" - attribute: "control sequence of operation" - response: - value: 4 - - label: "Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation" @@ -527,27 +210,6 @@ tests: minValue: 0 maxValue: 5 - - label: - "Writes the respective default value to mandatory attributes to DUT: - ControlSequenceOfOperation" - command: "writeAttribute" - attribute: "control sequence of operation" - arguments: - value: 4 - - - label: - "Read back mandatory attributes from DUT: ControlSequenceOfOperation" - command: "readAttribute" - attribute: "control sequence of operation" - response: - value: 4 - - - label: "Reads mandatory attributes from DUT: SystemMode" - command: "readAttribute" - attribute: "system mode" - response: - value: 1 - - label: "Reads constraints of mandatory attributes from DUT: SystemMode" command: "readAttribute" attribute: "system mode" @@ -557,27 +219,6 @@ tests: minValue: 0 maxValue: 9 - - label: - "Writes the respective default value to mandatory attributes to DUT: - SystemMode" - command: "writeAttribute" - attribute: "system mode" - arguments: - value: 1 - - - label: "Read back mandatory attributes from DUT: SystemMode" - command: "readAttribute" - attribute: "system mode" - response: - value: 1 - - - label: "Reads optional attributes from DUT: OutdoorTemperature" - disabled: true - command: "readAttribute" - attribute: "OutdoorTemperature" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: OutdoorTemperature" disabled: true @@ -587,29 +228,6 @@ tests: constraints: type: int16 - - label: - "Writes the respective default value to optional attributes to DUT: - OutdoorTemperature" - disabled: true - command: "writeAttribute" - attribute: "OutdoorTemperature" - arguments: - value: null - - - label: "Read back optional attributes from DUT: OutdoorTemperature" - disabled: true - command: "readAttribute" - attribute: "OutdoorTemperature" - response: - value: null - - - label: "Reads optional attributes from DUT: Occupancy" - disabled: true - command: "readAttribute" - attribute: "Occupancy" - response: - value: 1 - - label: "Reads constraints of optional attributes from DUT: Occupancy" disabled: true command: "readAttribute" @@ -620,29 +238,6 @@ tests: minValue: 0 maxValue: 1 - - label: - "Writes the respective default value to optional attributes to DUT: - Occupancy" - disabled: true - command: "writeAttribute" - attribute: "Occupancy" - arguments: - value: 1 - - - label: "Read back optional attributes from DUT: Occupancy" - disabled: true - command: "readAttribute" - attribute: "Occupancy" - response: - value: 1 - - - label: "Reads optionl attributes from DUT: HVACSystemTypeConfiguration" - disabled: true - command: "readAttribute" - attribute: "HVACSystemTypeConfiguration" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: HVACSystemTypeConfiguration" @@ -653,31 +248,7 @@ tests: constraints: type: map8 minValue: 0 - maxValue: 5 - - - label: - "Writes the respective default value to optional attributes to DUT: - HVACSystemTypeConfiguration" - disabled: true - command: "writeAttribute" - attribute: "HVACSystemTypeConfiguration" - arguments: - value: 0 - - - label: - "Read back optional attributes from DUT: HVACSystemTypeConfiguration" - disabled: true - command: "readAttribute" - attribute: "HVACSystemTypeConfiguration" - response: - value: 0 - - - label: "Reads optional attributes from DUT: LocalTemperatureCalibration" - disabled: true - command: "readAttribute" - attribute: "LocalTemperatureCalibration" - response: - value: 0 + maxValue: 63 - label: "Reads constraints of optional attributes from DUT: @@ -691,30 +262,6 @@ tests: minValue: -25 maxValue: 25 - - label: - "Writes the respective default value to optional attributes to DUT: - LocalTemperatureCalibration" - disabled: true - command: "writeAttribute" - attribute: "LocalTemperatureCalibration" - arguments: - value: 0 - - - label: - "Read back optional attributes from DUT: LocalTemperatureCalibration" - disabled: true - command: "readAttribute" - attribute: "LocalTemperatureCalibration" - response: - value: 0 - - - label: "Reads optional attributes from DUT: MinSetpointDeadBand" - optional: true - command: "readAttribute" - attribute: "min setpoint dead band" - response: - value: 25 - - label: "Reads constraints of optional attributes from DUT: MinSetpointDeadBand" @@ -727,29 +274,6 @@ tests: minValue: 0 maxValue: 25 - - label: - "Writes the respective default value to optional attributes to DUT: - MinSetpointDeadBand" - optional: true - command: "writeAttribute" - attribute: "min setpoint dead band" - arguments: - value: 25 - - - label: "Read back optional attributes from DUT: MinSetpointDeadBand" - optional: true - command: "readAttribute" - attribute: "min setpoint dead band" - response: - value: 25 - - - label: "Reads optional attributes from DUT: RemoteSensing" - disabled: true - command: "readAttribute" - attribute: "RemoteSensing" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: RemoteSensing" disabled: true command: "readAttribute" @@ -757,29 +281,8 @@ tests: response: constraints: type: map8 - - - label: - "Writes the respective default value to optional attributes to DUT: - RemoteSensing" - disabled: true - command: "writeAttribute" - attribute: "RemoteSensing" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: RemoteSensing" - disabled: true - command: "readAttribute" - attribute: "RemoteSensing" - response: - value: 0 - - - label: "Reads optional attributes from DUT: AlarmMask" - disabled: true - command: "readAttribute" - attribute: "AlarmMask" - response: - value: 0 + minValue: 0 + maxValue: 7 - label: "Reads constraints of optional attributes from DUT: AlarmMask" disabled: true @@ -791,31 +294,6 @@ tests: minValue: 0 maxValue: 2 - - label: - "Writes the respective default value to optional attributes to DUT: - AlarmMask" - disabled: true - command: "writeAttribute" - attribute: "AlarmMask" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: AlarmMask" - disabled: true - command: "readAttribute" - attribute: "AlarmMask" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ThermostatRunningMode" - disabled: true - command: "readAttribute" - attribute: "ThermostatRunningMode" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ThermostatRunningMode" @@ -828,24 +306,6 @@ tests: minValue: 0 maxValue: 9 - - label: - "Writes the respective default value to optional attributes to DUT: - ThermostatRunningMode" - disabled: true - command: "writeAttribute" - attribute: "ThermostatRunningMode" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: ThermostatRunningMode" - disabled: true - command: "readAttribute" - attribute: "ThermostatRunningMode" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: StartOfWeek" optional: true command: "readAttribute" @@ -856,32 +316,6 @@ tests: minValue: 0 maxValue: 6 - - label: - "Writes the respective default value to optional attributes to DUT: - StartOfWeek" - optional: true - command: "writeAttribute" - attribute: "start of week" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: StartOfWeek" - optional: true - command: "readAttribute" - attribute: "start of week" - response: - value: 0 - - #issue #11625 default value is 0 as per spec but expecting 7 - - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" - disabled: true - command: "readAttribute" - attribute: "number of weekly transitions" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions" @@ -892,32 +326,6 @@ tests: constraints: type: uint8 - - label: - "Writes the respective default value to optional attributes to DUT: - NumberOfWeeklyTransitions" - optional: true - command: "writeAttribute" - attribute: "number of weekly transitions" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" - disabled: true - command: "readAttribute" - attribute: "number of weekly transitions" - response: - value: 0 - - #issue #11625 default value is 0 as per spec but expecting 4 - - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" - disabled: true - command: "readAttribute" - attribute: "number of daily transitions" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: NumberOfDailyTransitions" @@ -928,31 +336,6 @@ tests: constraints: type: uint8 - - label: - "Writes the respective default value to optional attributes to DUT: - NumberOfDailyTransitions" - optional: true - command: "writeAttribute" - attribute: "number of daily transitions" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" - disabled: true - command: "readAttribute" - attribute: "number of daily transitions" - response: - value: 0 - - - label: "Reads optional attributes from DUT: TemperatureSetpointHold" - disabled: true - command: "readAttribute" - attribute: "TemperatureSetpointHold" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: TemperatureSetpointHold" @@ -965,30 +348,6 @@ tests: minValue: 0 maxValue: 1 - - label: - "Writes the respective default value to optional attributes to DUT: - TemperatureSetpointHold" - disabled: true - command: "writeAttribute" - attribute: "TemperatureSetpointHold" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: TemperatureSetpointHold" - disabled: true - command: "readAttribute" - attribute: "TemperatureSetpointHold" - response: - value: 0 - - - label: - "Reads optional attributes from DUT: TemperatureSetpointHoldDuration" - disabled: true - command: "readAttribute" - attribute: "TemperatureSetpointHoldDuration" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: TemperatureSetpointHoldDuration" @@ -1001,33 +360,6 @@ tests: minValue: 0 maxValue: 1440 - - label: - "Writes the respective default value to optional attributes to DUT: - TemperatureSetpointHoldDuration" - disabled: true - command: "writeAttribute" - attribute: "TemperatureSetpointHoldDuration" - arguments: - value: null - - - label: - "Read back optional attributes from DUT: - TemperatureSetpointHoldDuration" - disabled: true - command: "readAttribute" - attribute: "TemperatureSetpointHoldDuration" - response: - value: null - - - label: - "Reads optional attributes from DUT: - ThermostatProgrammingOperationMode" - disabled: true - command: "readAttribute" - attribute: "ThermostatProgrammingOperationMode" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ThermostatProgrammingOperationMode" @@ -1040,24 +372,6 @@ tests: minValue: 0 maxValue: 2 - - label: - "Writes the respective default value to optional attributes to DUT: - ThermostatProgrammingOperationMode" - disabled: true - command: "writeAttribute" - attribute: "ThermostatProgrammingOperationMode" - arguments: - value: 0 - - - label: - "Read back optional attributes from DUT: - ThermostatProgrammingOperationMode" - disabled: true - command: "readAttribute" - attribute: "ThermostatProgrammingOperationMode" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ThermostatRunningState" @@ -1068,182 +382,45 @@ tests: constraints: type: map16 minValue: 0 - maxValue: 6 - - - label: - "Writes the respective default value to optional attributes to DUT: - ThermostatRunningState" - disabled: true - command: "writeAttribute" - attribute: "ThermostatRunningState" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: ThermostatRunningState" - disabled: true - command: "readAttribute" - attribute: "ThermostatRunningState" - response: - value: 0 - - - label: "Reads optional attributes from DUT: SetpointChangeSource" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSource" - response: - value: 0 - - - label: - "Reads constraints of optional attributes from DUT: - SetpointChangeSource" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSource" - response: - constraints: - type: enum8 - minValue: 0 - maxValue: 2 - - - label: - "Writes the respective default value to optional attributes to DUT: - SetpointChangeSource" - disabled: true - command: "writeAttribute" - attribute: "SetpointChangeSource" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: SetpointChangeSource" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSource" - response: - value: 0 - - - label: "Reads optional attributes from DUT: SetpointChangeAmount" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeAmount" - response: - value: null - - - label: - "Reads constraints of optional attributes from DUT: - SetpointChangeAmount" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeAmount" - response: - constraints: - type: int16 - - - label: - "Writes the respective default value to optional attributes to DUT: - SetpointChangeAmount" - disabled: true - command: "writeAttribute" - attribute: "SetpointChangeAmount" - arguments: - value: null - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: SetpointChangeAmount" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeAmount" - response: - value: null - - - label: "Reads optional attributes from DUT: SetpointChangeSourceTimestamp" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSourceTimestamp" - response: - value: 0 - - - label: - "Reads constraints of optional attributes from DUT: - SetpointChangeSourceTimestamp" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSourceTimestamp" - response: - constraints: - type: utc - - - label: - "Writes the respective default value to optional attributes to DUT: - SetpointChangeSourceTimestamp" - disabled: true - command: "writeAttribute" - attribute: "SetpointChangeSourceTimestamp" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: - "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" - disabled: true - command: "readAttribute" - attribute: "SetpointChangeSourceTimestamp" - response: - value: 0 - - - label: "Reads optional attributes from DUT: OccupiedSetback" - disabled: true - command: "readAttribute" - attribute: "OccupiedSetback" - response: - value: null + maxValue: 6 - label: - "Reads constraints of optional attributes from DUT: OccupiedSetback" + "Reads constraints of optional attributes from DUT: + SetpointChangeSource" disabled: true command: "readAttribute" - attribute: "OccupiedSetback" + attribute: "SetpointChangeSource" response: constraints: - type: uint8 + type: enum8 minValue: 0 - maxValue: 254 + maxValue: 2 - label: - "Writes the respective default value to optional attributes to DUT: - OccupiedSetback" - disabled: true - command: "writeAttribute" - attribute: "OccupiedSetback" - arguments: - value: null - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: OccupiedSetback" + "Reads constraints of optional attributes from DUT: + SetpointChangeAmount" disabled: true command: "readAttribute" - attribute: "OccupiedSetback" + attribute: "SetpointChangeAmount" response: - value: null + constraints: + type: int16 - - label: "Reads optional attributes from DUT: OccupiedSetbackMin" + - label: + "Reads constraints of optional attributes from DUT: + SetpointChangeSourceTimestamp" disabled: true command: "readAttribute" - attribute: "OccupiedSetbackMin" + attribute: "SetpointChangeSourceTimestamp" response: - value: null + constraints: + type: utc - label: - "Reads constraints of optional attributes from DUT: OccupiedSetbackMin" + "Reads constraints of optional attributes from DUT: OccupiedSetback" disabled: true command: "readAttribute" - attribute: "OccupiedSetbackMin" + attribute: "OccupiedSetback" response: constraints: type: uint8 @@ -1251,27 +428,15 @@ tests: maxValue: 254 - label: - "Writes the respective default value to optional attributes to DUT: - OccupiedSetbackMin" - disabled: true - command: "writeAttribute" - attribute: "OccupiedSetbackMin" - arguments: - value: null - - - label: "Read back optional attributes from DUT: OccupiedSetbackMin" + "Reads constraints of optional attributes from DUT: OccupiedSetbackMin" disabled: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: - value: null - - - label: "Reads optional attributes from DUT: OccupiedSetbackMax" - disabled: true - command: "readAttribute" - attribute: "OccupiedSetbackMax" - response: - value: null + constraints: + type: uint8 + minValue: 0 + maxValue: 254 - label: "Reads constraints of optional attributes from DUT: OccupiedSetbackMax" @@ -1284,29 +449,6 @@ tests: minValue: 0 maxValue: 254 - - label: - "Writes the respective default value to optional attributes to DUT: - OccupiedSetbackMax" - disabled: true - command: "writeAttribute" - attribute: "OccupiedSetbackMax" - arguments: - value: null - - - label: "Read back optional attributes from DUT: OccupiedSetbackMax" - disabled: true - command: "readAttribute" - attribute: "OccupiedSetbackMax" - response: - value: null - - - label: "Reads optional attributes from DUT: UnoccupiedSetback" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetback" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: UnoccupiedSetback" disabled: true @@ -1318,31 +460,6 @@ tests: minValue: 0 maxValue: 254 - - label: - "Writes the respective default value to optional attributes to DUT: - UnoccupiedSetback" - disabled: true - command: "writeAttribute" - attribute: "UnoccupiedSetback" - arguments: - value: null - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: UnoccupiedSetback" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetback" - response: - value: null - - - label: "Reads optional attributes from DUT: UnoccupiedSetbackMin" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetbackMin" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMin" @@ -1355,29 +472,6 @@ tests: minValue: 0 maxValue: 254 - - label: - "Writes the respective default value to optional attributes to DUT: - UnoccupiedSetbackMin" - disabled: true - command: "writeAttribute" - attribute: "UnoccupiedSetbackMin" - arguments: - value: null - - - label: "Read back optional attributes from DUT: UnoccupiedSetbackMin" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetbackMin" - response: - value: null - - - label: "Reads optional attributes from DUT: UnoccupiedSetbackMax" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetbackMax" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMax" @@ -1390,29 +484,6 @@ tests: minValue: 0 maxValue: 254 - - label: - "Writes the respective default value to optional attributes to DUT: - UnoccupiedSetbackMax" - disabled: true - command: "writeAttribute" - attribute: "UnoccupiedSetbackMax" - arguments: - value: null - - - label: "Read back optional attributes from DUT: UnoccupiedSetbackMax" - disabled: true - command: "readAttribute" - attribute: "UnoccupiedSetbackMax" - response: - value: null - - - label: "Reads optional attributes from DUT: EmergencyHeatDelta" - disabled: true - command: "readAttribute" - attribute: "EmergencyHeatDelta" - response: - value: 255OccupiedSetbackMin - - label: "Reads constraints of optional attributes from DUT: EmergencyHeatDelta" disabled: true @@ -1422,29 +493,6 @@ tests: constraints: type: uint8 - - label: - "Writes the respective default value to optional attributes to DUT: - EmergencyHeatDelta" - disabled: true - command: "writeAttribute" - attribute: "EmergencyHeatDelta" - arguments: - value: 255 - - - label: "Read back optional attributes from DUT: EmergencyHeatDelta" - disabled: true - command: "readAttribute" - attribute: "EmergencyHeatDelta" - response: - value: 255 - - - label: "Reads optional attributes from DUT: ACType" - disabled: true - command: "readAttribute" - attribute: "ACType" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACType" disabled: true command: "readAttribute" @@ -1455,29 +503,6 @@ tests: minValue: 0 maxValue: 4 - - label: - "Writes the respective default value to optional attributes to DUT: - ACType" - disabled: true - command: "writeAttribute" - attribute: "ACType" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACType" - disabled: true - command: "readAttribute" - attribute: "ACType" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACCapacity" - disabled: true - command: "readAttribute" - attribute: "ACCapacity" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACCapacity" disabled: true command: "readAttribute" @@ -1486,29 +511,6 @@ tests: constraints: type: uint16 - - label: - "Writes the respective default value to optional attributes to DUT: - ACCapacity" - disabled: true - command: "writeAttribute" - attribute: "ACCapacity" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACCapacity" - disabled: true - command: "readAttribute" - attribute: "ACCapacity" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACRefrigerantType" - disabled: true - command: "readAttribute" - attribute: "ACRefrigerantType" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACRefrigerantType" disabled: true @@ -1520,29 +522,6 @@ tests: minValue: 0 maxValue: 3 - - label: - "Writes the respective default value to optional attributes to DUT: - ACRefrigerantType" - disabled: true - command: "writeAttribute" - attribute: "ACRefrigerantType" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACRefrigerantType" - disabled: true - command: "readAttribute" - attribute: "ACRefrigerantType" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACCompressorType" - disabled: true - command: "readAttribute" - attribute: "ACCompressorType" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACCompressorType" disabled: true @@ -1554,29 +533,6 @@ tests: minValue: 0 maxValue: 3 - - label: - "Writes the respective default value to optional attributes to DUT: - ACCompressorType" - disabled: true - command: "writeAttribute" - attribute: "ACCompressorType" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACCompressorType" - disabled: true - command: "readAttribute" - attribute: "ACCompressorType" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACErrorCode" - disabled: true - command: "readAttribute" - attribute: "ACErrorCode" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACErrorCode" disabled: true command: "readAttribute" @@ -1585,29 +541,6 @@ tests: constraints: type: map32 - - label: - "Writes the respective default value to optional attributes to DUT: - ACErrorCode" - disabled: true - command: "writeAttribute" - attribute: "ACErrorCode" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACErrorCode" - disabled: true - command: "readAttribute" - attribute: "ACErrorCode" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACLouverPosition" - disabled: true - command: "readAttribute" - attribute: "ACLouverPosition" - response: - value: 0 - - label: "Reads constraints of optional attributes from DUT: ACLouverPosition" disabled: true @@ -1616,32 +549,9 @@ tests: response: constraints: type: enum8 - minValue: 0 + minValue: 1 maxValue: 5 - - label: - "Writes the respective default value to optional attributes to DUT: - ACLouverPosition" - disabled: true - command: "writeAttribute" - attribute: "ACLouverPosition" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACLouverPosition" - disabled: true - command: "readAttribute" - attribute: "ACLouverPosition" - response: - value: 0 - - - label: "Reads optional attributes from DUT: ACCoilTemperature" - disabled: true - command: "readAttribute" - attribute: "ACCoilTemperature" - response: - value: null - - label: "Reads constraints of optional attributes from DUT: ACCoilTemperature" disabled: true @@ -1651,24 +561,6 @@ tests: constraints: type: int16 - - label: - "Writes the respective default value to optional attributes to DUT: - ACCoilTemperature" - disabled: true - command: "writeAttribute" - attribute: "ACCoilTemperature" - arguments: - value: null - response: - error: UNSUPPORTED_WRITE - - - label: "Read back optional attributes from DUT: ACCoilTemperature" - disabled: true - command: "readAttribute" - attribute: "ACCoilTemperature" - response: - value: null - - label: "Reads optional attributes from DUT: ACCapacityFormat" disabled: true command: "readAttribute" @@ -1684,19 +576,3 @@ tests: response: constraints: type: enum8 - - - label: - "Writes the respective default value to optional attributes to DUT: - ACCapacityFormat" - disabled: true - command: "writeAttribute" - attribute: "ACCapacityFormat" - arguments: - value: 0 - - - label: "Read back optional attributes from DUT: ACCapacityFormat" - disabled: true - command: "readAttribute" - attribute: "ACCapacityFormat" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml index 24ddb1676891b2..3f1e178ccacf5a 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml @@ -31,6 +31,7 @@ tests: - label: "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range" + optional: true command: "readAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -44,6 +45,7 @@ tests: - label: "Writes a value back that is different but valid for OccupiedCoolingSetpoint attribute" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -53,6 +55,7 @@ tests: - label: "Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute" + optional: true command: "readAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -84,6 +87,7 @@ tests: - label: "Writes the limit of MinCoolSetpointLimit to OccupiedCoolingSetpoint attribute" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -93,6 +97,7 @@ tests: - label: "Writes the limit of MaxCoolSetpointLimit to OccupiedCoolingSetpoint attribute" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -315,6 +320,7 @@ tests: - label: "Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" + optional: true command: "readAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -328,6 +334,7 @@ tests: - label: "Writes a value back that is different but valid for MinCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -337,6 +344,7 @@ tests: - label: "Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute" + optional: true command: "readAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -367,6 +375,7 @@ tests: - label: "Writes the limit of AbsMinCoolSetpointLimit to MinCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -376,6 +385,7 @@ tests: - label: "Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -385,6 +395,7 @@ tests: - label: "Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range" + optional: true command: "readAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -398,6 +409,7 @@ tests: - label: "Writes a value back that is different but valid for MaxCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -407,6 +419,7 @@ tests: - label: "Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute" + optional: true command: "readAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -437,6 +450,7 @@ tests: - label: "Writes the limit of AbsMinCoolSetpointLimit to MaxCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -446,6 +460,7 @@ tests: - label: "Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -491,6 +506,7 @@ tests: - label: "Writes (sets back) the limit of MinCoolSetpointLimit to MinCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -500,6 +516,7 @@ tests: - label: "Writes (sets back) the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "min cool setpoint limit" PICS: A_MINCOOLSETPOINTLIMIT @@ -509,6 +526,7 @@ tests: - label: "Writes (sets back) the limit of MinCoolSetpointLimit to MaxCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -518,6 +536,7 @@ tests: - label: "Writes (sets back) the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute" + optional: true command: "writeAttribute" attribute: "max cool setpoint limit" PICS: A_MAXCOOLSETPOINTLIMIT @@ -612,6 +631,7 @@ tests: value: 30 - label: "Sets OccupiedCoolingSetpoint to default value" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -641,6 +661,7 @@ tests: value: -30 - label: "Sets OccupiedCoolingSetpoint to default value" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -670,6 +691,7 @@ tests: value: 30 - label: "Sets OccupiedCoolingSetpoint to default value" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT @@ -716,6 +738,7 @@ tests: value: -30 - label: "Sets OccupiedCoolingSetpoint to default value" + optional: true command: "writeAttribute" attribute: "occupied cooling setpoint" PICS: A_OCCUPIEDCOOLINGSETPOINT diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index a92c744e997e5f..fee98f83989075 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -43,23 +43,6 @@ tests: constraints: type: uint16 - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 2 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - disabled: true - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -77,7 +60,6 @@ tests: type: list - label: "Read the global attribute: AcceptedCommandList" - disabled: true command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -85,40 +67,8 @@ tests: type: list - label: "Read the global attribute: GeneratedCommandList" - disabled: true command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - - - label: "read the optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - - - label: "Read the optional global attribute constraints: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 - - - label: "write the default values to optional global attribute: FeatureMap" - disabled: true - command: "writeAttribute" - attribute: "FeatureMap" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml index ae682b0400e4f2..8d94d644347dc4 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml @@ -40,25 +40,8 @@ tests: response: constraints: type: enum8 - - - label: "write to the mandatory attribute: TemperatureDisplayMode" - command: "writeAttribute" - attribute: "temperature display mode" - arguments: - value: 0 - - - label: "read the mandatory attribute: TemperatureDisplayMode" - command: "readAttribute" - attribute: "temperature display mode" - response: - value: 0 - - - label: "read the mandatory attribute: TemperatureDisplayMode" - command: "readAttribute" - attribute: "temperature display mode" - response: - constraints: - type: enum8 + minValue: 0 + maxValue: 1 - label: "read the mandatory attribute: KeypadLockout" command: "readAttribute" @@ -72,44 +55,8 @@ tests: response: constraints: type: enum8 - - - label: "write to the mandatory attribute: KeypadLockout" - command: "writeAttribute" - attribute: "keypad lockout" - arguments: - value: 0 - - - label: "read the mandatory attribute: KeypadLockout" - command: "readAttribute" - attribute: "keypad lockout" - response: - value: 0 - - - label: "read the mandatory attribute: KeypadLockout" - command: "readAttribute" - attribute: "keypad lockout" - response: - constraints: - type: enum8 - - - label: "read the optional attribute: ScheduleProgrammingVisibility" - command: "readAttribute" - attribute: "schedule programming visibility" - response: - value: 0 - - - label: "read the optional attribute: ScheduleProgrammingVisibility" - command: "readAttribute" - attribute: "schedule programming visibility" - response: - constraints: - type: enum8 - - - label: "write to the mandatory attribute: ScheduleProgrammingVisibility" - command: "writeAttribute" - attribute: "schedule programming visibility" - arguments: - value: 0 + minValue: 0 + maxValue: 5 - label: "read the optional attribute: ScheduleProgrammingVisibility" command: "readAttribute" @@ -123,3 +70,5 @@ tests: response: constraints: type: enum8 + minValue: 0 + maxValue: 1 diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml index ba5652d7f841ae..9147321abaf224 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml @@ -54,7 +54,6 @@ tests: - label: "Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT" - disabled: true command: "writeAttribute" attribute: "temperature display mode" PICS: A_TEMPERATURE_DISPLAY_MODE @@ -132,7 +131,6 @@ tests: #Disabled as write was successful - label: "Writes a value of greater than 5 to KeypadLockout attribute of DUT" - disabled: true command: "writeAttribute" attribute: "keypad lockout" PICS: A_KEYPAD_LOCKOUT @@ -173,7 +171,6 @@ tests: - label: "Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT" - disabled: true command: "writeAttribute" attribute: "schedule programming visibility" PICS: A_SCHEDULE_PROGRAMMING_VISIBILITY diff --git a/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml index 282e7f63a22d03..70dd41a50da8e8 100644 --- a/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml @@ -36,6 +36,7 @@ tests: constraints: type: list + # issue: 16654 and 13645 # Various tests disabled for now until # https://github.com/project-chip/connectedhomeip/pull/14755 is # fixed and the SDK has the right types. @@ -47,7 +48,6 @@ tests: value: null - label: "Reads SecurityType attribute constraints" - disabled: true command: "readAttribute" attribute: "SecurityType" response: @@ -62,7 +62,6 @@ tests: value: null - label: "Reads WiFiVersion attribute constraints" - disabled: true command: "readAttribute" attribute: "WiFiVersion" response: @@ -77,7 +76,6 @@ tests: value: null - label: "Reads ChannelNumber attribute constraints" - disabled: true command: "readAttribute" attribute: "ChannelNumber" response: @@ -92,7 +90,6 @@ tests: value: null - label: "Reads RSSI attribute constraints" - disabled: true command: "readAttribute" attribute: "RSSI" response: @@ -194,7 +191,6 @@ tests: # Disabled because this fails on Linux because we have no Wi-Fi interface. - label: "Reads CurrentMaxRate attribute from DUT" disabled: true - optional: true command: "readAttribute" attribute: "CurrentMaxRate" response: @@ -203,7 +199,6 @@ tests: # Disabled because this fails on Linux because we have no Wi-Fi interface. - label: "Reads CurrentMaxRate attribute constraints" disabled: true - optional: true command: "readAttribute" attribute: "CurrentMaxRate" response: diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index d01a4df9ede1f3..f169fd959ae3e9 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -1994,48 +1994,39 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BOOL_1_1_000003_WriteAttribute +- (void)testSendClusterTest_TC_BOOL_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_BOOL_1_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 1U); - } - [expectation fulfill]; }]; @@ -2043,15 +2034,15 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000004_ReadAttribute } - (void)testSendClusterTest_TC_BOOL_1_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -2113,46 +2104,32 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BOOL_2_1_000003_WriteAttribute + +- (void)testSendClusterTest_TC_BRAC_1_1_000000_WaitForCommissionee { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Write the default value to mandatory non-global attribute: StateValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id stateValueArgument; - stateValueArgument = [NSNumber numberWithBool:1]; - [cluster writeAttributeStateValueWithValue:stateValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default value to mandatory non-global attribute: StateValue Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - + WaitForCommissionee(expectation, queue, 305414945); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BOOL_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_BRAC_1_1_000001_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads back the mandatory non-global attribute: StateValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back the mandatory non-global attribute: StateValue Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue boolValue], 0); + XCTAssertEqual([actualValue unsignedShortValue], 1U); } [expectation fulfill]; @@ -2160,50 +2137,74 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_BRAC_1_1_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_BRAC_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue, 305414945); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BRAC_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_BRAC_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 1U); - } + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BRAC_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_BRAC_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_BRAC_1_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13008,7 +13009,7 @@ - (void)testSendClusterTest_TC_ILL_1_1_000000_WaitForCommissionee } - (void)testSendClusterTest_TC_ILL_1_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13018,15 +13019,10 @@ - (void)testSendClusterTest_TC_ILL_1_1_000001_ReadAttribute XCTAssertNotNil(cluster); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 2U); - } - [expectation fulfill]; }]; @@ -13034,7 +13030,7 @@ - (void)testSendClusterTest_TC_ILL_1_1_000001_ReadAttribute } - (void)testSendClusterTest_TC_ILL_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13043,8 +13039,8 @@ - (void)testSendClusterTest_TC_ILL_1_1_000002_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13053,34 +13049,9 @@ - (void)testSendClusterTest_TC_ILL_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_ILL_1_1_000003_WriteAttribute +- (void)testSendClusterTest_TC_ILL_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; - XCTAssertNotNil(cluster); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_ILL_1_1_000004_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13089,24 +13060,19 @@ - (void)testSendClusterTest_TC_ILL_1_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 2U); - } - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_ILL_1_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_ILL_1_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -13115,8 +13081,8 @@ - (void)testSendClusterTest_TC_ILL_1_1_000005_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -13244,6 +13210,68 @@ - (void)testSendClusterTest_TC_LVL_1_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_1_1_000006_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000007_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000008_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedIntValue], 3UL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000009_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional global attribute : FeatureMap"]; @@ -13262,7 +13290,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_1_1_000007_WriteAttribute +- (void)testSendClusterTest_TC_LVL_1_1_000010_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; @@ -13284,6 +13312,25 @@ - (void)testSendClusterTest_TC_LVL_1_1_000007_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_1_1_000011_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee { @@ -13997,11 +14044,6 @@ - (void)testSendClusterTest_TC_LVL_3_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } - [expectation fulfill]; }]; @@ -14021,11 +14063,6 @@ - (void)testSendClusterTest_TC_LVL_3_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - [expectation fulfill]; }]; @@ -14045,11 +14082,6 @@ - (void)testSendClusterTest_TC_LVL_3_1_000003_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } - [expectation fulfill]; }]; @@ -14066,7 +14098,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000004_MoveToLevel __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveToLevelWithParams:params @@ -14122,8 +14154,8 @@ - (void)testSendClusterTest_TC_LVL_3_1_000007_MoveToLevel XCTAssertNotNil(cluster); __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:128]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; + params.level = [NSNumber numberWithUnsignedChar:100]; + params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveToLevelWithParams:params @@ -14139,11 +14171,11 @@ - (void)testSendClusterTest_TC_LVL_3_1_000007_MoveToLevel } - (void)testSendClusterTest_TC_LVL_3_1_000008_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait a second"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 11000 second"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 1000); - [self waitForExpectationsWithTimeout:(1000 / 1000) + kTimeoutInSeconds handler:nil]; + WaitForMs(expectation, queue, 11000); + [self waitForExpectationsWithTimeout:(11000 / 1000) + kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_3_1_000009_ReadAttribute { @@ -14161,7 +14193,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000009_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 128); + XCTAssertEqual([actualValue unsignedCharValue], 100); } [expectation fulfill]; @@ -14183,11 +14215,6 @@ - (void)testSendClusterTest_TC_LVL_3_1_000010_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 0U); - } - [expectation fulfill]; }]; @@ -14203,7 +14230,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000011_MoveToLevel XCTAssertNotNil(cluster); __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; + params.level = [NSNumber numberWithUnsignedChar:128]; params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; @@ -14220,11 +14247,11 @@ - (void)testSendClusterTest_TC_LVL_3_1_000011_MoveToLevel } - (void)testSendClusterTest_TC_LVL_3_1_000012_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 1000ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 100); - [self waitForExpectationsWithTimeout:(100 / 1000) + kTimeoutInSeconds handler:nil]; + WaitForMs(expectation, queue, 1000); + [self waitForExpectationsWithTimeout:(1000 / 1000) + kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute { @@ -14242,7 +14269,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); + XCTAssertEqual([actualValue unsignedCharValue], 128); } [expectation fulfill]; @@ -14292,31 +14319,8 @@ - (void)testSendClusterTest_TC_LVL_4_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue, 305414945); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +NSNumber * _Nonnull MaxlevelValue; - (void)testSendClusterTest_TC_LVL_4_1_000001_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"reads CurrentLevel attribute from DUT"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads max level attribute from DUT"]; @@ -14332,7 +14336,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); + MaxlevelValue = actualValue; } [expectation fulfill]; @@ -14340,7 +14344,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000003_Move +- (void)testSendClusterTest_TC_LVL_4_1_000002_Move { XCTestExpectation * expectation = [self expectationWithDescription:@"sends a Move up command"]; @@ -14351,7 +14355,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000003_Move __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:200]; + params.rate = [NSNumber numberWithUnsignedChar:32]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveWithParams:params @@ -14365,6 +14369,16 @@ - (void)testSendClusterTest_TC_LVL_4_1_000003_Move [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_4_1_000003_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"user prompt message"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, + @"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"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_LVL_4_1_000004_WaitForMs { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; @@ -14389,7 +14403,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); + XCTAssertEqualObjects(actualValue, MaxlevelValue); } [expectation fulfill]; @@ -14397,6 +14411,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +NSNumber * _Nonnull MinlevelValue; - (void)testSendClusterTest_TC_LVL_4_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads min level attribute from DUT"]; @@ -14413,7 +14428,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000006_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + MinlevelValue = actualValue; } [expectation fulfill]; @@ -14432,7 +14447,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000007_Move __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:250]; + params.rate = [NSNumber numberWithUnsignedChar:64]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveWithParams:params @@ -14446,15 +14461,25 @@ - (void)testSendClusterTest_TC_LVL_4_1_000007_Move [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000008_WaitForMs +- (void)testSendClusterTest_TC_LVL_4_1_000008_UserPrompt { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"user prompt message"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 3000); - [self waitForExpectationsWithTimeout:(3000 / 1000) + kTimeoutInSeconds handler:nil]; + UserPrompt(expectation, queue, + @"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"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_LVL_4_1_000009_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 5000ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 5000); + [self waitForExpectationsWithTimeout:(5000 / 1000) + kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_4_1_000010_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads CurrentLevel attribute from DUT"]; @@ -14468,6 +14493,10 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 1); + } { id actualValue = value; if (actualValue != nil) { @@ -14486,28 +14515,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000010_WriteAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Write default move rate attribute from DUT"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id defaultMoveRateArgument; - defaultMoveRateArgument = [NSNumber numberWithUnsignedChar:20]; - [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write default move rate attribute from DUT Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} +NSNumber * _Nullable DefaultMoveRateValue; - (void)testSendClusterTest_TC_LVL_4_1_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads default move rate attribute from DUT"]; @@ -14524,8 +14532,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000011_ReadAttribute { id actualValue = value; - XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue unsignedCharValue], 20); + DefaultMoveRateValue = actualValue; } [expectation fulfill]; @@ -14592,7 +14599,16 @@ - (void)testSendClusterTest_TC_LVL_4_1_000014_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000015_MoveToLevel +- (void)testSendClusterTest_TC_LVL_4_1_000015_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"user prompt message"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, + @"Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level."); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_4_1_000016_MoveToLevel { XCTestExpectation * expectation = [self expectationWithDescription:@"Reset level to 254"]; @@ -14617,7 +14633,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000015_MoveToLevel [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_4_1_000016_WaitForMs +- (void)testSendClusterTest_TC_LVL_4_1_000017_WaitForMs { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 100ms"]; @@ -14655,7 +14671,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000001_On } - (void)testSendClusterTest_TC_LVL_5_1_000002_Step { - XCTestExpectation * expectation = [self expectationWithDescription:@"Precondition: DUT level is set to 0x80"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Precondition: DUT level is set to its lowest point"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -14664,13 +14680,13 @@ - (void)testSendClusterTest_TC_LVL_5_1_000002_Step __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:126]; + params.stepSize = [NSNumber numberWithUnsignedChar:100]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); + NSLog(@"Precondition: DUT level is set to its lowest point Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -14681,12 +14697,13 @@ - (void)testSendClusterTest_TC_LVL_5_1_000002_Step } - (void)testSendClusterTest_TC_LVL_5_1_000003_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 4000ms"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 4000); - [self waitForExpectationsWithTimeout:(4000 / 1000) + kTimeoutInSeconds handler:nil]; + WaitForMs(expectation, queue, 3000); + [self waitForExpectationsWithTimeout:(3000 / 1000) + kTimeoutInSeconds handler:nil]; } +NSNumber * _Nonnull CurrentlevelValue; - (void)testSendClusterTest_TC_LVL_5_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads current level attribute from DUT"]; @@ -14703,7 +14720,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000004_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 128); + CurrentlevelValue = actualValue; } [expectation fulfill]; @@ -14713,7 +14730,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000004_ReadAttribute } - (void)testSendClusterTest_TC_LVL_5_1_000005_Step { - XCTestExpectation * expectation = [self expectationWithDescription:@"Sends step down command to DUT"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Sends step up command to DUT"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -14721,14 +14738,14 @@ - (void)testSendClusterTest_TC_LVL_5_1_000005_Step XCTAssertNotNil(cluster); __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; + params.stepMode = [NSNumber numberWithUnsignedChar:0]; params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends step down command to DUT Error: %@", err); + NSLog(@"Sends step up command to DUT Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -14739,11 +14756,11 @@ - (void)testSendClusterTest_TC_LVL_5_1_000005_Step } - (void)testSendClusterTest_TC_LVL_5_1_000006_WaitForMs { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 4000ms"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 5000ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 4000); - [self waitForExpectationsWithTimeout:(4000 / 1000) + kTimeoutInSeconds handler:nil]; + WaitForMs(expectation, queue, 5000); + [self waitForExpectationsWithTimeout:(5000 / 1000) + kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_5_1_000007_ReadAttribute { @@ -14761,7 +14778,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000007_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 64); + XCTAssertNotEqualObjects(actualValue, CurrentlevelValue); } [expectation fulfill]; @@ -14771,7 +14788,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000007_ReadAttribute } - (void)testSendClusterTest_TC_LVL_5_1_000008_Step { - XCTestExpectation * expectation = [self expectationWithDescription:@"Sends a Step up command"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Sends a Step down command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -14779,14 +14796,14 @@ - (void)testSendClusterTest_TC_LVL_5_1_000008_Step XCTAssertNotNil(cluster); __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:1]; params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a Step up command Error: %@", err); + NSLog(@"Sends a Step down command Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -14819,7 +14836,7 @@ - (void)testSendClusterTest_TC_LVL_5_1_000010_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 128); + XCTAssertEqualObjects(actualValue, CurrentlevelValue); } [expectation fulfill]; @@ -14940,6 +14957,7 @@ - (void)testSendClusterTest_TC_LVL_6_1_000003_WaitForMs WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:(100 / 1000) + kTimeoutInSeconds handler:nil]; } +NSNumber * _Nonnull CurrentLevelValue; - (void)testSendClusterTest_TC_LVL_6_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentLevel attribute from DUT"]; @@ -14966,6 +14984,10 @@ - (void)testSendClusterTest_TC_LVL_6_1_000004_ReadAttribute XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); } } + { + id actualValue = value; + CurrentLevelValue = actualValue; + } [expectation fulfill]; }]; @@ -15044,15 +15066,7 @@ - (void)testSendClusterTest_TC_LVL_6_1_000008_ReadAttribute { id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 3); - } + XCTAssertNotEqualObjects(actualValue, CurrentLevelValue); } [expectation fulfill]; @@ -17016,6 +17030,7 @@ - (void)testSendClusterTest_TC_OCC_2_2_000000_WaitForCommissionee WaitForCommissionee(expectation, queue, 305414945); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +NSNumber * _Nonnull OccupancyValue; - (void)testSendClusterTest_TC_OCC_2_2_000001_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads Occupancy attribute from DUT"]; @@ -17030,6 +17045,15 @@ - (void)testSendClusterTest_TC_OCC_2_2_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + { + id actualValue = value; + OccupancyValue = actualValue; + } + [expectation fulfill]; }]; @@ -17037,7 +17061,8 @@ - (void)testSendClusterTest_TC_OCC_2_2_000001_ReadAttribute } - (void)testSendClusterTest_TC_OCC_2_2_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads Occupancy attribute from DUT"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads back Occupancy attribute from DUT after few seconds"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -17045,7 +17070,7 @@ - (void)testSendClusterTest_TC_OCC_2_2_000002_ReadAttribute XCTAssertNotNil(cluster); [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads Occupancy attribute from DUT Error: %@", err); + NSLog(@"Reads back Occupancy attribute from DUT after few seconds Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -18802,15 +18827,15 @@ - (void)testSendClusterTest_TC_PS_1_1_000001_ReadAttribute } - (void)testSendClusterTest_TC_PS_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -18819,64 +18844,36 @@ - (void)testSendClusterTest_TC_PS_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PS_1_1_000003_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_PS_1_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_PS_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 1U); - } - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PS_1_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_PS_1_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19483,7 +19480,7 @@ - (void)testSendClusterTest_TC_PCC_1_1_000003_ReadAttribute } - (void)testSendClusterTest_TC_PCC_1_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19492,8 +19489,8 @@ - (void)testSendClusterTest_TC_PCC_1_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19502,18 +19499,9 @@ - (void)testSendClusterTest_TC_PCC_1_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_PCC_2_1_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue, 305414945); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19522,8 +19510,8 @@ - (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19532,9 +19520,9 @@ - (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000006_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxSpeed"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19543,19 +19531,24 @@ - (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxSpeed Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000007_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxFlow"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional global attribute: FeatureMap"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19564,8 +19557,8 @@ - (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MaxFlow Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -19574,9 +19567,10 @@ - (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000008_WriteAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19585,19 +19579,21 @@ - (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_PCC_1_1_000009_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back optional global attribute: FeatureMap"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -19606,8 +19602,127 @@ - (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedIntValue], 0UL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_PCC_2_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue, 305414945); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxPressure"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxPressure Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxSpeed"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxSpeed Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxFlow"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxFlow Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveOperationMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveOperationMode Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PCC_2_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: EffectiveControlMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: EffectiveControlMode Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -20527,6 +20642,12 @@ - (void)testSendClusterTest_TC_PCC_2_1_000040_ReadAttribute XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); } } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32767); + } + } [expectation fulfill]; }]; @@ -20560,6 +20681,12 @@ - (void)testSendClusterTest_TC_PCC_2_1_000041_ReadAttribute XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); } } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32767); + } + } [expectation fulfill]; }]; @@ -21417,10 +21544,9 @@ - (void)testSendClusterTest_TC_RH_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_RH_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_RH_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -21429,22 +21555,19 @@ - (void)testSendClusterTest_TC_RH_1_1_000002_WriteAttribute queue:queue]; XCTAssertNotNil(cluster); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_RH_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -21453,8 +21576,29 @@ - (void)testSendClusterTest_TC_RH_1_1_000003_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_RH_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -21488,6 +21632,19 @@ - (void)testSendClusterTest_TC_RH_2_1_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000U); + } + } + [expectation fulfill]; }]; @@ -21529,7 +21686,7 @@ - (void)testSendClusterTest_TC_RH_2_1_000002_ReadAttribute } - (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the optional attribute: Tolerance"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of attribute: Tolerance"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -21539,7 +21696,7 @@ - (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute XCTAssertNotNil(cluster); [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the optional attribute: Tolerance Error: %@", err); + NSLog(@"Reads constraints of attribute: Tolerance Error: %@", err); if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { [expectation fulfill]; @@ -21550,7 +21707,15 @@ - (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 0U); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + } } [expectation fulfill]; @@ -21558,9 +21723,18 @@ - (void)testSendClusterTest_TC_RH_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute + +- (void)testSendClusterTest_TC_RH_2_2_000000_WaitForCommissionee { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of attribute: Tolerance"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue, 305414945); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_RH_2_2_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of attribute: MinMeasuredValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -21569,13 +21743,8 @@ - (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of attribute: Tolerance Error: %@", err); - - if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of attribute: MinMeasuredValue Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -21588,7 +21757,7 @@ - (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 2048U); + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 9999U); } } @@ -21597,16 +21766,7 @@ - (void)testSendClusterTest_TC_RH_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_RH_2_2_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue, 305414945); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_RH_2_2_000001_ReadAttribute +- (void)testSendClusterTest_TC_RH_2_2_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads MeasuredValue attribute from DUT"]; @@ -21622,12 +21782,25 @@ - (void)testSendClusterTest_TC_RH_2_2_000001_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedShortValue], 0U); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedShortValue], 10000U); + } + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_RH_2_2_000002_ReadAttribute +- (void)testSendClusterTest_TC_RH_2_2_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: MeasuredValue"]; @@ -22175,10 +22348,9 @@ - (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -22187,22 +22359,28 @@ - (void)testSendClusterTest_TC_TM_1_1_000002_WriteAttribute queue:queue]; XCTAssertNotNil(cluster); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:4U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000003_ReadAttribute + +- (void)testSendClusterTest_TC_TM_2_1_000000_WaitForCommissionee { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue, 305414945); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -22211,8 +22389,8 @@ - (void)testSendClusterTest_TC_TM_1_1_000003_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -22221,18 +22399,43 @@ - (void)testSendClusterTest_TC_TM_1_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_TM_2_1_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MinMeasuredValue"]; + CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue, 305414945); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32766); + } + } + + [expectation fulfill]; + }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_TM_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxMeasuredValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -22241,17 +22444,30 @@ - (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27314); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32767); + } + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_TM_2_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; @@ -22300,6 +22516,74 @@ - (void)testSendClusterTest_TC_TM_2_2_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_TM_2_2_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MinMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27315); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32766); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_2_2_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MaxMeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], -27314); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 32767); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_2_2_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads MeasuredValue attribute from DUT"]; @@ -22320,7 +22604,7 @@ - (void)testSendClusterTest_TC_TM_2_2_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_2_2_000002_ReadAttribute +- (void)testSendClusterTest_TC_TM_2_2_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the mandatory attribute: MeasuredValue"]; @@ -22369,30 +22653,7 @@ - (void)testSendClusterTest_TC_TSTAT_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_1_1_000002_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:5U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; @@ -22411,7 +22672,7 @@ - (void)testSendClusterTest_TC_TSTAT_1_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_1_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_1_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional global attribute constraints: FeatureMap"]; @@ -22461,31 +22722,6 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_TSTAT_2_1_000002_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 700); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; @@ -22518,74 +22754,32 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000004_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id absMinHeatSetpointLimitArgument; - absMinHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeAbsMinHeatSetpointLimitWithValue:absMinHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMinHeatSetpointLimit Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000003_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue shortValue], 700); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000006_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3000); + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } } [expectation fulfill]; @@ -22593,31 +22787,36 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000004_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); } } { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); } } @@ -22626,1022 +22825,37 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000008_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id absMaxHeatSetpointLimitArgument; - absMaxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeAbsMaxHeatSetpointLimitWithValue:absMaxHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMaxHeatSetpointLimit Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000009_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3000); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000010_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 1600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000011_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3200); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000012_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id absMinCoolSetpointLimitArgument; - absMinCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeAbsMinCoolSetpointLimitWithValue:absMinCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMinCoolSetpointLimit Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000013_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 1600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000014_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3200); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000015_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3200); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000016_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id absMaxCoolSetpointLimitArgument; - absMaxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeAbsMaxCoolSetpointLimitWithValue:absMaxCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMaxCoolSetpointLimit Error: %@", - err); - - XCTAssertEqual( - [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000017_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3200); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000018_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: OccupiedCoolingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 2600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000019_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 2600); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000020_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: OccupiedCoolingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"OccupiedCoolingSetpoint Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000021_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: OccupiedCoolingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 2600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000022_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 2000); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000023_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 2600); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000024_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: OccupiedHeatingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"OccupiedHeatingSetpoint Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000025_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: OccupiedHeatingSetpoint"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 2000); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000026_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: MinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 700); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000027_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000028_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MinHeatSetpointLimit Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000029_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: MinHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 700); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000030_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3000); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000031_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3000); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000032_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MaxHeatSetpointLimit Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000033_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: MaxHeatSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3000); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000034_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: MinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 1600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000035_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3200); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000036_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MinCoolSetpointLimit Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000037_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: MinCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 1600); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000038_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: MaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3200); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000039_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue shortValue], 3200); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000040_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MaxCoolSetpointLimit Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000041_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: MaxCoolSetpointLimit"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue shortValue], 3200); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000042_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads mandatory attributes from DUT: ControlSequenceOfOperation"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 4); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000043_ReadAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); - } - } - { - id actualValue = value; - if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 5); - } - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000044_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription: - @"Writes the respective default value to mandatory attributes to DUT: ControlSequenceOfOperation"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = [NSNumber numberWithUnsignedChar:4]; - [cluster writeAttributeControlSequenceOfOperationWithValue:controlSequenceOfOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"ControlSequenceOfOperation Error: %@", - err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000045_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000005_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back mandatory attributes from DUT: ControlSequenceOfOperation"]; + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 4); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); + } } [expectation fulfill]; @@ -23649,23 +22863,37 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000045_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000046_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000006_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads mandatory attributes from DUT: SystemMode"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 1); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 2600); + } } [expectation fulfill]; @@ -23673,31 +22901,31 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000046_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000047_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000007_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: SystemMode"]; + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); } } { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 9); + XCTAssertLessThanOrEqual([actualValue shortValue], 2600); } } @@ -23706,47 +22934,65 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000047_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000048_WriteAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000008_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: SystemMode"]; + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id systemModeArgument; - systemModeArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster - writeAttributeSystemModeWithValue:systemModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: SystemMode Error: %@", err); + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - [expectation fulfill]; - }]; + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } + } + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000049_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000009_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read back mandatory attributes from DUT: SystemMode"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 1); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } } [expectation fulfill]; @@ -23754,17 +23000,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000049_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000050_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000010_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads optional attributes from DUT: MinSetpointDeadBand"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: MinCoolSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MinCoolSetpointLimit Error: %@", err); if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { [expectation fulfill]; @@ -23775,7 +23022,15 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000050_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue charValue], 25); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); + } } [expectation fulfill]; @@ -23783,18 +23038,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000050_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000011_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand"]; + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit Error: %@", err); if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { [expectation fulfill]; @@ -23806,13 +23061,13 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute { id actualValue = value; if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue charValue], 0); + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); } } { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue charValue], 25); + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); } } @@ -23821,60 +23076,65 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000051_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000052_WriteAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000012_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand"]; + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:25]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"MinSetpointDeadBand Error: %@", - err); + [cluster readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - if (err.domain == MatterInteractionErrorDomain - && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 5); + } + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000053_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000013_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Read back optional attributes from DUT: MinSetpointDeadBand"]; + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: SystemMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attributes from DUT: MinSetpointDeadBand Error: %@", err); - - if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } + [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: SystemMode Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue charValue], 25); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 9); + } } [expectation fulfill]; @@ -23882,18 +23142,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000053_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000014_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: StartOfWeek"]; + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); + [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { [expectation fulfill]; @@ -23905,13 +23165,13 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute { id actualValue = value; if (actualValue != nil) { - XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + XCTAssertGreaterThanOrEqual([actualValue charValue], 0); } } { id actualValue = value; if (actualValue != nil) { - XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 6); + XCTAssertLessThanOrEqual([actualValue charValue], 25); } } @@ -23920,38 +23180,10 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000055_WriteAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000015_ReadAttribute { XCTestExpectation * expectation = - [self expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: StartOfWeek"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id startOfWeekArgument; - startOfWeekArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeStartOfWeekWithValue:startOfWeekArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", - err); - - if (err.domain == MatterInteractionErrorDomain - && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Read back optional attributes from DUT: StartOfWeek"]; + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: StartOfWeek"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -23959,7 +23191,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute XCTAssertNotNil(cluster); [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attributes from DUT: StartOfWeek Error: %@", err); + NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { [expectation fulfill]; @@ -23970,7 +23202,15 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 6); + } } [expectation fulfill]; @@ -23978,7 +23218,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000057_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000016_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions"]; @@ -24003,38 +23243,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000057_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000058_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: NumberOfWeeklyTransitions"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id numberOfWeeklyTransitionsArgument; - numberOfWeeklyTransitionsArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeNumberOfWeeklyTransitionsWithValue:numberOfWeeklyTransitionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"NumberOfWeeklyTransitions Error: %@", - err); - - if (err.domain == MatterInteractionErrorDomain - && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSTAT_2_1_000059_ReadAttribute +- (void)testSendClusterTest_TC_TSTAT_2_1_000017_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: NumberOfDailyTransitions"]; @@ -24059,37 +23268,6 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000059_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSTAT_2_1_000060_WriteAttribute -{ - XCTestExpectation * expectation = [self - expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: NumberOfDailyTransitions"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id numberOfDailyTransitionsArgument; - numberOfDailyTransitionsArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeNumberOfDailyTransitionsWithValue:numberOfDailyTransitionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"NumberOfDailyTransitions Error: %@", - err); - - if (err.domain == MatterInteractionErrorDomain - && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - [expectation fulfill]; - return; - } - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - (void)testSendClusterTest_TC_TSTAT_2_2_000000_WaitForCommissionee { @@ -24114,6 +23292,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000001_ReadAttribute NSLog( @"Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24156,6 +23339,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000002_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24176,6 +23365,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000003_ReadAttribute [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24206,6 +23400,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000004_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24231,6 +23431,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000005_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24667,6 +23873,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000021_ReadAttribute [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24709,6 +23920,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000022_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24729,6 +23946,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000023_ReadAttribute [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24759,6 +23981,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000024_WriteAttribute @"Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24784,6 +24012,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000025_WriteAttribute NSLog(@"Writes the limit of MaxCoolSetpointLimit to MinCoolSetpointLimit attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24805,6 +24039,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000026_ReadAttribute [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24847,6 +24086,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000027_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24867,6 +24112,11 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000028_ReadAttribute [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { @@ -24897,6 +24147,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000029_WriteAttribute @"Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -24922,6 +24178,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000030_WriteAttribute NSLog(@"Writes the limit of MaxCoolSetpointLimit to MaxCoolSetpointLimit attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25047,6 +24309,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000035_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25072,6 +24340,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000036_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25097,6 +24371,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000037_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25122,6 +24402,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000038_WriteAttribute @"attribute Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25274,6 +24560,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000044_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25296,6 +24588,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000045_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25318,6 +24616,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000046_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25362,6 +24666,12 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000048_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.domain == MatterInteractionErrorDomain + && err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; @@ -25420,31 +24730,7 @@ - (void)testSendClusterTest_TC_TSUIC_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_1_1_000002_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:2U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; @@ -25464,111 +24750,9 @@ - (void)testSendClusterTest_TC_TSUIC_1_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_TSUIC_2_1_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue, 305414945); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000001_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000002_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000003_WriteAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: TemperatureDisplayMode"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write to the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000004_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_1_1_000003_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AcceptedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25576,8 +24760,8 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -25586,9 +24770,9 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_1_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: GeneratedCommandList"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25596,67 +24780,28 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000006_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000007_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000008_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000000_WaitForCommissionee { - XCTestExpectation * expectation = [self expectationWithDescription:@"write to the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write to the mandatory attribute: KeypadLockout Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - + WaitForCommissionee(expectation, queue, 305414945); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25664,8 +24809,8 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000009_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -25679,9 +24824,9 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: TemperatureDisplayMode"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25689,20 +24834,32 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000010_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25710,26 +24867,24 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000011_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000012_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000004_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: KeypadLockout"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -25737,44 +24892,30 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000012_ReadAttribute [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TSUIC_2_1_000013_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"write to the mandatory attribute: ScheduleProgrammingVisibility"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); + [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster - writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write to the mandatory attribute: ScheduleProgrammingVisibility Error: %@", - err); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 5); + } + } - [expectation fulfill]; - }]; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000014_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; @@ -25801,7 +24942,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000014_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_1_000015_ReadAttribute +- (void)testSendClusterTest_TC_TSUIC_2_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: ScheduleProgrammingVisibility"]; @@ -25818,6 +24959,19 @@ - (void)testSendClusterTest_TC_TSUIC_2_1_000015_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } + } + [expectation fulfill]; }]; @@ -25883,6 +25037,32 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000002_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_TSUIC_2_2_000003_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id temperatureDisplayModeArgument; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2]; + [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT " + @"Error: %@", + err); + + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSUIC_2_2_000004_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 0 to KeypadLockout attribute of DUT"]; @@ -25905,7 +25085,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000003_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000004_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000005_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 1 to KeypadLockout attribute of DUT"]; @@ -25928,7 +25108,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000004_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000005_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000006_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 2 to KeypadLockout attribute of DUT"]; @@ -25951,7 +25131,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000005_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000006_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000007_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 3 to KeypadLockout attribute of DUT"]; @@ -25974,7 +25154,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000006_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000007_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000008_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 4 to KeypadLockout attribute of DUT"]; @@ -25997,7 +25177,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000007_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000008_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000009_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 5 to KeypadLockout attribute of DUT"]; @@ -26020,7 +25200,30 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000008_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000009_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000010_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes a value of greater than 5 to KeypadLockout attribute of DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSUIC_2_2_000011_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"]; @@ -26046,7 +25249,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000009_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TSUIC_2_2_000010_WriteAttribute +- (void)testSendClusterTest_TC_TSUIC_2_2_000012_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT"]; @@ -26072,6 +25275,32 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000010_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_TSUIC_2_2_000013_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2]; + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_DIAG_TH_NW_1_1_000000_WaitForCommissionee { @@ -28544,6 +27773,103 @@ - (void)testSendClusterTest_TC_WIFIDIAG_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads SecurityType attribute constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads SecurityType attribute constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads WiFiVersion attribute constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads ChannelNumber attribute constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads RSSI attribute constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads RSSI attribute constraints Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue charValue], -120); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue charValue], 0); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_WIFIDIAG_3_1_000000_WaitForCommissionee { diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index b5a321a5a7673f..7360214a6abd09 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -2346,17 +2346,16 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; } @@ -2426,61 +2425,54 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetConnectedDevice(); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -2536,15 +2528,6 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: StateValue\n"); err = TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2(); break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : Write the default value to mandatory non-global attribute: StateValue\n"); - err = TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: StateValue\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4(); - break; } if (CHIP_NO_ERROR != err) { @@ -2560,7 +2543,7 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -2612,47 +2595,6 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id stateValueArgument; - stateValueArgument = [NSNumber numberWithBool:1]; - [cluster writeAttributeStateValueWithValue:stateValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default value to mandatory non-global attribute: StateValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back the mandatory non-global attribute: StateValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("StateValue", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_BRAC_1_1 : public TestCommandBridge { @@ -2703,6 +2645,18 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; } if (CHIP_NO_ERROR != err) { @@ -2718,7 +2672,7 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -2770,6 +2724,60 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_CC_1_1 : public TestCommandBridge { @@ -16448,25 +16456,20 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -16483,7 +16486,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -16496,7 +16499,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { CHIPDevice * device = GetConnectedDevice(); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -16505,22 +16508,18 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); - } - + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -16528,42 +16527,19 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -16571,23 +16547,19 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); - } - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -16595,12 +16567,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -16670,12 +16642,28 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional global attribute : FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : write the default values to optional global attribute: FeatureMap\n"); - err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : reads back optional global attribute: FeatureMap\n"); + err = TestReadsBackOptionalGlobalAttributeFeatureMap_11(); break; } @@ -16692,7 +16680,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -16806,57 +16794,133 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional global attribute : FeatureMap Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_7() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_7() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id featureMapArgument; - featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; - [cluster writeAttributeFeatureMapWithValue:featureMapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class Test_TC_LVL_2_1 : public TestCommandBridge { -public: - Test_TC_LVL_2_1() - : TestCommandBridge("Test_TC_LVL_2_1") - , mTestIndex(0) + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_8() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } + CHIPDevice * device = GetConnectedDevice(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~Test_TC_LVL_2_1() {} + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_9() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute : FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_10() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_11() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_2_1 : public TestCommandBridge { +public: + Test_TC_LVL_2_1() + : TestCommandBridge("Test_TC_LVL_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LVL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -17804,8 +17868,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestSendsAMoveToLevelCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait a second\n"); - err = TestWaitASecond_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 11000 second\n"); + err = TestWait11000Second_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); @@ -17820,8 +17884,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestSendsAMoveToLevelCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); - err = TestWait10ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); @@ -17874,11 +17938,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254)); - } - + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); NextTest(); }]; @@ -17896,11 +17956,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("min level", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); NextTest(); }]; @@ -17918,11 +17974,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("max level", actualValue, 254)); - } - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); }]; @@ -17937,7 +17989,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveToLevelWithParams:params @@ -17987,8 +18039,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:128]; - params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; + params.level = [NSNumber numberWithUnsignedChar:100]; + params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveToLevelWithParams:params @@ -18003,9 +18055,9 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitASecond_8() + CHIP_ERROR TestWait11000Second_8() { - WaitForMs(1000); + WaitForMs(11000); return CHIP_NO_ERROR; } @@ -18022,7 +18074,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 128)); + VerifyOrReturn(CheckValue("current level", actualValue, 100)); } NextTest(); @@ -18042,11 +18094,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("on off transition time", actualValue, 0U)); - } - + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); }]; @@ -18060,7 +18108,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; + params.level = [NSNumber numberWithUnsignedChar:128]; params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; @@ -18076,9 +18124,9 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10ms_12() + CHIP_ERROR TestWait1000ms_12() { - WaitForMs(100); + WaitForMs(1000); return CHIP_NO_ERROR; } @@ -18095,7 +18143,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254)); + VerifyOrReturn(CheckValue("current level", actualValue, 128)); } NextTest(); @@ -18175,16 +18223,16 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : reads max level attribute from DUT\n"); - err = TestReadsMaxLevelAttributeFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : sends a Move up command\n"); - err = TestSendsAMoveUpCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : user prompt message\n"); + err = TestUserPromptMessage_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); @@ -18203,16 +18251,16 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestSendsAMoveDownCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 3000ms\n"); - err = TestWait3000ms_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : user prompt message\n"); + err = TestUserPromptMessage_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); + err = TestWait5000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write default move rate attribute from DUT\n"); - err = TestWriteDefaultMoveRateAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); @@ -18231,12 +18279,16 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestReadsCurrentLevelAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reset level to 254\n"); - err = TestResetLevelTo254_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : user prompt message\n"); + err = TestUserPromptMessage_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); - err = TestWait100ms_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Reset level to 254\n"); + err = TestResetLevelTo254_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 100ms\n"); + err = TestWait100ms_17(); break; } @@ -18253,7 +18305,7 @@ class Test_TC_LVL_4_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; @@ -18265,30 +18317,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); return CHIP_NO_ERROR; } + NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_2() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -18299,9 +18330,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("max level", actualValue, 254)); + MaxlevelValue = value; } NextTest(); @@ -18310,7 +18341,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_3() + CHIP_ERROR TestSendsAMoveUpCommand_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -18318,7 +18349,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:200]; + params.rate = [NSNumber numberWithUnsignedChar:32]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveWithParams:params @@ -18333,6 +18364,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestUserPromptMessage_3() + { + UserPrompt(@"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"); + return CHIP_NO_ERROR; + } + CHIP_ERROR TestWait3000ms_4() { WaitForMs(3000); @@ -18352,7 +18390,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254)); + VerifyOrReturn(CheckValue("current level", actualValue, MaxlevelValue)); } NextTest(); @@ -18360,6 +18398,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinlevelValue; CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() { @@ -18372,9 +18411,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("min level", actualValue, 0)); + MinlevelValue = value; } NextTest(); @@ -18391,7 +18430,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:250]; + params.rate = [NSNumber numberWithUnsignedChar:64]; params.optionMask = [NSNumber numberWithUnsignedChar:1]; params.optionOverride = [NSNumber numberWithUnsignedChar:1]; [cluster moveWithParams:params @@ -18406,13 +18445,20 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000ms_8() + CHIP_ERROR TestUserPromptMessage_8() { - WaitForMs(3000); + UserPrompt(@"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"); return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestWait5000ms_9() + { + WaitForMs(5000); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -18423,6 +18469,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 1)); + } + if (value != nil) { VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0)); } @@ -18435,26 +18486,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestWriteDefaultMoveRateAttributeFromDut_10() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id defaultMoveRateArgument; - defaultMoveRateArgument = [NSNumber numberWithUnsignedChar:20]; - [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write default move rate attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + NSNumber * _Nullable DefaultMoveRateValue; CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { @@ -18467,10 +18499,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("default move rate", actualValue)); - VerifyOrReturn(CheckValue("default move rate", actualValue, 20)); + DefaultMoveRateValue = value; } NextTest(); @@ -18529,7 +18560,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_15() + CHIP_ERROR TestUserPromptMessage_15() + { + UserPrompt( + @"Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level."); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestResetLevelTo254_16() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -18552,7 +18590,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_16() + CHIP_ERROR TestWait100ms_17() { WaitForMs(100); return CHIP_NO_ERROR; @@ -18604,32 +18642,32 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestSendingOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to 0x80\n"); - err = TestPreconditionDutLevelIsSetTo0x80_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to its lowest point\n"); + err = TestPreconditionDutLevelIsSetToItsLowestPoint_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 4000ms\n"); - err = TestWait4000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); + err = TestWait3000ms_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); err = TestReadsCurrentLevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step down command to DUT\n"); - err = TestSendsStepDownCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step up command to DUT\n"); + err = TestSendsStepUpCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 4000ms\n"); - err = TestWait4000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 5000ms\n"); + err = TestWait5000ms_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step up command\n"); - err = TestSendsAStepUpCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step down command\n"); + err = TestSendsAStepDownCommand_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); @@ -18696,7 +18734,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() + CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -18704,13 +18742,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:126]; + params.stepSize = [NSNumber numberWithUnsignedChar:100]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to 0x80 Error: %@", err); + NSLog(@"Precondition: DUT level is set to its lowest point Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); @@ -18720,11 +18758,12 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_3() + CHIP_ERROR TestWait3000ms_3() { - WaitForMs(4000); + WaitForMs(3000); return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentlevelValue; CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { @@ -18737,9 +18776,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 128)); + CurrentlevelValue = value; } NextTest(); @@ -18748,21 +18787,21 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepDownCommandToDut_5() + CHIP_ERROR TestSendsStepUpCommandToDut_5() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; + params.stepMode = [NSNumber numberWithUnsignedChar:0]; params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends step down command to DUT Error: %@", err); + NSLog(@"Sends step up command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); @@ -18772,9 +18811,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_6() + CHIP_ERROR TestWait5000ms_6() { - WaitForMs(4000); + WaitForMs(5000); return CHIP_NO_ERROR; } @@ -18789,9 +18828,8 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 64)); + if (value != nil) { + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentlevelValue)); } NextTest(); @@ -18800,21 +18838,21 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepUpCommand_8() + CHIP_ERROR TestSendsAStepDownCommand_8() { CHIPDevice * device = GetConnectedDevice(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:1]; params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; params.optionMask = [NSNumber numberWithUnsignedChar:0]; params.optionOverride = [NSNumber numberWithUnsignedChar:0]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a Step up command Error: %@", err); + NSLog(@"Sends a Step down command Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); @@ -18843,7 +18881,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 128)); + VerifyOrReturn(CheckValue("current level", actualValue, CurrentlevelValue)); } NextTest(); @@ -19056,6 +19094,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { WaitForMs(100); return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentLevelValue; CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { @@ -19074,6 +19113,9 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 1)); } + { + CurrentLevelValue = value; + } NextTest(); }]; @@ -19143,10 +19185,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 2)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); } NextTest(); @@ -22050,12 +22089,12 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { err = TestReadsOccupancyAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads back Occupancy attribute from DUT after few seconds\n"); if (ShouldSkip("A_OCCUPANCY")) { NextTest(); return; } - err = TestReadsOccupancyAttributeFromDut_2(); + err = TestReadsBackOccupancyAttributeFromDutAfterFewSeconds_2(); break; } @@ -22084,6 +22123,7 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); return CHIP_NO_ERROR; } + NSNumber * _Nonnull OccupancyValue; CHIP_ERROR TestReadsOccupancyAttributeFromDut_1() { @@ -22098,14 +22138,21 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("occupancy", actualValue, 0)); + } + { + OccupancyValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOccupancyAttributeFromDut_2() + CHIP_ERROR TestReadsBackOccupancyAttributeFromDutAfterFewSeconds_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -22114,11 +22161,10 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads Occupancy attribute from DUT Error: %@", err); + NSLog(@"Reads back Occupancy attribute from DUT after few seconds Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); NextTest(); }]; @@ -24462,21 +24508,16 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -24493,7 +24534,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -24528,79 +24569,54 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -25112,8 +25128,28 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional global attribute: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : reads back optional global attribute: FeatureMap\n"); + err = TestReadsBackOptionalGlobalAttributeFeatureMap_9(); break; } @@ -25130,7 +25166,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -25206,7 +25242,71 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() { CHIPDevice * device = GetConnectedDevice(); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device @@ -25225,6 +25325,52 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_9() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back optional global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_PCC_2_1 : public TestCommandBridge { @@ -26452,6 +26598,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintMinValue("minConstTemp", [value shortValue], -27315)); } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", [value shortValue], 32767)); + } NextTest(); }]; @@ -26481,6 +26630,9 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", [value shortValue], -27315)); } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", [value shortValue], 32767)); + } NextTest(); }]; @@ -27245,13 +27397,16 @@ class Test_TC_RH_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -27268,7 +27423,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -27301,7 +27456,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device @@ -27309,22 +27464,19 @@ class Test_TC_RH_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device @@ -27332,12 +27484,32 @@ class Test_TC_RH_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -27394,12 +27566,8 @@ class Test_TC_RH_2_1 : public TestCommandBridge { err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); - err = TestReadsTheOptionalAttributeTolerance_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); - err = TestReadsConstraintsOfAttributeTolerance_4(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of attribute: Tolerance\n"); + err = TestReadsConstraintsOfAttributeTolerance_3(); break; } @@ -27416,7 +27584,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -27442,7 +27610,14 @@ class Test_TC_RH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); + } + NextTest(); }]; @@ -27462,7 +27637,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); if (value != nil) { VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); } @@ -27476,36 +27651,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOptionalAttributeTolerance_3() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the optional attribute: Tolerance Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("tolerance", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() + CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device @@ -27579,20 +27725,24 @@ class Test_TC_RH_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads constraints of attribute: MinMeasuredValue\n"); + err = TestReadsConstraintsOfAttributeMinMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads MeasuredValue attribute from DUT\n"); if (ShouldSkip("A_RELATIVEHUMIDITY")) { NextTest(); return; } - err = TestReadsMeasuredValueAttributeFromDut_1(); + err = TestReadsMeasuredValueAttributeFromDut_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); if (ShouldSkip("A_RELATIVEHUMIDITY")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); + err = TestReadTheMandatoryAttributeMeasuredValue_3(); break; } @@ -27609,7 +27759,7 @@ class Test_TC_RH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -27622,7 +27772,7 @@ class Test_TC_RH_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_1() { CHIPDevice * device = GetConnectedDevice(); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device @@ -27630,19 +27780,53 @@ class Test_TC_RH_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads MeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 9999U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_2() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads MeasuredValue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 10000U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device @@ -28404,13 +28588,8 @@ class Test_TC_TM_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; } @@ -28427,7 +28606,7 @@ class Test_TC_TM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -28460,30 +28639,7 @@ class Test_TC_TM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:4U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device @@ -28549,8 +28705,16 @@ class Test_TC_TM_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeMeasuredValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_4(); break; } @@ -28567,7 +28731,7 @@ class Test_TC_TM_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -28600,7 +28764,61 @@ class Test_TC_TM_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_2() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32766)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device @@ -28674,20 +28892,28 @@ class Test_TC_TM_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads MeasuredValue attribute from DUT\n"); if (ShouldSkip("A_TEMPERATURE")) { NextTest(); return; } - err = TestReadsMeasuredValueAttributeFromDut_1(); + err = TestReadsMeasuredValueAttributeFromDut_3(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the mandatory attribute: MeasuredValue\n"); if (ShouldSkip("A_TEMPERATURE")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); + err = TestReadTheMandatoryAttributeMeasuredValue_4(); break; } @@ -28704,7 +28930,7 @@ class Test_TC_TM_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -28717,7 +28943,61 @@ class Test_TC_TM_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MinMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value shortValue], -27315)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value shortValue], 32766)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MaxMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value shortValue], -27314)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value shortValue], 32767)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device @@ -28737,7 +29017,7 @@ class Test_TC_TM_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device @@ -28803,17 +29083,12 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional global attribute constraints: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_4(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional global attribute constraints: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3(); break; } @@ -28830,7 +29105,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -28861,28 +29136,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:5U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28900,7 +29154,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_4() + CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28965,280 +29219,82 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { err = TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); + ChipLogProgress( + chipTool, " ***** Test Step 2 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); break; case 3: ChipLogProgress( - chipTool, " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3(); + chipTool, " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutAbsMinCoolSetpointLimit_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5(); + ChipLogProgress( + chipTool, " ***** Test Step 5 : Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutAbsMaxCoolSetpointLimit_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6(); + ChipLogProgress( + chipTool, " ***** Test Step 6 : Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutOccupiedCoolingSetpoint_6(); break; case 7: ChipLogProgress( - chipTool, " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7(); + chipTool, " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9(); + ChipLogProgress( + chipTool, " ***** Test Step 9 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10(); + ChipLogProgress( + chipTool, " ***** Test Step 10 : Reads constraints of optional attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinCoolSetpointLimit_10(); break; case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11(); + chipTool, " ***** Test Step 11 : Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMaxCoolSetpointLimit_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14(); + ChipLogProgress( + chipTool, " ***** Test Step 14 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_14(); break; case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18(); - break; - case 19: ChipLogProgress( - chipTool, " ***** Test Step 19 : Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19(); + chipTool, " ***** Test Step 16 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_16(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Writes the respective default value to mandatory attributes to DUT: " - "OccupiedCoolingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read back mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22(); - break; - case 23: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 23 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Writes the respective default value to mandatory attributes to DUT: " - "OccupiedHeatingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read back mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26(); - break; - case 27: - ChipLogProgress( - chipTool, " ***** Test Step 27 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27(); - break; - case 28: - ChipLogProgress(chipTool, - " ***** Test Step 28 : Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read back mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30(); - break; - case 31: - ChipLogProgress( - chipTool, " ***** Test Step 31 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read back mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34(); - break; - case 35: - ChipLogProgress( - chipTool, " ***** Test Step 35 : Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35(); - break; - case 36: - ChipLogProgress(chipTool, - " ***** Test Step 36 : Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read back mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Reads mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38(); - break; - case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39(); - break; - case 40: - ChipLogProgress(chipTool, - " ***** Test Step 40 : Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read back mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42(); - break; - case 43: - ChipLogProgress( - chipTool, " ***** Test Step 43 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43(); - break; - case 44: - ChipLogProgress(chipTool, - " ***** Test Step 44 : Writes the respective default value to mandatory attributes to DUT: " - "ControlSequenceOfOperation\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44(); - break; - case 45: - ChipLogProgress( - chipTool, " ***** Test Step 45 : Read back mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Reads mandatory attributes from DUT: SystemMode\n"); - err = TestReadsMandatoryAttributesFromDutSystemMode_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47(); - break; - case 48: - ChipLogProgress( - chipTool, " ***** Test Step 48 : Writes the respective default value to mandatory attributes to DUT: SystemMode\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read back mandatory attributes from DUT: SystemMode\n"); - err = TestReadBackMandatoryAttributesFromDutSystemMode_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50(); - break; - case 51: - ChipLogProgress( - chipTool, " ***** Test Step 51 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51(); - break; - case 52: - ChipLogProgress(chipTool, - " ***** Test Step 52 : Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read back optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53(); - break; - case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54(); - break; - case 55: - ChipLogProgress( - chipTool, " ***** Test Step 55 : Writes the respective default value to optional attributes to DUT: StartOfWeek\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55(); - break; - case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read back optional attributes from DUT: StartOfWeek\n"); - err = TestReadBackOptionalAttributesFromDutStartOfWeek_56(); - break; - case 57: - ChipLogProgress( - chipTool, " ***** Test Step 57 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57(); - break; - case 58: - ChipLogProgress(chipTool, - " ***** Test Step 58 : Writes the respective default value to optional attributes to DUT: " - "NumberOfWeeklyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58(); - break; - case 59: - ChipLogProgress( - chipTool, " ***** Test Step 59 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59(); - break; - case 60: - ChipLogProgress(chipTool, - " ***** Test Step 60 : Writes the respective default value to optional attributes to DUT: " - "NumberOfDailyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60(); + chipTool, " ***** Test Step 17 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_17(); break; } @@ -29255,7 +29311,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 61; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -29286,29 +29342,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs min heat setpoint limit", actualValue, 700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29333,72 +29367,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id absMinHeatSetpointLimitArgument; - absMinHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeAbsMinHeatSetpointLimitWithValue:absMinHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs min heat setpoint limit", actualValue, 700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs max heat setpoint limit", actualValue, 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29423,883 +29392,88 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id absMaxHeatSetpointLimitArgument; - absMaxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeAbsMaxHeatSetpointLimitWithValue:absMaxHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs max heat setpoint limit", actualValue, 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs min cool setpoint limit", actualValue, 1600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], 1600)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id absMinCoolSetpointLimitArgument; - absMinCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeAbsMinCoolSetpointLimitWithValue:absMinCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMinCoolSetpointLimit_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs min cool setpoint limit", actualValue, 1600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs max cool setpoint limit", actualValue, 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], 1600)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id absMaxCoolSetpointLimitArgument; - absMaxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeAbsMaxCoolSetpointLimitWithValue:absMaxCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"AbsMaxCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("abs max cool setpoint limit", actualValue, 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupied cooling setpoint", actualValue, 2600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 2600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = [NSNumber numberWithShort:2600]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"OccupiedCoolingSetpoint Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupied cooling setpoint", actualValue, 2600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupied heating setpoint", actualValue, 2000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 2600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = [NSNumber numberWithShort:2000]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"OccupiedHeatingSetpoint Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupied heating setpoint", actualValue, 2000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min heat setpoint limit", actualValue, 700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = [NSNumber numberWithShort:700]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MinHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min heat setpoint limit", actualValue, 700)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("max heat setpoint limit", actualValue, 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = [NSNumber numberWithShort:3000]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MaxHeatSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("max heat setpoint limit", actualValue, 3000)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min cool setpoint limit", actualValue, 1600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], 1600)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = [NSNumber numberWithShort:1600]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MinCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min cool setpoint limit", actualValue, 1600)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("max cool setpoint limit", actualValue, 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = [NSNumber numberWithShort:3200]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"MaxCoolSetpointLimit Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("max cool setpoint limit", actualValue, 3200)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("control sequence of operation", actualValue, 4)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); - if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0)); - } - if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5)); - } + NSLog(@"Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + return; + } - id controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = [NSNumber numberWithUnsignedChar:4]; - [cluster writeAttributeControlSequenceOfOperationWithValue:controlSequenceOfOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: " - @"ControlSequenceOfOperation Error: %@", - err); + VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", [value shortValue], 1600)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", [value shortValue], 3200)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMaxCoolSetpointLimit_5() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); - VerifyOrReturn(CheckValue("status", err, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("control sequence of operation", actualValue, 4)); - } + VerifyOrReturn(CheckValue("status", err, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", [value shortValue], 1600)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", [value shortValue], 3200)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_46() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutOccupiedCoolingSetpoint_6() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("system mode", actualValue, 1)); + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", [value shortValue], 1600)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", [value shortValue], 2600)); } NextTest(); @@ -30308,23 +29482,23 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_7() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0)); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", [value shortValue], 700)); } if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", [value shortValue], 2600)); } NextTest(); @@ -30333,42 +29507,48 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_8() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id systemModeArgument; - systemModeArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster - writeAttributeSystemModeWithValue:systemModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attributes to DUT: SystemMode Error: %@", - err); + [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckValue("status", err, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", [value shortValue], 700)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", [value shortValue], 3000)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackMandatoryAttributesFromDutSystemMode_49() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_9() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back mandatory attributes from DUT: SystemMode Error: %@", err); + [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("system mode", actualValue, 1)); + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", [value shortValue], 700)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", [value shortValue], 3000)); } NextTest(); @@ -30377,14 +29557,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinCoolSetpointLimit_10() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MinCoolSetpointLimit Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -30393,9 +29573,12 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("min setpoint dead band", actualValue, 25)); + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", [value shortValue], 1600)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", [value shortValue], 3200)); } NextTest(); @@ -30404,14 +29587,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMaxCoolSetpointLimit_11() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -30420,12 +29603,12 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", [value shortValue], 1600)); } if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", [value shortValue], 3200)); } NextTest(); @@ -30434,52 +29617,49 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_12() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id minSetpointDeadBandArgument; - minSetpointDeadBandArgument = [NSNumber numberWithChar:25]; - [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"MinSetpointDeadBand Error: %@", - err); + [cluster + readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_13() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attributes from DUT: MinSetpointDeadBand Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of mandatory attributes from DUT: SystemMode Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("min setpoint dead band", actualValue, 25)); + VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9)); } NextTest(); @@ -30488,14 +29668,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_14() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); + [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -30504,12 +29684,12 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0)); + VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", [value charValue], 0)); } if (value != nil) { - VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6)); + VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", [value charValue], 25)); } NextTest(); @@ -30518,40 +29698,14 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startOfWeekArgument; - startOfWeekArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster - writeAttributeStartOfWeekWithValue:startOfWeekArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackOptionalAttributesFromDutStartOfWeek_56() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_15() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attributes from DUT: StartOfWeek Error: %@", err); + NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -30560,9 +29714,12 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("start of week", actualValue, 0)); + VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6)); } NextTest(); @@ -30571,7 +29728,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_16() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30595,33 +29752,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id numberOfWeeklyTransitionsArgument; - numberOfWeeklyTransitionsArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeNumberOfWeeklyTransitionsWithValue:numberOfWeeklyTransitionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"NumberOfWeeklyTransitions Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_17() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30643,32 +29774,6 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id numberOfDailyTransitionsArgument; - numberOfDailyTransitionsArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeNumberOfDailyTransitionsWithValue:numberOfDailyTransitionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attributes to DUT: " - @"NumberOfDailyTransitions Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_TSTAT_2_2 : public TestCommandBridge { @@ -31187,6 +30292,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { NSLog(@"Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31222,6 +30332,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"OccupiedCoolingSetpoint attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31239,6 +30354,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of OccupiedCoolingSetpoint attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31266,6 +30386,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31288,6 +30413,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31663,6 +30793,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { NSLog( @"Reads MinCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31698,6 +30833,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31715,6 +30855,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of MinCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31742,6 +30887,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31764,6 +30914,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31782,6 +30937,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { NSLog( @"Reads MaxCoolSetpointLimit attribute from Server DUT and verifies that the value is within range Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31817,6 +30977,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31834,6 +30999,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads it back again to confirm the successful write of MaxCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); { @@ -31861,6 +31031,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31883,6 +31058,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -31993,6 +31173,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"MinCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32015,6 +31200,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"MinCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32037,6 +31227,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"MaxCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32059,6 +31254,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { @"MaxCoolSetpointLimit attribute Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32195,6 +31395,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32215,6 +31420,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32235,6 +31445,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32275,6 +31490,11 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { completionHandler:^(NSError * _Nullable err) { NSLog(@"Sets OccupiedCoolingSetpoint to default value Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + VerifyOrReturn(CheckValue("status", err, 0)); NextTest(); @@ -32349,13 +31569,16 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -32372,7 +31595,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -32404,41 +31627,57 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:2U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -32495,56 +31734,20 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { err = TestReadTheMandatoryAttributeTemperatureDisplayMode_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write to the mandatory attribute: TemperatureDisplayMode\n"); - err = TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write to the mandatory attribute: KeypadLockout\n"); - err = TestWriteToTheMandatoryAttributeKeypadLockout_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : write to the mandatory attribute: ScheduleProgrammingVisibility\n"); - err = TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_15(); + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_6(); break; } @@ -32561,188 +31764,69 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("temperature display mode", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write to the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_4() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("temperature display mode", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_5() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_6() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("keypad lockout", actualValue, 0)); - } - - NextTest(); - }]; + chip::Optional mTimeout; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_7() + CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("temperature display mode", actualValue, 0)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteToTheMandatoryAttributeKeypadLockout_8() + CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write to the mandatory attribute: KeypadLockout Error: %@", err); + [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckValue("status", err, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_9() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_3() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -32765,7 +31849,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_10() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -32778,13 +31862,20 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_11() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_5() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -32808,7 +31899,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_12() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_6() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -32822,52 +31913,11 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err, 0)); VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster - writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write to the mandatory attribute: ScheduleProgrammingVisibility Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_14() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 0)); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1)); } NextTest(); @@ -32875,26 +31925,6 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_15() - { - CHIPDevice * device = GetConnectedDevice(); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_TSUIC_2_2 : public TestCommandBridge { @@ -32954,70 +31984,96 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); + err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_8(); break; case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_10(); + break; + case 11: ChipLogProgress( - chipTool, " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); + chipTool, " ***** Test Step 11 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_11(); break; - case 10: + case 12: ChipLogProgress( - chipTool, " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + chipTool, " ***** Test Step 12 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); + err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_13(); break; } @@ -33034,7 +32090,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -33091,7 +32147,29 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3() + CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_3() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id temperatureDisplayModeArgument; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2]; + [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode attribute of " + @"DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33112,7 +32190,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4() + CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_5() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33133,7 +32211,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5() + CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_6() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33154,7 +32232,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6() + CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_7() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33175,7 +32253,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7() + CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_8() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33196,7 +32274,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8() + CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_9() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33217,7 +32295,27 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9() + CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_10() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id keypadLockoutArgument; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6]; + [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_11() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33240,7 +32338,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10() + CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_12() { CHIPDevice * device = GetConnectedDevice(); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -33262,6 +32360,29 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_13() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2]; + [cluster + writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_DIAG_TH_NW_1_1 : public TestCommandBridge { @@ -33428,6 +32549,22 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 1 : Reads NetworkInterface structure attribute from DUT\n"); err = TestReadsNetworkInterfaceStructureAttributeFromDut_1(); break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); + err = TestReadsSecurityTypeAttributeConstraints_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads WiFiVersion attribute constraints\n"); + err = TestReadsWiFiVersionAttributeConstraints_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads ChannelNumber attribute constraints\n"); + err = TestReadsChannelNumberAttributeConstraints_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads RSSI attribute constraints\n"); + err = TestReadsRssiAttributeConstraints_5(); + break; } if (CHIP_NO_ERROR != err) { @@ -33443,7 +32580,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -33475,6 +32612,93 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_2() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads SecurityType attribute constraints Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("securityType", "", "enum")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_3() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("wiFiVersion", "", "enum")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsChannelNumberAttributeConstraints_4() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("channelNumber", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsRssiAttributeConstraints_5() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads RSSI attribute constraints Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + VerifyOrReturn(CheckConstraintType("rssi", "", "int8")); + if (value != nil) { + VerifyOrReturn(CheckConstraintMinValue("rssi", [value charValue], -120)); + } + if (value != nil) { + VerifyOrReturn(CheckConstraintMaxValue("rssi", [value charValue], 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_WIFIDIAG_3_1 : public TestCommandBridge { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2ae2ddd5dc6181..22f68a840de67a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -3050,17 +3050,16 @@ class Test_TC_BOOL_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; } @@ -3118,16 +3117,20 @@ class Test_TC_BOOL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_3(attributeList); + } static void OnFailureCallback_4(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) { - (static_cast(context))->OnSuccessResponse_4(clusterRevision); + (static_cast(context))->OnSuccessResponse_4(acceptedCommandList); } static void OnFailureCallback_5(void * context, CHIP_ERROR error) @@ -3135,9 +3138,10 @@ class Test_TC_BOOL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_5(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) { - (static_cast(context))->OnSuccessResponse_5(attributeList); + (static_cast(context))->OnSuccessResponse_5(generatedCommandList); } // @@ -3197,36 +3201,36 @@ class Test_TC_BOOL_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); + ThrowFailureResponse(); } - void OnSuccessResponse_3() { ThrowSuccessResponse(); } + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + { + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } @@ -3237,20 +3241,19 @@ class Test_TC_BOOL_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t clusterRevision) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & acceptedCommandList) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::BooleanStateClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_5, OnFailureCallback_5, true)); return CHIP_NO_ERROR; } @@ -3261,9 +3264,9 @@ class Test_TC_BOOL_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & generatedCommandList) { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); } }; @@ -3319,15 +3322,6 @@ class Test_TC_BOOL_2_1Suite : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Read mandatory non-global attribute constraints: StateValue\n"); err = TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2(); break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Write the default value to mandatory non-global attribute: StateValue\n"); - err = TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads back the mandatory non-global attribute: StateValue\n"); - err = TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4(); - break; } if (CHIP_NO_ERROR != err) @@ -3344,7 +3338,7 @@ class Test_TC_BOOL_2_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -3379,23 +3373,6 @@ class Test_TC_BOOL_2_1Suite : public TestCommand (static_cast(context))->OnSuccessResponse_2(stateValue); } - static void OnFailureCallback_3(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_3(error); - } - - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, bool stateValue) - { - (static_cast(context))->OnSuccessResponse_4(stateValue); - } - // // Tests methods // @@ -3452,53 +3429,6 @@ class Test_TC_BOOL_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("stateValue", "", "bool")); NextTest(); } - - CHIP_ERROR TestWriteTheDefaultValueToMandatoryNonGlobalAttributeStateValue_3() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::BooleanStateClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - bool stateValueArgument; - stateValueArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute( - stateValueArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStateValue_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::BooleanStateClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_4(bool stateValue) - { - VerifyOrReturn(CheckValue("stateValue", stateValue, 0)); - - NextTest(); - } }; class Test_TC_BRAC_1_1Suite : public TestCommand @@ -3552,6 +3482,18 @@ class Test_TC_BRAC_1_1Suite : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; } if (CHIP_NO_ERROR != err) @@ -3568,7 +3510,7 @@ class Test_TC_BRAC_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -3603,6 +3545,38 @@ class Test_TC_BRAC_1_1Suite : public TestCommand (static_cast(context))->OnSuccessResponse_2(clusterRevision); } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_3(error); + } + + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_3(attributeList); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) + { + (static_cast(context))->OnSuccessResponse_4(acceptedCommandList); + } + + static void OnFailureCallback_5(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_5(error); + } + + static void OnSuccessCallback_5(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) + { + (static_cast(context))->OnSuccessResponse_5(generatedCommandList); + } + // // Tests methods // @@ -3659,6 +3633,75 @@ class Test_TC_BRAC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::BridgedActionsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + { + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::BridgedActionsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & acceptedCommandList) + { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::BridgedActionsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & generatedCommandList) + { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + } }; class Test_TC_CC_1_1Suite : public TestCommand @@ -22368,25 +22411,20 @@ class Test_TC_ILL_1_1Suite : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -22404,7 +22442,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -22434,9 +22472,9 @@ class Test_TC_ILL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_2(clusterRevision); + (static_cast(context))->OnSuccessResponse_2(attributeList); } static void OnFailureCallback_3(void * context, CHIP_ERROR error) @@ -22444,26 +22482,21 @@ class Test_TC_ILL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_3(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) { - (static_cast(context))->OnSuccessResponse_4(clusterRevision); + (static_cast(context))->OnSuccessResponse_3(acceptedCommandList); } - static void OnFailureCallback_5(void * context, CHIP_ERROR error) + static void OnFailureCallback_4(void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_5(error); + (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) { - (static_cast(context))->OnSuccessResponse_5(attributeList); + (static_cast(context))->OnSuccessResponse_4(generatedCommandList); } // @@ -22476,7 +22509,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; @@ -22496,19 +22529,18 @@ class Test_TC_ILL_1_1Suite : public TestCommand void OnSuccessResponse_1(uint16_t clusterRevision) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); - + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } @@ -22519,82 +22551,57 @@ class Test_TC_ILL_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t clusterRevision) + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - ReturnErrorOnFailure( - cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::IlluminanceMeasurementClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t clusterRevision) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & acceptedCommandList) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::IlluminanceMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5, true)); + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(CHIP_ERROR error) + void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & generatedCommandList) { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); } }; @@ -22664,12 +22671,28 @@ class Test_TC_LVL_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional global attribute : FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : write the default values to optional global attribute: FeatureMap\n"); - err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : reads back optional global attribute: FeatureMap\n"); + err = TestReadsBackOptionalGlobalAttributeFeatureMap_11(); break; } @@ -22687,7 +22710,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -22754,9 +22777,10 @@ class Test_TC_LVL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint32_t featureMap) + static void OnSuccessCallback_6(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) { - (static_cast(context))->OnSuccessResponse_6(featureMap); + (static_cast(context))->OnSuccessResponse_6(acceptedCommandList); } static void OnFailureCallback_7(void * context, CHIP_ERROR error) @@ -22764,7 +22788,48 @@ class Test_TC_LVL_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_7(error); } - static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } + static void OnSuccessCallback_7(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) + { + (static_cast(context))->OnSuccessResponse_7(generatedCommandList); + } + + static void OnFailureCallback_8(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_8(error); + } + + static void OnSuccessCallback_8(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_8(featureMap); + } + + static void OnFailureCallback_9(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_9(error); + } + + static void OnSuccessCallback_9(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_9(featureMap); + } + + static void OnFailureCallback_10(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_10(error); + } + + static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } + + static void OnFailureCallback_11(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_11(error); + } + + static void OnSuccessCallback_11(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_11(featureMap); + } // // Tests methods @@ -22893,13 +22958,13 @@ class Test_TC_LVL_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_6, OnFailureCallback_6, true)); return CHIP_NO_ERROR; } @@ -22910,13 +22975,83 @@ class Test_TC_LVL_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_6(uint32_t featureMap) + void OnSuccessResponse_6(const chip::app::DataModel::DecodableList & acceptedCommandList) + { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_7() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_7(const chip::app::DataModel::DecodableList & generatedCommandList) + { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_8() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_8(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_8(uint32_t featureMap) + { + VerifyOrReturn(CheckValue("featureMap", featureMap, 3UL)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_9() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_9(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_9(uint32_t featureMap) { VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_7() + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -22926,18 +23061,41 @@ class Test_TC_LVL_1_1Suite : public TestCommand featureMapArgument = 0UL; ReturnErrorOnFailure(cluster.WriteAttribute( - featureMapArgument, this, OnSuccessCallback_7, OnFailureCallback_7)); + featureMapArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } - void OnFailureResponse_7(CHIP_ERROR error) + void OnFailureResponse_10(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_7() { ThrowSuccessResponse(); } + void OnSuccessResponse_10() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_11() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_11(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_11(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + } }; class Test_TC_LVL_2_1Suite : public TestCommand @@ -24262,8 +24420,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand err = TestSendsAMoveToLevelCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait a second\n"); - err = TestWaitASecond_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 11000 second\n"); + err = TestWait11000Second_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); @@ -24278,8 +24436,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand err = TestSendsAMoveToLevelCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10ms\n"); - err = TestWait10ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); @@ -24423,8 +24581,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_1(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); - + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); NextTest(); } @@ -24447,8 +24604,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_2(uint8_t minLevel) { - VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); - + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); NextTest(); } @@ -24471,8 +24627,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_3(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); } @@ -24483,7 +24638,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand RequestType request; request.level = 64; - request.transitionTime = 0U; + request.transitionTime = 65535U; request.optionMask = 1; request.optionOverride = 1; @@ -24543,8 +24698,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 128; - request.transitionTime = 1U; + request.level = 100; + request.transitionTime = 100U; request.optionMask = 1; request.optionOverride = 1; @@ -24568,10 +24723,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWaitASecond_8() + CHIP_ERROR TestWait11000Second_8() { SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + return WaitForMs(11000); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() @@ -24593,7 +24748,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 100)); NextTest(); } @@ -24617,8 +24772,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); - + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); } @@ -24628,7 +24782,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; - request.level = 254; + request.level = 128; request.transitionTime = 65535U; request.optionMask = 1; request.optionOverride = 1; @@ -24653,10 +24807,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestWait10ms_12() + CHIP_ERROR TestWait1000ms_12() { SetIdentity(kIdentityAlpha); - return WaitForMs(100); + return WaitForMs(1000); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() @@ -24678,7 +24832,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand void OnSuccessResponse_13(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); NextTest(); } @@ -24765,16 +24919,16 @@ class Test_TC_LVL_4_1Suite : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : reads max level attribute from DUT\n"); - err = TestReadsMaxLevelAttributeFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : sends a Move up command\n"); - err = TestSendsAMoveUpCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : user prompt message\n"); + err = TestUserPromptMessage_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); @@ -24793,16 +24947,16 @@ class Test_TC_LVL_4_1Suite : public TestCommand err = TestSendsAMoveDownCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 3000ms\n"); - err = TestWait3000ms_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : user prompt message\n"); + err = TestUserPromptMessage_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); + err = TestWait5000ms_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Write default move rate attribute from DUT\n"); - err = TestWriteDefaultMoveRateAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); @@ -24821,12 +24975,16 @@ class Test_TC_LVL_4_1Suite : public TestCommand err = TestReadsCurrentLevelAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reset level to 254\n"); - err = TestResetLevelTo254_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : user prompt message\n"); + err = TestUserPromptMessage_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); - err = TestWait100ms_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Reset level to 254\n"); + err = TestResetLevelTo254_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 100ms\n"); + err = TestWait100ms_17(); break; } @@ -24844,13 +25002,17 @@ class Test_TC_LVL_4_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t MaxlevelValue; + uint8_t MinlevelValue; + chip::app::DataModel::Nullable DefaultMoveRateValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { bool isExpectedDnssdResult = false; @@ -24864,19 +25026,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_1(error); } - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_1(currentLevel); - } - - static void OnFailureCallback_2(void * context, CHIP_ERROR error) + static void OnSuccessCallback_1(void * context, uint8_t maxLevel) { - (static_cast(context))->OnFailureResponse_2(error); - } - - static void OnSuccessCallback_2(void * context, uint8_t maxLevel) - { - (static_cast(context))->OnSuccessResponse_2(maxLevel); + (static_cast(context))->OnSuccessResponse_1(maxLevel); } static void OnFailureCallback_5(void * context, CHIP_ERROR error) @@ -24899,22 +25051,15 @@ class Test_TC_LVL_4_1Suite : public TestCommand (static_cast(context))->OnSuccessResponse_6(minLevel); } - static void OnFailureCallback_9(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_9(error); - } - - static void OnSuccessCallback_9(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_9(currentLevel); - } - static void OnFailureCallback_10(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } + static void OnSuccessCallback_10(void * context, uint8_t currentLevel) + { + (static_cast(context))->OnSuccessResponse_10(currentLevel); + } static void OnFailureCallback_11(void * context, CHIP_ERROR error) { @@ -24946,13 +25091,13 @@ class Test_TC_LVL_4_1Suite : public TestCommand return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_1, OnFailureCallback_1, true)); return CHIP_NO_ERROR; } @@ -24963,67 +25108,50 @@ class Test_TC_LVL_4_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_1(uint8_t currentLevel) - { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); - - NextTest(); - } - - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_2() + void OnSuccessResponse_1(uint8_t maxLevel) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_2(uint8_t maxLevel) - { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + MaxlevelValue = maxLevel; NextTest(); } - CHIP_ERROR TestSendsAMoveUpCommand_3() + CHIP_ERROR TestSendsAMoveUpCommand_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; request.moveMode = static_cast(0); - request.rate = 200; + request.rate = 32; request.optionMask = 1; request.optionOverride = 1; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_3(); + (static_cast(context))->OnSuccessResponse_2(); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_3(error); + (static_cast(context))->OnFailureResponse_2(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_3() { NextTest(); } + void OnSuccessResponse_2() { NextTest(); } + + CHIP_ERROR TestUserPromptMessage_3() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("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"); + } CHIP_ERROR TestWait3000ms_4() { @@ -25050,7 +25178,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, MaxlevelValue)); NextTest(); } @@ -25074,8 +25202,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand void OnSuccessResponse_6(uint8_t minLevel) { - VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); - + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + MinlevelValue = minLevel; NextTest(); } @@ -25086,7 +25214,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand RequestType request; request.moveMode = static_cast(1); - request.rate = 250; + request.rate = 64; request.optionMask = 1; request.optionOverride = 1; @@ -25110,59 +25238,44 @@ class Test_TC_LVL_4_1Suite : public TestCommand void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWait3000ms_8() + CHIP_ERROR TestUserPromptMessage_8() { SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + return UserPrompt("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"); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestWait5000ms_9() + { + SetIdentity(kIdentityAlpha); + return WaitForMs(5000); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_9, OnFailureCallback_9, true)); + this, OnSuccessCallback_10, OnFailureCallback_10, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_9(CHIP_ERROR error) + void OnFailureResponse_10(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_9(uint8_t currentLevel) + void OnSuccessResponse_10(uint8_t currentLevel) { + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 1)); VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } - CHIP_ERROR TestWriteDefaultMoveRateAttributeFromDut_10() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - chip::app::DataModel::Nullable defaultMoveRateArgument; - defaultMoveRateArgument.SetNonNull(); - defaultMoveRateArgument.Value() = 20; - - ReturnErrorOnFailure(cluster.WriteAttribute( - defaultMoveRateArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_10(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_10() { NextTest(); } - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; @@ -25182,9 +25295,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand void OnSuccessResponse_11(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 20)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + DefaultMoveRateValue = defaultMoveRate; NextTest(); } @@ -25249,7 +25361,14 @@ class Test_TC_LVL_4_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestResetLevelTo254_15() + CHIP_ERROR TestUserPromptMessage_15() + { + SetIdentity(kIdentityAlpha); + return UserPrompt( + "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level."); + } + + CHIP_ERROR TestResetLevelTo254_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; @@ -25261,26 +25380,26 @@ class Test_TC_LVL_4_1Suite : public TestCommand request.optionOverride = 1; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_15(); + (static_cast(context))->OnSuccessResponse_16(); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_15(error); + (static_cast(context))->OnFailureResponse_16(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(CHIP_ERROR error) + void OnFailureResponse_16(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_15() { NextTest(); } + void OnSuccessResponse_16() { NextTest(); } - CHIP_ERROR TestWait100ms_16() + CHIP_ERROR TestWait100ms_17() { SetIdentity(kIdentityAlpha); return WaitForMs(100); @@ -25335,32 +25454,32 @@ class Test_TC_LVL_5_1Suite : public TestCommand err = TestSendingOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to 0x80\n"); - err = TestPreconditionDutLevelIsSetTo0x80_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to its lowest point\n"); + err = TestPreconditionDutLevelIsSetToItsLowestPoint_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 4000ms\n"); - err = TestWait4000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); + err = TestWait3000ms_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); err = TestReadsCurrentLevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step down command to DUT\n"); - err = TestSendsStepDownCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step up command to DUT\n"); + err = TestSendsStepUpCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 4000ms\n"); - err = TestWait4000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 5000ms\n"); + err = TestWait5000ms_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step up command\n"); - err = TestSendsAStepUpCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step down command\n"); + err = TestSendsAStepDownCommand_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); @@ -25405,6 +25524,8 @@ class Test_TC_LVL_5_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t CurrentlevelValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { bool isExpectedDnssdResult = false; @@ -25480,14 +25601,14 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_2() + CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; request.stepMode = static_cast(1); - request.stepSize = 126; + request.stepSize = 100; request.transitionTime = 20U; request.optionMask = 0; request.optionOverride = 0; @@ -25512,10 +25633,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWait4000ms_3() + CHIP_ERROR TestWait3000ms_3() { SetIdentity(kIdentityAlpha); - return WaitForMs(4000); + return WaitForMs(3000); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() @@ -25537,20 +25658,20 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); - + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + CurrentlevelValue = currentLevel; NextTest(); } - CHIP_ERROR TestSendsStepDownCommandToDut_5() + CHIP_ERROR TestSendsStepUpCommandToDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; - request.stepMode = static_cast(1); + request.stepMode = static_cast(0); request.stepSize = 64; - request.transitionTime = 20U; + request.transitionTime = 2U; request.optionMask = 0; request.optionOverride = 0; @@ -25574,10 +25695,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWait4000ms_6() + CHIP_ERROR TestWait5000ms_6() { SetIdentity(kIdentityAlpha); - return WaitForMs(4000); + return WaitForMs(5000); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() @@ -25599,20 +25720,20 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_7(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 64)); + VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, CurrentlevelValue)); NextTest(); } - CHIP_ERROR TestSendsAStepUpCommand_8() + CHIP_ERROR TestSendsAStepDownCommand_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; - request.stepMode = static_cast(0); + request.stepMode = static_cast(1); request.stepSize = 64; - request.transitionTime = 20U; + request.transitionTime = 2U; request.optionMask = 0; request.optionOverride = 0; @@ -25661,7 +25782,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand void OnSuccessResponse_10(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 128)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, CurrentlevelValue)); NextTest(); } @@ -25841,6 +25962,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t CurrentLevelValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { bool isExpectedDnssdResult = false; @@ -25964,6 +26087,7 @@ class Test_TC_LVL_6_1Suite : public TestCommand { VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); + CurrentLevelValue = currentLevel; NextTest(); } @@ -26052,8 +26176,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand void OnSuccessResponse_8(uint8_t currentLevel) { - VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); + VerifyOrReturn(CheckConstraintNotValue("currentLevel", currentLevel, CurrentLevelValue)); + NextTest(); } @@ -31912,13 +32036,13 @@ class Test_TC_OCC_2_2Suite : public TestCommand err = TestReadsOccupancyAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads Occupancy attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads back Occupancy attribute from DUT after few seconds\n"); if (ShouldSkip("A_OCCUPANCY")) { NextTest(); return; } - err = TestReadsOccupancyAttributeFromDut_2(); + err = TestReadsBackOccupancyAttributeFromDutAfterFewSeconds_2(); break; } @@ -31943,6 +32067,8 @@ class Test_TC_OCC_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t OccupancyValue; + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { bool isExpectedDnssdResult = false; @@ -32000,11 +32126,13 @@ class Test_TC_OCC_2_2Suite : public TestCommand void OnSuccessResponse_1(uint8_t occupancy) { - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckValue("occupancy", occupancy, 0)); + + OccupancyValue = occupancy; NextTest(); } - CHIP_ERROR TestReadsOccupancyAttributeFromDut_2() + CHIP_ERROR TestReadsBackOccupancyAttributeFromDutAfterFewSeconds_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; @@ -32021,11 +32149,7 @@ class Test_TC_OCC_2_2Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint8_t occupancy) - { - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); - NextTest(); - } + void OnSuccessResponse_2(uint8_t occupancy) { NextTest(); } }; class Test_TC_OO_1_1Suite : public TestCommand @@ -35336,21 +35460,16 @@ class Test_TC_PS_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -35368,7 +35487,7 @@ class Test_TC_PS_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -35398,9 +35517,9 @@ class Test_TC_PS_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_2(clusterRevision); + (static_cast(context))->OnSuccessResponse_2(attributeList); } static void OnFailureCallback_3(void * context, CHIP_ERROR error) @@ -35408,26 +35527,21 @@ class Test_TC_PS_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + static void OnSuccessCallback_3(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) { - (static_cast(context))->OnSuccessResponse_4(clusterRevision); + (static_cast(context))->OnSuccessResponse_3(acceptedCommandList); } - static void OnFailureCallback_5(void * context, CHIP_ERROR error) + static void OnFailureCallback_4(void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_5(error); + (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) { - (static_cast(context))->OnSuccessResponse_5(attributeList); + (static_cast(context))->OnSuccessResponse_4(generatedCommandList); } // @@ -35464,13 +35578,13 @@ class Test_TC_PS_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PowerSourceClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } @@ -35481,79 +35595,55 @@ class Test_TC_PS_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t clusterRevision) + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PowerSourceClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::PowerSourceClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t clusterRevision) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & acceptedCommandList) { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PowerSourceClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(CHIP_ERROR error) + void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & generatedCommandList) { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); } }; @@ -36660,8 +36750,28 @@ class Test_TC_PCC_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional global attribute: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : reads back optional global attribute: FeatureMap\n"); + err = TestReadsBackOptionalGlobalAttributeFeatureMap_9(); break; } @@ -36679,7 +36789,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -36726,9 +36836,58 @@ class Test_TC_PCC_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint32_t featureMap) + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) + { + (static_cast(context))->OnSuccessResponse_4(acceptedCommandList); + } + + static void OnFailureCallback_5(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_5(error); + } + + static void OnSuccessCallback_5(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) + { + (static_cast(context))->OnSuccessResponse_5(generatedCommandList); + } + + static void OnFailureCallback_6(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_6(error); + } + + static void OnSuccessCallback_6(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_6(featureMap); + } + + static void OnFailureCallback_7(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_7(error); + } + + static void OnSuccessCallback_7(void * context, uint32_t featureMap) { - (static_cast(context))->OnSuccessResponse_4(featureMap); + (static_cast(context))->OnSuccessResponse_7(featureMap); + } + + static void OnFailureCallback_8(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_8(error); + } + + static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } + + static void OnFailureCallback_9(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_9(error); + } + + static void OnSuccessCallback_9(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_9(featureMap); } // @@ -36813,14 +36972,14 @@ class Test_TC_PCC_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::PumpConfigurationAndControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } @@ -36831,8 +36990,130 @@ class Test_TC_PCC_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_4(uint32_t featureMap) + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & acceptedCommandList) + { + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & generatedCommandList) + { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_6(uint32_t featureMap) + { + VerifyOrReturn(CheckValue("featureMap", featureMap, 0UL)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_7(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t featureMapArgument; + featureMapArgument = 0UL; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_8(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_8() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_9() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PumpConfigurationAndControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_9(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_9(uint32_t featureMap) { + VerifyOrReturn(CheckValue("featureMap", featureMap, 0UL)); VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); } @@ -38566,6 +38847,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { VerifyOrReturn(CheckConstraintType("minConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("minConstTemp", minConstTemp, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minConstTemp", minConstTemp, 32767)); NextTest(); } @@ -38591,6 +38873,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand { VerifyOrReturn(CheckConstraintType("maxConstTemp", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("maxConstTemp", maxConstTemp, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("maxConstTemp", maxConstTemp, 32767)); NextTest(); } @@ -39981,13 +40264,16 @@ class Test_TC_RH_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -40005,7 +40291,7 @@ class Test_TC_RH_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -40035,16 +40321,31 @@ class Test_TC_RH_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_2(attributeList); + } static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) + { + (static_cast(context))->OnSuccessResponse_3(acceptedCommandList); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) { - (static_cast(context))->OnSuccessResponse_3(attributeList); + (static_cast(context))->OnSuccessResponse_4(generatedCommandList); } // @@ -40081,38 +40382,38 @@ class Test_TC_RH_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - ReturnErrorOnFailure( - cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); + ThrowFailureResponse(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) + { + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } @@ -40123,9 +40424,33 @@ class Test_TC_RH_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & acceptedCommandList) { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & generatedCommandList) + { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); } }; @@ -40182,12 +40507,8 @@ class Test_TC_RH_2_1Suite : public TestCommand err = TestReadsConstraintsOfAttributeMinMeasuredValue_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the optional attribute: Tolerance\n"); - err = TestReadsTheOptionalAttributeTolerance_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads constraints of attribute: Tolerance\n"); - err = TestReadsConstraintsOfAttributeTolerance_4(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of attribute: Tolerance\n"); + err = TestReadsConstraintsOfAttributeTolerance_3(); break; } @@ -40205,7 +40526,7 @@ class Test_TC_RH_2_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -40250,16 +40571,6 @@ class Test_TC_RH_2_1Suite : public TestCommand (static_cast(context))->OnSuccessResponse_3(tolerance); } - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, uint16_t tolerance) - { - (static_cast(context))->OnSuccessResponse_4(tolerance); - } - // // Tests methods // @@ -40290,7 +40601,9 @@ class Test_TC_RH_2_1Suite : public TestCommand void OnSuccessResponse_1(uint16_t measuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", measuredValue, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", measuredValue, 10000U)); NextTest(); } @@ -40314,13 +40627,13 @@ class Test_TC_RH_2_1Suite : public TestCommand void OnSuccessResponse_2(uint16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U)); VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); } - CHIP_ERROR TestReadsTheOptionalAttributeTolerance_3() + CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; @@ -40339,31 +40652,6 @@ class Test_TC_RH_2_1Suite : public TestCommand } void OnSuccessResponse_3(uint16_t tolerance) - { - VerifyOrReturn(CheckValue("tolerance", tolerance, 0U)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::RelativeHumidityMeasurementClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_4(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); @@ -40416,22 +40704,26 @@ class Test_TC_RH_2_2Suite : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads constraints of attribute: MinMeasuredValue\n"); + err = TestReadsConstraintsOfAttributeMinMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads MeasuredValue attribute from DUT\n"); if (ShouldSkip("A_RELATIVEHUMIDITY")) { NextTest(); return; } - err = TestReadsMeasuredValueAttributeFromDut_1(); + err = TestReadsMeasuredValueAttributeFromDut_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MeasuredValue\n"); if (ShouldSkip("A_RELATIVEHUMIDITY")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); + err = TestReadTheMandatoryAttributeMeasuredValue_3(); break; } @@ -40449,7 +40741,7 @@ class Test_TC_RH_2_2Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -40469,9 +40761,9 @@ class Test_TC_RH_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_1(error); } - static void OnSuccessCallback_1(void * context, uint16_t measuredValue) + static void OnSuccessCallback_1(void * context, uint16_t minMeasuredValue) { - (static_cast(context))->OnSuccessResponse_1(measuredValue); + (static_cast(context))->OnSuccessResponse_1(minMeasuredValue); } static void OnFailureCallback_2(void * context, CHIP_ERROR error) @@ -40484,6 +40776,16 @@ class Test_TC_RH_2_2Suite : public TestCommand (static_cast(context))->OnSuccessResponse_2(measuredValue); } + static void OnFailureCallback_3(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_3(error); + } + + static void OnSuccessCallback_3(void * context, uint16_t measuredValue) + { + (static_cast(context))->OnSuccessResponse_3(measuredValue); + } + // // Tests methods // @@ -40494,14 +40796,14 @@ class Test_TC_RH_2_2Suite : public TestCommand return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); } - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_1, OnFailureCallback_1, true)); return CHIP_NO_ERROR; } @@ -40512,13 +40814,15 @@ class Test_TC_RH_2_2Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_1(uint16_t measuredValue) + void OnSuccessResponse_1(uint16_t minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 9999U)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() + CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::RelativeHumidityMeasurementClusterTest cluster; @@ -40537,6 +40841,32 @@ class Test_TC_RH_2_2Suite : public TestCommand } void OnSuccessResponse_2(uint16_t measuredValue) + { + VerifyOrReturn(CheckConstraintType("measuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", measuredValue, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", measuredValue, 10000U)); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::RelativeHumidityMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_3(uint16_t measuredValue) { VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); @@ -41415,13 +41745,8 @@ class Test_TC_TM_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; } @@ -41439,7 +41764,7 @@ class Test_TC_TM_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -41469,16 +41794,9 @@ class Test_TC_TM_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } - - static void OnFailureCallback_3(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_3(error); - } - - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_3(attributeList); + (static_cast(context))->OnSuccessResponse_2(attributeList); } // @@ -41515,31 +41833,7 @@ class Test_TC_TM_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::TemperatureMeasurementClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 4U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; @@ -41547,17 +41841,17 @@ class Test_TC_TM_1_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3, true)); + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) { VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); @@ -41612,8 +41906,16 @@ class Test_TC_TM_2_1Suite : public TestCommand err = TestReadTheMandatoryAttributeMeasuredValue_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_4(); break; } @@ -41631,7 +41933,7 @@ class Test_TC_TM_2_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -41661,9 +41963,29 @@ class Test_TC_TM_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t tolerance) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & minMeasuredValue) + { + (static_cast(context))->OnSuccessResponse_2(minMeasuredValue); + } + + static void OnFailureCallback_3(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_3(error); + } + + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::Nullable & maxMeasuredValue) + { + (static_cast(context))->OnSuccessResponse_3(maxMeasuredValue); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, uint16_t tolerance) { - (static_cast(context))->OnSuccessResponse_2(tolerance); + (static_cast(context))->OnSuccessResponse_4(tolerance); } // @@ -41700,24 +42022,76 @@ class Test_TC_TM_2_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_2() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2, true)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } void OnFailureResponse_2(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_2(const chip::app::DataModel::Nullable & minMeasuredValue) + { + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 32766)); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_3(const chip::app::DataModel::Nullable & maxMeasuredValue) + { + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", maxMeasuredValue, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", maxMeasuredValue, 32767)); + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t tolerance) + void OnSuccessResponse_4(uint16_t tolerance) { VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("tolerance", tolerance, 0U)); @@ -41770,22 +42144,30 @@ class Test_TC_TM_2_2Suite : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads MeasuredValue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads MeasuredValue attribute from DUT\n"); if (ShouldSkip("A_TEMPERATURE")) { NextTest(); return; } - err = TestReadsMeasuredValueAttributeFromDut_1(); + err = TestReadsMeasuredValueAttributeFromDut_3(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MeasuredValue\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the mandatory attribute: MeasuredValue\n"); if (ShouldSkip("A_TEMPERATURE")) { NextTest(); return; } - err = TestReadTheMandatoryAttributeMeasuredValue_2(); + err = TestReadTheMandatoryAttributeMeasuredValue_4(); break; } @@ -41803,7 +42185,7 @@ class Test_TC_TM_2_2Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -41823,9 +42205,9 @@ class Test_TC_TM_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_1(error); } - static void OnSuccessCallback_1(void * context, const chip::app::DataModel::Nullable & measuredValue) + static void OnSuccessCallback_1(void * context, const chip::app::DataModel::Nullable & minMeasuredValue) { - (static_cast(context))->OnSuccessResponse_1(measuredValue); + (static_cast(context))->OnSuccessResponse_1(minMeasuredValue); } static void OnFailureCallback_2(void * context, CHIP_ERROR error) @@ -41833,9 +42215,29 @@ class Test_TC_TM_2_2Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & measuredValue) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::Nullable & maxMeasuredValue) + { + (static_cast(context))->OnSuccessResponse_2(maxMeasuredValue); + } + + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { - (static_cast(context))->OnSuccessResponse_2(measuredValue); + (static_cast(context))->OnFailureResponse_3(error); + } + + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::Nullable & measuredValue) + { + (static_cast(context))->OnSuccessResponse_3(measuredValue); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, const chip::app::DataModel::Nullable & measuredValue) + { + (static_cast(context))->OnSuccessResponse_4(measuredValue); } // @@ -41848,14 +42250,14 @@ class Test_TC_TM_2_2Suite : public TestCommand return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); } - CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_1, OnFailureCallback_1, true)); return CHIP_NO_ERROR; } @@ -41866,20 +42268,22 @@ class Test_TC_TM_2_2Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_1(const chip::app::DataModel::Nullable & measuredValue) + void OnSuccessResponse_1(const chip::app::DataModel::Nullable & minMeasuredValue) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", minMeasuredValue, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", minMeasuredValue, 32766)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( + cluster.ReadAttribute( this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } @@ -41890,7 +42294,57 @@ class Test_TC_TM_2_2Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_2(const chip::app::DataModel::Nullable & measuredValue) + void OnSuccessResponse_2(const chip::app::DataModel::Nullable & maxMeasuredValue) + { + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", maxMeasuredValue, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", maxMeasuredValue, 32767)); + NextTest(); + } + + CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_3(const chip::app::DataModel::Nullable & measuredValue) + { + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TemperatureMeasurementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(const chip::app::DataModel::Nullable & measuredValue) { VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); NextTest(); @@ -41945,17 +42399,12 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional global attribute constraints: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_4(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional global attribute constraints: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3(); break; } @@ -41973,7 +42422,7 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -42003,26 +42452,19 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } - - static void OnFailureCallback_3(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_3(error); - } - - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_3(attributeList); + (static_cast(context))->OnSuccessResponse_2(attributeList); } - static void OnFailureCallback_4(void * context, CHIP_ERROR error) + static void OnFailureCallback_3(void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_4(error); + (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_4(void * context, uint32_t featureMap) + static void OnSuccessCallback_3(void * context, uint32_t featureMap) { - (static_cast(context))->OnSuccessResponse_4(featureMap); + (static_cast(context))->OnSuccessResponse_3(featureMap); } // @@ -42058,70 +42500,47 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 5U; - - ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_2() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3, true)); + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) { VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); } - CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_4() + CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_4(uint32_t featureMap) + void OnSuccessResponse_3(uint32_t featureMap) { VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); @@ -42177,285 +42596,82 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand err = TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); + ChipLogProgress(chipTool, + " ***** Test Step 2 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); break; case 3: ChipLogProgress(chipTool, - " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3(); + " ***** Test Step 3 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_3(); break; case 4: ChipLogProgress(chipTool, - " ***** Test Step 4 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4(); + " ***** Test Step 4 : Reads constraints of optional attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutAbsMinCoolSetpointLimit_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : Reads constraints of optional attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutAbsMaxCoolSetpointLimit_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6(); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Reads constraints of optional attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutOccupiedCoolingSetpoint_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7(); + " ***** Test Step 7 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_7(); break; case 8: ChipLogProgress(chipTool, - " ***** Test Step 8 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8(); + " ***** Test Step 8 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9(); + ChipLogProgress(chipTool, + " ***** Test Step 9 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10(); + ChipLogProgress(chipTool, + " ***** Test Step 10 : Reads constraints of optional attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinCoolSetpointLimit_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11(); + " ***** Test Step 11 : Reads constraints of optional attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMaxCoolSetpointLimit_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14(); + ChipLogProgress(chipTool, + " ***** Test Step 14 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_14(); break; case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_15(); break; case 16: ChipLogProgress(chipTool, - " ***** Test Step 16 : Writes the respective default value to mandatory attributes to DUT: " - "AbsMaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16(); + " ***** Test Step 16 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Writes the respective default value to mandatory attributes to DUT: " - "OccupiedCoolingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read back mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22(); - break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23(); - break; - case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : Writes the respective default value to mandatory attributes to DUT: " - "OccupiedHeatingSetpoint\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read back mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); - err = TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26(); - break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27(); - break; - case 28: - ChipLogProgress( - chipTool, - " ***** Test Step 28 : Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read back mandatory attributes from DUT: MinHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31(); - break; - case 32: - ChipLogProgress( - chipTool, - " ***** Test Step 32 : Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read back mandatory attributes from DUT: MaxHeatSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34(); - break; - case 35: - ChipLogProgress(chipTool, - " ***** Test Step 35 : Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35(); - break; - case 36: - ChipLogProgress( - chipTool, - " ***** Test Step 36 : Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read back mandatory attributes from DUT: MinCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Reads mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38(); - break; - case 39: - ChipLogProgress(chipTool, - " ***** Test Step 39 : Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39(); - break; - case 40: - ChipLogProgress( - chipTool, - " ***** Test Step 40 : Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read back mandatory attributes from DUT: MaxCoolSetpointLimit\n"); - err = TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42(); - break; - case 43: - ChipLogProgress( - chipTool, " ***** Test Step 43 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43(); - break; - case 44: - ChipLogProgress(chipTool, - " ***** Test Step 44 : Writes the respective default value to mandatory attributes to DUT: " - "ControlSequenceOfOperation\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44(); - break; - case 45: - ChipLogProgress(chipTool, - " ***** Test Step 45 : Read back mandatory attributes from DUT: ControlSequenceOfOperation\n"); - err = TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Reads mandatory attributes from DUT: SystemMode\n"); - err = TestReadsMandatoryAttributesFromDutSystemMode_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); - err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47(); - break; - case 48: - ChipLogProgress( - chipTool, " ***** Test Step 48 : Writes the respective default value to mandatory attributes to DUT: SystemMode\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read back mandatory attributes from DUT: SystemMode\n"); - err = TestReadBackMandatoryAttributesFromDutSystemMode_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50(); - break; - case 51: - ChipLogProgress(chipTool, - " ***** Test Step 51 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51(); - break; - case 52: - ChipLogProgress( - chipTool, - " ***** Test Step 52 : Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read back optional attributes from DUT: MinSetpointDeadBand\n"); - err = TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53(); - break; - case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54(); - break; - case 55: - ChipLogProgress( - chipTool, " ***** Test Step 55 : Writes the respective default value to optional attributes to DUT: StartOfWeek\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55(); - break; - case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read back optional attributes from DUT: StartOfWeek\n"); - err = TestReadBackOptionalAttributesFromDutStartOfWeek_56(); - break; - case 57: - ChipLogProgress(chipTool, - " ***** Test Step 57 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57(); - break; - case 58: - ChipLogProgress(chipTool, - " ***** Test Step 58 : Writes the respective default value to optional attributes to DUT: " - "NumberOfWeeklyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58(); - break; - case 59: - ChipLogProgress(chipTool, - " ***** Test Step 59 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); - err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59(); - break; - case 60: ChipLogProgress(chipTool, - " ***** Test Step 60 : Writes the respective default value to optional attributes to DUT: " - "NumberOfDailyTransitions\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60(); + " ***** Test Step 17 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_17(); break; } @@ -42473,7 +42689,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 61; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -42513,9 +42729,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, int16_t absMinHeatSetpointLimit) + static void OnSuccessCallback_3(void * context, int16_t absMaxHeatSetpointLimit) { - (static_cast(context))->OnSuccessResponse_3(absMinHeatSetpointLimit); + (static_cast(context))->OnSuccessResponse_3(absMaxHeatSetpointLimit); } static void OnFailureCallback_4(void * context, CHIP_ERROR error) @@ -42523,16 +42739,19 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } + static void OnSuccessCallback_4(void * context, int16_t absMinCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_4(absMinCoolSetpointLimit); + } static void OnFailureCallback_5(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, int16_t absMinHeatSetpointLimit) + static void OnSuccessCallback_5(void * context, int16_t absMaxCoolSetpointLimit) { - (static_cast(context))->OnSuccessResponse_5(absMinHeatSetpointLimit); + (static_cast(context))->OnSuccessResponse_5(absMaxCoolSetpointLimit); } static void OnFailureCallback_6(void * context, CHIP_ERROR error) @@ -42540,9 +42759,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_6(void * context, int16_t occupiedCoolingSetpoint) { - (static_cast(context))->OnSuccessResponse_6(absMaxHeatSetpointLimit); + (static_cast(context))->OnSuccessResponse_6(occupiedCoolingSetpoint); } static void OnFailureCallback_7(void * context, CHIP_ERROR error) @@ -42550,9 +42769,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_7(error); } - static void OnSuccessCallback_7(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_7(void * context, int16_t occupiedHeatingSetpoint) { - (static_cast(context))->OnSuccessResponse_7(absMaxHeatSetpointLimit); + (static_cast(context))->OnSuccessResponse_7(occupiedHeatingSetpoint); } static void OnFailureCallback_8(void * context, CHIP_ERROR error) @@ -42560,16 +42779,19 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_8(error); } - static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } + static void OnSuccessCallback_8(void * context, int16_t minHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_8(minHeatSetpointLimit); + } static void OnFailureCallback_9(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_9(error); } - static void OnSuccessCallback_9(void * context, int16_t absMaxHeatSetpointLimit) + static void OnSuccessCallback_9(void * context, int16_t maxHeatSetpointLimit) { - (static_cast(context))->OnSuccessResponse_9(absMaxHeatSetpointLimit); + (static_cast(context))->OnSuccessResponse_9(maxHeatSetpointLimit); } static void OnFailureCallback_10(void * context, CHIP_ERROR error) @@ -42577,9 +42799,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_10(error); } - static void OnSuccessCallback_10(void * context, int16_t absMinCoolSetpointLimit) + static void OnSuccessCallback_10(void * context, int16_t minCoolSetpointLimit) { - (static_cast(context))->OnSuccessResponse_10(absMinCoolSetpointLimit); + (static_cast(context))->OnSuccessResponse_10(minCoolSetpointLimit); } static void OnFailureCallback_11(void * context, CHIP_ERROR error) @@ -42587,9 +42809,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, int16_t absMinCoolSetpointLimit) + static void OnSuccessCallback_11(void * context, int16_t maxCoolSetpointLimit) { - (static_cast(context))->OnSuccessResponse_11(absMinCoolSetpointLimit); + (static_cast(context))->OnSuccessResponse_11(maxCoolSetpointLimit); } static void OnFailureCallback_12(void * context, CHIP_ERROR error) @@ -42597,1675 +42819,414 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_12(error); } - static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } - - static void OnFailureCallback_13(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_13(error); - } - - static void OnSuccessCallback_13(void * context, int16_t absMinCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_13(absMinCoolSetpointLimit); - } - - static void OnFailureCallback_14(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_14(error); - } - - static void OnSuccessCallback_14(void * context, int16_t absMaxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_14(absMaxCoolSetpointLimit); - } - - static void OnFailureCallback_15(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_15(error); - } - - static void OnSuccessCallback_15(void * context, int16_t absMaxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_15(absMaxCoolSetpointLimit); - } - - static void OnFailureCallback_16(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_16(error); - } - - static void OnSuccessCallback_16(void * context) { (static_cast(context))->OnSuccessResponse_16(); } - - static void OnFailureCallback_17(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_17(error); - } - - static void OnSuccessCallback_17(void * context, int16_t absMaxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_17(absMaxCoolSetpointLimit); - } - - static void OnFailureCallback_18(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_18(error); - } - - static void OnSuccessCallback_18(void * context, int16_t occupiedCoolingSetpoint) - { - (static_cast(context))->OnSuccessResponse_18(occupiedCoolingSetpoint); - } - - static void OnFailureCallback_19(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_19(error); - } - - static void OnSuccessCallback_19(void * context, int16_t occupiedCoolingSetpoint) - { - (static_cast(context))->OnSuccessResponse_19(occupiedCoolingSetpoint); - } - - static void OnFailureCallback_20(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_20(error); - } - - static void OnSuccessCallback_20(void * context) { (static_cast(context))->OnSuccessResponse_20(); } - - static void OnFailureCallback_21(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_21(error); - } - - static void OnSuccessCallback_21(void * context, int16_t occupiedCoolingSetpoint) - { - (static_cast(context))->OnSuccessResponse_21(occupiedCoolingSetpoint); - } - - static void OnFailureCallback_22(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_22(error); - } - - static void OnSuccessCallback_22(void * context, int16_t occupiedHeatingSetpoint) - { - (static_cast(context))->OnSuccessResponse_22(occupiedHeatingSetpoint); - } - - static void OnFailureCallback_23(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_23(error); - } - - static void OnSuccessCallback_23(void * context, int16_t occupiedHeatingSetpoint) - { - (static_cast(context))->OnSuccessResponse_23(occupiedHeatingSetpoint); - } - - static void OnFailureCallback_24(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_24(error); - } - - static void OnSuccessCallback_24(void * context) { (static_cast(context))->OnSuccessResponse_24(); } - - static void OnFailureCallback_25(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_25(error); - } - - static void OnSuccessCallback_25(void * context, int16_t occupiedHeatingSetpoint) - { - (static_cast(context))->OnSuccessResponse_25(occupiedHeatingSetpoint); - } - - static void OnFailureCallback_26(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_26(error); - } - - static void OnSuccessCallback_26(void * context, int16_t minHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_26(minHeatSetpointLimit); - } - - static void OnFailureCallback_27(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_27(error); - } - - static void OnSuccessCallback_27(void * context, int16_t minHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_27(minHeatSetpointLimit); - } - - static void OnFailureCallback_28(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_28(error); - } - - static void OnSuccessCallback_28(void * context) { (static_cast(context))->OnSuccessResponse_28(); } - - static void OnFailureCallback_29(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_29(error); - } - - static void OnSuccessCallback_29(void * context, int16_t minHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_29(minHeatSetpointLimit); - } - - static void OnFailureCallback_30(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_30(error); - } - - static void OnSuccessCallback_30(void * context, int16_t maxHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_30(maxHeatSetpointLimit); - } - - static void OnFailureCallback_31(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_31(error); - } - - static void OnSuccessCallback_31(void * context, int16_t maxHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_31(maxHeatSetpointLimit); - } - - static void OnFailureCallback_32(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_32(error); - } - - static void OnSuccessCallback_32(void * context) { (static_cast(context))->OnSuccessResponse_32(); } - - static void OnFailureCallback_33(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_33(error); - } - - static void OnSuccessCallback_33(void * context, int16_t maxHeatSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_33(maxHeatSetpointLimit); - } - - static void OnFailureCallback_34(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_34(error); - } - - static void OnSuccessCallback_34(void * context, int16_t minCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_34(minCoolSetpointLimit); - } - - static void OnFailureCallback_35(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_35(error); - } - - static void OnSuccessCallback_35(void * context, int16_t minCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_35(minCoolSetpointLimit); - } - - static void OnFailureCallback_36(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_36(error); - } - - static void OnSuccessCallback_36(void * context) { (static_cast(context))->OnSuccessResponse_36(); } - - static void OnFailureCallback_37(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_37(error); - } - - static void OnSuccessCallback_37(void * context, int16_t minCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_37(minCoolSetpointLimit); - } - - static void OnFailureCallback_38(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_38(error); - } - - static void OnSuccessCallback_38(void * context, int16_t maxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_38(maxCoolSetpointLimit); - } - - static void OnFailureCallback_39(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_39(error); - } - - static void OnSuccessCallback_39(void * context, int16_t maxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_39(maxCoolSetpointLimit); - } - - static void OnFailureCallback_40(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_40(error); - } - - static void OnSuccessCallback_40(void * context) { (static_cast(context))->OnSuccessResponse_40(); } - - static void OnFailureCallback_41(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_41(error); - } - - static void OnSuccessCallback_41(void * context, int16_t maxCoolSetpointLimit) - { - (static_cast(context))->OnSuccessResponse_41(maxCoolSetpointLimit); - } - - static void OnFailureCallback_42(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_42(error); - } - - static void OnSuccessCallback_42(void * context, - chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) - { - (static_cast(context))->OnSuccessResponse_42(controlSequenceOfOperation); - } - - static void OnFailureCallback_43(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_43(error); - } - - static void OnSuccessCallback_43(void * context, - chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) - { - (static_cast(context))->OnSuccessResponse_43(controlSequenceOfOperation); - } - - static void OnFailureCallback_44(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_44(error); - } - - static void OnSuccessCallback_44(void * context) { (static_cast(context))->OnSuccessResponse_44(); } - - static void OnFailureCallback_45(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_45(error); - } - - static void OnSuccessCallback_45(void * context, - chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) - { - (static_cast(context))->OnSuccessResponse_45(controlSequenceOfOperation); - } - - static void OnFailureCallback_46(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_46(error); - } - - static void OnSuccessCallback_46(void * context, uint8_t systemMode) - { - (static_cast(context))->OnSuccessResponse_46(systemMode); - } - - static void OnFailureCallback_47(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_47(error); - } - - static void OnSuccessCallback_47(void * context, uint8_t systemMode) - { - (static_cast(context))->OnSuccessResponse_47(systemMode); - } - - static void OnFailureCallback_48(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_48(error); - } - - static void OnSuccessCallback_48(void * context) { (static_cast(context))->OnSuccessResponse_48(); } - - static void OnFailureCallback_49(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_49(error); - } - - static void OnSuccessCallback_49(void * context, uint8_t systemMode) - { - (static_cast(context))->OnSuccessResponse_49(systemMode); - } - - static void OnFailureCallback_50(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_50(error); - } - - static void OnSuccessCallback_50(void * context, int8_t minSetpointDeadBand) - { - (static_cast(context))->OnSuccessResponse_50(minSetpointDeadBand); - } - - static void OnFailureCallback_51(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_51(error); - } - - static void OnSuccessCallback_51(void * context, int8_t minSetpointDeadBand) - { - (static_cast(context))->OnSuccessResponse_51(minSetpointDeadBand); - } - - static void OnFailureCallback_52(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_52(error); - } - - static void OnSuccessCallback_52(void * context) { (static_cast(context))->OnSuccessResponse_52(); } - - static void OnFailureCallback_53(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_53(error); - } - - static void OnSuccessCallback_53(void * context, int8_t minSetpointDeadBand) - { - (static_cast(context))->OnSuccessResponse_53(minSetpointDeadBand); - } - - static void OnFailureCallback_54(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_54(error); - } - - static void OnSuccessCallback_54(void * context, uint8_t startOfWeek) - { - (static_cast(context))->OnSuccessResponse_54(startOfWeek); - } - - static void OnFailureCallback_55(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_55(error); - } - - static void OnSuccessCallback_55(void * context) { (static_cast(context))->OnSuccessResponse_55(); } - - static void OnFailureCallback_56(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_56(error); - } - - static void OnSuccessCallback_56(void * context, uint8_t startOfWeek) - { - (static_cast(context))->OnSuccessResponse_56(startOfWeek); - } - - static void OnFailureCallback_57(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_57(error); - } - - static void OnSuccessCallback_57(void * context, uint8_t numberOfWeeklyTransitions) - { - (static_cast(context))->OnSuccessResponse_57(numberOfWeeklyTransitions); - } - - static void OnFailureCallback_58(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_58(error); - } - - static void OnSuccessCallback_58(void * context) { (static_cast(context))->OnSuccessResponse_58(); } - - static void OnFailureCallback_59(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_59(error); - } - - static void OnSuccessCallback_59(void * context, uint8_t numberOfDailyTransitions) - { - (static_cast(context))->OnSuccessResponse_59(numberOfDailyTransitions); - } - - static void OnFailureCallback_60(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_60(error); - } - - static void OnSuccessCallback_60(void * context) { (static_cast(context))->OnSuccessResponse_60(); } - - // - // Tests methods - // - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_1(int16_t localTemperature) - { - VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_2(int16_t absMinHeatSetpointLimit) - { - VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_3() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_3(int16_t absMinHeatSetpointLimit) - { - VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); - VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 3000)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t absMinHeatSetpointLimitArgument; - absMinHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute( - absMinHeatSetpointLimitArgument, this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_4() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_5() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_5(int16_t absMinHeatSetpointLimit) - { - VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_6(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_6(int16_t absMaxHeatSetpointLimit) - { - VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_7() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_7, OnFailureCallback_7, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_7(int16_t absMaxHeatSetpointLimit) - { - VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 700)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_8() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t absMaxHeatSetpointLimitArgument; - absMaxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute( - absMaxHeatSetpointLimitArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_8(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_8() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_9() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_9, OnFailureCallback_9, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_9(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_9(int16_t absMaxHeatSetpointLimit) - { - VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_10(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_10(int16_t absMinCoolSetpointLimit) - { - VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_11() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_11, OnFailureCallback_11, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_11(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_11(int16_t absMinCoolSetpointLimit) - { - VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 3200)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_12() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t absMinCoolSetpointLimitArgument; - absMinCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute( - absMinCoolSetpointLimitArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_12(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_12() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_13() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_13, OnFailureCallback_13, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_13(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_13(int16_t absMinCoolSetpointLimit) - { - VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_14, OnFailureCallback_14, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_14(int16_t absMaxCoolSetpointLimit) - { - VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_15() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_15, OnFailureCallback_15, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_15(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_15(int16_t absMaxCoolSetpointLimit) - { - VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_16() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t absMaxCoolSetpointLimitArgument; - absMaxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute( - absMaxCoolSetpointLimitArgument, this, OnSuccessCallback_16, OnFailureCallback_16)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_16(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_16() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_17() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_17, OnFailureCallback_17, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_17(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_17(int16_t absMaxCoolSetpointLimit) - { - VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_18() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_18, OnFailureCallback_18, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_18(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_18(int16_t occupiedCoolingSetpoint) - { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_19() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_19, OnFailureCallback_19, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_19(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_19(int16_t occupiedCoolingSetpoint) - { - VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_20() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t occupiedCoolingSetpointArgument; - occupiedCoolingSetpointArgument = 2600; - - ReturnErrorOnFailure(cluster.WriteAttribute( - occupiedCoolingSetpointArgument, this, OnSuccessCallback_20, OnFailureCallback_20)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_20(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_20() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_21() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_21, OnFailureCallback_21, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_21(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_21(int16_t occupiedCoolingSetpoint) - { - VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_22() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_22, OnFailureCallback_22, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_22(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_22(int16_t occupiedHeatingSetpoint) - { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_23() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_23, OnFailureCallback_23, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_23(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_23(int16_t occupiedHeatingSetpoint) - { - VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700)); - VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2600)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_24() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t occupiedHeatingSetpointArgument; - occupiedHeatingSetpointArgument = 2000; - - ReturnErrorOnFailure(cluster.WriteAttribute( - occupiedHeatingSetpointArgument, this, OnSuccessCallback_24, OnFailureCallback_24)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_24(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_24() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_25() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_25, OnFailureCallback_25, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_25(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_25(int16_t occupiedHeatingSetpoint) - { - VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); - - NextTest(); - } - - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_26() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_26, OnFailureCallback_26, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_26(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_26(int16_t minHeatSetpointLimit) - { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_27() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_27, OnFailureCallback_27, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_27(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_27(int16_t minHeatSetpointLimit) - { - VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); - VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); - NextTest(); - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_28() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t minHeatSetpointLimitArgument; - minHeatSetpointLimitArgument = 700; - - ReturnErrorOnFailure(cluster.WriteAttribute( - minHeatSetpointLimitArgument, this, OnSuccessCallback_28, OnFailureCallback_28)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_28(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_28() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_29() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_29, OnFailureCallback_29, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_29(CHIP_ERROR error) + static void OnSuccessCallback_12(void * context, + chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) { - chip::app::StatusIB status(error); - ThrowFailureResponse(); + (static_cast(context))->OnSuccessResponse_12(controlSequenceOfOperation); } - void OnSuccessResponse_29(int16_t minHeatSetpointLimit) + static void OnFailureCallback_13(void * context, CHIP_ERROR error) { - VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); - - NextTest(); + (static_cast(context))->OnFailureResponse_13(error); } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_30() + static void OnSuccessCallback_13(void * context, uint8_t systemMode) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_30, OnFailureCallback_30, true)); - return CHIP_NO_ERROR; + (static_cast(context))->OnSuccessResponse_13(systemMode); } - void OnFailureResponse_30(CHIP_ERROR error) + static void OnFailureCallback_14(void * context, CHIP_ERROR error) { - chip::app::StatusIB status(error); - ThrowFailureResponse(); + (static_cast(context))->OnFailureResponse_14(error); } - void OnSuccessResponse_30(int16_t maxHeatSetpointLimit) + static void OnSuccessCallback_14(void * context, int8_t minSetpointDeadBand) { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); - - NextTest(); + (static_cast(context))->OnSuccessResponse_14(minSetpointDeadBand); } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_31() + static void OnFailureCallback_15(void * context, CHIP_ERROR error) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_31, OnFailureCallback_31, true)); - return CHIP_NO_ERROR; + (static_cast(context))->OnFailureResponse_15(error); } - void OnFailureResponse_31(CHIP_ERROR error) + static void OnSuccessCallback_15(void * context, uint8_t startOfWeek) { - chip::app::StatusIB status(error); - ThrowFailureResponse(); + (static_cast(context))->OnSuccessResponse_15(startOfWeek); } - void OnSuccessResponse_31(int16_t maxHeatSetpointLimit) + static void OnFailureCallback_16(void * context, CHIP_ERROR error) { - VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700)); - VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); - NextTest(); + (static_cast(context))->OnFailureResponse_16(error); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_32() + static void OnSuccessCallback_16(void * context, uint8_t numberOfWeeklyTransitions) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t maxHeatSetpointLimitArgument; - maxHeatSetpointLimitArgument = 3000; - - ReturnErrorOnFailure(cluster.WriteAttribute( - maxHeatSetpointLimitArgument, this, OnSuccessCallback_32, OnFailureCallback_32)); - return CHIP_NO_ERROR; + (static_cast(context))->OnSuccessResponse_16(numberOfWeeklyTransitions); } - void OnFailureResponse_32(CHIP_ERROR error) + static void OnFailureCallback_17(void * context, CHIP_ERROR error) { - chip::app::StatusIB status(error); - ThrowFailureResponse(); + (static_cast(context))->OnFailureResponse_17(error); } - void OnSuccessResponse_32() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_33() + static void OnSuccessCallback_17(void * context, uint8_t numberOfDailyTransitions) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_33, OnFailureCallback_33, true)); - return CHIP_NO_ERROR; + (static_cast(context))->OnSuccessResponse_17(numberOfDailyTransitions); } - void OnFailureResponse_33(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } + // + // Tests methods + // - void OnSuccessResponse_33(int16_t maxHeatSetpointLimit) + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); - - NextTest(); + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_34() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_34, OnFailureCallback_34, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_34(CHIP_ERROR error) + void OnFailureResponse_1(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_34(int16_t minCoolSetpointLimit) + void OnSuccessResponse_1(int16_t localTemperature) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); - + VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); NextTest(); } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_35() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_35, OnFailureCallback_35, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_35(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_35(int16_t minCoolSetpointLimit) + void OnSuccessResponse_2(int16_t absMinHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 3000)); NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_36() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t minCoolSetpointLimitArgument; - minCoolSetpointLimitArgument = 1600; - - ReturnErrorOnFailure(cluster.WriteAttribute( - minCoolSetpointLimitArgument, this, OnSuccessCallback_36, OnFailureCallback_36)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_36(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_36() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_37() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_37, OnFailureCallback_37, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_37(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_37(int16_t minCoolSetpointLimit) + void OnSuccessResponse_3(int16_t absMaxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); - + VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); NextTest(); } - CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_38() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMinCoolSetpointLimit_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_38, OnFailureCallback_38, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_38(CHIP_ERROR error) + void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_38(int16_t maxCoolSetpointLimit) + void OnSuccessResponse_4(int16_t absMinCoolSetpointLimit) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); - + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 3200)); NextTest(); } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_39() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMaxCoolSetpointLimit_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_39, OnFailureCallback_39, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_39(CHIP_ERROR error) + void OnFailureResponse_5(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_39(int16_t maxCoolSetpointLimit) + void OnSuccessResponse_5(int16_t absMaxCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); - VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600)); - VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_40() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int16_t maxCoolSetpointLimitArgument; - maxCoolSetpointLimitArgument = 3200; - - ReturnErrorOnFailure(cluster.WriteAttribute( - maxCoolSetpointLimitArgument, this, OnSuccessCallback_40, OnFailureCallback_40)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_40(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_40() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_41() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutOccupiedCoolingSetpoint_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_41, OnFailureCallback_41, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_41(CHIP_ERROR error) + void OnFailureResponse_6(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_41(int16_t maxCoolSetpointLimit) + void OnSuccessResponse_6(int16_t occupiedCoolingSetpoint) { - VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); - + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); } - CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_42() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_42, OnFailureCallback_42, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_42(CHIP_ERROR error) + void OnFailureResponse_7(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_42(chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) + void OnSuccessResponse_7(int16_t occupiedHeatingSetpoint) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); - + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2600)); NextTest(); } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_43() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_43, OnFailureCallback_43, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_8, OnFailureCallback_8, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_43(CHIP_ERROR error) + void OnFailureResponse_8(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_43(chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) + void OnSuccessResponse_8(int16_t minHeatSetpointLimit) { - VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_44() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = static_cast(4); - - ReturnErrorOnFailure( - cluster.WriteAttribute( - controlSequenceOfOperationArgument, this, OnSuccessCallback_44, OnFailureCallback_44)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_44(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_44() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_45() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_45, OnFailureCallback_45, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_9, OnFailureCallback_9, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_45(CHIP_ERROR error) + void OnFailureResponse_9(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_45(chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) + void OnSuccessResponse_9(int16_t maxHeatSetpointLimit) { - VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); - + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); } - CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_46() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinCoolSetpointLimit_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_46, OnFailureCallback_46, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_46(CHIP_ERROR error) + void OnFailureResponse_10(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_46(uint8_t systemMode) + void OnSuccessResponse_10(int16_t minCoolSetpointLimit) { - VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); - + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); NextTest(); } - CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_47() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMaxCoolSetpointLimit_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_47, OnFailureCallback_47, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_11, OnFailureCallback_11, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_47(CHIP_ERROR error) + void OnFailureResponse_11(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_47(uint8_t systemMode) + void OnSuccessResponse_11(int16_t maxCoolSetpointLimit) { - VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0)); - VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_48() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t systemModeArgument; - systemModeArgument = 1; - - ReturnErrorOnFailure(cluster.WriteAttribute( - systemModeArgument, this, OnSuccessCallback_48, OnFailureCallback_48)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_48(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_48() { NextTest(); } - - CHIP_ERROR TestReadBackMandatoryAttributesFromDutSystemMode_49() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_49, OnFailureCallback_49, true)); + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_12, OnFailureCallback_12, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_49(CHIP_ERROR error) + void OnFailureResponse_12(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_49(uint8_t systemMode) + void OnSuccessResponse_12(chip::app::Clusters::Thermostat::ThermostatControlSequence controlSequenceOfOperation) { - VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); - + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); NextTest(); } - CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_50() + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_50, OnFailureCallback_50, true)); + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_13, OnFailureCallback_13, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_50(CHIP_ERROR error) + void OnFailureResponse_13(CHIP_ERROR error) { chip::app::StatusIB status(error); - (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); + ThrowFailureResponse(); } - void OnSuccessResponse_50(int8_t minSetpointDeadBand) + void OnSuccessResponse_13(uint8_t systemMode) { - VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); - + VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("systemMode", systemMode, 0)); + VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); NextTest(); } - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_51() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_51, OnFailureCallback_51, true)); + this, OnSuccessCallback_14, OnFailureCallback_14, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_51(CHIP_ERROR error) + void OnFailureResponse_14(CHIP_ERROR error) { chip::app::StatusIB status(error); (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_51(int8_t minSetpointDeadBand) + void OnSuccessResponse_14(int8_t minSetpointDeadBand) { VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); VerifyOrReturn(CheckConstraintMinValue("minSetpointDeadBand", minSetpointDeadBand, 0)); @@ -44273,70 +43234,24 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_52() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - int8_t minSetpointDeadBandArgument; - minSetpointDeadBandArgument = 25; - - ReturnErrorOnFailure(cluster.WriteAttribute( - minSetpointDeadBandArgument, this, OnSuccessCallback_52, OnFailureCallback_52)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_52(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_52() { NextTest(); } - - CHIP_ERROR TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_53() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_53, OnFailureCallback_53, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_53(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_53(int8_t minSetpointDeadBand) - { - VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_54() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_54, OnFailureCallback_54, true)); + this, OnSuccessCallback_15, OnFailureCallback_15, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_54(CHIP_ERROR error) + void OnFailureResponse_15(CHIP_ERROR error) { chip::app::StatusIB status(error); (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_54(uint8_t startOfWeek) + void OnSuccessResponse_15(uint8_t startOfWeek) { VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("startOfWeek", startOfWeek, 0)); @@ -44344,61 +43259,7 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_55() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t startOfWeekArgument; - startOfWeekArgument = 0; - - ReturnErrorOnFailure(cluster.WriteAttribute( - startOfWeekArgument, this, OnSuccessCallback_55, OnFailureCallback_55)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_55(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - if (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) - { - NextTest(); - } - else - { - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - } - - void OnSuccessResponse_55() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadBackOptionalAttributesFromDutStartOfWeek_56() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_56, OnFailureCallback_56, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_56(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); - } - - void OnSuccessResponse_56(uint8_t startOfWeek) - { - VerifyOrReturn(CheckValue("startOfWeek", startOfWeek, 0)); - - NextTest(); - } - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_57() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; @@ -44406,106 +43267,44 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_57, OnFailureCallback_57, true)); + this, OnSuccessCallback_16, OnFailureCallback_16, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_57(CHIP_ERROR error) + void OnFailureResponse_16(CHIP_ERROR error) { chip::app::StatusIB status(error); (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_57(uint8_t numberOfWeeklyTransitions) + void OnSuccessResponse_16(uint8_t numberOfWeeklyTransitions) { VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); NextTest(); } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_58() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t numberOfWeeklyTransitionsArgument; - numberOfWeeklyTransitionsArgument = 0; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - numberOfWeeklyTransitionsArgument, this, OnSuccessCallback_58, OnFailureCallback_58)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_58(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - if (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) - { - NextTest(); - } - else - { - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - } - - void OnSuccessResponse_58() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_59() + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_59, OnFailureCallback_59, true)); + this, OnSuccessCallback_17, OnFailureCallback_17, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_59(CHIP_ERROR error) + void OnFailureResponse_17(CHIP_ERROR error) { chip::app::StatusIB status(error); (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } - void OnSuccessResponse_59(uint8_t numberOfDailyTransitions) + void OnSuccessResponse_17(uint8_t numberOfDailyTransitions) { VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); NextTest(); } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_60() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t numberOfDailyTransitionsArgument; - numberOfDailyTransitionsArgument = 0; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - numberOfDailyTransitionsArgument, this, OnSuccessCallback_60, OnFailureCallback_60)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_60(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - if (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) - { - NextTest(); - } - else - { - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - } - - void OnSuccessResponse_60() { ThrowSuccessResponse(); } }; class Test_TC_TSTAT_2_2Suite : public TestCommand @@ -45501,7 +44300,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_1(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_1(int16_t occupiedCoolingSetpoint) @@ -45530,7 +44329,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_2() { NextTest(); } @@ -45549,7 +44348,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_3(int16_t occupiedCoolingSetpoint) @@ -45576,7 +44375,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_4() { NextTest(); } @@ -45598,7 +44397,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_5(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_5() { NextTest(); } @@ -45965,7 +44764,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_21(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_21(int16_t minCoolSetpointLimit) @@ -45994,7 +44793,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_22(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_22() { NextTest(); } @@ -46013,7 +44812,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_23(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_23(int16_t minCoolSetpointLimit) @@ -46040,7 +44839,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_24(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_24() { NextTest(); } @@ -46062,7 +44861,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_25(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_25() { NextTest(); } @@ -46081,7 +44880,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_26(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_26(int16_t maxCoolSetpointLimit) @@ -46110,7 +44909,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_27(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_27() { NextTest(); } @@ -46129,7 +44928,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_28(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_28(int16_t maxCoolSetpointLimit) @@ -46156,7 +44955,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_29(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_29() { NextTest(); } @@ -46178,7 +44977,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_30(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_30() { NextTest(); } @@ -46288,7 +45087,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_35(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_35() { NextTest(); } @@ -46310,7 +45109,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_36(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_36() { NextTest(); } @@ -46332,7 +45131,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_37(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_37() { NextTest(); } @@ -46354,7 +45153,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_38(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_38() { NextTest(); } @@ -46495,7 +45294,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_44(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_44() { NextTest(); } @@ -46517,7 +45316,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_45(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_45() { NextTest(); } @@ -46539,7 +45338,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_46(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_46() { NextTest(); } @@ -46583,7 +45382,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand void OnFailureResponse_48(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + (status.mStatus == chip::Protocols::InteractionModel::Status::UnsupportedAttribute) ? NextTest() : ThrowFailureResponse(); } void OnSuccessResponse_48() { NextTest(); } @@ -46659,13 +45458,16 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_4(); break; } @@ -46683,7 +45485,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -46713,16 +45515,31 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_2(attributeList); + } static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context, + const chip::app::DataModel::DecodableList & acceptedCommandList) { - (static_cast(context))->OnSuccessResponse_3(attributeList); + (static_cast(context))->OnSuccessResponse_3(acceptedCommandList); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, + const chip::app::DataModel::DecodableList & generatedCommandList) + { + (static_cast(context))->OnSuccessResponse_4(generatedCommandList); } // @@ -46759,40 +45576,39 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 2U; - ReturnErrorOnFailure( - cluster - .WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2, true)); return CHIP_NO_ERROR; } void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); + ThrowFailureResponse(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_2(const chip::app::DataModel::DecodableList & attributeList) + { + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3, true)); + ReturnErrorOnFailure(cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo>( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } @@ -46802,9 +45618,33 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & acceptedCommandList) { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo>( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & generatedCommandList) + { + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); } }; @@ -46861,56 +45701,20 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand err = TestReadTheMandatoryAttributeTemperatureDisplayMode_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : write to the mandatory attribute: TemperatureDisplayMode\n"); - err = TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : write to the mandatory attribute: KeypadLockout\n"); - err = TestWriteToTheMandatoryAttributeKeypadLockout_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : write to the mandatory attribute: ScheduleProgrammingVisibility\n"); - err = TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_15(); + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_6(); break; } @@ -46928,7 +45732,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -46968,16 +45772,19 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + static void OnSuccessCallback_3(void * context, uint8_t keypadLockout) + { + (static_cast(context))->OnSuccessResponse_3(keypadLockout); + } static void OnFailureCallback_4(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_4(error); } - static void OnSuccessCallback_4(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_4(void * context, uint8_t keypadLockout) { - (static_cast(context))->OnSuccessResponse_4(temperatureDisplayMode); + (static_cast(context))->OnSuccessResponse_4(keypadLockout); } static void OnFailureCallback_5(void * context, CHIP_ERROR error) @@ -46985,9 +45792,9 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_5(error); } - static void OnSuccessCallback_5(void * context, uint8_t temperatureDisplayMode) + static void OnSuccessCallback_5(void * context, uint8_t scheduleProgrammingVisibility) { - (static_cast(context))->OnSuccessResponse_5(temperatureDisplayMode); + (static_cast(context))->OnSuccessResponse_5(scheduleProgrammingVisibility); } static void OnFailureCallback_6(void * context, CHIP_ERROR error) @@ -46995,93 +45802,9 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand (static_cast(context))->OnFailureResponse_6(error); } - static void OnSuccessCallback_6(void * context, uint8_t keypadLockout) - { - (static_cast(context))->OnSuccessResponse_6(keypadLockout); - } - - static void OnFailureCallback_7(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_7(error); - } - - static void OnSuccessCallback_7(void * context, uint8_t keypadLockout) - { - (static_cast(context))->OnSuccessResponse_7(keypadLockout); - } - - static void OnFailureCallback_8(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_8(error); - } - - static void OnSuccessCallback_8(void * context) { (static_cast(context))->OnSuccessResponse_8(); } - - static void OnFailureCallback_9(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_9(error); - } - - static void OnSuccessCallback_9(void * context, uint8_t keypadLockout) - { - (static_cast(context))->OnSuccessResponse_9(keypadLockout); - } - - static void OnFailureCallback_10(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_10(error); - } - - static void OnSuccessCallback_10(void * context, uint8_t keypadLockout) - { - (static_cast(context))->OnSuccessResponse_10(keypadLockout); - } - - static void OnFailureCallback_11(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_11(error); - } - - static void OnSuccessCallback_11(void * context, uint8_t scheduleProgrammingVisibility) - { - (static_cast(context))->OnSuccessResponse_11(scheduleProgrammingVisibility); - } - - static void OnFailureCallback_12(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_12(error); - } - - static void OnSuccessCallback_12(void * context, uint8_t scheduleProgrammingVisibility) - { - (static_cast(context))->OnSuccessResponse_12(scheduleProgrammingVisibility); - } - - static void OnFailureCallback_13(void * context, CHIP_ERROR error) + static void OnSuccessCallback_6(void * context, uint8_t scheduleProgrammingVisibility) { - (static_cast(context))->OnFailureResponse_13(error); - } - - static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } - - static void OnFailureCallback_14(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_14(error); - } - - static void OnSuccessCallback_14(void * context, uint8_t scheduleProgrammingVisibility) - { - (static_cast(context))->OnSuccessResponse_14(scheduleProgrammingVisibility); - } - - static void OnFailureCallback_15(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_15(error); - } - - static void OnSuccessCallback_15(void * context, uint8_t scheduleProgrammingVisibility) - { - (static_cast(context))->OnSuccessResponse_15(scheduleProgrammingVisibility); + (static_cast(context))->OnSuccessResponse_6(scheduleProgrammingVisibility); } // @@ -47142,157 +45865,12 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand void OnSuccessResponse_2(uint8_t temperatureDisplayMode) { VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", temperatureDisplayMode, 0)); + VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", temperatureDisplayMode, 1)); NextTest(); } - CHIP_ERROR TestWriteToTheMandatoryAttributeTemperatureDisplayMode_3() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t temperatureDisplayModeArgument; - temperatureDisplayModeArgument = 0; - - ReturnErrorOnFailure( - cluster.WriteAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( - temperatureDisplayModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_3() { NextTest(); } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( - this, OnSuccessCallback_4, OnFailureCallback_4, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_4(uint8_t temperatureDisplayMode) - { - VerifyOrReturn(CheckValue("temperatureDisplayMode", temperatureDisplayMode, 0)); - - NextTest(); - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_5() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( - this, OnSuccessCallback_5, OnFailureCallback_5, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_5(uint8_t temperatureDisplayMode) - { - VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); - NextTest(); - } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_6() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_6, OnFailureCallback_6, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_6(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_6(uint8_t keypadLockout) - { - VerifyOrReturn(CheckValue("keypadLockout", keypadLockout, 0)); - - NextTest(); - } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_7() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_7, OnFailureCallback_7, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_7(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_7(uint8_t keypadLockout) - { - VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); - NextTest(); - } - - CHIP_ERROR TestWriteToTheMandatoryAttributeKeypadLockout_8() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t keypadLockoutArgument; - keypadLockoutArgument = 0; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - keypadLockoutArgument, this, OnSuccessCallback_8, OnFailureCallback_8)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_8(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_8() { NextTest(); } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_9() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47300,24 +45878,24 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_9, OnFailureCallback_9, true)); + this, OnSuccessCallback_3, OnFailureCallback_3, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_9(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_9(uint8_t keypadLockout) + void OnSuccessResponse_3(uint8_t keypadLockout) { VerifyOrReturn(CheckValue("keypadLockout", keypadLockout, 0)); NextTest(); } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_10() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47325,98 +45903,25 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10, true)); + this, OnSuccessCallback_4, OnFailureCallback_4, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(CHIP_ERROR error) + void OnFailureResponse_4(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_10(uint8_t keypadLockout) + void OnSuccessResponse_4(uint8_t keypadLockout) { VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("keypadLockout", keypadLockout, 0)); + VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", keypadLockout, 5)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_11() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - this, OnSuccessCallback_11, OnFailureCallback_11, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_11(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_11(uint8_t scheduleProgrammingVisibility) - { - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 0)); - - NextTest(); - } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_12() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - this, OnSuccessCallback_12, OnFailureCallback_12, true)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_12(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_12(uint8_t scheduleProgrammingVisibility) - { - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); - NextTest(); - } - - CHIP_ERROR TestWriteToTheMandatoryAttributeScheduleProgrammingVisibility_13() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint8_t scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = 0; - - ReturnErrorOnFailure( - cluster.WriteAttribute< - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_13(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_13() { NextTest(); } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_14() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47425,24 +45930,24 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute< chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - this, OnSuccessCallback_14, OnFailureCallback_14, true)); + this, OnSuccessCallback_5, OnFailureCallback_5, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_14(CHIP_ERROR error) + void OnFailureResponse_5(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_14(uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_5(uint8_t scheduleProgrammingVisibility) { VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 0)); NextTest(); } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_15() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47451,19 +45956,21 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute< chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - this, OnSuccessCallback_15, OnFailureCallback_15, true)); + this, OnSuccessCallback_6, OnFailureCallback_6, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(CHIP_ERROR error) + void OnFailureResponse_6(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_15(uint8_t scheduleProgrammingVisibility) + void OnSuccessResponse_6(uint8_t scheduleProgrammingVisibility) { VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 0)); + VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", scheduleProgrammingVisibility, 1)); NextTest(); } }; @@ -47530,78 +46037,108 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) + ChipLogProgress(chipTool, + " ***** Test Step 3 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3(); + err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4(); + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5(); + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6(); + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7(); + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8(); + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_8(); break; case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) + { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_10(); + break; + case 11: ChipLogProgress(chipTool, - " ***** Test Step 9 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); + " ***** Test Step 11 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9(); + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_11(); break; - case 10: + case 12: ChipLogProgress(chipTool, - " ***** Test Step 10 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + " ***** Test Step 12 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) + { + NextTest(); + return; + } + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_12(); + break; + case 13: + ChipLogProgress( + chipTool, + " ***** Test Step 13 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10(); + err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_13(); break; } @@ -47619,7 +46156,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -47704,6 +46241,27 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand static void OnSuccessCallback_10(void * context) { (static_cast(context))->OnSuccessResponse_10(); } + static void OnFailureCallback_11(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_11(error); + } + + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + + static void OnFailureCallback_12(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_12(error); + } + + static void OnSuccessCallback_12(void * context) { (static_cast(context))->OnSuccessResponse_12(); } + + static void OnFailureCallback_13(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_13(error); + } + + static void OnSuccessCallback_13(void * context) { (static_cast(context))->OnSuccessResponse_13(); } + // // Tests methods // @@ -47762,37 +46320,39 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_2() { NextTest(); } - CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_3() + CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t keypadLockoutArgument; - keypadLockoutArgument = 0; + uint8_t temperatureDisplayModeArgument; + temperatureDisplayModeArgument = 2; ReturnErrorOnFailure( - cluster.WriteAttribute( - keypadLockoutArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo>( + temperatureDisplayModeArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); - ThrowFailureResponse(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); } - void OnSuccessResponse_3() { NextTest(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_4() + CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 1; + keypadLockoutArgument = 0; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -47808,14 +46368,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_4() { NextTest(); } - CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_5() + CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 2; + keypadLockoutArgument = 1; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -47831,14 +46391,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_5() { NextTest(); } - CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_6() + CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 3; + keypadLockoutArgument = 2; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -47854,14 +46414,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_6() { NextTest(); } - CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_7() + CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 4; + keypadLockoutArgument = 3; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -47877,14 +46437,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_7() { NextTest(); } - CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_8() + CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint8_t keypadLockoutArgument; - keypadLockoutArgument = 5; + keypadLockoutArgument = 4; ReturnErrorOnFailure( cluster.WriteAttribute( @@ -47900,7 +46460,54 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_9() + CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_9() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t keypadLockoutArgument; + keypadLockoutArgument = 5; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_9(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_9() { NextTest(); } + + CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_10() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t keypadLockoutArgument; + keypadLockoutArgument = 6; + + ReturnErrorOnFailure( + cluster.WriteAttribute( + keypadLockoutArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_10(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_10() { ThrowSuccessResponse(); } + + CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47912,19 +46519,19 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ReturnErrorOnFailure( cluster.WriteAttribute< chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } - void OnFailureResponse_9(CHIP_ERROR error) + void OnFailureResponse_11(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_9() { NextTest(); } + void OnSuccessResponse_11() { NextTest(); } - CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_10() + CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; @@ -47936,17 +46543,42 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ReturnErrorOnFailure( cluster.WriteAttribute< chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( - scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_10, OnFailureCallback_10)); + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_12, OnFailureCallback_12)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(CHIP_ERROR error) + void OnFailureResponse_12(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_10() { NextTest(); } + void OnSuccessResponse_12() { NextTest(); } + + CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_13() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::ThermostatUserInterfaceConfigurationClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint8_t scheduleProgrammingVisibilityArgument; + scheduleProgrammingVisibilityArgument = 2; + + ReturnErrorOnFailure( + cluster.WriteAttribute< + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo>( + scheduleProgrammingVisibilityArgument, this, OnSuccessCallback_13, OnFailureCallback_13)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_13(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + } + + void OnSuccessResponse_13() { ThrowSuccessResponse(); } }; class Test_TC_DIAG_TH_NW_1_1Suite : public TestCommand @@ -52122,6 +50754,22 @@ class Test_TC_WIFIDIAG_1_1Suite : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 1 : Reads NetworkInterface structure attribute from DUT\n"); err = TestReadsNetworkInterfaceStructureAttributeFromDut_1(); break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads SecurityType attribute constraints\n"); + err = TestReadsSecurityTypeAttributeConstraints_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads WiFiVersion attribute constraints\n"); + err = TestReadsWiFiVersionAttributeConstraints_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads ChannelNumber attribute constraints\n"); + err = TestReadsChannelNumberAttributeConstraints_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads RSSI attribute constraints\n"); + err = TestReadsRssiAttributeConstraints_5(); + break; } if (CHIP_NO_ERROR != err) @@ -52138,7 +50786,7 @@ class Test_TC_WIFIDIAG_1_1Suite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -52166,6 +50814,50 @@ class Test_TC_WIFIDIAG_1_1Suite : public TestCommand (static_cast(context))->OnSuccessResponse_1(networkInterfaces); } + static void OnFailureCallback_2(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_2(error); + } + + static void OnSuccessCallback_2( + void * context, + const chip::app::DataModel::Nullable & securityType) + { + (static_cast(context))->OnSuccessResponse_2(securityType); + } + + static void OnFailureCallback_3(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_3(error); + } + + static void OnSuccessCallback_3( + void * context, + const chip::app::DataModel::Nullable & wiFiVersion) + { + (static_cast(context))->OnSuccessResponse_3(wiFiVersion); + } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, const chip::app::DataModel::Nullable & channelNumber) + { + (static_cast(context))->OnSuccessResponse_4(channelNumber); + } + + static void OnFailureCallback_5(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_5(error); + } + + static void OnSuccessCallback_5(void * context, const chip::app::DataModel::Nullable & rssi) + { + (static_cast(context))->OnSuccessResponse_5(rssi); + } + // // Tests methods // @@ -52201,6 +50893,103 @@ class Test_TC_WIFIDIAG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); NextTest(); } + + CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_2( + const chip::app::DataModel::Nullable & securityType) + { + VerifyOrReturn(CheckConstraintType("securityType", "", "enum")); + NextTest(); + } + + CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_3( + const chip::app::DataModel::Nullable & wiFiVersion) + { + VerifyOrReturn(CheckConstraintType("wiFiVersion", "", "enum")); + NextTest(); + } + + CHIP_ERROR TestReadsChannelNumberAttributeConstraints_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(const chip::app::DataModel::Nullable & channelNumber) + { + VerifyOrReturn(CheckConstraintType("channelNumber", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestReadsRssiAttributeConstraints_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_5(const chip::app::DataModel::Nullable & rssi) + { + VerifyOrReturn(CheckConstraintType("rssi", "", "int8")); + VerifyOrReturn(CheckConstraintMinValue("rssi", rssi, -120)); + VerifyOrReturn(CheckConstraintMaxValue("rssi", rssi, 0)); + NextTest(); + } }; class Test_TC_WIFIDIAG_3_1Suite : public TestCommand