From 1431706ff3af26e39a1ed66989a7b9d9a5082ec4 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Mon, 8 Aug 2022 21:19:19 +0530 Subject: [PATCH] Modified script Aug 5 (#21678) * Modifed script TC-CADMIN-1.13 TC-LVL-2.1 TC-LVL-2.2 TC-LVL-3.1 TC-WNCV-4.2 * Auto generated files --- .../certification/Test_TC_CADMIN_1_13.yaml | 95 ++- .../suites/certification/Test_TC_LVL_2_1.yaml | 4 +- .../suites/certification/Test_TC_LVL_2_2.yaml | 2 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 244 +++---- .../certification/Test_TC_WNCV_4_2.yaml | 2 +- .../chip-tool/zap-generated/test/Commands.h | 644 +++++++++-------- .../zap-generated/test/Commands.h | 666 ++++++++---------- 7 files changed, 835 insertions(+), 822 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 3607b092a20cc8..cc190385b2cf10 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -19,7 +19,7 @@ name: config: nodeId: 0x12344321 - timeout: 500 + timeout: 600 nodeIdForDuplicateCommissioning: type: node_id defaultValue: 0x11 @@ -61,7 +61,34 @@ tests: - name: "discriminator" value: discriminator - - label: "Commission from gamma" + - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 2 + + - label: "TH_CR1 reads AdminFabricIndex attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "AdminFabricIndex" + PICS: CADMIN.S.A0001 + response: + constraints: + notValue: null + + #Issue https://github.com/CHIP-Specifications/chip-test-plans/issues/1972 + - label: "TH_CR1 reads AdminVendorId attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "AdminVendorId" + PICS: CADMIN.S.A0002 + response: + constraints: + notValue: null + + - label: "TH_CR3 starts a commissioning process with DUT_CE" identity: "gamma" cluster: "CommissionerCommands" command: "PairWithCode" @@ -72,7 +99,7 @@ tests: - name: "payload" value: payload - - label: "TH_CR3 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3" identity: "gamma" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -95,7 +122,7 @@ tests: - name: "discriminator" value: discriminator - - label: "Commission from beta" + - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" @@ -106,7 +133,7 @@ tests: - name: "payload" value: payload - - label: "TH_CR2 starts a commissioning process with DUT_CE" + - label: "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2" identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -128,7 +155,7 @@ tests: - name: "discriminator" value: discriminator - - label: "TH_CR1 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 opens a 2nd commissioning window on DUT_CE" identity: "alpha" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" @@ -141,7 +168,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -174,7 +201,7 @@ tests: - name: "ms" value: 180000 - - label: "TH_CR1 re-opens new commissioning window on DUT_CE" + - label: "TH_CR1 re-opens new commissioning window on DUT_CE using ECM" identity: "alpha" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" @@ -187,13 +214,21 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "TH_CR3 opens a new commissioning window on DUT_CE" + - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 1 + + - label: "TH_CR3 opens a 2nd commissioning window on DUT_CE" identity: "gamma" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" @@ -206,7 +241,7 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -252,13 +287,13 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" - - label: "TH_CR2 opens a new commissioning window on DUT_CE" + - label: "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM" identity: "beta" cluster: "AdministratorCommissioning" command: "OpenCommissioningWindow" @@ -271,10 +306,42 @@ tests: - name: "PAKEVerifier" value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" value: "SPAKE2P Key Salt" response: error: FAILURE + + - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 180000 + + - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "WindowStatus" + PICS: CADMIN.S.A0000 + response: + value: 0 + + - label: "TH_CR1 reads AdminFabricIndex attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "AdminFabricIndex" + PICS: CADMIN.S.A0001 + response: + value: null + + - label: "TH_CR1 reads AdminVendorId attribute from DUT_CE" + cluster: "AdministratorCommissioning" + command: "readAttribute" + attribute: "AdminVendorId" + PICS: CADMIN.S.A0002 + response: + value: null 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 86a9e2e1c1b2cd..2382f4bbca275f 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 @@ -37,7 +37,7 @@ tests: constraints: type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Reads the RemainingTime attribute" PICS: LVL.S.A0001 @@ -68,7 +68,7 @@ tests: constraints: type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "Reads the MaxLevel attribute" PICS: LVL.S.A0003 && LVL.S.F01 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index 2fe969796c54eb..6d450bce210140 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -83,7 +83,7 @@ tests: constraints: type: int8u minValue: 0 - maxValue: 255 + maxValue: 254 - label: "writes the OnLevel attribute on the DUT" PICS: LVL.S.A0011 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 d2447c8ba6aed1..4545de8e01c1bf 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 @@ -48,151 +48,159 @@ tests: arguments: value: 0 - - label: "Reads the MinLevel attribute" - PICS: LVL.S.A0002 - command: "readAttribute" - attribute: "MinLevel" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 255 - - - label: "Reads the MaxLevel attribute" - PICS: LVL.S.A0003 - command: "readAttribute" - attribute: "MaxLevel" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 255 + - label: "TH sends Off command to DUT" + cluster: "On/Off" + PICS: LVL.S.C04.Rsp && OO.S.C00.Rsp + command: "Off" - - label: "sends a MoveToLevelWithOnOff command" - PICS: LVL.S.C00.Rsp + - label: + "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and + TransitionTime =0 (immediate)" + PICS: LVL.S.C04.Rsp command: "MoveToLevelWithOnOff" arguments: values: - - name: "level" - value: 64 - - name: "transitionTime" + - name: "Level" + value: 50 + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 100ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 + - label: "TH reads OnOff attribute (On/Off cluster) from DUT" + cluster: "On/Off" + PICS: OO.S.A0000 && LVL.S.C04.Rsp + command: "readAttribute" + attribute: "OnOff" + response: + value: 1 - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C04.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" response: - value: 64 + value: 50 - - label: "sends a Move to level command" + - label: "TH sends On command to DUT" + cluster: "On/Off" + PICS: LVL.S.C04.Rsp && OO.S.C01.Rsp + command: "On" + + - label: + "TH sends a MoveToLevel command to DUT, with Level =50 and + TransitionTime =0 (immediate)" PICS: LVL.S.C00.Rsp command: "MoveToLevel" arguments: values: - - name: "level" - value: 100 - - name: "transitionTime" + - name: "Level" + value: 50 + - name: "TransitionTime" value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" response: - value: 100 + value: 50 - - label: "sends a Move to level command" + - label: + "TH sends a MoveToLevel command to the DUT with Level = 200 and + TransitionTime = 300 (30 s). This means the level should increase by + 150 units in 30s, so 5 units/s" PICS: LVL.S.C00.Rsp && LVL.S.M.VarRate command: "MoveToLevel" arguments: values: - - name: "level" - value: 128 - - name: "transitionTime" - value: 100 + - name: "Level" + value: 200 + - name: "TransitionTime" + value: 300 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 11000ms" + - label: "Wait 10000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 11000 + value: 10000 - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "CurrentLevel" response: - value: 128 + constraints: + minValue: 85 + maxValue: 115 + + - label: "Wait 10000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 - - label: "Reads the OnOffTransitionTime attribute from the DUT" - PICS: LVL.S.A0010 + - label: "TH reads CurrentLevel attribute from DUT" + PICS: LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" - attribute: "OnOffTransitionTime" + attribute: "CurrentLevel" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 127 + maxValue: 173 - - label: "sends a Move to level command" - PICS: LVL.S.C00.Rsp && LVL.S.A0010 - command: "MoveToLevel" + - label: "Wait 10000ms" + cluster: "DelayCommands" + command: "WaitForMs" arguments: values: - - name: "level" - value: 64 - - name: "transitionTime" - value: null - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 + - name: "ms" + value: 10000 + + - label: "TH reads CurrentLevel attribute from DUT" + PICS: LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate + command: "readAttribute" + attribute: "CurrentLevel" + response: + constraints: + minValue: 170 + maxValue: 200 - - label: "Wait 1000ms" + - label: "Wait 5000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 5000 + + - label: "TH reads CurrentLevel attribute from DUT" + PICS: LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate + command: "readAttribute" + attribute: "CurrentLevel" + response: + value: 200 - - label: "Reads CurrentLevel attribute from DUT" - PICS: LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000 + - label: "TH reads CurrentLevel attribute from DUT" + PICS: LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate command: "readAttribute" attribute: "CurrentLevel" response: - value: 64 + value: 200 - label: "TH writes 0 to the Options attribute" PICS: LVL.S.A000f @@ -227,15 +235,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -261,15 +261,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -290,15 +282,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -319,15 +303,7 @@ tests: - name: "OptionsOverride" value: 1 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -367,15 +343,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -401,15 +369,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -430,15 +390,7 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" @@ -459,15 +411,7 @@ tests: - name: "OptionsOverride" value: 1 - - label: "Wait 100 ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 100 - - - label: "Reads CurrentLevel attribute from DUT" + - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C00.Rsp && LVL.S.A0000 command: "readAttribute" attribute: "CurrentLevel" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml index c663f658a4a7a1..359be2185e8713 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_4_2.yaml @@ -136,7 +136,7 @@ tests: ######## GoToTiltPercentage Long-Run for 60.2 percent ####### ### Step 4x -> Check GoToTiltPercentage 60.20% Long-Run effects - - label: "4a: TH sends GoToTiltPercentage command with 60.20 percent to DUT" + - label: "4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT" command: "GoToTiltPercentage" PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp arguments: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bf0c60c65707e9..2fdc5a50cfef39 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -14292,7 +14292,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); CurrentLevelValue = value; } break; @@ -14323,7 +14323,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); MinLevelFeatureMapNotSupportedValue = value; } break; @@ -14729,7 +14729,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); OnLevelValue = value; } break; @@ -15026,7 +15026,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", 53, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15079,107 +15079,104 @@ class Test_TC_LVL_3_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 64U)); + VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); + VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 128U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 127U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); } 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; + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); + } break; case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentLevel", value)); - VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 64U)); + VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 0U)); + VerifyOrReturn(CheckValueNonNull("currentLevel", value)); + VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; case 21: @@ -15187,12 +15184,19 @@ class Test_TC_LVL_3_1Suite : public TestCommand break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("options", value, 0U)); + } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15201,15 +15205,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } 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)); - shouldContinue = true; break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -15224,10 +15224,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand 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)); { chip::app::DataModel::Nullable value; @@ -15236,14 +15232,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 34: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15252,10 +15244,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); } break; - case 35: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 36: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -15263,17 +15255,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("options", value, 1U)); } break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 40: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15282,17 +15270,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 44: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15301,14 +15285,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 47: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15317,14 +15297,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 50: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15333,10 +15309,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); } break; - case 51: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -15390,23 +15366,20 @@ class Test_TC_LVL_3_1Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "Reads the MinLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MinLevel::Id, true, - chip::NullOptional); + LogStep(4, "TH sends Off command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); } case 5: { - LogStep(5, "Reads the MaxLevel attribute"); - VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::MaxLevel::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "sends a MoveToLevelWithOnOff command"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; - value.level = 64U; + value.level = 50U; value.transitionTime.SetNonNull(); value.transitionTime.Value() = 0U; value.optionsMask = 0U; @@ -15416,25 +15389,32 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 100ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); + case 6: { + LogStep(6, "TH reads OnOff attribute (On/Off cluster) from DUT"); + VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Reads CurrentLevel attribute from DUT"); + case 7: { + LogStep(7, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } + case 8: { + LogStep(8, "TH sends On command to DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } case 9: { - LogStep(9, "sends a Move to level command"); + LogStep(9, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 100U; + value.level = 50U; value.transitionTime.SetNonNull(); value.transitionTime.Value() = 0U; value.optionsMask = 0U; @@ -15445,26 +15425,21 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } case 10: { - LogStep(10, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Reads CurrentLevel attribute from DUT"); + LogStep(10, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "sends a Move to level command"); + case 11: { + LogStep(11, + "TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This means the " + "level should increase by 150 units in 30s, so 5 units/s"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 128U; + value.level = 200U; value.transitionTime.SetNonNull(); - value.transitionTime.Value() = 100U; + value.transitionTime.Value() = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, @@ -15472,55 +15447,71 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 11000ms"); + case 12: { + LogStep(12, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Reads CurrentLevel attribute from DUT"); + case 13: { + LogStep(13, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } + case 14: { + LogStep(14, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } case 15: { - LogStep(15, "Reads the OnOffTransitionTime attribute from the DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, - LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); + LogStep(15, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); } case 16: { - LogStep(16, "sends a Move to level command"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "Wait 10000ms"); ListFreer listFreer; - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 64U; - value.transitionTime.SetNull(); - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, - chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "Wait 1000ms"); + LogStep(17, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "TH writes 0 to the Options attribute"); + case 20: { + LogStep(20, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -15528,14 +15519,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "TH reads Options attribute"); + case 22: { + LogStep(22, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH sends On command to DUT"); + case 23: { + LogStep(23, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -15543,8 +15534,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 22: { - LogStep(22, "TH sends a MoveToLevel command to the DUT with"); + case 24: { + LogStep(24, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15558,21 +15549,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 23: { - LogStep(23, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Reads CurrentLevel attribute from DUT"); + case 25: { + LogStep(25, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "TH sends Off command to DUT"); + case 26: { + LogStep(26, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -15580,8 +15564,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "TH sends a MoveToLevel command to the DUT with"); + case 27: { + LogStep(27, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15595,15 +15579,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } case 28: { - LogStep(28, "Reads CurrentLevel attribute from DUT"); + LogStep(28, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); @@ -15624,20 +15601,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } case 30: { - LogStep(30, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Reads CurrentLevel attribute from DUT"); + LogStep(30, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "TH sends a MoveToLevel command to the DUT with"); + case 31: { + LogStep(31, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15651,21 +15621,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Reads CurrentLevel attribute from DUT"); + case 32: { + LogStep(32, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "TH writes 1 to the Options attribute"); + case 33: { + LogStep(33, "TH writes 1 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -15673,14 +15636,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 36: { - LogStep(36, "TH reads Options attribute"); + case 34: { + LogStep(34, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "TH sends On command to DUT"); + case 35: { + LogStep(35, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -15688,8 +15651,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 38: { - LogStep(38, "TH sends a MoveToLevel command to the DUT with"); + case 36: { + LogStep(36, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15703,21 +15666,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 39: { - LogStep(39, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 40: { - LogStep(40, "Reads CurrentLevel attribute from DUT"); + case 37: { + LogStep(37, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "TH sends Off command to DUT"); + case 38: { + LogStep(38, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -15725,8 +15681,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 42: { - LogStep(42, "TH sends a MoveToLevel command to the DUT with"); + case 39: { + LogStep(39, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15740,21 +15696,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 44: { - LogStep(44, "Reads CurrentLevel attribute from DUT"); + case 40: { + LogStep(40, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "TH sends a MoveToLevel command to the DUT with"); + case 41: { + LogStep(41, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15768,21 +15717,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 46: { - LogStep(46, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 47: { - LogStep(47, "Reads CurrentLevel attribute from DUT"); + case 42: { + LogStep(42, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "TH sends a MoveToLevel command to the DUT with"); + case 43: { + LogStep(43, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -15796,21 +15738,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 49: { - LogStep(49, "Wait 100 ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 50: { - LogStep(50, "Reads CurrentLevel attribute from DUT"); + case 44: { + LogStep(44, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Precondition send Off Command"); + case 45: { + LogStep(45, "Precondition send Off Command"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -15818,8 +15753,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 52: { - LogStep(52, "Check on/off attribute value is false after off command"); + case 46: { + LogStep(46, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -38785,7 +38720,7 @@ class Test_TC_WNCV_4_2Suite : public TestCommand WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "4a: TH sends GoToTiltPercentage command with 60.20 percent to DUT"); + LogStep(11, "4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT"); VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type value; @@ -76727,7 +76662,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { public: Test_TC_CADMIN_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_13", 17, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_13", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -76741,7 +76676,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ~Test_TC_CADMIN_1_13Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(500)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(600)); } private: chip::Optional mNodeId; @@ -76774,14 +76709,27 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 2U)); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("value", value)); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("value", value)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -76795,9 +76743,20 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -76817,17 +76776,25 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 1U)); + } + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -76847,16 +76814,44 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("adminVendorId", value)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -76893,23 +76888,41 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } case 2: { - LogStep(2, "Commission from gamma"); + LogStep(2, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH_CR3 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityGamma, value); } - case 3: { - LogStep(3, "TH_CR3 starts a commissioning process with DUT_CE"); + case 6: { + LogStep(6, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; return WaitForCommissionee(kIdentityGamma, value); } - case 4: { - LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE"); + case 7: { + LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -76920,23 +76933,23 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 5: { - LogStep(5, "Commission from beta"); + case 8: { + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); + case 9: { + LogStep(9, "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 7: { - LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); + case 10: { + LogStep(10, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -76947,8 +76960,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); + case 11: { + LogStep(11, "TH_CR1 opens a 2nd commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -76959,7 +76972,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -76968,21 +76981,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 12: { + LogStep(12, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 10: { - LogStep(10, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + case 13: { + LogStep(13, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "TH_CR1 re-opens new commissioning window on DUT_CE"); + case 14: { + LogStep(14, "TH_CR1 re-opens new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -76993,7 +77006,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -77002,8 +77015,14 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH_CR3 opens a new commissioning window on DUT_CE"); + case 15: { + LogStep(15, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH_CR3 opens a 2nd commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -77014,7 +77033,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, @@ -77023,21 +77042,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 17: { + LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 14: { - LogStep(14, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + case 18: { + LogStep(18, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH_CR1 opens a new commissioning window on DUT_CE"); + case 19: { + LogStep(19, "TH_CR1 opens a new commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -77048,7 +77067,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -77057,8 +77076,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH_CR2 opens a new commissioning window on DUT_CE"); + case 20: { + LogStep(20, "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -77069,7 +77088,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), 97); - value.discriminator = 3840U; + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, @@ -77078,6 +77097,31 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } + case 21: { + LogStep(21, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + } + case 23: { + LogStep(23, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } 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 744579e7e2012f..e583667c8d5db5 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -23145,7 +23145,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 254U)); } { CurrentLevelValue = value; @@ -23226,7 +23226,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); { MinLevelFeatureMapNotSupportedValue = value; } @@ -24058,7 +24058,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("onLevel", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("onLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 255U)); + VerifyOrReturn(CheckConstraintMaxValue("onLevel", [value unsignedCharValue], 254U)); } { OnLevelValue = value; @@ -24554,180 +24554,193 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestThWrites0ToTheOptionsAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends Off command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsTheMinLevelAttribute_4(); + err = TestThSendsOffCommandToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); - if (ShouldSkip("LVL.S.A0003")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " + "(immediate)\n"); + if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestReadsTheMaxLevelAttribute_5(); + err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : sends a MoveToLevelWithOnOff command\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestSendsAMoveToLevelWithOnOffCommand_6(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); - err = TestWait100ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends On command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_8(); + err = TestThSendsOnCommandToDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : sends a Move to level command\n"); + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_9(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100 ms\n"); - err = TestWait100Ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_11(); + err = TestThReadsCurrentLevelAttributeFromDut_10(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move to level command\n"); + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " + "This means the level should increase by 150 units in 30s, so 5 units/s\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestSendsAMoveToLevelCommand_12(); + err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_11(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 11000ms\n"); - err = TestWait11000ms_13(); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10000ms\n"); + err = TestWait10000ms_12(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads CurrentLevel attribute from DUT\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_14(); + err = TestThReadsCurrentLevelAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); + err = TestWait10000ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the OnOffTransitionTime attribute from the DUT\n"); - if (ShouldSkip("LVL.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15(); + err = TestThReadsCurrentLevelAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : sends a Move to level command\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010")) { - NextTest(); - return; - } - err = TestSendsAMoveToLevelCommand_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); + err = TestWait10000ms_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); - err = TestWait1000ms_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0010 && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_18(); + err = TestThReadsCurrentLevelAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); + err = TestWait5000ms_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_19(); + err = TestThReadsCurrentLevelAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_20(); + err = TestThReadsCurrentLevelAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_21(); + err = TestThWrites0ToTheOptionsAttribute_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_22(); + err = TestThReadsOptionsAttribute_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 100 ms\n"); - err = TestWait100Ms_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_24(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_25(); + err = TestThReadsCurrentLevelAttributeFromDut_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_26(); + err = TestThSendsOffCommandToDut_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 100 ms\n"); - err = TestWait100Ms_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_28(); + err = TestThReadsCurrentLevelAttributeFromDut_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends a MoveToLevel command to the DUT with\n"); @@ -24738,164 +24751,140 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestThSendsAMoveToLevelCommandToTheDutWith_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 100 ms\n"); - err = TestWait100Ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_31(); + err = TestThReadsCurrentLevelAttributeFromDut_30(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH sends a MoveToLevel command to the DUT with\n"); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH sends a MoveToLevel command to the DUT with\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 100 ms\n"); - err = TestWait100Ms_33(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_31(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads CurrentLevel attribute from DUT\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_34(); + err = TestThReadsCurrentLevelAttributeFromDut_32(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH writes 1 to the Options attribute\n"); + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH writes 1 to the Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThWrites1ToTheOptionsAttribute_35(); + err = TestThWrites1ToTheOptionsAttribute_33(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads Options attribute\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_36(); + err = TestThReadsOptionsAttribute_34(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends On command to DUT\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends On command to DUT\n"); if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_37(); + err = TestThSendsOnCommandToDut_35(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends a MoveToLevel command to the DUT with\n"); + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH sends a MoveToLevel command to the DUT with\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Wait 100 ms\n"); - err = TestWait100Ms_39(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_36(); break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Reads CurrentLevel attribute from DUT\n"); + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_40(); + err = TestThReadsCurrentLevelAttributeFromDut_37(); break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends Off command to DUT\n"); + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends Off command to DUT\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_41(); + err = TestThSendsOffCommandToDut_38(); break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH sends a MoveToLevel command to the DUT with\n"); + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : TH sends a MoveToLevel command to the DUT with\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Wait 100 ms\n"); - err = TestWait100Ms_43(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_39(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Reads CurrentLevel attribute from DUT\n"); + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_44(); + err = TestThReadsCurrentLevelAttributeFromDut_40(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : TH sends a MoveToLevel command to the DUT with\n"); + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends a MoveToLevel command to the DUT with\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Wait 100 ms\n"); - err = TestWait100Ms_46(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_41(); break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Reads CurrentLevel attribute from DUT\n"); + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_47(); + err = TestThReadsCurrentLevelAttributeFromDut_42(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : TH sends a MoveToLevel command to the DUT with\n"); + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends a MoveToLevel command to the DUT with\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Wait 100 ms\n"); - err = TestWait100Ms_49(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_43(); break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Reads CurrentLevel attribute from DUT\n"); + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestReadsCurrentLevelAttributeFromDut_50(); + err = TestThReadsCurrentLevelAttributeFromDut_44(); break; - case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Precondition send Off Command\n"); + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestPreconditionSendOffCommand_51(); + err = TestPreconditionSendOffCommand_45(); break; - case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Check on/off attribute value is false after off command\n"); + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_52(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_46(); break; } @@ -25049,24 +25038,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -25080,7 +25051,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 53; + const uint16_t mTestCount = 47; chip::Optional mNodeId; chip::Optional mCluster; @@ -25155,53 +25126,24 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMinLevelAttribute_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 255U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestThSendsOffCommandToDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxLevel attribute Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 255U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelWithOnOffCommand_6() + CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25210,13 +25152,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:64U]; + params.level = [NSNumber numberWithUnsignedChar:50U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a MoveToLevelWithOnOff command Error: %@", err); + NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " + @"(immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25226,14 +25170,29 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_7() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25242,14 +25201,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 64U)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } NextTest(); @@ -25258,7 +25217,24 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_9() + CHIP_ERROR TestThSendsOnCommandToDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25267,13 +25243,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100U]; + params.level = [NSNumber numberWithUnsignedChar:50U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); + NSLog(@"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25283,14 +25260,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_10() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25299,14 +25269,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 100U)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 50U)); } NextTest(); @@ -25315,7 +25285,8 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_12() + CHIP_ERROR + TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25324,13 +25295,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:128U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; + params.level = [NSNumber numberWithUnsignedChar:200U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); + NSLog(@"TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This " + @"means the level should increase by 150 units in 30s, so 5 units/s Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25340,14 +25313,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait11000ms_13() + CHIP_ERROR TestWait10000ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25356,14 +25329,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 128U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 115U)); } NextTest(); @@ -25372,7 +25345,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_15() + CHIP_ERROR TestWait10000ms_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25380,14 +25360,16 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { 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); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("onOffTransitionTime", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("onOffTransitionTime", [value unsignedShortValue], 65535U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 127U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 173U)); + } NextTest(); }]; @@ -25395,7 +25377,14 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_16() + CHIP_ERROR TestWait10000ms_16() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25403,31 +25392,31 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:64U]; - params.transitionTime = nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 200U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_17() + CHIP_ERROR TestWait5000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_18() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25436,14 +25425,39 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 64U)); + VerifyOrReturn(CheckValue("CurrentLevel", actualValue, 200U)); } NextTest(); @@ -25452,7 +25466,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_19() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25474,7 +25488,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_20() + CHIP_ERROR TestThReadsOptionsAttribute_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25498,7 +25512,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_21() + CHIP_ERROR TestThSendsOnCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25515,7 +25529,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_22() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25540,14 +25554,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_23() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_24() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25556,7 +25563,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25572,7 +25579,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_25() + CHIP_ERROR TestThSendsOffCommandToDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25589,7 +25596,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_26() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25614,14 +25621,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_27() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_28() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25630,7 +25630,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25671,14 +25671,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_30() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_31() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25687,7 +25680,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25703,7 +25696,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_32() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25728,14 +25721,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_33() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_34() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25744,7 +25730,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25760,7 +25746,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1ToTheOptionsAttribute_35() + CHIP_ERROR TestThWrites1ToTheOptionsAttribute_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25782,7 +25768,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_36() + CHIP_ERROR TestThReadsOptionsAttribute_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25806,7 +25792,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_37() + CHIP_ERROR TestThSendsOnCommandToDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25823,7 +25809,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_38() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25848,14 +25834,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_39() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_40() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25864,7 +25843,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25880,7 +25859,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_41() + CHIP_ERROR TestThSendsOffCommandToDut_38() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -25897,7 +25876,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_42() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25922,14 +25901,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_43() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_44() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_40() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25938,7 +25910,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25954,7 +25926,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_45() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25979,14 +25951,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_46() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_47() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -25995,7 +25960,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26011,7 +25976,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_48() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_43() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26036,14 +26001,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100Ms_49() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_50() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -26052,7 +26010,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26068,7 +26026,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSendOffCommand_51() + CHIP_ERROR TestPreconditionSendOffCommand_45() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26085,7 +26043,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_52() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -64425,12 +64383,12 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { err = Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToTiltPercentage command with 60.20 percent to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 11 : 4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT\n"); if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.C08.Rsp")) { NextTest(); return; } - err = Test4aThSendsGoToTiltPercentageCommandWith6020PercentToDut_11(); + err = Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : 4b: DUT updates its attributes\n"); @@ -64756,7 +64714,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6020PercentToDut_11() + CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6005PercentToDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64768,7 +64726,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:6005U]; [cluster goToTiltPercentageWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 60.20 percent to DUT Error: %@", err); + NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));