From 1c43420d052d46329bb6dbfb25bc869027720479 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Thu, 23 Jun 2022 04:19:02 +0530 Subject: [PATCH] Modified tests June 17 (#19704) * Modified tests TC-BOOl-1.1 TC-CC-1.1 TC-FLW-1.1 TC-I-1.1 TC-ILL-1.1 TC-ILL-2.1 TC-LVL-1.1 to TC-LVL-6.1 TC-MC-1.* TC-MOD-1.1 TC-OCC-1.1 TC-OCC-2.1 TC-OO-1.1 TC-OO-2.4 TC-PCC-1.1 TC-PRS-1.1 TC-PS-1.1 TC-RH-2.1 TC-TSUIC-1.1 TC-ULABEL-1.1 TC-WNCV-1.1 TC-WNCV-2.1 TC-WNCV-4.3 * Added auto genearted files * Added PICS values * Modified MC-1.4 test * Auto generated files --- src/app/tests/suites/certification/PICS.yaml | 219 + .../certification/Test_TC_BOOL_1_1.yaml | 37 +- .../suites/certification/Test_TC_CC_1_1.yaml | 78 +- .../suites/certification/Test_TC_FLW_1_1.yaml | 40 +- .../suites/certification/Test_TC_ILL_1_1.yaml | 37 +- .../suites/certification/Test_TC_ILL_2_1.yaml | 21 +- .../suites/certification/Test_TC_I_1_1.yaml | 25 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 44 +- .../suites/certification/Test_TC_LVL_2_1.yaml | 3 + .../suites/certification/Test_TC_LVL_3_1.yaml | 61 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 50 +- .../suites/certification/Test_TC_LVL_5_1.yaml | 59 +- .../suites/certification/Test_TC_LVL_6_1.yaml | 89 +- .../suites/certification/Test_TC_MC_1_1.yaml | 34 +- .../suites/certification/Test_TC_MC_1_10.yaml | 45 +- .../suites/certification/Test_TC_MC_1_11.yaml | 44 +- .../suites/certification/Test_TC_MC_1_12.yaml | 36 +- .../suites/certification/Test_TC_MC_1_2.yaml | 37 +- .../suites/certification/Test_TC_MC_1_3.yaml | 47 +- .../suites/certification/Test_TC_MC_1_4.yaml | 50 +- .../suites/certification/Test_TC_MC_1_5.yaml | 40 +- .../suites/certification/Test_TC_MC_1_6.yaml | 57 +- .../suites/certification/Test_TC_MC_1_7.yaml | 47 +- .../suites/certification/Test_TC_MC_1_8.yaml | 5 - .../suites/certification/Test_TC_MC_1_9.yaml | 45 +- .../suites/certification/Test_TC_MC_3_4.yaml | 110 - .../suites/certification/Test_TC_MOD_1_1.yaml | 4 +- .../suites/certification/Test_TC_OCC_1_1.yaml | 42 +- .../suites/certification/Test_TC_OCC_2_1.yaml | 275 +- .../suites/certification/Test_TC_OO_1_1.yaml | 22 +- .../suites/certification/Test_TC_OO_2_4.yaml | 36 +- .../suites/certification/Test_TC_PCC_1_1.yaml | 28 +- .../suites/certification/Test_TC_PRS_1_1.yaml | 96 +- .../suites/certification/Test_TC_PS_1_1.yaml | 47 +- .../suites/certification/Test_TC_RH_2_1.yaml | 2 - .../certification/Test_TC_TSUIC_1_1.yaml | 4 +- .../certification/Test_TC_TSUIC_2_2.yaml | 91 + .../certification/Test_TC_ULABEL_1_1.yaml | 80 +- .../certification/Test_TC_WNCV_1_1.yaml | 4 +- .../certification/Test_TC_WNCV_2_1.yaml | 18 - .../certification/Test_TC_WNCV_4_3.yaml | 5 +- .../tests/suites/certification/ci-pics-values | 51 + src/app/tests/suites/tests.js | 1 - .../chip-tool/zap-generated/test/Commands.h | 4131 +++----- .../zap-generated/test/Commands.h | 9314 ++++++++--------- 45 files changed, 6805 insertions(+), 8806 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_4.yaml diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 3d45acdec89453..ab15d05a79c9e3 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -622,3 +622,222 @@ PICS: "Can the MeasuredValue attribute changed by physical control at the device?" id: MANUAL_FLOW_CHANGE + + #Media clusters + - label: + "Does the DUT support the Keypad Input server cluster Navigation Keys?" + id: MC_KEYPADINPUT.S.NV + + - label: + "Does the DUT support the Keypad Input server cluster Location Keys?" + id: MC_KEYPADINPUT.S.LK + + - label: "Does the DUT support the Keypad Input server cluster Number Keys?" + id: MC_KEYPADINPUT.S.NK + + - label: + "Does the DUT support the Application Launcher server cluster + Application Platform feature?" + id: MC_APPLAUNCHER.S.AP + + - label: + "Does the DUT support the Application Launcher server cluster + CatalogList attribute?" + id: MC_APPLAUNCHER.S.A0000 + + - label: + "Does the DUT support the Application Launcher server cluster + CurrentApp attribute?" + id: MC_APPLAUNCHER.S.A0001 + + - label: + "Does the DUT support the Media Input server cluster InputList + attribute?" + id: MC_MEDIAINPUT.S.A0000 + + - label: + "Does the DUT support the Media Input server cluster CurrentInput + attribute?" + id: MC_MEDIAINPUT.S.A0001 + + - label: + "Does the DUT support the Media Input server cluster Name Updates + feature?" + id: MC_MEDIAINPUT.S.NU + + - label: + "Does the DUT support the Channel server cluster Channel List feature?" + id: MC_CHANNEL.S.CL + + - label: + "Does the DUT support the Channel server cluster Lineup Info feature?" + id: MC_CHANNEL.S.LI + + - label: + "Does the DUT support the Channel server cluster ChannelList + attribute?" + id: MC_CHANNEL.S.A0000 + + - label: "Does the DUT support the Channel server cluster Lineup attribute?" + id: MC_CHANNEL.S.A0001 + + - label: + "Does the DUT support the Channel server cluster CurrentChannel + attribute?" + id: MC_CHANNEL.S.A0002 + + - label: + "Does the DUT support the Channel server cluster ChangeChannel + command?" + id: MC_CHANNEL.S.C0000 + + - label: + "Does the DUT support the Channel server cluster ChangeChannelByNumber + command?" + id: MC_CHANNEL.S.C0002 + + - label: + "Does the DUT support the Channel server cluster SkipChannel command?" + id: MC_CHANNEL.S.C0003 + + - label: + "Does the DUT support the Media Playback server cluster Advanced Seek + feature?" + id: MC_MEDIAPLAYBACK.S.AS + + - label: + "Does the DUT support the Media Playback server cluster Variable Speed + feature?" + id: MC_MEDIAPLAYBACK.S.VS + + - label: + "Does the DUT the Audio Output server cluster Name Updates feature?" + id: NAMEUPDATES + + - label: + "Does the DUT support the Target Navigator server cluster + CurrentTarget attribute?" + id: MC_TGTNAV.S.A0001 + + - label: + "Does the DUT support the Application Basic server cluster VendorName + attribute?" + id: MC_APBSC.S.A0000 + + - label: + "Does the DUT support the Application Basic server cluster VendorID + attribute?" + id: MC_APBSC.S.A0001 + + - label: + "Does the DUT support the Application Basic server cluster ProductID + attribute?" + id: MC_APBSC.S.A0003 + + - label: + "Does the DUT support the Content Launcher server cluster Content + Search feature?" + id: MC_CONTENTLAUNCHER.S.CS + + - label: + "Does the DUT support the Content Launcher server cluster Content + Search feature?" + id: MC_CONTENTLAUNCHER.S.UP + + - label: + "Does the DUT support the Content Launcher server cluster AcceptHeader + attribute?" + id: MC_CONTENTLAUNCHER.S.A0000 + + - label: + "Does the DUT support the Content Launcher server cluster + SupportedStreamingProtocols attribute?" + id: MC_CONTENTLAUNCHER.S.A0001 + + - label: "Does the device implement the Tolerance attribute?" + id: PRS.S.A0003 + + - label: "Does the device implement the Occupancy attribute?" + id: OCC.S.A0000 + + - label: "Does the device implement the OccupancySensorType attribute?" + id: OCC.S.A0001 + + - label: + "Does the device implement the OccupancySensorTypeBitmap attribute?" + id: OCC.S.A0002 + + - label: + "Does the device implement the PIROccupiedToUnoccupiedDelay attribute?" + id: OCC.S.A0010 + + - label: + "Does the device implement the PIRUnoccupiedToOccupiedDelay attribute?" + id: OCC.S.A0011 + + - label: + "Does the device implement the PIRUnoccupiedToOccupiedThreshold + attribute?" + id: OCC.S.A0012 + + - label: + "Does the device implement the UltrasonicOccupiedToUnoccupiedDelay + attribute?" + id: OCC.S.A0020 + + - label: + "Does the device implement the UltrasonicUnoccupiedToOccupiedDelay + attribute?" + id: OCC.S.A0021 + + - label: + "Does the device implement the UltrasonicUnoccupiedToOccupiedThreshold + attribute?" + id: OCC.S.A0022 + + - label: + "Does the device implement the + PhysicalContactOccupiedToUnoccupiedDelay attribute?" + id: OCC.S.A0030 + + - label: + "Does the device implement the + PhysicalContactUnoccupiedToOccupiedDelay attribute?" + id: OCC.S.A0031 + + - label: + "Does the device implement the + PhysicalContactUnoccupiedToOccupiedThreshold attribute?" + id: OCC.S.A0032 + + - label: "Does the device implement the Tolerance attribute?" + id: FLW.S.A0003 + + - label: "Does the DUT(server) support the Hue/Saturation feature?" + id: CC.S.F00 + + - label: "Does the DUT(server) support the Enhanced Hue feature?" + id: CC.S.F01 + + - label: "Does the DUT(server) support the Color Loop feature?" + id: CC.S.F02 + + - label: "Does the DUT(server) support the Color XY feature?" + id: CC.S.F03 + + - label: "Does the DUT(server) support the Color Temperature feature?" + id: CC.S.F04 + + - label: "Does the device support extended range and resolution?" + id: PRS.S.F00 + + - label: + "Does the DUT(server) support the Frequency attributes and behavior + feature?" + id: LVL.S.F02 + + - label: "Does the DUT(server) support the MaxLevel attribute?" + id: LVL.S.A0003 + + - label: "Does the DUT(server) support the MinLevel attribute?" + id: LVL.S.A0002 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 809d2724379b9f..f6629faaaef1f1 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 @@ -33,13 +33,16 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints : ClusterRevision" + - label: "Read the global attribute constraints : FeatureMap" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 0 constraints: - type: uint16 + type: map32 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -49,22 +52,6 @@ tests: constraints: type: list - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -81,18 +68,18 @@ tests: constraints: type: list - #issue #17483 + #issue #15011 - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates FeatureMap attribute has the value 0" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool booleanstate read feature-map 1 1(Not implemented in SDK) + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Please enter '0' for success" + value: "Please enter 'y' for success" - name: "expectedValue" - value: 0 + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 90985a2acaffce..070bc7e42b4d90 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -33,53 +33,50 @@ tests: attribute: "ClusterRevision" response: value: 5 - - - 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: 5 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" + - label: "Read the global attribute constraints : FeatureMap" + PICS: + PICS_SKIP_SAMPLE_APP && (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03) command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: - value: 5 + value: 1 + constraints: + type: map32 - label: "Read the global attribute: AttributeList" + PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: + value: + [ + 0, + 1, + 3, + 4, + 7, + 8, + 15, + 16384, + 16385, + 16386, + 16394, + 16395, + 16396, + 16397, + 16400, + 65528, + 65529, + 65531, + 65532, + 65533, + ] constraints: type: list - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -91,21 +88,22 @@ tests: command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [] constraints: type: list - #issue #17483 + #issue #15011 - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates FeatureMap attribute has the value 0" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - Not implemented in SDK + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Please enter '0' for success" + value: "Please enter 'y' for success" - name: "expectedValue" - value: 0 + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 05a08cfac4ed81..bbd301d5db68c8 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -28,7 +28,7 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: @@ -36,29 +36,23 @@ tests: constraints: type: uint16 + - label: "Read the global attribute constraints : FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 + - label: "Read the global attribute: AttributeList" + PICS: FLW.S.A0003 command: "readAttribute" attribute: "AttributeList" response: + value: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] constraints: type: list - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -75,18 +69,18 @@ tests: constraints: type: list - #issue #17483 + #issue #15011 - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates FeatureMap attribute has the value 0" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - Not implemented in SDK + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Please enter '0' for success" + value: "Please enter 'y' for success" - name: "expectedValue" - value: 0 + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 285526dce31bda..fe1eb639c95bba 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 @@ -33,13 +33,16 @@ tests: attribute: "ClusterRevision" response: value: 3 + constraints: + type: uint16 - - label: "Read the global attribute constraints : ClusterRevision" + - label: "Read the global attribute constraints : FeatureMap" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 0 constraints: - type: uint16 + type: map32 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -49,22 +52,6 @@ tests: constraints: type: list - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -81,18 +68,18 @@ tests: constraints: type: list - #issue #17483 + #issue #15011 - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates FeatureMap attribute has the value 0" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - Not implemented in SDK + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Please enter '0' for success" + value: "Please enter 'y' for success" - name: "expectedValue" - value: 0 + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml index 81f80d6ee85cbc..437aa2092b8c6e 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_1.yaml @@ -28,6 +28,16 @@ tests: - name: "nodeId" value: nodeId + - label: "TH reads MeasuredValue attribute from DUT" + PICS: PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + type: uint16 + minValue: 1 + maxValue: 65534 + - label: "TH reads MinMeasuredValue attribute from DUT" command: "readAttribute" attribute: "MinMeasuredValue" @@ -46,15 +56,6 @@ tests: minValue: 2 maxValue: 65534 - - label: "TH reads MeasuredValue attribute from DUT" - command: "readAttribute" - attribute: "MeasuredValue" - response: - constraints: - type: uint16 - minValue: 0 - maxValue: 65534 - - label: "TH reads Tolerance attribute from DUT" command: "readAttribute" attribute: "Tolerance" @@ -70,3 +71,5 @@ tests: response: constraints: type: enum8 + minValue: 0 + maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml index dfe9367b901a9e..717969e0c0823c 100644 --- a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml @@ -33,13 +33,16 @@ tests: attribute: "ClusterRevision" response: value: 4 + constraints: + type: uint16 - - label: "Read the global attribute constraints : ClusterRevision" + - label: "TH reads the FeatureMap attribute from the DUT" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 0 constraints: - type: uint16 + type: map32 - label: "Read the global attribute: AttributeList" command: "readAttribute" @@ -80,19 +83,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - - #issue #17483 - - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates FeatureMap attribute has the value 0" - verification: | - Not implemented in SDK - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter '0' for success" - - name: "expectedValue" - value: 0 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 3d0fba4fa0fa2b..8d02a0b5eb6978 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 @@ -28,25 +28,45 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: value: 5 + constraints: + type: uint16 - - label: "Read the global attribute constraints : ClusterRevision" + - label: "Read the global attribute: FeatureMap" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 3 constraints: - type: uint16 + type: map32 - label: "Read the global attribute: AttributeList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16384] + value: [0, 15, 17] + constraints: + type: list + + - label: "Read the global attribute: AcceptedCommandList" + PICS: LVL.S.F02 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [0, 1, 2, 3, 4, 5, 6, 7] + constraints: + type: list + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] constraints: type: list @@ -65,17 +85,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - - - label: "Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [0, 1, 2, 3, 4, 5, 6, 7] - constraints: - type: list - - - label: "read the optional global attribute: FeatureMap" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 3 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index c48f553ea60789..d5dc4a108fd67d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -55,6 +55,7 @@ tests: attribute: "current level" response: value: 254 + saveAs: CurrentLevelValue constraints: type: uint8 @@ -83,6 +84,8 @@ tests: response: constraints: type: uint8 + minValue: 1 + maxValue: 254 - label: "Reads the CurrentFrequency attribute" command: "readAttribute" 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 0416617a970345..d95705a471575d 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 @@ -28,13 +28,6 @@ tests: - name: "nodeId" value: nodeId - - label: "reads CurrentLevel attribute from DUT" - command: "readAttribute" - attribute: "current level" - response: - constraints: - type: uint8 - - label: "Reads the MinLevel attribute" command: "readAttribute" attribute: "min level" @@ -56,7 +49,7 @@ tests: - name: "level" value: 64 - name: "transitionTime" - value: 65535 + value: 0 - name: "optionMask" value: 1 - name: "optionOverride" @@ -70,7 +63,7 @@ tests: - name: "ms" value: 100 - - label: "reads CurrentLevel attribute from DUT" + - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: @@ -83,27 +76,27 @@ tests: - name: "level" value: 100 - name: "transitionTime" - value: 100 + value: 0 - name: "optionMask" value: 1 - name: "optionOverride" value: 1 - - label: "Wait 11000 second" + - label: "Wait 100 second" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 11000 + value: 100 - - label: "reads CurrentLevel attribute from DUT" + - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: value: 100 - - label: "reads On Off Transition Time attribute from DUT" + - label: "Reads On Off Transition Time attribute from DUT" command: "readAttribute" attribute: "On Off Transition Time" response: @@ -117,7 +110,41 @@ tests: - name: "level" value: 128 - name: "transitionTime" - value: 65535 + value: 100 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait10000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 11000 + + - label: "Reads CurrentLevel attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + value: 128 + + - label: "Reads the OnOffTransitionTime attribute from the DUT" + command: "readAttribute" + attribute: "on off transition time" + response: + constraints: + type: uint16 + + - label: "sends a Move to level command" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 64 + - name: "transitionTime" + value: 0 - name: "optionMask" value: 1 - name: "optionOverride" @@ -131,11 +158,11 @@ tests: - name: "ms" value: 1000 - - label: "reads CurrentLevel attribute from DUT" + - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 128 + value: 64 - 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 6a3abbc3e0962d..d9e96394fe0b50 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,6 +28,27 @@ tests: - name: "nodeId" value: nodeId + - label: "Reads Minlevel attribute from DUT" + command: "readAttribute" + attribute: "min level" + response: + saveAs: MinlevelValue + constraints: + type: uint8 + + - label: "sends a Move to level command" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 1 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + - label: "reads max level attribute from DUT" command: "readAttribute" attribute: "max level" @@ -60,30 +81,23 @@ tests: per second or as close as possible to this rate and completes moving to its maximum level" - - label: "Wait 3000ms" + - label: "Wait 9000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 3000 + value: 9000 - - label: "reads CurrentLevel attribute from DUT" + - label: "Reads CurrentLevel attribute from DUT" + PICS: LVL.S.A0003 command: "readAttribute" attribute: "current level" response: value: MaxlevelValue - - label: "reads min level attribute from DUT" - command: "readAttribute" - attribute: "min level" - response: - saveAs: MinlevelValue - constraints: - type: uint8 - - - label: "sends a Move down command" - command: "Move" + - label: "sends a MoveWithOnOff command" + command: "MoveWithOnOff" arguments: values: - name: "moveMode" @@ -116,10 +130,11 @@ tests: # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" + PICS: LVL.S.A0002 command: "readAttribute" attribute: "current level" response: - value: 1 + value: MinlevelValue constraints: minValue: 0 maxValue: 1 @@ -153,13 +168,6 @@ tests: - name: "ms" value: 100 - - label: "reads CurrentLevel attribute from DUT" - command: "readAttribute" - attribute: "current level" - response: - constraints: - notValue: 255 - - label: "user prompt message" cluster: "LogCommands" command: "UserPrompt" 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 4fd1359b7d0719..6d19877d9e3ccd 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 @@ -28,32 +28,26 @@ tests: - name: "nodeId" value: nodeId - - label: "Sending on command" - cluster: "On/Off" - command: "on" + - label: "Reads Minlevel attribute from DUT" + command: "readAttribute" + attribute: "min level" + response: + saveAs: MinlevelValue + constraints: + type: uint8 - - label: "Precondition: DUT level is set to its lowest point" - command: "Step" + - label: "Sends MoveToLevelWithOnOff command to DUT" + command: "MoveToLevelWithOnOff" arguments: values: - - name: "stepMode" + - name: "level" value: 1 - - name: "stepSize" - value: 100 - name: "transitionTime" - value: 20 - - name: "optionMask" value: 0 + - name: "optionMask" + value: 1 - name: "optionOverride" - value: 0 - - - label: "Wait 3000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 3000 + value: 1 - label: "Reads current level attribute from DUT" command: "readAttribute" @@ -72,29 +66,30 @@ tests: - name: "stepSize" value: 64 - name: "transitionTime" - value: 2 + value: 20 - name: "optionMask" - value: 0 + value: 1 - name: "optionOverride" - value: 0 + value: 1 - - label: "Wait 5000ms" + - label: "Wait 4000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5000 + value: 4000 - label: "Reads current level attribute from DUT" command: "readAttribute" attribute: "current level" response: + value: 65 constraints: - notValue: CurrentlevelValue + type: uint8 - - label: "Sends a Step down command" - command: "Step" + - label: "Sends a StepWithOnOff command" + command: "StepWithOnOff" arguments: values: - name: "stepMode" @@ -102,11 +97,11 @@ tests: - name: "stepSize" value: 64 - name: "transitionTime" - value: 2 + value: 20 - name: "optionMask" - value: 0 + value: 1 - name: "optionOverride" - value: 0 + value: 1 - label: "Wait 4000ms" cluster: "DelayCommands" @@ -142,7 +137,3 @@ tests: values: - name: "ms" value: 100 - - - label: "Sending off command" - cluster: "On/Off" - command: "off" 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 f0c31c8184c2af..47820d47c17a6c 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 @@ -28,16 +28,20 @@ tests: - name: "nodeId" value: nodeId - - label: "Sending on command" - cluster: "On/Off" - command: "on" + - label: "Reads Minlevel attribute from DUT" + command: "readAttribute" + attribute: "min level" + response: + saveAs: MinlevelValue + constraints: + type: uint8 - - label: "Precondition: set DUT to lowest point" - command: "MoveToLevel" + - label: "Sends MoveToLevelWithOnOff command to DUT" + command: "MoveToLevelWithOnOff" arguments: values: - name: "level" - value: 0 + value: 1 - name: "transitionTime" value: 0 - name: "optionMask" @@ -45,23 +49,62 @@ tests: - name: "optionOverride" value: 1 - - label: "Wait 100ms" + - label: "Reads CurrentLevel attribute from DUT" + command: "readAttribute" + attribute: "current level" + response: + saveAs: CurrentLevelValue + constraints: + minValue: 0 + maxValue: 1 + + - label: "Sends a move up command to DUT" + command: "Move" + arguments: + values: + - name: "moveMode" + value: 0 + - name: "rate" + value: 5 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 5000 + + - label: "Sends stop command to DUT" + command: "Stop" + arguments: + values: + - name: "optionMask" + value: 0 + - name: "optionOverride" + value: 0 + + - label: "user prompt message" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Physically verify that the device has stopped + transitioning." - # For lighting Device type current level minimal value is 1 - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - saveAs: CurrentLevelValue + value: 25 constraints: - minValue: 0 - maxValue: 1 + notValue: CurrentLevelValue - label: "Sends a move up command to DUT" command: "Move" @@ -70,19 +113,19 @@ tests: - name: "moveMode" value: 0 - name: "rate" - value: 1 + value: 5 - name: "optionMask" value: 1 - name: "optionOverride" value: 1 - - label: "Wait 2000ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 2000 + value: 5000 - label: "Sends stop command to DUT" command: "Stop" @@ -93,10 +136,22 @@ tests: - name: "optionOverride" value: 0 + - label: "user prompt message" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Physically verify that the device has stopped + transitioning." + - label: "Reads CurrentLevel attribute from DUT" + PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "current level" response: + value: 50 constraints: notValue: CurrentLevelValue @@ -120,7 +175,3 @@ tests: values: - name: "ms" value: 100 - - - label: "Sending off command" - cluster: "On/Off" - command: "off" diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml index 291f7b32f949ee..1c4f740e144c59 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml @@ -28,7 +28,7 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: @@ -36,6 +36,14 @@ tests: constraints: type: uint16 + - label: "Read the optional global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 + - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -44,21 +52,6 @@ tests: constraints: type: list - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -75,13 +68,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response indicates either value 0 or throws a general error if the - attribute is not supported" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool lowpower read feature-map 1 1 - [1645780669.465220][5069:5074] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml index b8ce0bded39b5c..10e05d09ebf345 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_10.yaml @@ -19,7 +19,6 @@ name: config: nodeId: 0x12344321 cluster: "Application Basic" - # Default endpoint is 3, since that's where tv-app has this cluster. endpoint: 3 tests: @@ -31,7 +30,7 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: @@ -47,9 +46,11 @@ tests: constraints: type: map32 - #Issue 10988 + #Issue 10988 and 18940 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: + PICS_SKIP_SAMPLE_APP && MC_APBSC.S.A0000 && MC_APBSC.S.A0001 && + MC_APBSC.S.A0003 command: "readAttribute" attribute: "AttributeList" response: @@ -57,6 +58,22 @@ tests: constraints: type: list + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: "Read EventList attribute from the DUT and Verify that the DUT @@ -72,23 +89,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - - #Issue 10988 - - label: "Read the global attribute: AcceptedCommandList" - PICS: PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [0, 1] - constraints: - type: list - - #Issue 17459 - - label: "Read the global attribute: GeneratedCommandList" - PICS: PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [2] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_11.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_11.yaml index d8cc0f0ad5a75d..ee22c9e7252722 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_11.yaml @@ -35,17 +35,20 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_CONTENTLAUNCHER.S.CS || MC_CONTENTLAUNCHER.S.UP command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 - #Issue 10988 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: MC_CONTENTLAUNCHER.S.A0000 && MC_CONTENTLAUNCHER.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -53,29 +56,13 @@ tests: constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - #Issue 17460 - label: "Read the global attribute: AcceptedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AcceptedCommandList" response: - value: [0] + value: [0, 1] constraints: type: list @@ -85,19 +72,16 @@ tests: command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [1] + value: [2] constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT values based on feature/PICS - support: Bit 0 - Set to 1 if the DUT supports Content Search - (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL - Playback (PICS_URLPLAYBACK is true)" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool contentlauncher read feature-map 1 1 - [1646119133.092519][9106:9111] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 - [1646119133.092543][9106:9111] CHIP:EM: Sending Standalone Ack for MessageCounter:13579575 on exchange 33783 + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml index 67f89129746fd1..b13d5fc6375884 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_12.yaml @@ -19,7 +19,6 @@ name: config: nodeId: 0x12344321 cluster: "Account Login" - # Default endpoint is 3, since that's where tv-app has this cluster. endpoint: 3 tests: @@ -39,6 +38,14 @@ tests: constraints: type: uint16 + - label: "Read the optional global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 + - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" @@ -47,22 +54,6 @@ tests: constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - #issue 17461 - label: "Read the global attribute: AcceptedCommandList" PICS: PICS_SKIP_SAMPLE_APP @@ -73,7 +64,6 @@ tests: constraints: type: list - #issue 17461 - label: "Read the global attribute: GeneratedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -83,14 +73,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool accountlogin read feature-map 1 3 - [1646119386.505037][9184:9189] CHIP:DMG: } - [1646119386.505073][9184:9189] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 - [1646119386.505096][9184:9189] CHIP:EM: Sending Standalone Ack for MessageCounter:5632577 on exchange 37257 + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_2.yaml index 61f37b08a0ca69..64a70312eaa054 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_2.yaml @@ -34,17 +34,19 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_KEYPADINPUT.S.NV || MC_KEYPADINPUT.S.LK || MC_KEYPADINPUT.S.NK command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 - #Issue 17453 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: @@ -52,21 +54,6 @@ tests: constraints: type: list - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -75,9 +62,7 @@ tests: constraints: type: list - #Disabled due to issue 17453 - label: "Read the global attribute: GeneratedCommandList" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -85,12 +70,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool lowpower read feature-map 1 1 - [1645780669.465220][5069:5074] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_3.yaml index 250a57d646010e..988c5db4e54a76 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_3.yaml @@ -35,41 +35,30 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_APPLAUNCHER.S.AP command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 - #Issue 10988 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: + PICS_SKIP_SAMPLE_APP && MC_APPLAUNCHER.S.A0000 && + MC_APPLAUNCHER.S.A0001 command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 65528, 65529, 65531, 65532, 65533] + value: [65528, 65529, 65531, 65532, 65533] constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #Issue 17454 + #Issue 19150 - label: "Read the global attribute: AcceptedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -79,7 +68,6 @@ tests: constraints: type: list - #Issue 17454 - label: "Read the global attribute: GeneratedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -89,15 +77,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read attribute Feature map and verify that DUT response indicates - that the FeatureMap attribute has bit 0 set to 1 if the DUT supports - the Application Platform feature (PICS_AP_S is true)." + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool applicationlauncher read feature-map 1 1 - Verify we are getting feature-map values based on features or pic supported sent in the above command - [1649661177918] [67258:746649] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - [1649661177918] [67258:746649] CHIP: [EM] Sending Standalone Ack for MessageCounter:16467393 on exchange 63291i + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_4.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_4.yaml index 987843332653cd..95297a36380586 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_4.yaml @@ -34,40 +34,29 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_MEDIAINPUT.S.NU command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 #Issue 10988 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: + PICS_SKIP_SAMPLE_APP && MC_MEDIAINPUT.S.A0000 && MC_MEDIAINPUT.S.A0001 command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 65528, 65529, 65531, 65532, 65533] + value: [65528, 65529, 65531, 65532, 65533] constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -84,23 +73,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read attribute Feature map and Verify that the DUT response indicates - that the FeatureMap attribute has bit 0 set to 1 if the DUT supports - the Name Updates feature PICS_NU_S is true" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool mediainput read feature-map 1 1 - [1649662558973] [67411:752539] CHIP: [DMG] AttributePathIB = - [1649662558973] [67411:752539] CHIP: [DMG] { - [1649662558973] [67411:752539] CHIP: [DMG] Endpoint = 0x1, - [1649662558973] [67411:752539] CHIP: [DMG] Cluster = 0x507, - [1649662558973] [67411:752539] CHIP: [DMG] Attribute = 0x0000_FFFC, - [1649662558973] [67411:752539] CHIP: [DMG] } - [1649662558973] [67411:752539] CHIP: [DMG] - [1649662558973] [67411:752539] CHIP: [DMG] StatusIB = - [1649662558973] [67411:752539] CHIP: [DMG] { - [1649662558973] [67411:752539] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1649662558973] [67411:752539] CHIP: [DMG] }, + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_5.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_5.yaml index 8b140ba8e0176b..bc1c03dc7e7622 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_5.yaml @@ -29,7 +29,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Read the global attribute constraints: ClusterRevision" + - label: "read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: @@ -37,7 +37,7 @@ tests: constraints: type: uint16 - - label: "Read FeatureMap attribute from the DUT" + - label: "Read the optional global attribute: FeatureMap" command: "readAttribute" attribute: "FeatureMap" response: @@ -45,32 +45,16 @@ tests: constraints: type: map32 - #Issue 10988 + #Testplan issue 1416 - label: "Read the global attribute: AttributeList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 65528, 65529, 65531, 65532, 65533] + value: [65528, 65529, 65531, 65531, 65533] constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -86,3 +70,19 @@ tests: value: [] constraints: type: list + + #issue #11053 disabled steps below Global attributes missing from YAML framework + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." + verification: | + Not implemented in chip-tool + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_6.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_6.yaml index 21fc28f659e0db..a47ea52c4022ed 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_6.yaml @@ -33,74 +33,55 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_CHANNEL.S.CL || MC_CHANNEL.S.LI command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 - #Issue 10988 + #Issue 10988 and 19152 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: + PICS_SKIP_SAMPLE_APP && MC_CHANNEL.S.A0000 && MC_CHANNEL.S.A0001 && + MC_CHANNEL.S.A0002 command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + value: [65528, 65529, 65531, 65532, 65533] constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #Issue 10988 + #Issue 10988 and 19152 - label: "Read the global attribute: AcceptedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [0, 2, 3] constraints: type: list - #Issue 10988 - label: "Read the global attribute: GeneratedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [1] constraints: type: list - #Issue 10988 + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response values based on feature/PICS support Bit 0 - Set to 1 if the - DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if the - DUT supports Lineup Info (PICS_LI_S is true)" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool channel read feature-map 1 1 - [[1649662622709] [67419:752862] CHIP: [DMG] Endpoint = 0x1, - [1649662622709] [67419:752862] CHIP: [DMG] Cluster = 0x504, - [1649662622709] [67419:752862] CHIP: [DMG] Attribute = 0x0000_FFFC, - [1649662622709] [67419:752862] CHIP: [DMG] } - [1649662622709] [67419:752862] CHIP: [DMG] - [1649662622709] [67419:752862] CHIP: [DMG] StatusIB = - [1649662622709] [67419:752862] CHIP: [DMG] { - [1649662622709] [67419:752862] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_7.yaml index 9d5c55652ea724..5ffb1bb81f1acb 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_7.yaml @@ -38,43 +38,34 @@ tests: constraints: type: uint16 - #Issue 10988 + - label: "Read the optional global attribute: FeatureMap" + PICS: MC_MEDIAPLAYBACK.S.AS || MC_MEDIAPLAYBACK.S.VS + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: map32 + + #Issue 10988 and 19154 - label: "Read the global attribute: AttributeList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 2, 3, 4, 5, 6, 65528, 65529, 65531, 65532, 65533] + value: [0, 65528, 65529, 65531, 65532, 65533] constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - ##Issue 10988 - label: "Read the global attribute: AcceptedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AcceptedCommandList" response: - value: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11] + value: [0, 1, 2] constraints: type: list - #Issue 17455 - label: "Read the global attribute: GeneratedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -84,18 +75,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT values - based on feature/PICS support:Bit 0 - Set to 1 if the DUT supports - Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the DUT - supports Variable Speed (PICS_VARIABLESPEED is true)" + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool mediaplayback read feature-map 1 3 - [1646115004.682978][8139:8144] CHIP:DMG: SuppressResponse = true, - [1646115004.682994][8139:8144] CHIP:DMG: InteractionModelRevision = 1 - [1646115004.683010][8139:8144] CHIP:DMG: } - [1646115004.683125][8139:8144] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 - [1646115004.683189][8139:8144] CHIP:EM: Sending Standalone Ack for MessageCounter:712796 on exchange 9659i + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_8.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_8.yaml index 3bc8dc9c77a66d..3f5f9ffff0f560 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_8.yaml @@ -34,11 +34,6 @@ tests: attribute: "ClusterRevision" response: value: 1 - - - label: "Read the global attribute constraints: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: constraints: type: uint16 diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_9.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_9.yaml index 32e449a267d1b8..5409d6ae61ea3c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_9.yaml @@ -35,17 +35,19 @@ tests: attribute: "ClusterRevision" response: value: 1 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the optional global attribute: FeatureMap" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 0 constraints: - type: uint16 + type: map32 - ##Issue 10988 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP + PICS: MC_TGTNAV.S.A0001 command: "readAttribute" attribute: "AttributeList" response: @@ -53,21 +55,14 @@ tests: constraints: type: list - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Read the global attribute: AttributeList" + PICS: "!MC_TGTNAV.S.A0001" + command: "readAttribute" + attribute: "AttributeList" + response: + value: [0, 65528, 65529, 65531, 65532, 65533] + constraints: + type: list - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" @@ -77,7 +72,6 @@ tests: constraints: type: list - # Issue 17458 - label: "Read the global attribute: GeneratedCommandList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -87,13 +81,12 @@ tests: constraints: type: list + #issue #11053 disabled steps below Global attributes missing from YAML framework - label: - "Read FeatureMap attribute from the DUT and verify response has the - value 0 or throws a general error if the attribute is not supported.." + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - ./chip-tool targetnavigator read feature-map 1 1 - [1646117330.365338][8706:8711] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 - [1646117330.365410][8706:8711] CHIP:EM: Sending Standalone Ack for MessageCounter:10744435 on exchange 3932i + Not implemented in chip-tool cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml deleted file mode 100644 index e846576ac631c6..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_MC_3_4.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 21.3.4. [TC-MC-3.4] Press And Hold Key Press Verification - -config: - nodeId: 0x12344321 - cluster: "Keypad Input" - endpoint: 1 - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - #Issue 17510 - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 - - - label: "TH sends same KeyPad input codes to DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "SendKey" - arguments: - values: - - name: "keyCode" - value: 0x09 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index 6a158bdbdf74de..10bb2d1eeae69b 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml @@ -42,7 +42,7 @@ tests: response: value: 1 constraints: - type: map8 + type: map32 #if condition needed #Issue 10988 - label: "TH reads the AttributeList attribute from the DUT" @@ -74,6 +74,7 @@ tests: command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [0] constraints: type: list @@ -81,5 +82,6 @@ tests: command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index b10a243d0926e3..d202a90f195bc8 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -33,34 +33,22 @@ tests: attribute: "ClusterRevision" response: value: 3 - - - 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: 3 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" + - label: "Read the global attribute constraints : FeatureMap" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: - value: 3 + value: 0 + constraints: + type: map32 - label: "Read the global attribute: AttributeList" command: "readAttribute" attribute: "AttributeList" response: + value: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] constraints: type: list @@ -84,6 +72,7 @@ tests: command: "readAttribute" attribute: "AcceptedCommandList" response: + value: [] constraints: type: list @@ -91,21 +80,6 @@ tests: command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [] constraints: type: list - - #issue #17483 - - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response" - verification: | - Not implemented in SDK - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter '0' for success" - - name: "expectedValue" - value: 0 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 098cf14f53b807..ce4861270de5c3 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 @@ -29,6 +29,7 @@ tests: value: nodeId - label: "Reads mandatory attribute constrains: Occupancy" + PICS: OCC.S.A0000 command: "readAttribute" attribute: "occupancy" response: @@ -37,47 +38,8 @@ tests: minValue: 0 maxValue: 1 - - label: - "Writes the respective default value to mandatory attribute: Occupancy" - command: "writeAttribute" - attribute: "occupancy" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Reads back mandatory attribute: Occupancy" - command: "readAttribute" - attribute: "occupancy" - response: - value: 0 - - - label: "Reads mandatory attribute: OccupancySensorType" - command: "readAttribute" - attribute: "occupancy sensor type" - response: - value: 0 - - label: "Reads mandatory attribute constrains: OccupancySensorType" - command: "readAttribute" - attribute: "occupancy sensor type" - response: - constraints: - type: enum8 - minValue: 0 - maxValue: 3 - - - label: - "Writes the respective default value to mandatory attribute: - OccupancySensorType" - command: "writeAttribute" - attribute: "occupancy sensor type" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "Reads back mandatory attribute: OccupancySensorType" + PICS: OCC.S.A0001 command: "readAttribute" attribute: "occupancy sensor type" response: @@ -87,6 +49,7 @@ tests: maxValue: 3 - label: "Reads mandatory attribute constrains: OccupancySensorTypeBitmap" + PICS: OCC.S.A0002 command: "readAttribute" attribute: "occupancy sensor type bitmap" response: @@ -95,28 +58,8 @@ tests: minValue: 1 maxValue: 273 - - label: - "Writes the respective default value to mandatory attribute: - OccupancySensorTypeBitmap" - command: "writeAttribute" - attribute: "occupancy sensor type bitmap" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "Reads back mandatory attribute: OccupancySensorTypeBitmap" - command: "readAttribute" - attribute: "occupancy sensor type bitmap" - response: - constraints: - type: map8 - minValue: 1 - maxValue: 273 - - #disabled due to issue #15377 - label: "Reads optional attribute: PIROccupiedToUnoccupiedDelay" - optional: true + PICS: OCC.S.A0010 command: "readAttribute" attribute: "PIR occupied to unoccupied delay" response: @@ -124,89 +67,29 @@ tests: constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - PIROccupiedToUnoccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "PIR occupied to unoccupied delay" - arguments: - value: 0 - - - label: "Reads back optional attribute: PIROccupiedToUnoccupiedDelay" - optional: true - command: "readAttribute" - attribute: "PIR occupied to unoccupied delay" - response: - value: 0 - - - label: "Reads optional attribute: PIRUnoccupiedToOccupiedDelay" - optional: true - command: "readAttribute" - attribute: "PIR unoccupied to occupied delay" - response: - value: 0 - - label: "Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay" - optional: true + PICS: OCC.S.A0011 command: "readAttribute" attribute: "PIR unoccupied to occupied delay" response: + value: 0 constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - PIRUnoccupiedToOccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "PIR unoccupied to occupied delay" - arguments: - value: 0 - - - label: "Reads back optional attribute: PIRUnoccupiedToOccupiedDelay" - optional: true - command: "readAttribute" - attribute: "PIR unoccupied to occupied delay" - response: - value: 0 - - - label: "Reads optional attribute: PIRUnoccupiedToOccupiedThreshold" - optional: true - command: "readAttribute" - attribute: "PIR unoccupied to occupied threshold" - response: - value: 1 - - label: "Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold" - optional: true + PICS: OCC.S.A0012 command: "readAttribute" attribute: "PIR unoccupied to occupied threshold" response: + value: 1 constraints: type: uint8 minValue: 1 maxValue: 254 - - label: - "Writes the respective default value to optional attribute: - PIRUnoccupiedToOccupiedThreshold" - optional: true - command: "writeAttribute" - attribute: "PIR unoccupied to occupied threshold" - arguments: - value: 1 - - - label: "Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold" - optional: true - command: "readAttribute" - attribute: "PIR unoccupied to occupied threshold" - response: - value: 1 - - label: "Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay" - optional: true + PICS: OCC.S.A0020 command: "readAttribute" attribute: "ultrasonic occupied to unoccupied delay" response: @@ -214,24 +97,8 @@ tests: constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - UltrasonicOccupiedToUnoccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "ultrasonic occupied to unoccupied delay" - arguments: - value: 0 - - - label: "Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay" - optional: true - command: "readAttribute" - attribute: "ultrasonic occupied to unoccupied delay" - response: - value: 0 - - label: "Read attribute: UltrasonicUnoccupiedToOccupiedDelay" - optional: true + PICS: OCC.S.A0021 command: "readAttribute" attribute: "ultrasonic unoccupied to occupied delay" response: @@ -239,24 +106,8 @@ tests: constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - UltrasonicUnoccupiedToOccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "ultrasonic unoccupied to occupied delay" - arguments: - value: 0 - - - label: "Read back attribute: UltrasonicUnoccupiedToOccupiedDelay" - optional: true - command: "readAttribute" - attribute: "ultrasonic unoccupied to occupied delay" - response: - value: 0 - - label: "Read attribute: UltrasonicUnoccupiedToOccupiedThreshold" - optional: true + PICS: OCC.S.A0022 command: "readAttribute" attribute: "ultrasonic unoccupied to occupied threshold" response: @@ -266,129 +117,37 @@ tests: minValue: 1 maxValue: 254 - - label: - "Writes the respective default value to optional attribute: - UltrasonicUnoccupiedToOccupiedThreshold" - optional: true - command: "writeAttribute" - attribute: "ultrasonic unoccupied to occupied threshold" - arguments: - value: 1 - - - label: "Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold" - optional: true - command: "readAttribute" - attribute: "ultrasonic unoccupied to occupied threshold" - response: - value: 1 - - - label: - "Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay" - optional: true - command: "readAttribute" - attribute: "physical contact occupied to unoccupied delay" - response: - value: 0 - - label: "Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay" - optional: true + PICS: OCC.S.A0030 command: "readAttribute" attribute: "physical contact occupied to unoccupied delay" response: + value: 0 constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - PhysicalContactOccupiedToUnoccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "physical contact occupied to unoccupied delay" - arguments: - value: 0 - - - label: - "Reads back optional attribute: - PhysicalContactOccupiedToUnoccupiedDelay" - optional: true - command: "readAttribute" - attribute: "physical contact occupied to unoccupied delay" - response: - value: 0 - - - label: - "Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay" - optional: true - command: "readAttribute" - attribute: "physical contact unoccupied to occupied delay" - response: - value: 0 - - label: "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay" - optional: true + PICS: OCC.S.A0031 command: "readAttribute" attribute: "physical contact unoccupied to occupied delay" response: + value: 0 constraints: type: uint16 - - label: - "Writes the respective default value to optional attribute: - PhysicalContactUnoccupiedToOccupiedDelay" - optional: true - command: "writeAttribute" - attribute: "physical contact unoccupied to occupied delay" - arguments: - value: 0 - - - label: - "Reads back optional attribute: - PhysicalContactUnoccupiedToOccupiedDelay" - optional: true - command: "readAttribute" - attribute: "physical contact unoccupied to occupied delay" - response: - value: 0 - - - label: - "Reads optional attribute: - PhysicalContactUnoccupiedToOccupiedThreshold" - optional: true - command: "readAttribute" - attribute: "physical contact unoccupied to occupied threshold" - response: - value: 1 - - label: "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold" - optional: true + PICS: OCC.S.A0032 command: "readAttribute" attribute: "physical contact unoccupied to occupied threshold" response: + value: 1 constraints: type: uint8 minValue: 1 maxValue: 254 - - - label: - "Writes the respective default value to optional attribute: - PhysicalContactUnoccupiedToOccupiedThreshold" - optional: true - command: "writeAttribute" - attribute: "physical contact unoccupied to occupied threshold" - arguments: - value: 1 - - - label: - "Reads back optional attribute: - PhysicalContactUnoccupiedToOccupiedThreshold" - optional: true - command: "readAttribute" - attribute: "physical contact unoccupied to occupied threshold" - response: - value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index 73e9da144c5121..0456468123905f 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -36,13 +36,22 @@ tests: constraints: type: uint16 + - label: "read the optional global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + PICS: OO_LT + response: + value: 1 + constraints: + type: map32 + #issue 17495 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 16384, 16385, 16386, 16387] + value: + [0, 16384, 16385, 16386, 16387, 65528, 65529, 65531, 65532, 65533] constraints: type: list @@ -77,12 +86,3 @@ tests: value: [] constraints: type: list - - - label: "read the optional global attribute: FeatureMap" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OO_LT - response: - value: 1 - constraints: - type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml index 1cdc700c436472..f742b058a35ed8 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml @@ -37,13 +37,7 @@ tests: arguments: value: 0 - - label: "TH reads the StartUpOnOff attribute from the DUT" - command: "readAttribute" - attribute: "StartUpOnOff" - response: - value: 0 - - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -56,9 +50,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" @@ -71,7 +62,7 @@ tests: arguments: value: 1 - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -84,9 +75,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" @@ -99,7 +87,7 @@ tests: arguments: value: 2 - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -112,16 +100,13 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" response: value: 0 - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -134,9 +119,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" @@ -149,7 +131,7 @@ tests: arguments: value: null - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -162,9 +144,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" @@ -174,7 +153,7 @@ tests: - label: "TH sends Off command to DUT" command: "Off" - - label: "Power off DUT" + - label: "Power Off and On DUT" cluster: "SystemCommands" endpoint: 0 command: "Reboot" @@ -187,9 +166,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Power on DUT" - disabled: true - - label: "TH reads the OnOff attribute from the DUT" command: "readAttribute" attribute: "OnOff" 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 fa307c009d9e7e..3f5545849ddda5 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 @@ -69,20 +69,6 @@ tests: constraints: type: list - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: "TH reads the EventList attribute from the DUT" - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "TH reads the AcceptedCommandList attribute from the DUT" command: "readAttribute" attribute: "AcceptedCommandList" @@ -98,3 +84,17 @@ tests: value: [] constraints: type: list + + #issue #15011 disabled steps below Global attributes missing from YAML framework + - label: "TH reads the EventList attribute from the DUT" + verification: | + Not implemented in chip-tool + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index 797f90deeeba53..809e1b0b6dfcff 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -33,34 +33,39 @@ tests: attribute: "ClusterRevision" response: value: 3 + constraints: + type: uint16 - - label: "Read the global attribute constraints: ClusterRevision" + - label: "Read the global attribute constraints: FeatureMap" + PICS: PRS.S.F00 command: "readAttribute" - attribute: "ClusterRevision" + attribute: "FeatureMap" response: + value: 1 constraints: - type: uint16 + type: map32 - - label: - "Write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 3 + - label: "Read the global mandatory attribute constraints: AttributeList" + command: "readAttribute" + attribute: "AttributeList" response: - error: UNSUPPORTED_WRITE + contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] + constraints: + type: list - - label: "Reads back global attribute: ClusterRevision" + - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" - attribute: "ClusterRevision" + attribute: "AcceptedCommandList" response: - value: 3 + value: [] + constraints: + type: list - - label: "Read the global mandatory attribute constraints: AttributeList" + - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" - attribute: "AttributeList" + attribute: "GeneratedCommandList" response: + value: [] constraints: type: list @@ -79,62 +84,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - - #issue #17484 - - label: - "Read AcceptedCommandList attribute from the DUT and Verify that the - DUT response" - verification: | - ./chip-tool pressuremeasurement read accepted-command-list 1 1 - - Verify response: - [1650367843.973086][4114:4119] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFF9 DataVersion: 2248280323 - [1650367843.973242][4114:4119] CHIP:TOO: AcceptedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Read GeneratedCommandList attribute from the DUT and Verify that the - DUT response" - verification: | - ./chip-tool pressuremeasurement read generated-command-list 1 1 - - Verify response: - [1650367913.285053][4120:4125] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFF8 DataVersion: 2248280323 - [1650367913.285193][4120:4125] CHIP:TOO: GeneratedCommandList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #17483 - - label: - "Read FeatureMap attribute from the DUT and Verify that the DUT - response" - verification: | - ./chip-tool pressuremeasurement read feature-map 1 1 - Verify response: - cluster id: 0x0403 - Attribute: 0xFFFC - PressureMeasurement.FeatureMap response: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter '0' for success" - - name: "expectedValue" - value: 0 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 a7f03021e2d417..78d672d2967720 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 @@ -28,7 +28,7 @@ tests: - name: "nodeId" value: nodeId - - label: "read the global attribute: ClusterRevision" + - label: "Read the global attribute: ClusterRevision" command: "readAttribute" attribute: "ClusterRevision" response: @@ -36,6 +36,15 @@ tests: constraints: type: uint16 + - label: "Read the optional global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 2 + constraints: + type: map32 + + # if condition needed 10988 - label: "Read the global attribute: AttributeList" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" @@ -45,22 +54,6 @@ tests: constraints: type: list - #issue #11053 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" @@ -77,8 +70,18 @@ tests: constraints: type: list - - label: "read the optional global attribute: FeatureMap" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 2 + #issue #11053 + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." + verification: | + Not implemented in chip-tool + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" 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 4fb1522a8e0fea..ddd1e3c4b2ea8a 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 @@ -46,9 +46,7 @@ tests: minValue: 0 maxValue: 9999 - #Issue 14703 - label: "Reads constraints of attribute: MaxMeasuredValue" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "max measured value" response: 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 87dd8a44f2df4c..f099eca3adaadc 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 @@ -46,11 +46,11 @@ tests: # Issue 17464 - label: "Read the global attribute: AttributeList" - PICS: PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE + PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + value: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] constraints: type: list 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 adfa99e173cb99..12de356c78139d 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 @@ -43,6 +43,13 @@ tests: - name: "message" value: "Verify device temperature displayed in °C" + - label: "TH reads the TemperatureDisplayMode attribute of DUT" + command: "readAttribute" + attribute: "temperature display mode" + PICS: A_TEMPERATURE_DISPLAY_MODE + arguments: + value: 0 + - label: "Writes a value of 1 to TemperatureDisplayMode attribute of DUT" command: "writeAttribute" attribute: "temperature display mode" @@ -58,6 +65,13 @@ tests: - name: "message" value: "Verify device temperature displayed in °F" + - label: "TH reads the TemperatureDisplayMode attribute of DUT" + command: "readAttribute" + attribute: "temperature display mode" + PICS: A_TEMPERATURE_DISPLAY_MODE + response: + value: 1 + - label: "Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT" @@ -69,6 +83,13 @@ tests: response: error: CONSTRAINT_ERROR + - label: "TH reads the TemperatureDisplayMode attribute of DUT" + command: "readAttribute" + attribute: "temperature display mode" + PICS: A_TEMPERATURE_DISPLAY_MODE + response: + value: 1 + - label: "Writes a value of 0 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -84,6 +105,13 @@ tests: - name: "message" value: "Verify all device functionality available to the user" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 0 + - label: "Writes a value of 1 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -99,6 +127,13 @@ tests: - name: "message" value: "Verify device operates at Level 1 reduced functionality" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 1 + - label: "Writes a value of 2 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -114,6 +149,13 @@ tests: - name: "message" value: "Verify device operates at Level 2 reduced functionality" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 2 + - label: "Writes a value of 3 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -129,6 +171,13 @@ tests: - name: "message" value: "Verify device operates at Level 3 reduced functionality" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 3 + - label: "Writes a value of 4 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -144,6 +193,13 @@ tests: - name: "message" value: "Verify device operates at Level 4 reduced functionality" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 4 + - label: "Writes a value of 5 to KeypadLockout attribute of DUT" command: "writeAttribute" attribute: "keypad lockout" @@ -159,6 +215,13 @@ tests: - name: "message" value: "Verify device operates at least functionality level" + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 5 + - label: "Writes a value of greater than 5 to KeypadLockout attribute of DUT" command: "writeAttribute" @@ -169,6 +232,13 @@ tests: response: error: CONSTRAINT_ERROR + - label: "TH reads the KeypadLockout attribute of DUT" + command: "readAttribute" + attribute: "keypad lockout" + PICS: A_KEYPAD_LOCKOUT + response: + value: 5 + - label: "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT" command: "writeAttribute" @@ -189,6 +259,13 @@ tests: "Verify local schedule programming functionality is enabled at the thermostat" + - label: "TH reads the ScheduleProgrammingVisibility attribute of DUT" + command: "readAttribute" + attribute: "schedule programming visibility" + PICS: A_SCHEDULE_PROGRAMMING_VISIBILITY + response: + value: 0 + - label: "Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT" command: "writeAttribute" @@ -209,6 +286,13 @@ tests: "Verify local schedule programming functionality is disabled at the thermostat" + - label: "TH reads the ScheduleProgrammingVisibility attribute of DUT" + command: "readAttribute" + attribute: "schedule programming visibility" + PICS: A_SCHEDULE_PROGRAMMING_VISIBILITY + response: + value: 1 + - label: "Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT" @@ -219,3 +303,10 @@ tests: value: 2 response: error: CONSTRAINT_ERROR + + - label: "TH reads the ScheduleProgrammingVisibility attribute of DUT" + command: "readAttribute" + attribute: "schedule programming visibility" + PICS: A_SCHEDULE_PROGRAMMING_VISIBILITY + response: + value: 1 diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml index e169ba6b7af56e..5eb44862aa81c4 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml @@ -36,59 +36,21 @@ tests: constraints: type: uint16 - #Issue 17807 - - label: "Read the optional global attribute: FeatureMap" - verification: | - ./chip-tool fixedlabel read feature-map 1 0 - [1651124089.644987][2374:2379] CHIP:TOO: Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - [1651124089.645078][2374:2379] CHIP:EM: Sending Standalone Ack for MessageCounter:4887314 on exchange 28800i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 - #Issue 17807 - label: "Read the global attribute: AttributeList" - verification: | - ./chip-tool fixedlabel read attribute-list 1 0 - [1651124128.610488][2381:2386] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFB DataVersion: 3688229931 - [1651124128.610670][2381:2386] CHIP:TOO: AttributeList: 5 entries - [1651124128.610719][2381:2386] CHIP:TOO: [1]: 0 - [1651124128.610758][2381:2386] CHIP:TOO: [2]: 65528 - [1651124128.610794][2381:2386] CHIP:TOO: [3]: 65529 - [1651124128.610831][2381:2386] CHIP:TOO: [4]: 65531 - [1651124128.610867][2381:2386] CHIP:TOO: [5]: 65533 - [1651124128.611068][2381:2386] CHIP:EM: Sending Standalone Ack for MessageCounter:12258956 on exchange 48899i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + command: "readAttribute" + attribute: "AttributeList" + response: + value: [0, 65528, 65529, 65531, 65532, 65533] + constraints: + type: list - label: "Read the global attribute: AcceptedCommandList" command: "readAttribute" @@ -105,3 +67,19 @@ tests: value: [] constraints: type: list + + #issue #15011 disabled steps below Global attributes missing from YAML framework + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." + verification: | + Not implemented in chip-tool + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 27c4ce5b6a40b4..6d608accb03495 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -50,13 +50,12 @@ tests: minValue: 0 maxValue: 32768 - #Issue 18041 - label: "TH reads from the DUT the (0xFFFB) AttributeList attribute" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "AttributeList" response: - value: [0, 7, 10, 13, 23, 26, 65528, 65529, 65531, 65532, 65533] + value: [0, 7, 10, 13, 23, 65528, 65529, 65531, 65532, 65533] constraints: type: list @@ -74,7 +73,6 @@ tests: - name: "expectedValue" value: "y" - #Issue 18041 - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index 37e7c86b630532..f69ed57990c769 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -207,24 +207,6 @@ tests: minValue: 0 maxValue: 2047 - - label: "3a.2: write a value into the RO mandatory attribute: SafetyStatus" - command: "writeAttribute" - attribute: "SafetyStatus" - PICS: A_SAFETYSTATUS - arguments: - value: 4096 - response: - error: UNSUPPORTED_WRITE - - - label: "3a.3: reads back the RO mandatory attribute: SafetyStatus" - command: "readAttribute" - attribute: "SafetyStatus" - PICS: A_SAFETYSTATUS - response: - constraints: - type: map16 - notValue: 4096 - ### Attribute[ 1]: PhysicalClosedLimitLift ==================== - label: "3b: read the RO optional attribute default: PhysicalClosedLimitLift" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_3.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_3.yaml index acbbc0047184cb..0165b84b4fde99 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_3.yaml @@ -46,16 +46,13 @@ tests: minValue: 0 maxValue: 10000 - # Issue 18794 - label: "1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage" command: "readAttribute" attribute: "CurrentPositionLiftPercentage" - PICS: - PICS_SKIP_SAMPLE_APP && WNCV_LF && WNCV_PA_LF && - A_CURRENTPOSITIONLIFTPERCENTAGE + PICS: WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE response: value: attrCurrentPositionLiftPercent100ths / 100 constraints: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 621f8ea2d743b5..cc48a21efb25dc 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -181,3 +181,54 @@ CC.S.C41.Rsp=1 CC.S.C42.Rsp=1 CC.S.C43.Rsp=1 CC.S.C44.Rsp=1 +PRS.S.F00=0 +CC.S.F00=1 +CC.S.F01=1 +CC.S.F02=1 +CC.S.F03=1 +CC.S.F04=1 +MC_APPLAUNCHER.S.A0000=1 +MC_APPLAUNCHER.S.A0001=1 +MC_MEDIAINPUT.S.A0000=1 +MC_MEDIAINPUT.S.A0001=1 +MC_CHANNEL.S.CL=0 +MC_CHANNEL.S.LI=0 +MC_CHANNEL.S.A0000=1 +MC_CHANNEL.S.A0001=1 +MC_CHANNEL.S.A0002=1 +MC_CHANNEL.S.C0000=1 +MC_CHANNEL.S.C0002=1 +MC_CHANNEL.S.C0003=1 +MC_MEDIAPLAYBACK.S.AS=0 +MC_MEDIAPLAYBACK.S.VS=0 +NAMEUPDATES=0 +MC_TGTNAV.S.A0001=1 +MC_APBSC.S.A0000=1 +MC_APBSC.S.A0001=1 +MC_APBSC.S.A0003=1 +MC_CONTENTLAUNCHER.S.CS=0 +MC_CONTENTLAUNCHER.S.UP=0 +MC_CONTENTLAUNCHER.S.A0000=1 +MC_CONTENTLAUNCHER.S.A0001=1 +PRS.S.A0003=0 +LVL.S.F02=1 +LVL.S.A0003=1 +LVL.S.A0002=1 +OCC.S.A0000=1 +OCC.S.A0001=1 +OCC.S.A0002=1 +OCC.S.A0010=0 +OCC.S.A0011=0 +OCC.S.A0012=0 +OCC.S.A0020=0 +OCC.S.A0021=0 +OCC.S.A0022=0 +OCC.S.A0030=0 +OCC.S.A0031=0 +OCC.S.A0032=0 +FLW.S.A0003=0 +MC_APPLAUNCHER.S.AP=0 +MC_KEYPADINPUT.S.LK=0 +MC_KEYPADINPUT.S.NK=0 +MC_KEYPADINPUT.S.NV=0 +MC_MEDIAINPUT.S.NU=0 diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index 89ebab0786fabb..f0877b8ba9b300 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -651,7 +651,6 @@ function getTests() { 'Test_TC_MC_2_1', 'Test_TC_MC_3_2', 'Test_TC_MC_3_3', - 'Test_TC_MC_3_4', 'Test_TC_MC_3_5', 'Test_TC_MC_3_6', 'Test_TC_MC_3_7', diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bc159c2318982c..63ddebbcd934f7 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -103,7 +103,6 @@ class TestList : public Command printf("Test_TC_MC_2_1\n"); printf("Test_TC_MC_3_2\n"); printf("Test_TC_MC_3_3\n"); - printf("Test_TC_MC_3_4\n"); printf("Test_TC_MC_3_5\n"); printf("Test_TC_MC_3_6\n"); printf("Test_TC_MC_3_7\n"); @@ -2396,7 +2395,7 @@ class Test_TC_BI_2_2Suite : public TestCommand class Test_TC_BOOL_1_1Suite : public TestCommand { public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 8, credsIssuerConfig) + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2439,14 +2438,16 @@ class Test_TC_BOOL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -2474,10 +2475,6 @@ class Test_TC_BOOL_1_1Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2489,7 +2486,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2501,7 +2498,7 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -2533,9 +2530,9 @@ class Test_TC_BOOL_1_1Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + LogStep(2, "Read the global attribute constraints : FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); @@ -2543,36 +2540,24 @@ class Test_TC_BOOL_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } } @@ -2807,7 +2792,7 @@ class Test_TC_BRAC_1_1Suite : public TestCommand class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 10, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2850,40 +2835,71 @@ class Test_TC_CC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - } - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 7UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 8UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 15UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 16384UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 16385UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 16386UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); + VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 16394UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); + VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 16395UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); + VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 16396UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); + VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 16397UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 14)); + VerifyOrReturn(CheckValue("attributeList[14]", iter_0.GetValue(), 16400UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 15)); + VerifyOrReturn(CheckValue("attributeList[15]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); + VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); + VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); + VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); + VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 20)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2891,15 +2907,19 @@ class Test_TC_CC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 8: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 9: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -2931,27 +2951,27 @@ class Test_TC_CC_1_1Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + LogStep(2, "Read the global attribute constraints : FeatureMap"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "write the default values to mandatory global attribute: ClusterRevision"); - ListFreer listFreer; - uint16_t value; - value = 5U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - value, chip::NullOptional, chip::NullOptional); + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 4: { - LogStep(4, "reads back global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 6: { LogStep(6, @@ -2964,28 +2984,6 @@ class Test_TC_CC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -13599,14 +13597,41 @@ class Test_TC_FLW_1_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -13659,25 +13684,20 @@ class Test_TC_FLW_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(2, "Read the global attribute constraints : FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("FLW.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, + FlowMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -13691,14 +13711,13 @@ class Test_TC_FLW_1_1Suite : public TestCommand } case 6: { LogStep(6, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } } @@ -14598,7 +14617,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand class Test_TC_I_1_1Suite : public TestCommand { public: - Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 8, credsIssuerConfig) + Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14641,14 +14660,16 @@ class Test_TC_I_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -14709,10 +14730,6 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -14741,8 +14758,8 @@ class Test_TC_I_1_1Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, + LogStep(2, "TH reads the FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { @@ -14771,18 +14788,6 @@ class Test_TC_I_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -15437,7 +15442,7 @@ class Test_TC_I_2_3Suite : public TestCommand class Test_TC_ILL_1_1Suite : public TestCommand { public: - Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 8, credsIssuerConfig) + Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15480,14 +15485,16 @@ class Test_TC_ILL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -15523,10 +15530,6 @@ class Test_TC_ILL_1_1Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -15538,7 +15541,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -15550,7 +15553,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -15582,9 +15585,9 @@ class Test_TC_ILL_1_1Suite : public TestCommand IlluminanceMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); + LogStep(2, "Read the global attribute constraints : FeatureMap"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + IlluminanceMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); @@ -15592,36 +15595,24 @@ class Test_TC_ILL_1_1Suite : public TestCommand IlluminanceMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } } @@ -15676,7 +15667,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } break; case 2: @@ -15685,8 +15676,8 @@ class Test_TC_ILL_2_1Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65533U)); } break; case 3: @@ -15695,7 +15686,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } break; @@ -15715,6 +15706,8 @@ class Test_TC_ILL_2_1Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; default: @@ -15740,19 +15733,20 @@ class Test_TC_ILL_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads MinMeasuredValue attribute from DUT"); + LogStep(1, "TH reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH reads MaxMeasuredValue attribute from DUT"); + LogStep(2, "TH reads MinMeasuredValue attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads MeasuredValue attribute from DUT"); + LogStep(3, "TH reads MaxMeasuredValue attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { LogStep(4, "TH reads Tolerance attribute from DUT"); @@ -15815,14 +15809,16 @@ class Test_TC_LVL_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 3UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -15835,41 +15831,15 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 15UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 10UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 12UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 13UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 14UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); - VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 15UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 13)); - VerifyOrReturn(CheckValue("attributeList[13]", iter_0.GetValue(), 16384UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 14)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 17UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 3)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -15897,14 +15867,22 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 3UL)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -15928,14 +15906,14 @@ class Test_TC_LVL_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); @@ -15944,7 +15922,18 @@ class Test_TC_LVL_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Read the global attribute: AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -15954,16 +15943,6 @@ class Test_TC_LVL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "read the optional global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } } return CHIP_NO_ERROR; } @@ -15993,6 +15972,8 @@ class Test_TC_LVL_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t CurrentLevelValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -16023,6 +16004,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("currentLevel", value, 254U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + CurrentLevelValue = value; } break; case 4: @@ -16051,6 +16033,8 @@ class Test_TC_LVL_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -16590,7 +16574,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 16, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16645,20 +16629,12 @@ class Test_TC_LVL_3_1Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -16666,14 +16642,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -16681,7 +16657,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 100U)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -16689,14 +16665,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -16704,6 +16680,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, 128U)); } break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; @@ -16711,6 +16695,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 64U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -16734,26 +16733,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "reads CurrentLevel attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Reads the MinLevel attribute"); + LogStep(1, "Reads the MinLevel attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Reads the MaxLevel attribute"); + case 2: { + LogStep(2, "Reads the MaxLevel attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "sends a Move to level command"); + case 3: { + LogStep(3, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 64U; - value.transitionTime = 65535U; + value.transitionTime = 0U; value.optionMask = 1U; value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, @@ -16761,24 +16755,24 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Wait 100ms"); + case 4: { + LogStep(4, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "reads CurrentLevel attribute from DUT"); + case 5: { + LogStep(5, "Reads CurrentLevel attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "sends a Move to level command"); + case 6: { + LogStep(6, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 100U; - value.transitionTime = 100U; + value.transitionTime = 0U; value.optionMask = 1U; value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, @@ -16786,29 +16780,29 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 11000 second"); + case 7: { + LogStep(7, "Wait 100 second"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "reads CurrentLevel attribute from DUT"); + case 8: { + LogStep(8, "Reads CurrentLevel attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "reads On Off Transition Time attribute from DUT"); + case 9: { + LogStep(9, "Reads On Off Transition Time attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "sends a Move to level command"); + case 10: { + LogStep(10, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 128U; - value.transitionTime = 65535U; + value.transitionTime = 100U; value.optionMask = 1U; value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, @@ -16816,20 +16810,50 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } + case 11: { + LogStep(11, "Wait10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 11000UL; + return WaitForMs(kIdentityAlpha, value); + } case 12: { - LogStep(12, "Wait 1000ms"); + LogStep(12, "Reads CurrentLevel attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, "Reads the OnOffTransitionTime attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "sends a Move to level command"); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; + value.level = 64U; + value.transitionTime = 0U; + value.optionMask = 1U; + value.optionOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "reads CurrentLevel attribute from DUT"); + case 16: { + LogStep(16, "Reads CurrentLevel attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reset level to 254"); + case 17: { + LogStep(17, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 254U; @@ -16841,8 +16865,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Wait 100ms"); + case 18: { + LogStep(18, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; @@ -16877,8 +16901,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t MaxlevelValue; uint8_t MinlevelValue; + uint8_t MaxlevelValue; chip::app::DataModel::Nullable DefaultMoveRateValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -16903,7 +16927,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - MaxlevelValue = value; + MinlevelValue = value; } break; case 2: @@ -16911,51 +16935,54 @@ class Test_TC_LVL_4_1Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + MaxlevelValue = value; + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, MaxlevelValue)); - } + shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - MinlevelValue = value; + VerifyOrReturn(CheckValue("currentLevel", value, MaxlevelValue)); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 1U)); + VerifyOrReturn(CheckValue("currentLevel", value, MinlevelValue)); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -16964,20 +16991,12 @@ class Test_TC_LVL_4_1Suite : public TestCommand DefaultMoveRateValue = value; } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 255U)); - } + shouldContinue = true; break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -17013,12 +17032,30 @@ class Test_TC_LVL_4_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "reads max level attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, + LogStep(1, "Reads Minlevel attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "sends a Move up command"); + LogStep(2, "sends a Move to level command"); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; + value.level = 1U; + value.transitionTime = 0U; + value.optionMask = 1U; + value.optionOverride = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + chip::NullOptional + + ); + } + case 3: { + LogStep(3, "reads max level attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "sends a Move up command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); @@ -17030,8 +17067,8 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 3: { - LogStep(3, "user prompt message"); + case 5: { + LogStep(5, "user prompt message"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -17040,38 +17077,32 @@ class Test_TC_LVL_4_1Suite : public TestCommand 148); return UserPrompt(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Wait 3000ms"); + case 6: { + LogStep(6, "Wait 9000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 9000UL; return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "reads CurrentLevel attribute from DUT"); + case 7: { + LogStep(7, "Reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "reads min level attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "sends a Move down command"); + case 8: { + LogStep(8, "sends a MoveWithOnOff command"); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Move::Type value; - value.moveMode = static_cast(1); - value.rate = 64U; - value.optionMask = 1U; - value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, + chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type value; + value.moveMode = static_cast(1); + value.rate = 64U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveWithOnOff::Id, value, chip::NullOptional ); } - case 8: { - LogStep(8, "user prompt message"); + case 9: { + LogStep(9, "user prompt message"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -17080,25 +17111,26 @@ class Test_TC_LVL_4_1Suite : public TestCommand 147); return UserPrompt(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Wait 5000ms"); + case 10: { + LogStep(10, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "reads CurrentLevel attribute from DUT"); + case 11: { + LogStep(11, "reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "reads default move rate attribute from DUT"); + case 12: { + LogStep(12, "reads default move rate attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "sends a Move up command at default move rate"); + case 13: { + LogStep(13, "sends a Move up command at default move rate"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); @@ -17110,18 +17142,13 @@ class Test_TC_LVL_4_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 100ms"); + case 14: { + LogStep(14, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "reads CurrentLevel attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } case 15: { LogStep(15, "user prompt message"); ListFreer listFreer; @@ -17159,7 +17186,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand class Test_TC_LVL_5_1Suite : public TestCommand { public: - Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 14, credsIssuerConfig) + Test_TC_LVL_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_5_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17180,6 +17207,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t MinlevelValue; uint8_t CurrentlevelValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -17200,15 +17228,17 @@ class Test_TC_LVL_5_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + MinlevelValue = value; + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -17217,29 +17247,30 @@ class Test_TC_LVL_5_1Suite : public TestCommand CurrentlevelValue = value; } break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentlevelValue)); + VerifyOrReturn(CheckValue("currentLevel", value, 65U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -17247,16 +17278,13 @@ class Test_TC_LVL_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel", value, CurrentlevelValue)); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17280,93 +17308,78 @@ class Test_TC_LVL_5_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sending on command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); + LogStep(1, "Reads Minlevel attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "Precondition: DUT level is set to its lowest point"); + LogStep(2, "Sends MoveToLevelWithOnOff command to DUT"); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Step::Type value; - value.stepMode = static_cast(1); - value.stepSize = 100U; - value.transitionTime = 20U; - value.optionMask = 0U; - value.optionOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, - chip::NullOptional + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; + value.level = 1U; + value.transitionTime = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, + value, chip::NullOptional ); } case 3: { - LogStep(3, "Wait 3000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Reads current level attribute from DUT"); + LogStep(3, "Reads current level attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Sends step up command to DUT"); + case 4: { + LogStep(4, "Sends step up command to DUT"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; value.stepMode = static_cast(0); value.stepSize = 64U; - value.transitionTime = 2U; - value.optionMask = 0U; - value.optionOverride = 0U; + value.transitionTime = 20U; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Wait 5000ms"); + case 5: { + LogStep(5, "Wait 4000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; + value.ms = 4000UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Reads current level attribute from DUT"); + case 6: { + LogStep(6, "Reads current level attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Sends a Step down command"); + case 7: { + LogStep(7, "Sends a StepWithOnOff command"); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::Step::Type value; + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type value; value.stepMode = static_cast(1); value.stepSize = 64U; - value.transitionTime = 2U; - value.optionMask = 0U; - value.optionOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, + value.transitionTime = 20U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::StepWithOnOff::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Wait 4000ms"); + case 8: { + LogStep(8, "Wait 4000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reads current level attribute from DUT"); + case 9: { + LogStep(9, "Reads current level attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Reset level to 254"); + case 10: { + LogStep(10, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 254U; @@ -17378,21 +17391,13 @@ class Test_TC_LVL_5_1Suite : public TestCommand ); } - case 12: { - LogStep(12, "Wait 100ms"); + case 11: { + LogStep(11, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Sending off command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } } return CHIP_NO_ERROR; } @@ -17401,7 +17406,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 12, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17422,6 +17427,7 @@ class Test_TC_LVL_6_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t MinlevelValue; uint8_t CurrentLevelValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -17442,15 +17448,17 @@ class Test_TC_LVL_6_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + MinlevelValue = value; + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -17460,21 +17468,26 @@ class Test_TC_LVL_6_1Suite : public TestCommand CurrentLevelValue = value; } break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 25U)); VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); } break; @@ -17488,6 +17501,26 @@ class Test_TC_LVL_6_1Suite : public TestCommand case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentLevel", value, 50U)); + VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17511,44 +17544,76 @@ class Test_TC_LVL_6_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Sending on command"); + LogStep(1, "Reads Minlevel attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Sends MoveToLevelWithOnOff command to DUT"); ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; + value.level = 1U; + value.transitionTime = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevelWithOnOff::Id, + value, chip::NullOptional ); } - case 2: { - LogStep(2, "Precondition: set DUT to lowest point"); + case 3: { + LogStep(3, "Reads CurrentLevel attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Sends a move up command to DUT"); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 0U; - value.transitionTime = 0U; + chip::app::Clusters::LevelControl::Commands::Move::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; value.optionMask = 1U; value.optionOverride = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional ); } - case 3: { - LogStep(3, "Wait 100ms"); + case 5: { + LogStep(5, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Reads CurrentLevel attribute from DUT"); + case 6: { + LogStep(6, "Sends stop command to DUT"); + ListFreer listFreer; + chip::app::Clusters::LevelControl::Commands::Stop::Type value; + value.optionMask = 0U; + value.optionOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, + chip::NullOptional + + ); + } + case 7: { + LogStep(7, "user prompt message"); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the device has stopped transitioning.garbage: not in length on purpose", 60); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "Reads CurrentLevel attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Sends a move up command to DUT"); + case 9: { + LogStep(9, "Sends a move up command to DUT"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); - value.rate = 1U; + value.rate = 5U; value.optionMask = 1U; value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, @@ -17556,15 +17621,15 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 2000ms"); + case 10: { + LogStep(10, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Sends stop command to DUT"); + case 11: { + LogStep(11, "Sends stop command to DUT"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; value.optionMask = 0U; @@ -17574,13 +17639,22 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Reads CurrentLevel attribute from DUT"); + case 12: { + LogStep(12, "user prompt message"); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the device has stopped transitioning.garbage: not in length on purpose", 60); + return UserPrompt(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "Reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Reset level to 254"); + case 14: { + LogStep(14, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 254U; @@ -17592,21 +17666,13 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "Wait 100ms"); + case 15: { + LogStep(15, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "Sending off command"); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } } return CHIP_NO_ERROR; } @@ -17662,6 +17728,15 @@ class Test_TC_MC_1_1Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17683,10 +17758,6 @@ class Test_TC_MC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { @@ -17740,25 +17811,19 @@ class Test_TC_MC_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, + LogStep(2, "Read the optional global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -17772,8 +17837,7 @@ class Test_TC_MC_1_1Suite : public TestCommand } case 6: { LogStep(6, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates either value 0 or throws a " - "general error if the attribute is not supported"); + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -17790,7 +17854,7 @@ class Test_TC_MC_1_1Suite : public TestCommand class Test_TC_MC_1_2Suite : public TestCommand { public: - Test_TC_MC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_2", 8, credsIssuerConfig) + Test_TC_MC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_2", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17833,14 +17897,16 @@ class Test_TC_MC_1_2Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -17866,10 +17932,6 @@ class Test_TC_MC_1_2Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17883,7 +17945,7 @@ class Test_TC_MC_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17897,7 +17959,7 @@ class Test_TC_MC_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -17929,40 +17991,30 @@ class Test_TC_MC_1_2Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::ClusterRevision::Id, - true, chip::NullOptional); + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_KEYPADINPUT.S.NV || MC_KEYPADINPUT.S.LK || MC_KEYPADINPUT.S.NK"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -17979,7 +18031,7 @@ class Test_TC_MC_1_2Suite : public TestCommand class Test_TC_MC_1_3Suite : public TestCommand { public: - Test_TC_MC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_3", 8, credsIssuerConfig) + Test_TC_MC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_3", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18022,14 +18074,16 @@ class Test_TC_MC_1_3Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -18040,29 +18094,21 @@ class Test_TC_MC_1_3Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18080,7 +18126,7 @@ class Test_TC_MC_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18094,7 +18140,7 @@ class Test_TC_MC_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -18126,43 +18172,33 @@ class Test_TC_MC_1_3Suite : public TestCommand ApplicationLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_APPLAUNCHER.S.AP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); + ApplicationLauncher::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_APPLAUNCHER.S.A0000 && MC_APPLAUNCHER.S.A0001"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read attribute Feature map and verify that DUT response indicates that the FeatureMap attribute has bit 0 set " - "to 1 if the DUT supports the Application Platform feature (PICS_AP_S is true)."); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -18179,7 +18215,7 @@ class Test_TC_MC_1_3Suite : public TestCommand class Test_TC_MC_1_4Suite : public TestCommand { public: - Test_TC_MC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_4", 8, credsIssuerConfig) + Test_TC_MC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_4", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18222,14 +18258,16 @@ class Test_TC_MC_1_4Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -18240,29 +18278,21 @@ class Test_TC_MC_1_4Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18282,7 +18312,7 @@ class Test_TC_MC_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18294,7 +18324,7 @@ class Test_TC_MC_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -18326,41 +18356,31 @@ class Test_TC_MC_1_4Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::ClusterRevision::Id, true, + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_MEDIAINPUT.S.NU"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_MEDIAINPUT.S.A0000 && MC_MEDIAINPUT.S.A0001"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read attribute Feature map and Verify that the DUT response indicates that the FeatureMap attribute has bit 0 " - "set to 1 if the DUT supports the Name Updates feature PICS_NU_S is true"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -18440,29 +18460,21 @@ class Test_TC_MC_1_5Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18474,7 +18486,7 @@ class Test_TC_MC_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18486,6 +18498,10 @@ class Test_TC_MC_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18509,12 +18525,12 @@ class Test_TC_MC_1_5Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read the global attribute constraints: ClusterRevision"); + LogStep(1, "read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read FeatureMap attribute from the DUT"); + LogStep(2, "Read the optional global attribute: FeatureMap"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::FeatureMap::Id, true, chip::NullOptional); } @@ -18525,7 +18541,17 @@ class Test_TC_MC_1_5Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -18535,16 +18561,6 @@ class Test_TC_MC_1_5Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } } return CHIP_NO_ERROR; } @@ -18553,7 +18569,7 @@ class Test_TC_MC_1_5Suite : public TestCommand class Test_TC_MC_1_6Suite : public TestCommand { public: - Test_TC_MC_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_6", 8, credsIssuerConfig) + Test_TC_MC_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_6", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18596,14 +18612,16 @@ class Test_TC_MC_1_6Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -18614,47 +18632,53 @@ class Test_TC_MC_1_6Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 1)); + VerifyOrReturn(CheckValue("acceptedCommandList[1]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 2)); + VerifyOrReturn(CheckValue("acceptedCommandList[2]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 3)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -18686,44 +18710,33 @@ class Test_TC_MC_1_6Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ClusterRevision::Id, true, + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_CHANNEL.S.CL || MC_CHANNEL.S.LI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_CHANNEL.S.A0000 && MC_CHANNEL.S.A0001 && MC_CHANNEL.S.A0002"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and Verify that the DUT response values based on feature/PICS support " - "Bit 0 - Set to 1 if the DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if the DUT supports " - "Lineup Info (PICS_LI_S is true)"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -18787,6 +18800,15 @@ class Test_TC_MC_1_7Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18796,36 +18818,20 @@ class Test_TC_MC_1_7Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 12)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { @@ -18839,23 +18845,7 @@ class Test_TC_MC_1_7Suite : public TestCommand VerifyOrReturn(CheckValue("acceptedCommandList[1]", iter_0.GetValue(), 1UL)); VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 2)); VerifyOrReturn(CheckValue("acceptedCommandList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 3)); - VerifyOrReturn(CheckValue("acceptedCommandList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 4)); - VerifyOrReturn(CheckValue("acceptedCommandList[4]", iter_0.GetValue(), 4UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 5)); - VerifyOrReturn(CheckValue("acceptedCommandList[5]", iter_0.GetValue(), 5UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 6)); - VerifyOrReturn(CheckValue("acceptedCommandList[6]", iter_0.GetValue(), 6UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 7)); - VerifyOrReturn(CheckValue("acceptedCommandList[7]", iter_0.GetValue(), 7UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 8)); - VerifyOrReturn(CheckValue("acceptedCommandList[8]", iter_0.GetValue(), 8UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 9)); - VerifyOrReturn(CheckValue("acceptedCommandList[9]", iter_0.GetValue(), 9UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 10)); - VerifyOrReturn(CheckValue("acceptedCommandList[10]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 11)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 3)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -18906,22 +18896,18 @@ class Test_TC_MC_1_7Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_MEDIAPLAYBACK.S.AS || MC_MEDIAPLAYBACK.S.VS"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -18936,9 +18922,7 @@ class Test_TC_MC_1_7Suite : public TestCommand } case 6: { LogStep(6, - "Read FeatureMap attribute from the DUT and Verify that the DUT values based on feature/PICS support:Bit 0 - " - "Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the DUT supports " - "Variable Speed (PICS_VARIABLESPEED is true)"); + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -18955,7 +18939,7 @@ class Test_TC_MC_1_7Suite : public TestCommand class Test_TC_MC_1_8Suite : public TestCommand { public: - Test_TC_MC_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_8", 8, credsIssuerConfig) + Test_TC_MC_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_8", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18998,17 +18982,10 @@ class Test_TC_MC_1_8Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 3: + case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19034,11 +19011,11 @@ class Test_TC_MC_1_8Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 4: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19052,7 +19029,7 @@ class Test_TC_MC_1_8Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19066,7 +19043,7 @@ class Test_TC_MC_1_8Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -19098,18 +19075,13 @@ class Test_TC_MC_1_8Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); + LogStep(2, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, + case 3: { + LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -19119,20 +19091,20 @@ class Test_TC_MC_1_8Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 6: { + LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the device supports Name " "Updates PICS_NAMEUPDATES is true"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -19194,14 +19166,16 @@ class Test_TC_MC_1_9Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -19232,7 +19206,27 @@ class Test_TC_MC_1_9Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -19294,26 +19288,21 @@ class Test_TC_MC_1_9Suite : public TestCommand TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(2, "Read the optional global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MC_TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(4, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("!MC_TGTNAV.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -19328,8 +19317,7 @@ class Test_TC_MC_1_9Suite : public TestCommand } case 7: { LogStep(7, - "Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a general error if the " - "attribute is not supported.."); + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -19435,9 +19423,182 @@ class Test_TC_MC_1_10Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_APBSC.S.A0000 && MC_APBSC.S.A0001 && MC_APBSC.S.A0003"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_1_11Suite : public TestCommand +{ +public: + Test_TC_MC_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_11", 7, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_1_11Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19453,7 +19614,7 @@ class Test_TC_MC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19466,190 +19627,10 @@ class Test_TC_MC_1_10Suite : public TestCommand } VerifyOrReturn(CheckConstraintType("value", "", "list")); } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_1_11Suite : public TestCommand -{ -public: - Test_TC_MC_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_11", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_1_11Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -19679,44 +19660,34 @@ class Test_TC_MC_1_11Suite : public TestCommand ContentLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(2, "Read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("MC_CONTENTLAUNCHER.S.CS || MC_CONTENTLAUNCHER.S.UP"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("MC_CONTENTLAUNCHER.S.A0000 && MC_CONTENTLAUNCHER.S.A0001"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT values based on feature/PICS support: Bit 0 - Set to 1 if the DUT " - "supports Content Search (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL Playback " - "(PICS_URLPLAYBACK is true)"); + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -19780,6 +19751,15 @@ class Test_TC_MC_1_12Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -19801,10 +19781,6 @@ class Test_TC_MC_1_12Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { @@ -19869,20 +19845,14 @@ class Test_TC_MC_1_12Suite : public TestCommand true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(2, "Read the optional global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -19897,7 +19867,8 @@ class Test_TC_MC_1_12Suite : public TestCommand AccountLogin::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -20322,10 +20293,10 @@ class Test_TC_MC_3_3Suite : public TestCommand } }; -class Test_TC_MC_3_4Suite : public TestCommand +class Test_TC_MC_3_5Suite : public TestCommand { public: - Test_TC_MC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_4", 11, credsIssuerConfig) + Test_TC_MC_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_5", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -20333,7 +20304,7 @@ class Test_TC_MC_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_4Suite() {} + ~Test_TC_MC_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -20365,256 +20336,9 @@ class Test_TC_MC_3_4Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 7: { - LogStep(7, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "TH sends same KeyPad input codes to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; - value.keyCode = static_cast(9); - return SendCommand(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Commands::SendKey::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_3_5Suite : public TestCommand -{ -public: - Test_TC_MC_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_5", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_3_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; default: @@ -22575,7 +22299,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -22617,6 +22341,12 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -22625,6 +22355,10 @@ class Test_TC_MOD_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -25072,7 +24806,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand class Test_TC_OCC_1_1Suite : public TestCommand { public: - Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 10, credsIssuerConfig) + Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25115,59 +24849,74 @@ class Test_TC_OCC_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - } - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 8: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -25196,30 +24945,17 @@ class Test_TC_OCC_1_1Suite : public TestCommand OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(2, "Read the global attribute constraints : FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "write the default values to mandatory global attribute: ClusterRevision"); - ListFreer listFreer; - uint16_t value; - value = 3U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::ClusterRevision::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "reads back global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AttributeList"); + LogStep(3, "Read the global attribute: AttributeList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, + case 4: { + LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -25229,26 +24965,16 @@ class Test_TC_OCC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Read the global attribute: AcceptedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -25257,7 +24983,7 @@ class Test_TC_OCC_1_1Suite : public TestCommand class Test_TC_OCC_2_1Suite : public TestCommand { public: - Test_TC_OCC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_1", 43, credsIssuerConfig) + Test_TC_OCC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_1", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25305,25 +25031,6 @@ class Test_TC_OCC_2_1Suite : public TestCommand } break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancy", value, 0U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancySensorType", value, 0U)); - } - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -25333,33 +25040,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 10: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -25369,11 +25050,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); } break; - case 11: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -25382,118 +25059,27 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 12: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("pirOccupiedToUnoccupiedDelay", value, 0U)); - } - break; - case 14: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedDelay", value, 0U)); - } - break; - case 15: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 16: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedDelay", value, 0U)); - } - break; - case 18: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); - } - break; - case 19: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 20: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); - } - break; - case 22: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -25502,30 +25088,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 23: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ultrasonicOccupiedToUnoccupiedDelay", value, 0U)); - } - break; - case 25: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -25534,30 +25097,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 26: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedDelay", value, 0U)); - } - break; - case 28: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -25568,156 +25108,35 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 29: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1U)); - } - break; - case 31: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactOccupiedToUnoccupiedDelay", value, 0U)); - } - break; - case 32: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 33: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("physicalContactOccupiedToUnoccupiedDelay", value, 0U)); - } - break; - case 35: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedDelay", value, 0U)); - } - break; - case 36: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 37: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedDelay", value, 0U)); - } - break; - case 39: - if (IsUnsupported(status.mStatus)) - { - return; - } + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); - } - break; - case 40: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 41: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -25742,268 +25161,76 @@ class Test_TC_OCC_2_1Suite : public TestCommand } case 1: { LogStep(1, "Reads mandatory attribute constrains: Occupancy"); + VerifyOrDo(!ShouldSkip("OCC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Writes the respective default value to mandatory attribute: Occupancy"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads back mandatory attribute: Occupancy"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads mandatory attribute: OccupancySensorType"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Reads mandatory attribute constrains: OccupancySensorType"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Writes the respective default value to mandatory attribute: OccupancySensorType"); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorType::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 7: { - LogStep(7, "Reads back mandatory attribute: OccupancySensorType"); + LogStep(2, "Reads mandatory attribute constrains: OccupancySensorType"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 10: { - LogStep(10, "Reads back mandatory attribute: OccupancySensorTypeBitmap"); + case 3: { + LogStep(3, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Reads optional attribute: PIROccupiedToUnoccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Writes the respective default value to optional attribute: PIROccupiedToUnoccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 13: { - LogStep(13, "Reads back optional attribute: PIROccupiedToUnoccupiedDelay"); + case 4: { + LogStep(4, "Reads optional attribute: PIROccupiedToUnoccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads optional attribute: PIRUnoccupiedToOccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 17: { - LogStep(17, "Reads back optional attribute: PIRUnoccupiedToOccupiedDelay"); + case 5: { + LogStep(5, "Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Reads optional attribute: PIRUnoccupiedToOccupiedThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedThreshold"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 21: { - LogStep(21, "Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold"); + case 6: { + LogStep(6, "Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold"); + VerifyOrDo(!ShouldSkip("OCC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Writes the respective default value to optional attribute: UltrasonicOccupiedToUnoccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 24: { - LogStep(24, "Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay"); + case 7: { + LogStep(7, "Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Read attribute: UltrasonicUnoccupiedToOccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); - } - case 26: { - LogStep(26, "Writes the respective default value to optional attribute: UltrasonicUnoccupiedToOccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 27: { - LogStep(27, "Read back attribute: UltrasonicUnoccupiedToOccupiedDelay"); + case 8: { + LogStep(8, "Read attribute: UltrasonicUnoccupiedToOccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read attribute: UltrasonicUnoccupiedToOccupiedThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, true, - chip::NullOptional); - } - case 29: { - LogStep(29, "Writes the respective default value to optional attribute: UltrasonicUnoccupiedToOccupiedThreshold"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold"); + case 9: { + LogStep(9, "Read attribute: UltrasonicUnoccupiedToOccupiedThreshold"); + VerifyOrDo(!ShouldSkip("OCC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, true, - chip::NullOptional); - } - case 32: { - LogStep(32, "Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Writes the respective default value to optional attribute: PhysicalContactOccupiedToUnoccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 34: { - LogStep(34, "Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay"); + case 10: { + LogStep(10, "Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Writes the respective default value to optional attribute: PhysicalContactUnoccupiedToOccupiedDelay"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 38: { - LogStep(38, "Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay"); + case 11: { + LogStep(11, "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay"); + VerifyOrDo(!ShouldSkip("OCC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, true, - chip::NullOptional); - } - case 41: { - LogStep(41, "Writes the respective default value to optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold"); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 42: { - LogStep(42, "Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold"); + case 12: { + LogStep(12, "Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold"); + VerifyOrDo(!ShouldSkip("OCC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, true, chip::NullOptional); @@ -26063,6 +25290,15 @@ class Test_TC_OO_1_1Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26079,16 +25315,26 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 16386UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 16387UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 5)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26112,7 +25358,7 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -26124,15 +25370,6 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -26161,13 +25398,18 @@ class Test_TC_OO_1_1Suite : public TestCommand chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, + LogStep(2, "read the optional global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("OO_LT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -26177,21 +25419,15 @@ class Test_TC_OO_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("OO_LT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } case 6: { - LogStep(6, "read the optional global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("OO_LT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::FeatureMap::Id, true, + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } @@ -26672,7 +25908,7 @@ class Test_TC_OO_2_2Suite : public TestCommand class Test_TC_OO_2_4Suite : public TestCommand { public: - Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_4", 26, credsIssuerConfig) + Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_4", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26717,22 +25953,13 @@ class Test_TC_OO_2_4Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startUpOnOff", value)); - VerifyOrReturn(CheckValue("startUpOnOff.Value()", value.Value(), 0U)); - } + shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26740,18 +25967,18 @@ class Test_TC_OO_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 0)); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26759,18 +25986,18 @@ class Test_TC_OO_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26778,15 +26005,15 @@ class Test_TC_OO_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 0)); } break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26794,18 +26021,18 @@ class Test_TC_OO_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26813,18 +26040,18 @@ class Test_TC_OO_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 22: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26872,29 +26099,24 @@ class Test_TC_OO_2_4Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 3: { - LogStep(3, "TH reads the StartUpOnOff attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Power off DUT"); + LogStep(3, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Wait for the commissioned device to be retrieved"); + case 4: { + LogStep(4, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH reads the OnOff attribute from the DUT"); + case 5: { + LogStep(5, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH writes a value of 1 to StartUpOnOff attribute of DUT"); + case 6: { + LogStep(6, "TH writes a value of 1 to StartUpOnOff attribute of DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -26902,25 +26124,25 @@ class Test_TC_OO_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Power off DUT"); + case 7: { + LogStep(7, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Wait for the commissioned device to be retrieved"); + case 8: { + LogStep(8, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads the OnOff attribute from the DUT"); + case 9: { + LogStep(9, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH writes a value of 2 to StartUpOnOff attribute of DUT"); + case 10: { + LogStep(10, "TH writes a value of 2 to StartUpOnOff attribute of DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -26928,88 +26150,88 @@ class Test_TC_OO_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, chip::NullOptional, chip::NullOptional); } - case 12: { - LogStep(12, "Power off DUT"); + case 11: { + LogStep(11, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Wait for the commissioned device to be retrieved"); + case 12: { + LogStep(12, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads the OnOff attribute from the DUT"); + case 13: { + LogStep(13, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Power off DUT"); + case 14: { + LogStep(14, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Wait for the commissioned device to be retrieved"); + case 15: { + LogStep(15, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads the OnOff attribute from the DUT"); + case 16: { + LogStep(16, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "TH writes NULL to StartUpOnOff attribute of DUT"); + case 17: { + LogStep(17, "TH writes NULL to StartUpOnOff attribute of DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::StartUpOnOff::Id, value, chip::NullOptional, chip::NullOptional); } - case 19: { - LogStep(19, "Power off DUT"); + case 18: { + LogStep(18, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Wait for the commissioned device to be retrieved"); + case 19: { + LogStep(19, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 21: { - LogStep(21, "TH reads the OnOff attribute from the DUT"); + case 20: { + LogStep(20, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH sends Off command to DUT"); + case 21: { + LogStep(21, "TH sends Off command to DUT"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 23: { - LogStep(23, "Power off DUT"); + case 22: { + LogStep(22, "Power Off and On DUT"); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Wait for the commissioned device to be retrieved"); + case 23: { + LogStep(23, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 25: { - LogStep(25, "TH reads the OnOff attribute from the DUT"); + case 24: { + LogStep(24, "TH reads the OnOff attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -27067,6 +26289,15 @@ class Test_TC_PS_1_1Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -27100,10 +26331,6 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { @@ -27130,11 +26357,7 @@ class Test_TC_PS_1_1Suite : public TestCommand break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 2UL)); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -27159,26 +26382,20 @@ class Test_TC_PS_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); + LogStep(1, "Read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, + LogStep(2, "Read the optional global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -27191,9 +26408,15 @@ class Test_TC_PS_1_1Suite : public TestCommand true, chip::NullOptional); } case 6: { - LogStep(6, "read the optional global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::FeatureMap::Id, true, - chip::NullOptional); + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -27717,7 +26940,7 @@ class Test_TC_PS_2_1Suite : public TestCommand class Test_TC_PRS_1_1Suite : public TestCommand { public: - Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 10, credsIssuerConfig) + Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27760,32 +26983,47 @@ class Test_TC_PRS_1_1Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -27793,18 +27031,6 @@ class Test_TC_PRS_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -27833,28 +27059,25 @@ class Test_TC_PRS_1_1Suite : public TestCommand PressureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); + LogStep(2, "Read the global attribute constraints: FeatureMap"); + VerifyOrDo(!ShouldSkip("PRS.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + PressureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Write the default values to mandatory global attribute: ClusterRevision"); - ListFreer listFreer; - uint16_t value; - value = 3U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ClusterRevision::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(3, "Read the global mandatory attribute constraints: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Reads back global attribute: ClusterRevision"); + LogStep(4, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + PressureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the global mandatory attribute constraints: AttributeList"); + LogStep(5, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + PressureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 6: { LogStep(6, @@ -27867,36 +27090,6 @@ class Test_TC_PRS_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Read AcceptedCommandList attribute from the DUT and Verify that the DUT response"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Read GeneratedCommandList attribute from the DUT and Verify that the DUT response"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -28225,10 +27418,6 @@ class Test_TC_PCC_1_1Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28240,7 +27429,7 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -28252,6 +27441,10 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -28291,7 +27484,17 @@ class Test_TC_PCC_1_1Suite : public TestCommand PumpConfigurationAndControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads the EventList attribute from the DUT"); + LogStep(4, "TH reads the AcceptedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads the GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, + PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads the EventList attribute from the DUT"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -28300,16 +27503,6 @@ class Test_TC_PCC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "TH reads the AcceptedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads the GeneratedCommandList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, - PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } @@ -29874,7 +29067,6 @@ class Test_TC_RH_2_1Suite : public TestCommand } case 3: { LogStep(3, "Reads constraints of attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } @@ -33603,20 +32795,16 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65530UL)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -33683,8 +32871,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -33833,7 +33020,7 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand class Test_TC_TSUIC_2_2Suite : public TestCommand { public: - Test_TC_TSUIC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_2", 24, credsIssuerConfig) + Test_TC_TSUIC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_2", 37, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -33879,34 +33066,51 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 1U)); + } break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 1U)); + } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 0U)); + } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -33917,27 +33121,41 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 1U)); + } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 2U)); + } break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 3U)); + } break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -33947,8 +33165,80 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand shouldContinue = true; break; case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 4U)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 5U)); + } + break; + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("keypadLockout", value, 5U)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 0U)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 1U)); + } + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 1U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -33990,7 +33280,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 3: { - LogStep(3, "Writes a value of 1 to TemperatureDisplayMode attribute of DUT"); + LogStep(3, "TH reads the TemperatureDisplayMode attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Writes a value of 1 to TemperatureDisplayMode attribute of DUT"); VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -33999,16 +33296,23 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "Verify device temperature displayed in °F"); + case 5: { + LogStep(5, "Verify device temperature displayed in °F"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Verify device temperature displayed in °Fgarbage: not in length on purpose", 42); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT"); + case 6: { + LogStep(6, "TH reads the TemperatureDisplayMode attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT"); VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34017,8 +33321,15 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Writes a value of 0 to KeypadLockout attribute of DUT"); + case 8: { + LogStep(8, "TH reads the TemperatureDisplayMode attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Writes a value of 0 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34027,16 +33338,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "Verify all device functionality available to the user"); + case 10: { + LogStep(10, "Verify all device functionality available to the user"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify all device functionality available to the usergarbage: not in length on purpose", 53); return UserPrompt(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Writes a value of 1 to KeypadLockout attribute of DUT"); + case 11: { + LogStep(11, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "Writes a value of 1 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34045,16 +33362,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "Verify device operates at Level 1 reduced functionality"); + case 13: { + LogStep(13, "Verify device operates at Level 1 reduced functionality"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify device operates at Level 1 reduced functionalitygarbage: not in length on purpose", 55); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Writes a value of 2 to KeypadLockout attribute of DUT"); + case 14: { + LogStep(14, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 15: { + LogStep(15, "Writes a value of 2 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34063,16 +33386,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Verify device operates at Level 2 reduced functionality"); + case 16: { + LogStep(16, "Verify device operates at Level 2 reduced functionality"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify device operates at Level 2 reduced functionalitygarbage: not in length on purpose", 55); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "Writes a value of 3 to KeypadLockout attribute of DUT"); + case 17: { + LogStep(17, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 18: { + LogStep(18, "Writes a value of 3 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34081,16 +33410,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Verify device operates at Level 3 reduced functionality"); + case 19: { + LogStep(19, "Verify device operates at Level 3 reduced functionality"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify device operates at Level 3 reduced functionalitygarbage: not in length on purpose", 55); return UserPrompt(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Writes a value of 4 to KeypadLockout attribute of DUT"); + case 20: { + LogStep(20, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "Writes a value of 4 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34099,16 +33434,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Verify device operates at Level 4 reduced functionality"); + case 22: { + LogStep(22, "Verify device operates at Level 4 reduced functionality"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify device operates at Level 4 reduced functionalitygarbage: not in length on purpose", 55); return UserPrompt(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Writes a value of 5 to KeypadLockout attribute of DUT"); + case 23: { + LogStep(23, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "Writes a value of 5 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34117,16 +33458,22 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 17: { - LogStep(17, "Verify device operates at least functionality level"); + case 25: { + LogStep(25, "Verify device operates at least functionality level"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Verify device operates at least functionality levelgarbage: not in length on purpose", 51); return UserPrompt(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Writes a value of greater than 5 to KeypadLockout attribute of DUT"); + case 26: { + LogStep(26, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 27: { + LogStep(27, "Writes a value of greater than 5 to KeypadLockout attribute of DUT"); VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34135,8 +33482,14 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); } - case 19: { - LogStep(19, "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"); + case 28: { + LogStep(28, "TH reads the KeypadLockout attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT"); VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34145,8 +33498,8 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "Verify local schedule programming functionality is enabled at the thermostat"); + case 30: { + LogStep(30, "Verify local schedule programming functionality is enabled at the thermostat"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -34154,8 +33507,15 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand 76); return UserPrompt(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT"); + case 31: { + LogStep(31, "TH reads the ScheduleProgrammingVisibility attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, + chip::NullOptional); + } + case 32: { + LogStep(32, "Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT"); VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34164,8 +33524,8 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "Verify local schedule programming functionality is disabled at the thermostat"); + case 33: { + LogStep(33, "Verify local schedule programming functionality is disabled at the thermostat"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -34173,8 +33533,15 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand 77); return UserPrompt(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT"); + case 34: { + LogStep(34, "TH reads the ScheduleProgrammingVisibility attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, + chip::NullOptional); + } + case 35: { + LogStep(35, "Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT"); VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -34183,6 +33550,13 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); } + case 36: { + LogStep(36, "TH reads the ScheduleProgrammingVisibility attribute of DUT"); + VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -35732,214 +35106,72 @@ class Test_TC_DIAG_TH_NW_2_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads RxTotalCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads RxUnicastCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads RxBroadcastCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads RxDataCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataCount::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads RxDataPollCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads RxBeaconCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads RxBeaconRequestCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH reads RxOtherCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads RxAddressFilteredCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads RxDestAddrFilteredCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads RxDuplicatedCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "TH reads RxErrNoFrameCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads RxErrUnknownNeighborCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "TH reads RxErrInvalidScrAddrCount attribute value from DUT and verify data type"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "TH reads RxErrSecCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "TH reads RxErrFcsCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "TH reads RxErrOtherCount attribute value from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ULABEL_1_1Suite : public TestCommand -{ -public: - Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::ClusterRevision::Id, true, - chip::NullOptional); + LogStep(1, "TH reads RxTotalCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the optional global attribute: FeatureMap"); + LogStep(2, "TH reads RxUnicastCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads RxBroadcastCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads RxDataCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxDataCount::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads RxDataPollCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads RxBeaconCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads RxBeaconRequestCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads RxOtherCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads RxAddressFilteredCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id, true, chip::NullOptional); + } + case 10: { + LogStep(10, "TH reads RxDestAddrFilteredCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads RxDuplicatedCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads RxErrNoFrameCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id, true, chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads RxErrUnknownNeighborCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads RxErrInvalidScrAddrCount attribute value from DUT and verify data type"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -35948,18 +35180,185 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } + case 15: { + LogStep(15, "TH reads RxErrSecCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads RxErrFcsCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id, true, chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads RxErrOtherCount attribute value from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, + ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_1_1Suite : public TestCommand +{ +public: + Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 7, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -35969,16 +35368,6 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } } return CHIP_NO_ERROR; } @@ -36939,18 +36328,16 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 23UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 26UL)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 11)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -37056,7 +36443,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand class Test_TC_WNCV_2_1Suite : public TestCommand { public: - Test_TC_WNCV_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_1", 26, credsIssuerConfig) + Test_TC_WNCV_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_1", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -37237,18 +36624,6 @@ class Test_TC_WNCV_2_1Suite : public TestCommand } break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::BitMask value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map16")); - VerifyOrReturn(CheckConstraintNotValue("value", value, 4096U)); - } - break; - case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -37258,7 +36633,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -37268,7 +36643,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -37278,7 +36653,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -37288,7 +36663,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -37298,7 +36673,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -37308,7 +36683,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -37318,7 +36693,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; - case 25: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -37444,64 +36819,49 @@ class Test_TC_WNCV_2_1Suite : public TestCommand true, chip::NullOptional); } case 16: { - LogStep(16, "3a.2: write a value into the RO mandatory attribute: SafetyStatus"); - VerifyOrDo(!ShouldSkip("A_SAFETYSTATUS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::BitMask value; - value = static_cast>(4096U); - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::SafetyStatus::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 17: { - LogStep(17, "3a.3: reads back the RO mandatory attribute: SafetyStatus"); - VerifyOrDo(!ShouldSkip("A_SAFETYSTATUS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::SafetyStatus::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "3b: read the RO optional attribute default: PhysicalClosedLimitLift"); + LogStep(16, "3b: read the RO optional attribute default: PhysicalClosedLimitLift"); VerifyOrDo(!ShouldSkip("A_PHYSICALCLOSEDLIMITLIFT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::PhysicalClosedLimitLift::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "3c: read the RO optional attribute default: PhysicalClosedLimitTilt"); + case 17: { + LogStep(17, "3c: read the RO optional attribute default: PhysicalClosedLimitTilt"); VerifyOrDo(!ShouldSkip("A_PHYSICALCLOSEDLIMITTILT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::PhysicalClosedLimitTilt::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "3d: read the RO optional attribute default: CurrentPositionLift"); + case 18: { + LogStep(18, "3d: read the RO optional attribute default: CurrentPositionLift"); VerifyOrDo(!ShouldSkip("A_CURRENTPOSITIONLIFT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionLift::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "3e: read the RO optional attribute default: CurrentPositionTilt"); + case 19: { + LogStep(19, "3e: read the RO optional attribute default: CurrentPositionTilt"); VerifyOrDo(!ShouldSkip("A_CURRENTPOSITIONTILT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "3f: read the RO optional attribute default: NumberOfActuationsLift"); + case 20: { + LogStep(20, "3f: read the RO optional attribute default: NumberOfActuationsLift"); VerifyOrDo(!ShouldSkip("A_NUMBEROFACTUATIONSLIFT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::NumberOfActuationsLift::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "3g: read the RO optional attribute default: NumberOfActuationsTilt"); + case 21: { + LogStep(21, "3g: read the RO optional attribute default: NumberOfActuationsTilt"); VerifyOrDo(!ShouldSkip("A_NUMBEROFACTUATIONSTILT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::NumberOfActuationsTilt::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "3h: read the RO optional attribute default: CurrentPositionLiftPercentage"); + case 22: { + LogStep(22, "3h: read the RO optional attribute default: CurrentPositionLiftPercentage"); VerifyOrDo(!ShouldSkip("A_CURRENTPOSITIONLIFTPERCENTAGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "3i:read the RO optional attribute default: CurrentPositionTiltPercentage"); + case 23: { + LogStep(23, "3i:read the RO optional attribute default: CurrentPositionTiltPercentage"); VerifyOrDo(!ShouldSkip("A_CURRENTPOSITIONTILTPERCENTAGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); @@ -40254,7 +39614,7 @@ class Test_TC_WNCV_4_3Suite : public TestCommand LogStep(2, "1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " "CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE"), + VerifyOrDo(!ShouldSkip("WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); @@ -88005,7 +87365,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 8df5eeab078aea..9e5427fa7410a3 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -99,7 +99,6 @@ class TestList : public Command { printf("Test_TC_MC_2_1\n"); printf("Test_TC_MC_3_2\n"); printf("Test_TC_MC_3_3\n"); - printf("Test_TC_MC_3_4\n"); printf("Test_TC_MC_3_5\n"); printf("Test_TC_MC_3_6\n"); printf("Test_TC_MC_3_7\n"); @@ -3094,40 +3093,30 @@ class Test_TC_BOOL_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 constraints : FeatureMap\n"); + err = TestReadTheGlobalAttributeConstraintsFeatureMap_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 EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_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 global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -3161,9 +3150,6 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -3177,7 +3163,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -3207,24 +3193,30 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); 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(@"Read the global attribute constraints : ClusterRevision Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -3260,16 +3252,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -3292,7 +3275,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -3315,12 +3298,12 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; @@ -3707,21 +3690,28 @@ class Test_TC_CC_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 constraints : FeatureMap\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeConstraintsFeatureMap_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"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + 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; case 6: ChipLogProgress(chipTool, @@ -3733,24 +3723,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { } err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -3772,7 +3744,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -3783,15 +3755,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -3805,7 +3768,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -3835,23 +3798,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -3859,50 +3805,30 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl 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 ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -3913,6 +3839,31 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(20))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 7UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 8UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 15UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 16384UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 16385UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 16386UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 16394UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 16395UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 16396UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 16397UL)); + VerifyOrReturn(CheckValue("", actualValue[14], 16400UL)); + VerifyOrReturn(CheckValue("", actualValue[15], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[16], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; @@ -3920,16 +3871,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -3947,7 +3889,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -3958,6 +3900,11 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -3965,12 +3912,12 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_9() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; @@ -19253,22 +19200,20 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : FeatureMap\n"); + err = TestReadTheGlobalAttributeConstraintsFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("FLW.S.A0003")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); @@ -19280,13 +19225,13 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -19354,7 +19299,7 @@ class Test_TC_FLW_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: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19370,31 +19315,59 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() @@ -19443,12 +19416,12 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; @@ -20915,8 +20888,8 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -20940,16 +20913,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { } err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -20982,9 +20945,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -20998,7 +20958,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -21028,24 +20988,30 @@ class Test_TC_I_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -21138,15 +21104,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_I_2_1 : public TestCommandBridge { @@ -22244,40 +22201,30 @@ class Test_TC_ILL_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 constraints : FeatureMap\n"); + err = TestReadTheGlobalAttributeConstraintsFeatureMap_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 EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_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 global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -22311,9 +22258,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -22327,7 +22271,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -22359,13 +22303,14 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22373,12 +22318,17 @@ 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -22420,16 +22370,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22454,7 +22395,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22479,12 +22420,12 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; @@ -22532,16 +22473,20 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); - err = TestThReadsMinMeasuredValueAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MeasuredValue attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThReadsMeasuredValueAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); - err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MinMeasuredValue attribute from DUT\n"); + err = TestThReadsMinMeasuredValueAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads MeasuredValue attribute from DUT\n"); - err = TestThReadsMeasuredValueAttributeFromDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads MaxMeasuredValue attribute from DUT\n"); + err = TestThReadsMaxMeasuredValueAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads Tolerance attribute from DUT\n"); @@ -22607,7 +22552,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22615,16 +22560,16 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); } NextTest(); @@ -22633,7 +22578,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22641,16 +22586,16 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); } NextTest(); @@ -22659,7 +22604,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_3() + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device @@ -22667,16 +22612,16 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); } NextTest(); @@ -22724,6 +22669,8 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintType("lightSensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("lightSensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("lightSensorType", [value unsignedCharValue], 254U)); } NextTest(); @@ -22776,12 +22723,12 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -22792,22 +22739,26 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_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(); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -22875,7 +22826,7 @@ class Test_TC_LVL_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: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22884,24 +22835,30 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -22921,21 +22878,10 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(14))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 10UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 11UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 12UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 13UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 14UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 15UL)); - VerifyOrReturn(CheckValue("", actualValue[13], 16384UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 15UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 17UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -22945,16 +22891,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -22985,27 +22922,37 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); 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 readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_LVL_2_1 : public TestCommandBridge { @@ -23232,6 +23179,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { value.ms = 100UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentLevelValue; CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { @@ -23250,6 +23198,10 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + { + CurrentLevelValue = value; + } + NextTest(); }]; @@ -23317,6 +23269,9 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); + NextTest(); }]; @@ -24265,64 +24220,76 @@ class Test_TC_LVL_3_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 the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); - err = TestWait100ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100 second\n"); + err = TestWait100Second_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 11000 second\n"); - err = TestWait11000Second_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads On Off Transition Time attribute from DUT\n"); + err = TestReadsOnOffTransitionTimeAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads On Off Transition Time attribute from DUT\n"); - err = TestReadsOnOffTransitionTimeAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait10000ms\n"); + err = TestWait10000ms_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OnOffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); - err = TestResetLevelTo254_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); - err = TestWait100ms_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reset level to 254\n"); + err = TestResetLevelTo254_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 100ms\n"); + err = TestWait100ms_18(); break; } @@ -24383,6 +24350,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -24396,7 +24372,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -24410,25 +24386,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheMinLevelAttribute_2() + CHIP_ERROR TestReadsTheMinLevelAttribute_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24446,7 +24404,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMaxLevelAttribute_3() + CHIP_ERROR TestReadsTheMaxLevelAttribute_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24464,7 +24422,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_4() + CHIP_ERROR TestSendsAMoveToLevelCommand_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24472,7 +24430,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:64U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionMask = [NSNumber numberWithUnsignedChar:1U]; params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params @@ -24487,21 +24445,21 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_5() + CHIP_ERROR TestWait100ms_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { CHIPDevice * device = GetDevice("alpha"); 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); + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24516,7 +24474,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_7() + CHIP_ERROR TestSendsAMoveToLevelCommand_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24524,7 +24482,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionMask = [NSNumber numberWithUnsignedChar:1U]; params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params @@ -24539,21 +24497,21 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait11000Second_8() + CHIP_ERROR TestWait100Second_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { CHIPDevice * device = GetDevice("alpha"); 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); + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24568,14 +24526,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_10() + CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads On Off Transition Time attribute from DUT Error: %@", err); + NSLog(@"Reads On Off Transition Time attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24586,7 +24544,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_11() + CHIP_ERROR TestSendsAMoveToLevelCommand_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24594,7 +24552,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; params.level = [NSNumber numberWithUnsignedChar:128U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; params.optionMask = [NSNumber numberWithUnsignedChar:1U]; params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params @@ -24609,21 +24567,21 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait10000ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 11000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_12() { CHIPDevice * device = GetDevice("alpha"); 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); + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24638,7 +24596,77 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_14() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_13() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAMoveToLevelCommand_14() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move to level command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait1000ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_16() + { + CHIPDevice * device = GetDevice("alpha"); + 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 64U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestResetLevelTo254_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24661,7 +24689,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_15() + CHIP_ERROR TestWait100ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; @@ -24712,60 +24740,68 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads max level attribute from DUT\n"); - err = TestReadsMaxLevelAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Minlevel attribute from DUT\n"); + err = TestReadsMinlevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); - err = TestSendsAMoveUpCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : user prompt message\n"); - err = TestUserPromptMessage_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); - err = TestWait3000ms_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : user prompt message\n"); + err = TestUserPromptMessage_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads min level attribute from DUT\n"); - err = TestReadsMinLevelAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 9000ms\n"); + err = TestWait9000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move down command\n"); - err = TestSendsAMoveDownCommand_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0003")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : user prompt message\n"); - err = TestUserPromptMessage_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : sends a MoveWithOnOff command\n"); + err = TestSendsAMoveWithOnOffCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); - err = TestWait5000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : user prompt message\n"); + err = TestUserPromptMessage_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); - err = TestReadsDefaultMoveRateAttributeFromDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.A0002")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move up command at default move rate\n"); - err = TestSendsAMoveUpCommandAtDefaultMoveRate_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : reads default move rate attribute from DUT\n"); + err = TestReadsDefaultMoveRateAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : sends a Move up command at default move rate\n"); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : user prompt message\n"); @@ -24870,9 +24906,55 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull MinlevelValue; + + CHIP_ERROR TestReadsMinlevelAttributeFromDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads Minlevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + { + MinlevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAMoveToLevelCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:1U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move to level command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24894,7 +24976,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_2() + CHIP_ERROR TestSendsAMoveUpCommand_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24917,7 +24999,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUserPromptMessage_3() + CHIP_ERROR TestUserPromptMessage_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -24927,21 +25009,21 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait3000ms_4() + CHIP_ERROR TestWait9000ms_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 9000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { CHIPDevice * device = GetDevice("alpha"); 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); + NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24955,54 +25037,29 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() + CHIP_ERROR TestSendsAMoveWithOnOffCommand_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads min level attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); - { - MinlevelValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsAMoveDownCommand_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + __auto_type * params = [[CHIPLevelControlClusterMoveWithOnOffParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedChar:64U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move down command Error: %@", err); + [cluster moveWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a MoveWithOnOff command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestUserPromptMessage_8() + CHIP_ERROR TestUserPromptMessage_9() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -25012,14 +25069,14 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWait5000ms_9() + CHIP_ERROR TestWait5000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25032,7 +25089,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 1U)); + VerifyOrReturn(CheckValue("current level", actualValue, MinlevelValue)); } VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); @@ -25045,7 +25102,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25070,7 +25127,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25093,32 +25150,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_13() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() - { - CHIPDevice * device = GetDevice("alpha"); - 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestUserPromptMessage_15() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -25202,56 +25240,48 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Minlevel attribute from DUT\n"); + err = TestReadsMinlevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to its lowest point\n"); - err = TestPreconditionDutLevelIsSetToItsLowestPoint_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends MoveToLevelWithOnOff command to DUT\n"); + err = TestSendsMoveToLevelWithOnOffCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); - err = TestWait3000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Sends step up command to DUT\n"); + err = TestSendsStepUpCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step up command to DUT\n"); - err = TestSendsStepUpCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 4000ms\n"); + err = TestWait4000ms_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 5000ms\n"); - err = TestWait5000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a StepWithOnOff command\n"); + err = TestSendsAStepWithOnOffCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step down command\n"); - err = TestSendsAStepDownCommand_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 4000ms\n"); + err = TestWait4000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); - err = TestWait4000ms_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reset level to 254\n"); + err = TestResetLevelTo254_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 254\n"); - err = TestResetLevelTo254_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); - err = TestWait100ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sending off command\n"); - err = TestSendingOffCommand_13(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 100ms\n"); + err = TestWait100ms_11(); break; } @@ -25300,12 +25330,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -25319,7 +25343,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -25332,57 +25356,53 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestSendingOnCommand_1() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending on command Error: %@", err); + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads Minlevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + { + MinlevelValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_2() { CHIPDevice * device = GetDevice("alpha"); 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:1U]; - params.stepSize = [NSNumber numberWithUnsignedChar:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to its lowest point Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:1U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + [cluster moveToLevelWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestWait3000ms_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } NSNumber * _Nonnull CurrentlevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25404,7 +25424,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepUpCommandToDut_5() + CHIP_ERROR TestSendsStepUpCommandToDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25413,9 +25433,9 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:0U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster stepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Sends step up command to DUT Error: %@", err); @@ -25428,14 +25448,14 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_6() + CHIP_ERROR TestWait4000ms_5() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; + value.ms = 4000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25446,46 +25466,48 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentlevelValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 65U)); + } + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepDownCommand_8() + CHIP_ERROR TestSendsAStepWithOnOffCommand_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; + __auto_type * params = [[CHIPLevelControlClusterStepWithOnOffParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:1U]; params.stepSize = [NSNumber numberWithUnsignedChar:64U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a Step down command Error: %@", err); + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + [cluster stepWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a StepWithOnOff command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait4000ms_9() + CHIP_ERROR TestWait4000ms_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 4000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25507,7 +25529,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_11() + CHIP_ERROR TestResetLevelTo254_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25530,29 +25552,12 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_12() + CHIP_ERROR TestWait100ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - - CHIP_ERROR TestSendingOffCommand_13() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_LVL_6_1 : public TestCommandBridge { @@ -25598,48 +25603,68 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Minlevel attribute from DUT\n"); + err = TestReadsMinlevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: set DUT to lowest point\n"); - err = TestPreconditionSetDutToLowestPoint_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends MoveToLevelWithOnOff command to DUT\n"); + err = TestSendsMoveToLevelWithOnOffCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 100ms\n"); - err = TestWait100ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a move up command to DUT\n"); + err = TestSendsAMoveUpCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends a move up command to DUT\n"); - err = TestSendsAMoveUpCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 5000ms\n"); + err = TestWait5000ms_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 2000ms\n"); - err = TestWait2000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends stop command to DUT\n"); + err = TestSendsStopCommandToDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Sends stop command to DUT\n"); - err = TestSendsStopCommandToDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : user prompt message\n"); + err = TestUserPromptMessage_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reset level to 254\n"); - err = TestResetLevelTo254_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a move up command to DUT\n"); + err = TestSendsAMoveUpCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100ms\n"); - err = TestWait100ms_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); - err = TestSendingOffCommand_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Sends stop command to DUT\n"); + err = TestSendsStopCommandToDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : user prompt message\n"); + err = TestUserPromptMessage_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsCurrentLevelAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); + err = TestResetLevelTo254_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); + err = TestWait100ms_15(); break; } @@ -25688,6 +25713,18 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -25701,7 +25738,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -25714,56 +25751,53 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestSendingOnCommand_1() + CHIP_ERROR TestReadsMinlevelAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending on command Error: %@", err); + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads Minlevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + { + MinlevelValue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSetDutToLowestPoint_2() + CHIP_ERROR TestSendsMoveToLevelWithOnOffCommandToDut_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:0U]; + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1U]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: set DUT to lowest point Error: %@", err); + [cluster moveToLevelWithOnOffWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends MoveToLevelWithOnOff command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestWait100ms_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25786,7 +25820,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_5() + CHIP_ERROR TestSendsAMoveUpCommandToDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25794,7 +25828,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionMask = [NSNumber numberWithUnsignedChar:1U]; params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveWithParams:params @@ -25809,14 +25843,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait2000ms_6() + CHIP_ERROR TestWait5000ms_5() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendsStopCommandToDut_7() + CHIP_ERROR TestSendsStopCommandToDut_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25837,6 +25871,14 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestUserPromptMessage_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the device has stopped transitioning.garbage: not in length on purpose", 60); + return UserPrompt("alpha", value); + } + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { CHIPDevice * device = GetDevice("alpha"); @@ -25848,6 +25890,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 25U)); + } + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); @@ -25856,52 +25903,118 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_9() + CHIP_ERROR TestSendsAMoveUpCommandToDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionMask = [NSNumber numberWithUnsignedChar:1U]; params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset level to 254 Error: %@", err); + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a move up command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_10() + CHIP_ERROR TestWait5000ms_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestSendingOffCommand_11() + CHIP_ERROR TestSendsStopCommandToDut_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending off command Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterStopParams alloc] init]; + params.optionMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends stop command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestUserPromptMessage_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the device has stopped transitioning.garbage: not in length on purpose", 60); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + { + CHIPDevice * device = GetDevice("alpha"); + 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 ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 50U)); + } + + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); + NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestResetLevelTo254_14() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:254U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset level to 254 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } }; class Test_TC_MC_1_1 : public TestCommandBridge { @@ -25947,22 +26060,16 @@ class Test_TC_MC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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"); @@ -25974,13 +26081,13 @@ class Test_TC_MC_1_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates either " - "value 0 or throws a general error if the attribute is not supported\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -26048,7 +26155,7 @@ class Test_TC_MC_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: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26064,7 +26171,30 @@ class Test_TC_MC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLowPower * cluster = [[CHIPTestLowPower 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26092,15 +26222,6 @@ class Test_TC_MC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); @@ -26148,8 +26269,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26206,47 +26326,34 @@ class Test_TC_MC_1_2 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - 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"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_KEYPADINPUT.S.NV || MC_KEYPADINPUT.S.LK || MC_KEYPADINPUT.S.NK")) { NextTest(); return; } + err = TestReadTheOptionalGlobalAttributeFeatureMap_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 EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_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 global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -26280,9 +26387,6 @@ class Test_TC_MC_1_2 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -26296,7 +26400,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -26326,24 +26430,30 @@ class Test_TC_MC_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -26378,16 +26488,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26411,7 +26512,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26435,7 +26536,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26492,52 +26593,46 @@ class Test_TC_MC_1_3 : 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 optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_APPLAUNCHER.S.AP")) { + NextTest(); + return; + } + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_APPLAUNCHER.S.A0000 && MC_APPLAUNCHER.S.A0001")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read attribute Feature map and verify that DUT response indicates that the FeatureMap " - "attribute has bit 0 set to 1 if the DUT supports the Application Platform feature (PICS_AP_S is true).\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -26571,9 +26666,6 @@ class Test_TC_MC_1_3 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -26587,7 +26679,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -26619,13 +26711,14 @@ class Test_TC_MC_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device @@ -26633,12 +26726,17 @@ class Test_TC_MC_1_3 : 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -26660,14 +26758,12 @@ class Test_TC_MC_1_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -26677,16 +26773,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device @@ -26714,7 +26801,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device @@ -26740,8 +26827,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -26798,44 +26884,38 @@ class Test_TC_MC_1_4 : 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 optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_MEDIAINPUT.S.NU")) { + NextTest(); + return; + } + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_MEDIAINPUT.S.A0000 && MC_MEDIAINPUT.S.A0001")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_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 global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read attribute Feature map and Verify that the DUT response indicates that the FeatureMap " - "attribute has bit 0 set to 1 if the DUT supports the Name Updates feature PICS_NU_S is true\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -26869,9 +26949,6 @@ class Test_TC_MC_1_4 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -26885,7 +26962,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -26915,24 +26992,30 @@ class Test_TC_MC_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -26952,14 +27035,12 @@ class Test_TC_MC_1_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -26969,16 +27050,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27005,7 +27077,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27028,8 +27100,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -27082,12 +27153,12 @@ class Test_TC_MC_1_5 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); - err = TestReadFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -27098,22 +27169,22 @@ class Test_TC_MC_1_5 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -27174,14 +27245,14 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan 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); + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27197,14 +27268,14 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27233,14 +27304,12 @@ class Test_TC_MC_1_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -27250,16 +27319,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27282,7 +27342,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27304,6 +27364,15 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_MC_1_6 : public TestCommandBridge { @@ -27353,53 +27422,46 @@ class Test_TC_MC_1_6 : 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 optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_CHANNEL.S.CL || MC_CHANNEL.S.LI")) { + NextTest(); + return; + } + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_CHANNEL.S.A0000 && MC_CHANNEL.S.A0001 && MC_CHANNEL.S.A0002")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response values based on " - "feature/PICS support Bit 0 - Set to 1 if the DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if " - "the DUT supports Lineup Info (PICS_LI_S is true)\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -27433,9 +27495,6 @@ class Test_TC_MC_1_6 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -27449,7 +27508,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -27479,24 +27538,30 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -27516,15 +27581,12 @@ class Test_TC_MC_1_6 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -27534,16 +27596,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27554,6 +27607,14 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 3UL)); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; @@ -27561,7 +27622,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27572,6 +27633,12 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -27579,8 +27646,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -27637,22 +27703,20 @@ class Test_TC_MC_1_7 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_MEDIAPLAYBACK.S.AS || MC_MEDIAPLAYBACK.S.VS")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_2(); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); @@ -27672,14 +27736,13 @@ class Test_TC_MC_1_7 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT values based on feature/PICS " - "support:Bit 0 - Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the " - "DUT supports Variable Speed (PICS_VARIABLESPEED is true)\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -27763,7 +27826,30 @@ class Test_TC_MC_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27776,19 +27862,13 @@ class Test_TC_MC_1_7 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(12))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -27798,15 +27878,6 @@ class Test_TC_MC_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); @@ -27820,18 +27891,10 @@ class Test_TC_MC_1_7 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(11))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 5UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 6UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 7UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 8UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 9UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 11UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -27865,8 +27928,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -27923,52 +27985,48 @@ class Test_TC_MC_1_8 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - 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"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestReadTheGlobalAttributeAttributeList_2(); break; - case 4: + case 3: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 7: + case 6: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the " + " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the " "device supports Name Updates PICS_NAMEUPDATES is true\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_6(); break; } @@ -28002,9 +28060,6 @@ class Test_TC_MC_1_8 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28018,7 +28073,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -28048,23 +28103,6 @@ class Test_TC_MC_1_8 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -28072,7 +28110,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28102,7 +28140,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28111,7 +28149,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28135,7 +28173,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -28160,7 +28198,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { } CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7() + TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28217,26 +28255,24 @@ class Test_TC_MC_1_9 : 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 optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("MC_TGTNAV.S.A0001")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!MC_TGTNAV.S.A0001")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); @@ -28252,13 +28288,13 @@ class Test_TC_MC_1_9 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a " - "general error if the attribute is not supported..\n"); + " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); break; } @@ -28338,24 +28374,30 @@ class Test_TC_MC_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -28392,13 +28434,33 @@ class Test_TC_MC_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() @@ -28449,8 +28511,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28503,7 +28564,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: @@ -28512,37 +28573,29 @@ class Test_TC_MC_1_10 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && MC_APBSC.S.A0000 && MC_APBSC.S.A0001 && MC_APBSC.S.A0003")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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: AcceptedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_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 global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -28612,7 +28665,7 @@ class Test_TC_MC_1_10 : 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: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28688,16 +28741,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -28712,9 +28756,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -28724,7 +28766,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -28739,8 +28781,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 2UL)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -28749,6 +28790,15 @@ class Test_TC_MC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_MC_1_11 : public TestCommandBridge { @@ -28798,53 +28848,46 @@ class Test_TC_MC_1_11 : 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 optional global attribute: FeatureMap\n"); + if (ShouldSkip("MC_CONTENTLAUNCHER.S.CS || MC_CONTENTLAUNCHER.S.UP")) { + NextTest(); + return; + } + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip("MC_CONTENTLAUNCHER.S.A0000 && MC_CONTENTLAUNCHER.S.A0001")) { NextTest(); return; } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT values based on feature/PICS support: Bit 0 - Set to " - "1 if the DUT supports Content Search (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL " - "Playback (PICS_URLPLAYBACK is true)\n"); + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -28878,9 +28921,6 @@ class Test_TC_MC_1_11 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28894,7 +28934,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -28924,24 +28964,30 @@ class Test_TC_MC_1_11 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -28978,16 +29024,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29000,8 +29037,9 @@ class Test_TC_MC_1_11 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -29011,7 +29049,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -29025,7 +29063,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[0], 2UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -29035,8 +29073,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29093,18 +29130,12 @@ class Test_TC_MC_1_12 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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"); @@ -29123,13 +29154,14 @@ class Test_TC_MC_1_12 : public TestCommandBridge { err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -29213,7 +29245,30 @@ class Test_TC_MC_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -29241,15 +29296,6 @@ class Test_TC_MC_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); @@ -29300,7 +29346,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29927,11 +29973,11 @@ class Test_TC_MC_3_3 : public TestCommandBridge { } }; -class Test_TC_MC_3_4 : public TestCommandBridge { +class Test_TC_MC_3_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_4() - : TestCommandBridge("Test_TC_MC_3_4") + Test_TC_MC_3_5() + : TestCommandBridge("Test_TC_MC_3_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29941,7 +29987,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_4() {} + ~Test_TC_MC_3_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29949,11 +29995,11 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29970,84 +30016,264 @@ class Test_TC_MC_3_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read CatalogList attribute.\n"); + err = TestReadCatalogListAttribute_1(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_2(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_3(); + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_4(); + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadCatalogListAttribute_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CatalogList attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("catalogList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_3_6 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_6() + : TestCommandBridge("Test_TC_MC_3_6") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_3_6() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends same KeyPad input codes to DUT\n"); + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Current App ID attribute.\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_5(); + err = TestReadCurrentAppIdAttribute_1(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_6(); + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadCurrentAppIdAttribute_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentAppWithCompletionHandler:^( + CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Current App ID attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentApp", "", "ApplicationEP")); } - err = TestThSendsSameKeyPadInputCodesToDut_7(); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_3_7 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_7() + : TestCommandBridge("Test_TC_MC_3_7") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_3_7() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends same KeyPad input codes to DUT\n"); + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_8(); + err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends same KeyPad input codes to DUT\n"); + case 2: + ChipLogProgress( + chipTool, " ***** Test Step 2 : TH sends a LaunchApp command to DUT to launch an app which is not available\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_9(); + err = TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends same KeyPad input codes to DUT\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Launch an app with the provided a application ID\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_10(); + err = TestLaunchAnAppWithTheProvidedAApplicationId_3(); break; } @@ -30072,27 +30298,6 @@ class Test_TC_MC_3_4 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -30106,7 +30311,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -30120,212 +30325,296 @@ class Test_TC_MC_3_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_1() + CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - return CHIP_NO_ERROR; - } + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch an app with the provided a application ID Error: %@", err); - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_3() + CHIP_ERROR TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"NonAvailableApp"; - return CHIP_NO_ERROR; - } + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends a LaunchApp command to DUT to launch an app which is not available Error: %@", err); - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_5() + CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp2"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch an app with the provided a application ID Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } + + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_6() +class Test_TC_MC_3_8 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_8() + : TestCommandBridge("Test_TC_MC_3_8") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + ~Test_TC_MC_3_8() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - NextTest(); - }]; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); + } - return CHIP_NO_ERROR; - } + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + Wait(); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Stop an app with the provided application ID\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestStopAnAppWithTheProvidedApplicationId_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheStatusAttribute_2(); + break; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - NextTest(); - }]; + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_8() + chip::System::Clock::Timeout GetWaitDuration() const override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; - NextTest(); - }]; + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - return CHIP_NO_ERROR; + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_9() + CHIP_ERROR TestStopAnAppWithTheProvidedApplicationId_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + __auto_type * params = [[CHIPApplicationLauncherClusterStopAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + stopAppWithParams:params + completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Stop an app with the provided application ID Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_10() + CHIP_ERROR TestReadsTheStatusAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9U]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_5 : public TestCommandBridge { +class Test_TC_MC_3_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_5() - : TestCommandBridge("Test_TC_MC_3_5") + Test_TC_MC_3_9() + : TestCommandBridge("Test_TC_MC_3_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30335,7 +30624,7 @@ class Test_TC_MC_3_5 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_5() {} + ~Test_TC_MC_3_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30343,11 +30632,11 @@ class Test_TC_MC_3_5 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30364,8 +30653,20 @@ class Test_TC_MC_3_5 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read CatalogList attribute.\n"); - err = TestReadCatalogListAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends HideApp command to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsHideAppCommandToDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheStatusAttribute_2(); break; } @@ -30384,6 +30685,9 @@ class Test_TC_MC_3_5 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30397,7 +30701,7 @@ class Test_TC_MC_3_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -30411,7 +30715,7 @@ class Test_TC_MC_3_5 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCatalogListAttribute_1() + CHIP_ERROR TestThSendsHideAppCommandToDut_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device @@ -30419,12 +30723,43 @@ class Test_TC_MC_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CatalogList attribute. Error: %@", err); + __auto_type * params = [[CHIPApplicationLauncherClusterHideAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + + [cluster + hideAppWithParams:params + completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends HideApp command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheStatusAttribute_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("catalogList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + NextTest(); }]; @@ -30432,11 +30767,11 @@ class Test_TC_MC_3_5 : public TestCommandBridge { } }; -class Test_TC_MC_3_6 : public TestCommandBridge { +class Test_TC_MC_3_10 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_6() - : TestCommandBridge("Test_TC_MC_3_6") + Test_TC_MC_3_10() + : TestCommandBridge("Test_TC_MC_3_10") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30446,7 +30781,7 @@ class Test_TC_MC_3_6 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_6() {} + ~Test_TC_MC_3_10() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30454,11 +30789,11 @@ class Test_TC_MC_3_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30475,12 +30810,8 @@ class Test_TC_MC_3_6 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Current App ID attribute.\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadCurrentAppIdAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; } @@ -30526,29 +30857,18 @@ class Test_TC_MC_3_6 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCurrentAppIdAttribute_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletionHandler:^( - CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Current App ID attribute. Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentApp", "", "ApplicationEP")); - } - + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); NextTest(); }]; @@ -30556,11 +30876,11 @@ class Test_TC_MC_3_6 : public TestCommandBridge { } }; -class Test_TC_MC_3_7 : public TestCommandBridge { +class Test_TC_MC_3_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_7() - : TestCommandBridge("Test_TC_MC_3_7") + Test_TC_MC_3_11() + : TestCommandBridge("Test_TC_MC_3_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30570,7 +30890,7 @@ class Test_TC_MC_3_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_7() {} + ~Test_TC_MC_3_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30578,11 +30898,11 @@ class Test_TC_MC_3_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30599,29 +30919,24 @@ class Test_TC_MC_3_7 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : TH sends a LaunchApp command to DUT to launch an app which is not available\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2(); + err = TestSelectInputCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Launch an app with the provided a application ID\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestLaunchAnAppWithTheProvidedAApplicationId_3(); + err = TestReadCurrentInputList_3(); break; } @@ -30673,129 +30988,72 @@ class Test_TC_MC_3_7 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + return CHIP_NO_ERROR; + } - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2() + CHIP_ERROR TestSelectInputCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"NonAvailableApp"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends a LaunchApp command to DUT to launch an app which is not available Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + [cluster selectInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Select Input Command Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_3() + CHIP_ERROR TestReadCurrentInputList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp2"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current input list Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_8 : public TestCommandBridge { +class Test_TC_MC_3_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_8() - : TestCommandBridge("Test_TC_MC_3_8") + Test_TC_MC_3_12() + : TestCommandBridge("Test_TC_MC_3_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30805,7 +31063,7 @@ class Test_TC_MC_3_8 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_8() {} + ~Test_TC_MC_3_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30813,11 +31071,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30834,20 +31092,20 @@ class Test_TC_MC_3_8 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Stop an app with the provided application ID\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStopAnAppWithTheProvidedApplicationId_1(); + err = TestHideInputStatusCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheStatusAttribute_2(); + err = TestShowInputStatusCommand_2(); break; } @@ -30896,61 +31154,34 @@ class Test_TC_MC_3_8 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStopAnAppWithTheProvidedApplicationId_1() + CHIP_ERROR TestHideInputStatusCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterStopAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - - [cluster - stopAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop an app with the provided application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Hide Input Status Command Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestShowInputStatusCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - NextTest(); }]; @@ -30958,11 +31189,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { } }; -class Test_TC_MC_3_9 : public TestCommandBridge { +class Test_TC_MC_3_13 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_9() - : TestCommandBridge("Test_TC_MC_3_9") + Test_TC_MC_3_13() + : TestCommandBridge("Test_TC_MC_3_13") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30972,7 +31203,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_9() {} + ~Test_TC_MC_3_13() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30980,11 +31211,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31001,20 +31232,28 @@ class Test_TC_MC_3_9 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends HideApp command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsHideAppCommandToDut_1(); + err = TestRenameInputCommand_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Input Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheStatusAttribute_2(); + err = TestRenameInputCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_4(); break; } @@ -31036,6 +31275,12 @@ class Test_TC_MC_3_9 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31049,7 +31294,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -31063,51 +31308,78 @@ class Test_TC_MC_3_9 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsHideAppCommandToDut_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterHideAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - [cluster - hideAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends HideApp command to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRenameInputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A1"; + [cluster renameInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestRenameInputCommand_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A2"; + [cluster renameInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeMediaInputList_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); NextTest(); }]; @@ -31115,11 +31387,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } }; -class Test_TC_MC_3_10 : public TestCommandBridge { +class Test_TC_MC_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_10() - : TestCommandBridge("Test_TC_MC_3_10") + Test_TC_MC_5_1() + : TestCommandBridge("Test_TC_MC_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31129,7 +31401,7 @@ class Test_TC_MC_3_10 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_10() {} + ~Test_TC_MC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31137,11 +31409,11 @@ class Test_TC_MC_3_10 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31158,8 +31430,8 @@ class Test_TC_MC_3_10 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); break; } @@ -31205,18 +31477,18 @@ class Test_TC_MC_3_10 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; @@ -31224,21 +31496,23 @@ class Test_TC_MC_3_10 : public TestCommandBridge { } }; -class Test_TC_MC_3_11 : public TestCommandBridge { +class Test_TC_MC_5_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_11() - : TestCommandBridge("Test_TC_MC_3_11") + Test_TC_MC_5_2() + : TestCommandBridge("Test_TC_MC_5_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_11() {} + ~Test_TC_MC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31246,11 +31520,11 @@ class Test_TC_MC_3_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31267,24 +31541,28 @@ class Test_TC_MC_3_11 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); + err = TestReadsTheChannelListAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSelectInputCommand_2(); + err = TestThSendsAChangeChannelByNumberCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); + err = TestLogACommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadCurrentInputList_3(); + err = TestReadsTheCurrentChannelAttribute_4(); break; } @@ -31309,6 +31587,9 @@ class Test_TC_MC_3_11 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31322,11 +31603,13 @@ class Test_TC_MC_3_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -31336,58 +31619,70 @@ class Test_TC_MC_3_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheChannelListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSelectInputCommand_2() + CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; + params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] + : [NSNumber numberWithUnsignedShort:2U]; + [cluster changeChannelByNumberWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentInputList_3() + CHIP_ERROR TestLogACommand_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current input list Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); } NextTest(); @@ -31397,21 +31692,23 @@ class Test_TC_MC_3_11 : public TestCommandBridge { } }; -class Test_TC_MC_3_12 : public TestCommandBridge { +class Test_TC_MC_5_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_12() - : TestCommandBridge("Test_TC_MC_3_12") + Test_TC_MC_5_3() + : TestCommandBridge("Test_TC_MC_5_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_12() {} + ~Test_TC_MC_5_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31419,11 +31716,11 @@ class Test_TC_MC_3_12 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31440,20 +31737,36 @@ class Test_TC_MC_3_12 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestHideInputStatusCommand_1(); + err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestShowInputStatusCommand_2(); + err = TestSendsASkipChannelCommandToTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); + err = TestLogACommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); break; } @@ -31475,6 +31788,15 @@ class Test_TC_MC_3_12 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31488,11 +31810,13 @@ class Test_TC_MC_3_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -31502,73 +31826,135 @@ class Test_TC_MC_3_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestHideInputStatusCommand_1() + CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Hide Input Status Command Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + CHIPChannelClusterChannelInfo * _Nullable currentChannelvalue; - CHIP_ERROR TestShowInputStatusCommand_2() + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Show Input Status Command Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } + { + currentChannelvalue = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MC_3_13 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_13() - : TestCommandBridge("Test_TC_MC_3_13") - , mTestIndex(0) + CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~Test_TC_MC_3_13() {} + __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; + params.count = [NSNumber numberWithUnsignedShort:1U]; + [cluster skipChannelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); - } + NextTest(); + }]; - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + return CHIP_NO_ERROR; + } - Wait(); + CHIP_ERROR TestLogACommand_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_7_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_7_1() + : TestCommandBridge("Test_TC_MC_7_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_7_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); // Ensure we increment mTestIndex before we start running the relevant // command. That way if we lose the timeslice after we send the message @@ -31580,28 +31966,24 @@ class Test_TC_MC_3_13 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); + err = TestReadsTheOutputListAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestRenameInputCommand_2(); + err = TestSendsASelectAudioOutputCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Input Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestRenameInputCommand_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_4(); + err = TestReadsTheCurrentOutputAttribute_3(); break; } @@ -31626,9 +32008,6 @@ class Test_TC_MC_3_13 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31642,7 +32021,7 @@ class Test_TC_MC_3_13 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -31656,78 +32035,60 @@ class Test_TC_MC_3_13 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheOutputListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OutputList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A1"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRenameInputCommand_3() + CHIP_ERROR TestSendsASelectAudioOutputCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + __auto_type * params = [[CHIPAudioOutputClusterSelectOutputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A2"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster selectOutputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a SelectAudioOutput command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeMediaInputList_4() + CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentOutput attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); + } + NextTest(); }]; @@ -31735,11 +32096,11 @@ class Test_TC_MC_3_13 : public TestCommandBridge { } }; -class Test_TC_MC_5_1 : public TestCommandBridge { +class Test_TC_MC_7_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_1() - : TestCommandBridge("Test_TC_MC_5_1") + Test_TC_MC_7_2() + : TestCommandBridge("Test_TC_MC_7_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31749,7 +32110,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_1() {} + ~Test_TC_MC_7_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31757,11 +32118,11 @@ class Test_TC_MC_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31778,8 +32139,26 @@ class Test_TC_MC_5_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute from the DUT\n"); + err = TestReadsTheOutputListAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a RenameOutput command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendsARenameOutputCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Reads the OutputList attribute from the DUT Verify that the output at the index provided in " + "step 2 has the name CertTest\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); break; } @@ -31798,6 +32177,12 @@ class Test_TC_MC_5_1 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31811,7 +32196,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -31824,43 +32209,78 @@ class Test_TC_MC_5_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestReadsTheOutputListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + { + audioOutputListValues = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestSendsARenameOutputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAudioOutputClusterRenameOutputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"CertTest"; + [cluster renameOutputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a RenameOutput command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_MC_5_2 : public TestCommandBridge { +class Test_TC_MC_8_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_2() - : TestCommandBridge("Test_TC_MC_5_2") + Test_TC_MC_8_1() + : TestCommandBridge("Test_TC_MC_8_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); + AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); + AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_2() {} + ~Test_TC_MC_8_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31868,11 +32288,11 @@ class Test_TC_MC_5_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31889,28 +32309,48 @@ class Test_TC_MC_5_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); - err = TestReadsTheChannelListAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); + err = TestReadsTheCurrentTargetAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); + err = TestReadsTheTargetListAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsAChangeChannelByNumberCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); - err = TestLogACommand_3(); + err = TestSendsANavigateTargetCommand_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheCurrentChannelAttribute_4(); + err = TestReadsTheCurrentTargetAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the TargetList attribute\n"); + err = TestReadsTheTargetListAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a NavigateTarget command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendsANavigateTargetCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentTarget attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheCurrentTargetAttribute_7(); break; } @@ -31938,6 +32378,15 @@ class Test_TC_MC_5_2 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31951,13 +32400,13 @@ class Test_TC_MC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; + chip::Optional mTargetvalue1; + chip::Optional mTargetvalue2; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -31967,70 +32416,155 @@ class Test_TC_MC_5_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttribute_1() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } + NSArray * _Nonnull TargetListValues; - CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() + CHIP_ERROR TestReadsTheTargetListAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; - params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] - : [NSNumber numberWithUnsignedShort:1U]; - params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] - : [NSNumber numberWithUnsignedShort:2U]; - [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + { + TargetListValues = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_3() + CHIP_ERROR TestSendsANavigateTargetCommand_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheTargetListAttribute_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsANavigateTargetCommand_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] + : [NSNumber numberWithUnsignedChar:2U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); } NextTest(); @@ -32040,23 +32574,21 @@ class Test_TC_MC_5_2 : public TestCommandBridge { } }; -class Test_TC_MC_5_3 : public TestCommandBridge { +class Test_TC_MC_9_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_3() - : TestCommandBridge("Test_TC_MC_5_3") + Test_TC_MC_9_1() + : TestCommandBridge("Test_TC_MC_9_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_3() {} + ~Test_TC_MC_9_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32064,11 +32596,11 @@ class Test_TC_MC_5_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32085,36 +32617,40 @@ class Test_TC_MC_5_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); + err = TestPrecondition_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); + err = TestReadsTheVendorNameAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsASkipChannelCommandToTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); + err = TestReadsTheVendorIDAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); - err = TestLogACommand_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); + err = TestReadsTheApplicationNameAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); + err = TestReadsTheProductIDAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Application attribute\n"); + err = TestReadsTheApplicationAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the Status attribute\n"); + err = TestReadsTheStatusAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the ApplicationVersion attribute\n"); + err = TestReadsTheApplicationVersionAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the AllowedVendorList attribute\n"); + err = TestReadsTheAllowedVendorListAttribute_9(); break; } @@ -32145,6 +32681,18 @@ class Test_TC_MC_5_3 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32158,13 +32706,11 @@ class Test_TC_MC_5_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -32174,269 +32720,173 @@ class Test_TC_MC_5_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestPrecondition_1() + { + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); + return Log("alpha", value); + } + + CHIP_ERROR TestReadsTheVendorNameAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIPChannelClusterChannelInfo * _Nullable currentChannelvalue; - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() + CHIP_ERROR TestReadsTheVendorIDAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - } - { - currentChannelvalue = value; - } - + VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() + CHIP_ERROR TestReadsTheApplicationNameAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; - params.count = [NSNumber numberWithUnsignedShort:1U]; - [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationName attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationName", [value length], 256)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + CHIP_ERROR TestReadsTheProductIDAttribute_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ProductID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); - } - + VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_MC_7_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_7_1() - : TestCommandBridge("Test_TC_MC_7_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MC_7_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); - err = TestReadsTheOutputListAttribute_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsASelectAudioOutputCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentOutputAttribute_3(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadsTheApplicationAttribute_6() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + [cluster readAttributeApplicationWithCompletionHandler:^( + CHIPApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Application attribute Error: %@", err); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + VerifyOrReturn(CheckConstraintType("application", "", "struct")); + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOutputListAttribute_1() + CHIP_ERROR TestReadsTheStatusAttribute_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OutputList attribute Error: %@", err); + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASelectAudioOutputCommand_2() + CHIP_ERROR TestReadsTheApplicationVersionAttribute_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAudioOutputClusterSelectOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - [cluster selectOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SelectAudioOutput command Error: %@", err); + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", [value length], 32)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() + CHIP_ERROR TestReadsTheAllowedVendorListAttribute_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentOutput attribute Error: %@", err); + [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); - } - + VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); NextTest(); }]; @@ -32444,11 +32894,11 @@ class Test_TC_MC_7_1 : public TestCommandBridge { } }; -class Test_TC_MC_7_2 : public TestCommandBridge { +class Test_TC_MC_10_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_7_2() - : TestCommandBridge("Test_TC_MC_7_2") + Test_TC_MC_10_1() + : TestCommandBridge("Test_TC_MC_10_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -32458,7 +32908,7 @@ class Test_TC_MC_7_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_7_2() {} + ~Test_TC_MC_10_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32466,11 +32916,11 @@ class Test_TC_MC_7_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32487,26 +32937,12 @@ class Test_TC_MC_7_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute from the DUT\n"); - err = TestReadsTheOutputListAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the AcceptHeader attribute from the DUT\n"); + err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a RenameOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsARenameOutputCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Reads the OutputList attribute from the DUT Verify that the output at the index provided in " - "step 2 has the name CertTest\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); + err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); break; } @@ -32528,9 +32964,6 @@ class Test_TC_MC_7_2 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -32544,7 +32977,7 @@ class Test_TC_MC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -32557,78 +32990,60 @@ class Test_TC_MC_7_2 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestReadsTheOutputListAttributeFromTheDut_1() + CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); + [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); - { - audioOutputListValues = value; - } - + VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsARenameOutputCommand_2() + CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAudioOutputClusterRenameOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"CertTest"; - [cluster renameOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a RenameOutput command Error: %@", err); + [cluster + readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_MC_8_1 : public TestCommandBridge { +class Test_TC_MOD_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_8_1() - : TestCommandBridge("Test_TC_MC_8_1") + Test_TC_MOD_1_1() + : TestCommandBridge("Test_TC_MOD_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); - AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_8_1() {} + ~Test_TC_MOD_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32636,11 +33051,11 @@ class Test_TC_MC_8_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32657,48 +33072,38 @@ class Test_TC_MC_8_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); - err = TestReadsTheCurrentTargetAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); - err = TestReadsTheTargetListAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSendsANavigateTargetCommand_3(); + err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentTargetAttribute_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the TargetList attribute\n"); - err = TestReadsTheTargetListAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a NavigateTarget command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsANavigateTargetCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentTargetAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -32732,9 +33137,6 @@ class Test_TC_MC_8_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -32748,13 +33150,11 @@ class Test_TC_MC_8_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -32764,157 +33164,134 @@ class Test_TC_MC_8_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - NSArray * _Nonnull TargetListValues; - CHIP_ERROR TestReadsTheTargetListAttribute_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); { - TargetListValues = value; + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsANavigateTargetCommand_3() + CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] - : [NSNumber numberWithUnsignedChar:1U]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheTargetListAttribute_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsANavigateTargetCommand_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] - : [NSNumber numberWithUnsignedChar:2U]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -32922,21 +33299,23 @@ class Test_TC_MC_8_1 : public TestCommandBridge { } }; -class Test_TC_MC_9_1 : public TestCommandBridge { +class Test_TC_MF_1_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_9_1() - : TestCommandBridge("Test_TC_MC_9_1") + Test_TC_MF_1_3() + : TestCommandBridge("Test_TC_MF_1_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_9_1() {} + ~Test_TC_MF_1_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32944,11 +33323,11 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32961,44 +33340,67 @@ class Test_TC_MC_9_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); + err = TestStopTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); - err = TestPrecondition_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); + err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); - err = TestReadsTheVendorNameAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); - err = TestReadsTheVendorIDAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); - err = TestReadsTheApplicationNameAttribute_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); - err = TestReadsTheProductIDAttribute_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Application attribute\n"); - err = TestReadsTheApplicationAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); + err = TestCommissionFromBeta_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the Status attribute\n"); - err = TestReadsTheStatusAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the ApplicationVersion attribute\n"); - err = TestReadsTheApplicationVersionAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); + err = TestQueryFabricsList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the AllowedVendorList attribute\n"); - err = TestReadsTheAllowedVendorListAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); + err = TestQueryFabricsList_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); break; } @@ -33041,6 +33443,18 @@ class Test_TC_MC_9_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -33054,187 +33468,277 @@ class Test_TC_MC_9_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 14; chip::Optional mNodeId; - chip::Optional mCluster; + chip::Optional mNodeId2; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStopTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } + + CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start("alpha", value); + } + + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPrecondition_1() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); - return Log("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" + "\360,D4\362\275\322z\244\371\316\247\015s\216L" + length:97]; + params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] + : [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheVendorNameAttribute_2() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorName attribute Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheVendorIDAttribute_3() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorID attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); + } + + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationNameAttribute_4() + CHIP_ERROR TestCommissionFromBeta_6() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + return PairWithCode("beta", value); + } + + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee("beta", value); + } + + CHIP_ERROR TestQueryFabricsList_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationName attribute Error: %@", err); + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query fabrics list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationName", [value length], 256)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheProductIDAttribute_5() + CHIP_ERROR TestQueryFabricsList_9() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("beta"); + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ProductID attribute Error: %@", err); + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:false]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query fabrics list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationAttribute_6() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletionHandler:^( - CHIPApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Application attribute Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest1"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "", "struct")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_7() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest1")); + } + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationVersionAttribute_8() + CHIP_ERROR TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest2"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", [value length], 32)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAllowedVendorListAttribute_9() + CHIP_ERROR TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest2")); + } + + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; @@ -33242,21 +33746,23 @@ class Test_TC_MC_9_1 : public TestCommandBridge { } }; -class Test_TC_MC_10_1 : public TestCommandBridge { +class Test_TC_MF_1_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_10_1() - : TestCommandBridge("Test_TC_MC_10_1") + Test_TC_MF_1_4() + : TestCommandBridge("Test_TC_MF_1_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_10_1() {} + ~Test_TC_MF_1_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33264,11 +33770,11 @@ class Test_TC_MC_10_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33281,463 +33787,67 @@ class Test_TC_MC_10_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); + err = TestStopTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the AcceptHeader attribute from the DUT\n"); - err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); + err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); - err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MOD_1_1() - : TestCommandBridge("Test_TC_MOD_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MOD_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsTheAttributeListAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "", "map8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); - } - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MF_1_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_3() - : TestCommandBridge("Test_TC_MF_1_3") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MF_1_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); - err = TestStopTargetDevice_0(); - break; - case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); - err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); - err = TestCommissionFromBeta_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); - err = TestQueryFabricsList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); - err = TestQueryFabricsList_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); + err = TestCommissionFromBeta_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); + err = TestQueryFabricsList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); + err = TestQueryFabricsList_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); break; } @@ -33843,26 +33953,16 @@ class Test_TC_MF_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326" - "\360,D4\362\275\322z\244\371\316\247\015s\216L" - length:97]; - params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] - : [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -33900,11 +34000,6 @@ class Test_TC_MF_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); - } - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); @@ -33917,7 +34012,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode("beta", value); } @@ -33967,7 +34062,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:false]; + params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Query fabrics list Error: %@", err); @@ -33976,11 +34071,9 @@ class Test_TC_MF_1_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValueAsString("Label", ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); } VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); @@ -33997,7 +34090,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; - nodeLabelArgument = @"chiptest1"; + nodeLabelArgument = @"chiptest"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " @@ -34023,11 +34116,6 @@ class Test_TC_MF_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest1")); - } - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); @@ -34036,17 +34124,17 @@ class Test_TC_MF_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() { CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nodeLabelArgument; - nodeLabelArgument = @"chiptest2"; + nodeLabelArgument = @"chiptest"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " @"Error: %@", err); @@ -34058,22 +34146,17 @@ class Test_TC_MF_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() { CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest2")); - } - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); @@ -34083,23 +34166,25 @@ class Test_TC_MF_1_3 : public TestCommandBridge { } }; -class Test_TC_MF_1_4 : public TestCommandBridge { +class Test_TC_MF_1_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_4() - : TestCommandBridge("Test_TC_MF_1_4") + Test_TC_MF_1_5() + : TestCommandBridge("Test_TC_MF_1_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_4() {} + ~Test_TC_MF_1_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34107,11 +34192,11 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34124,446 +34209,24 @@ class Test_TC_MF_1_4 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); - err = TestStopTargetDevice_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); - err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); + err = TestWaitForPixitCommWin18010Seconds_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); - err = TestCommissionFromBeta_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); - err = TestQueryFabricsList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); - err = TestQueryFabricsList_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; - - chip::Optional mNodeId; - chip::Optional mNodeId2; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - CHIP_ERROR TestStopTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } - - CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start("alpha", value); - } - - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCommissionFromBeta_6() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee("beta", value); - } - - CHIP_ERROR TestQueryFabricsList_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } - - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryFabricsList_9() - { - CHIPDevice * device = GetDevice("beta"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } - - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() - { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() - { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MF_1_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_5() - : TestCommandBridge("Test_TC_MF_1_5") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MF_1_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); - err = TestRebootTargetDevice_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); - err = TestWaitForPixitCommWin18010Seconds_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a new commissioning window on DUT_CE\n"); @@ -37197,48 +36860,30 @@ class Test_TC_OCC_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 constraints : FeatureMap\n"); + err = TestReadTheGlobalAttributeConstraintsFeatureMap_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(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); - break; - case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_7(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9(); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -37261,7 +36906,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -37272,15 +36917,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -37294,7 +36930,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -37326,25 +36962,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -37352,30 +36969,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -37383,23 +36977,24 @@ class Test_TC_OCC_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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -37412,6 +37007,19 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(8))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; @@ -37419,7 +37027,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -37428,505 +37036,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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 ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_OCC_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_2_1() - : TestCommandBridge("Test_TC_OCC_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); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OCC_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Writes the respective default value to mandatory attribute: Occupancy\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: Occupancy\n"); - err = TestReadsBackMandatoryAttributeOccupancy_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attribute: OccupancySensorType\n"); - err = TestReadsMandatoryAttributeOccupancySensorType_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attribute constrains: OccupancySensorType\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Writes the respective default value to mandatory attribute: OccupancySensorType\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back mandatory attribute: OccupancySensorType\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorType_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads back mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Writes the respective default value to optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads back optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads back optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18(); - break; - case 19: - ChipLogProgress( - chipTool, " ***** Test Step 19 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Writes the respective default value to optional attribute: " - "PIRUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22(); - break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Writes the respective default value to optional attribute: " - "UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25(); - break; - case 26: - ChipLogProgress(chipTool, - " ***** Test Step 26 : Writes the respective default value to optional attribute: " - "UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read back attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28(); - break; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Writes the respective default value to optional attribute: " - "UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31(); - break; - case 32: - ChipLogProgress( - chipTool, " ***** Test Step 32 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32(); - break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Writes the respective default value to optional attribute: " - "PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33(); - break; - case 34: - ChipLogProgress( - chipTool, " ***** Test Step 34 : Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35(); - break; - case 36: - ChipLogProgress( - chipTool, " ***** Test Step 36 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36(); - break; - case 37: - ChipLogProgress(chipTool, - " ***** Test Step 37 : Writes the respective default value to optional attribute: " - "PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37(); - break; - case 38: - ChipLogProgress( - chipTool, " ***** Test Step 38 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38(); - break; - case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39(); - break; - case 40: - ChipLogProgress(chipTool, - " ***** Test Step 40 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40(); - break; - case 41: - ChipLogProgress(chipTool, - " ***** Test Step 41 : Writes the respective default value to optional attribute: " - "PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41(); - break; - case 42: - ChipLogProgress( - chipTool, " ***** Test Step 42 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 43; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupancyArgument; - occupancyArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOccupancyWithValue:occupancyArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -37934,692 +37044,24 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupancy", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributeOccupancySensorType_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute: OccupancySensorType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupancy sensor type", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupancySensorTypeArgument; - occupancySensorTypeArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOccupancySensorTypeWithValue:occupancySensorTypeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: " - @"OccupancySensorType Error: %@", - err); - - VerifyOrReturn( - CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: OccupancySensorType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupancySensorTypeBitmapArgument; - occupancySensorTypeBitmapArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeOccupancySensorTypeBitmapWithValue:occupancySensorTypeBitmapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: " - @"OccupancySensorTypeBitmap Error: %@", - err); - - VerifyOrReturn(CheckValue( - "status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirOccupiedToUnoccupiedDelayArgument; - pirOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributePirOccupiedToUnoccupiedDelayWithValue:pirOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIROccupiedToUnoccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirUnoccupiedToOccupiedDelayArgument; - pirUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributePirUnoccupiedToOccupiedDelayWithValue:pirUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIRUnoccupiedToOccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirUnoccupiedToOccupiedThresholdArgument; - pirUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributePirUnoccupiedToOccupiedThresholdWithValue:pirUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIRUnoccupiedToOccupiedThreshold Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicOccupiedToUnoccupiedDelayArgument; - ultrasonicOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:ultrasonicOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicOccupiedToUnoccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicUnoccupiedToOccupiedDelayArgument; - ultrasonicUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:ultrasonicUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicUnoccupiedToOccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38627,95 +37069,244 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); - + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29() +class Test_TC_OCC_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OCC_2_1() + : TestCommandBridge("Test_TC_OCC_2_1") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicUnoccupiedToOccupiedThresholdArgument; - ultrasonicUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:ultrasonicUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicUnoccupiedToOccupiedThreshold Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + ~Test_TC_OCC_2_1() {} - NextTest(); - }]; + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - return CHIP_NO_ERROR; - } + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); + } - CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); + Wait(); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); + if (ShouldSkip("OCC.S.A0000")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads mandatory attribute constrains: OccupancySensorType\n"); + if (ShouldSkip("OCC.S.A0001")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + if (ShouldSkip("OCC.S.A0002")) { + NextTest(); + return; + } + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0010")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0011")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0012")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0020")) { + NextTest(); + return; + } + err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0021")) { + NextTest(); + return; + } + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0022")) { + NextTest(); + return; + } + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0030")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); + if (ShouldSkip("OCC.S.A0031")) { + NextTest(); + return; + } + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); + if (ShouldSkip("OCC.S.A0032")) { NextTest(); return; } + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12(); + break; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); - } + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } - NextTest(); - }]; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } - return CHIP_NO_ERROR; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 13; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38723,21 +37314,14 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); - } + VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -38745,7 +37329,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38753,25 +37337,22 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38779,29 +37360,23 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id physicalContactOccupiedToUnoccupiedDelayArgument; - physicalContactOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster - writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:physicalContactOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PhysicalContactOccupiedToUnoccupiedDelay Error: %@", - err); + readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34() + CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38809,29 +37384,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster + readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38839,29 +37410,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster + readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38869,25 +37436,28 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37() + CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38895,29 +37465,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id physicalContactUnoccupiedToOccupiedDelayArgument; - physicalContactUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:physicalContactUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PhysicalContactUnoccupiedToOccupiedDelay Error: %@", - err); + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38() + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38925,29 +37491,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); } + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39() + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38955,29 +37517,30 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -38985,30 +37548,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); - VerifyOrReturn( - CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); + } + VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39016,30 +37574,25 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id physicalContactUnoccupiedToOccupiedThresholdArgument; - physicalContactUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:physicalContactUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Writes the respective default value to optional attribute: " - @"PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", - err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39049,12 +37602,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39063,6 +37611,12 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn( + CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + NextTest(); }]; @@ -39117,42 +37671,38 @@ class Test_TC_OO_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : read the optional global attribute: FeatureMap\n"); + if (ShouldSkip("OO_LT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_2(); + err = TestReadTheOptionalGlobalAttributeFeatureMap_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 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("OO_LT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); - if (ShouldSkip("OO_LT")) { - NextTest(); - return; - } - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -39236,7 +37786,30 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -39249,12 +37822,17 @@ class Test_TC_OO_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 16384UL)); VerifyOrReturn(CheckValue("", actualValue[2], 16385UL)); VerifyOrReturn(CheckValue("", actualValue[3], 16386UL)); VerifyOrReturn(CheckValue("", actualValue[4], 16387UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -39264,7 +37842,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -39273,7 +37851,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -39302,7 +37880,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -39324,29 +37902,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_OO_2_1 : public TestCommandBridge { @@ -40265,96 +38820,92 @@ class Test_TC_OO_2_4 : public TestCommandBridge { err = TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the StartUpOnOff attribute from the DUT\n"); - err = TestThReadsTheStartUpOnOffAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Power off DUT\n"); - err = TestPowerOffDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes a value of 1 to StartUpOnOff attribute of DUT\n"); + err = TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH writes a value of 1 to StartUpOnOff attribute of DUT\n"); - err = TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Power off DUT\n"); - err = TestPowerOffDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH writes a value of 2 to StartUpOnOff attribute of DUT\n"); + err = TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH writes a value of 2 to StartUpOnOff attribute of DUT\n"); - err = TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Power off DUT\n"); - err = TestPowerOffDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Power off DUT\n"); - err = TestPowerOffDut_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : TH writes NULL to StartUpOnOff attribute of DUT\n"); + err = TestThWritesNullToStartUpOnOffAttributeOfDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH writes NULL to StartUpOnOff attribute of DUT\n"); - err = TestThWritesNullToStartUpOnOffAttributeOfDut_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Power off DUT\n"); - err = TestPowerOffDut_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Off command to DUT\n"); + err = TestThSendsOffCommandToDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Off command to DUT\n"); - err = TestThSendsOffCommandToDut_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Power Off and On DUT\n"); + err = TestPowerOffAndOnDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Power off DUT\n"); - err = TestPowerOffDut_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads the OnOff attribute from the DUT\n"); - err = TestThReadsTheOnOffAttributeFromTheDut_25(); + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads the OnOff attribute from the DUT\n"); + err = TestThReadsTheOnOffAttributeFromTheDut_24(); break; } @@ -40442,9 +38993,6 @@ class Test_TC_OO_2_4 : public TestCommandBridge { case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -40458,7 +39006,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 25; chip::Optional mNodeId; chip::Optional mCluster; @@ -40509,43 +39057,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheStartUpOnOffAttributeFromTheDut_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the StartUpOnOff attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("StartUpOnOff", actualValue)); - VerifyOrReturn(CheckValue("StartUpOnOff", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestPowerOffDut_4() + CHIP_ERROR TestPowerOffAndOnDut_3() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_4() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_6() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40567,7 +39092,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7() + CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40587,20 +39112,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPowerOffDut_8() + CHIP_ERROR TestPowerOffAndOnDut_7() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_9() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_8() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_10() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40622,7 +39147,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_11() + CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40642,20 +39167,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPowerOffDut_12() + CHIP_ERROR TestPowerOffAndOnDut_11() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_13() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_12() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_14() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40677,20 +39202,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPowerOffDut_15() + CHIP_ERROR TestPowerOffAndOnDut_14() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_16() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_15() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_17() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40712,7 +39237,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_18() + CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40732,20 +39257,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPowerOffDut_19() + CHIP_ERROR TestPowerOffAndOnDut_18() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_20() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_19() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_21() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40767,7 +39292,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_22() + CHIP_ERROR TestThSendsOffCommandToDut_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40784,20 +39309,20 @@ class Test_TC_OO_2_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPowerOffDut_23() + CHIP_ERROR TestPowerOffAndOnDut_22() { chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot("alpha", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_24() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_23() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_25() + CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40863,26 +39388,20 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); @@ -40893,8 +39412,14 @@ class Test_TC_PS_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeGeneratedCommandList_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 EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -40962,7 +39487,7 @@ class Test_TC_PS_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: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40978,7 +39503,30 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource 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 ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -41012,15 +39560,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); @@ -41067,26 +39606,13 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestPowerSource * cluster = [[CHIPTestPowerSource 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 ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 2UL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; @@ -42138,21 +40664,24 @@ class Test_TC_PRS_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 constraints: FeatureMap\n"); + if (ShouldSkip("PRS.S.F00")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeConstraintsFeatureMap_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 mandatory attribute constraints: AttributeList\n"); + err = TestReadTheGlobalMandatoryAttributeConstraintsAttributeList_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 mandatory attribute constraints: AttributeList\n"); - err = TestReadTheGlobalMandatoryAttributeConstraintsAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: ChipLogProgress(chipTool, @@ -42164,33 +40693,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { } err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read AcceptedCommandList attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read GeneratedCommandList attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_8(); - break; - case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -42212,7 +40714,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -42223,15 +40725,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -42245,7 +40738,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -42277,13 +40770,14 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device @@ -42291,19 +40785,24 @@ class Test_TC_PRS_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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestReadTheGlobalMandatoryAttributeConstraintsAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device @@ -42311,22 +40810,19 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; - [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 mandatory attribute constraints: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device @@ -42334,23 +40830,24 @@ class Test_TC_PRS_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 ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalMandatoryAttributeConstraintsAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device @@ -42358,12 +40855,17 @@ class Test_TC_PRS_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 mandatory attribute constraints: AttributeList Error: %@", err); + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -42378,33 +40880,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - - CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_8() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_PRS_2_1 : public TestCommandBridge { @@ -42868,20 +41343,20 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the EventList attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheEventListAttributeFromTheDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the EventList attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheEventListAttributeFromTheDut_6(); break; } @@ -43030,16 +41505,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_5() + CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device @@ -43064,7 +41530,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_6() + CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device @@ -43088,6 +41554,15 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_PCC_2_1 : public TestCommandBridge { @@ -45883,10 +44358,6 @@ class Test_TC_RH_2_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads constraints of attribute: MaxMeasuredValue\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadsConstraintsOfAttributeMaxMeasuredValue_3(); break; case 4: @@ -51455,7 +49926,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } @@ -51600,17 +50071,15 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(8))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65530UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -51905,142 +50374,246 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { err = TestVerifyDeviceTemperatureDisplayedInc_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the TemperatureDisplayMode attribute of DUT\n"); if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_3(); + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Verify device temperature displayed in °F\n"); - err = TestVerifyDeviceTemperatureDisplayedInf_4(); - break; - case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Writes a value of 1 to TemperatureDisplayMode attribute of DUT\n"); if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_5(); + err = TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Verify device temperature displayed in °F\n"); + err = TestVerifyDeviceTemperatureDisplayedInf_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_6(); + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Verify all device functionality available to the user\n"); - err = TestVerifyAllDeviceFunctionalityAvailableToTheUser_7(); + ChipLogProgress( + chipTool, " ***** Test Step 7 : Writes a value of greater than 1 to TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); - if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the TemperatureDisplayMode attribute of DUT\n"); + if (ShouldSkip("A_TEMPERATURE_DISPLAY_MODE")) { NextTest(); return; } - err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_8(); + err = TestThReadsTheTemperatureDisplayModeAttributeOfDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Verify device operates at Level 1 reduced functionality\n"); - err = TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Writes a value of 0 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_10(); + err = TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Verify all device functionality available to the user\n"); + err = TestVerifyAllDeviceFunctionalityAvailableToTheUser_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Verify device operates at Level 2 reduced functionality\n"); - err = TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Writes a value of 1 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_12(); + err = TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 3 reduced functionality\n"); - err = TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Verify device operates at Level 1 reduced functionality\n"); + err = TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads the KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_14(); + err = TestThReadsTheKeypadLockoutAttributeOfDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Verify device operates at Level 4 reduced functionality\n"); - err = TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : Writes a value of 2 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_16(); + err = TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Verify device operates at Level 2 reduced functionality\n"); + err = TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Verify device operates at least functionality level\n"); - err = TestVerifyDeviceOperatesAtLeastFunctionalityLevel_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 18 : Writes a value of 3 to KeypadLockout attribute of DUT\n"); if (ShouldSkip("A_KEYPAD_LOCKOUT")) { NextTest(); return; } - err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_18(); + err = TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18(); break; case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Verify device operates at Level 3 reduced functionality\n"); + err = TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Writes a value of 4 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Verify device operates at Level 4 reduced functionality\n"); + err = TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Writes a value of 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Verify device operates at least functionality level\n"); + err = TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Writes a value of greater than 5 to KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads the KeypadLockout attribute of DUT\n"); + if (ShouldSkip("A_KEYPAD_LOCKOUT")) { + NextTest(); + return; + } + err = TestThReadsTheKeypadLockoutAttributeOfDut_28(); + break; + case 29: ChipLogProgress( - chipTool, " ***** Test Step 19 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); + chipTool, " ***** Test Step 29 : Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_19(); + err = TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29(); break; - case 20: + case 30: ChipLogProgress( - chipTool, " ***** Test Step 20 : Verify local schedule programming functionality is enabled at the thermostat\n"); - err = TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_20(); + chipTool, " ***** Test Step 30 : Verify local schedule programming functionality is enabled at the thermostat\n"); + err = TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30(); break; - case 21: + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { + NextTest(); + return; + } + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31(); + break; + case 32: ChipLogProgress( - chipTool, " ***** Test Step 21 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + chipTool, " ***** Test Step 32 : Writes a value of 1 to ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_21(); + err = TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32(); break; - case 22: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 22 : Verify local schedule programming functionality is disabled at the thermostat\n"); - err = TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_22(); + chipTool, " ***** Test Step 33 : Verify local schedule programming functionality is disabled at the thermostat\n"); + err = TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33(); break; - case 23: + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { + NextTest(); + return; + } + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34(); + break; + case 35: ChipLogProgress(chipTool, - " ***** Test Step 23 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + " ***** Test Step 35 : Writes a value of greater than 1 to ScheduleProgrammingVisibility attribute of DUT\n"); + if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { + NextTest(); + return; + } + err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads the ScheduleProgrammingVisibility attribute of DUT\n"); if (ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY")) { NextTest(); return; } - err = TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_23(); + err = TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36(); break; } @@ -52069,13 +50642,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -52108,7 +50681,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -52123,8 +50696,47 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -52138,7 +50750,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 37; chip::Optional mNodeId; chip::Optional mCluster; @@ -52181,7 +50793,25 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_3() + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52203,14 +50833,37 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInf_4() + CHIP_ERROR TestVerifyDeviceTemperatureDisplayedInf_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Verify device temperature displayed in °Fgarbage: not in length on purpose", 42); return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_5() + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_6() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("temperature display mode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52233,7 +50886,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_6() + CHIP_ERROR TestThReadsTheTemperatureDisplayModeAttributeOfDut_8() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("temperature display mode", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52254,7 +50930,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyAllDeviceFunctionalityAvailableToTheUser_7() + CHIP_ERROR TestVerifyAllDeviceFunctionalityAvailableToTheUser_10() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message @@ -52262,7 +50938,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_8() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_11() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52283,7 +50982,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_9() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel1ReducedFunctionality_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52291,7 +50990,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_10() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_14() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_15() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52312,7 +51034,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_11() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel2ReducedFunctionality_16() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52320,7 +51042,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_12() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_17() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_18() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52341,7 +51086,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_13() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel3ReducedFunctionality_19() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52349,7 +51094,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_14() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_20() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52370,7 +51138,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_15() + CHIP_ERROR TestVerifyDeviceOperatesAtLevel4ReducedFunctionality_22() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52378,7 +51146,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_16() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_23() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52399,7 +51190,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyDeviceOperatesAtLeastFunctionalityLevel_17() + CHIP_ERROR TestVerifyDeviceOperatesAtLeastFunctionalityLevel_25() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message @@ -52407,7 +51198,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_18() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_26() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_27() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52427,7 +51241,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_19() + CHIP_ERROR TestThReadsTheKeypadLockoutAttributeOfDut_28() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("keypad lockout", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_29() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52450,7 +51287,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_20() + CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsEnabledAtTheThermostat_30() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52458,7 +51295,31 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_21() + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_31() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_32() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52481,7 +51342,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_22() + CHIP_ERROR TestVerifyLocalScheduleProgrammingFunctionalityIsDisabledAtTheThermostat_33() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( @@ -52489,7 +51350,31 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_23() + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_34() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_35() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -52511,6 +51396,30 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsTheScheduleProgrammingVisibilityAttributeOfDut_36() + { + CHIPDevice * device = GetDevice("alpha"); + 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(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_ULABEL_1_1 : public TestCommandBridge { @@ -52560,38 +51469,30 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute: FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadTheOptionalGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " "supported events.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; } @@ -52675,34 +51576,59 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel 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 global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -52725,7 +51651,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -52747,6 +51673,15 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_ULABEL_2_2 : public TestCommandBridge { @@ -54399,18 +53334,17 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(11))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 7UL)); VerifyOrReturn(CheckValue("", actualValue[2], 10UL)); VerifyOrReturn(CheckValue("", actualValue[3], 13UL)); VerifyOrReturn(CheckValue("", actualValue[4], 23UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 26UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -54648,88 +53582,72 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { err = Test3aReadTheRoMandatoryAttributeDefaultSafetyStatus_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : 3a.2: write a value into the RO mandatory attribute: SafetyStatus\n"); - if (ShouldSkip("A_SAFETYSTATUS")) { - NextTest(); - return; - } - err = Test3a2WriteAValueIntoTheRoMandatoryAttributeSafetyStatus_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : 3a.3: reads back the RO mandatory attribute: SafetyStatus\n"); - if (ShouldSkip("A_SAFETYSTATUS")) { - NextTest(); - return; - } - err = Test3a3ReadsBackTheRoMandatoryAttributeSafetyStatus_17(); - break; - case 18: ChipLogProgress( - chipTool, " ***** Test Step 18 : 3b: read the RO optional attribute default: PhysicalClosedLimitLift\n"); + chipTool, " ***** Test Step 16 : 3b: read the RO optional attribute default: PhysicalClosedLimitLift\n"); if (ShouldSkip("A_PHYSICALCLOSEDLIMITLIFT")) { NextTest(); return; } - err = Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_18(); + err = Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16(); break; - case 19: + case 17: ChipLogProgress( - chipTool, " ***** Test Step 19 : 3c: read the RO optional attribute default: PhysicalClosedLimitTilt\n"); + chipTool, " ***** Test Step 17 : 3c: read the RO optional attribute default: PhysicalClosedLimitTilt\n"); if (ShouldSkip("A_PHYSICALCLOSEDLIMITTILT")) { NextTest(); return; } - err = Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_19(); + err = Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); if (ShouldSkip("A_CURRENTPOSITIONLIFT")) { NextTest(); return; } - err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_20(); + err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); if (ShouldSkip("A_CURRENTPOSITIONTILT")) { NextTest(); return; } - err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21(); + err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_19(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); if (ShouldSkip("A_NUMBEROFACTUATIONSLIFT")) { NextTest(); return; } - err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22(); + err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_20(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); if (ShouldSkip("A_NUMBEROFACTUATIONSTILT")) { NextTest(); return; } - err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23(); + err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_21(); break; - case 24: + case 22: ChipLogProgress( - chipTool, " ***** Test Step 24 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); + chipTool, " ***** Test Step 22 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); if (ShouldSkip("A_CURRENTPOSITIONLIFTPERCENTAGE")) { NextTest(); return; } - err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24(); + err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_22(); break; - case 25: + case 23: ChipLogProgress( - chipTool, " ***** Test Step 25 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); + chipTool, " ***** Test Step 23 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); if (ShouldSkip("A_CURRENTPOSITIONTILTPERCENTAGE")) { NextTest(); return; } - err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25(); + err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_23(); break; } @@ -54791,7 +53709,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -54814,12 +53732,6 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54833,7 +53745,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -55185,46 +54097,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3a2WriteAValueIntoTheRoMandatoryAttributeSafetyStatus_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id safetyStatusArgument; - safetyStatusArgument = [NSNumber numberWithUnsignedShort:4096U]; - [cluster writeAttributeSafetyStatusWithValue:safetyStatusArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a.2: write a value into the RO mandatory attribute: SafetyStatus Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3a3ReadsBackTheRoMandatoryAttributeSafetyStatus_17() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a.3: reads back the RO mandatory attribute: SafetyStatus Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("safetyStatus", "", "map16")); - VerifyOrReturn(CheckConstraintNotValue("safetyStatus", value, 4096U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_18() + CHIP_ERROR Test3bReadTheRoOptionalAttributeDefaultPhysicalClosedLimitLift_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55245,7 +54118,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_19() + CHIP_ERROR Test3cReadTheRoOptionalAttributeDefaultPhysicalClosedLimitTilt_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55266,7 +54139,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_20() + CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55290,7 +54163,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21() + CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55314,7 +54187,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22() + CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55335,7 +54208,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23() + CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55356,7 +54229,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24() + CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -55383,7 +54256,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25() + CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -60419,7 +59292,7 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : 1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " "CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE")) { + if (ShouldSkip("WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE")) { NextTest(); return; } @@ -107179,7 +106052,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),