From 108091621b1a6988d6273d2e9a46b146d8cd76d6 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Sat, 1 Apr 2023 08:48:07 +0530 Subject: [PATCH] Modified script Mar 31 (#25915) * Fixes issue: 2468 TC-DD-2.1 Fixes issue: 2508 TC-WNCV-2.1 Fixes issue: 752 TC-WAKEONLAN-4.1 * Auto generated files --- .../suites/certification/Test_TC_DD_2_1.yaml | 4 +- .../certification/Test_TC_WAKEONLAN_4_1.yaml | 2 +- .../certification/Test_TC_WNCV_2_1.yaml | 30 +++- .../chip-tool/zap-generated/test/Commands.h | 75 +++++++--- .../zap-generated/test/Commands.h | 134 +++++++++++++++--- 5 files changed, 203 insertions(+), 42 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml index 7365862af85268..0433e8bd778cd2 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml @@ -51,7 +51,7 @@ tests: "If (MCORE.DD.CHIP_DEV) then If !(MCORE.DD.CHIP_DEV) then If (MCORE.DD.DEV_LOCK) then If (MCORE.DD.DEV_BARRIER) then" PICS: - MCORE.DD.CHIP_DEV && !(MCORE.DD.CHIP_DEV) && MCORE.DD.DEV_LOCK && + MCORE.DD.CHIP_DEV || !(MCORE.DD.CHIP_DEV) || MCORE.DD.DEV_LOCK || MCORE.DD.DEV_BARRIER verification: | If (MCORE.DD.CHIP_DEV) IP/BLE discovery tool should discover the DUT else it should not @@ -521,7 +521,7 @@ tests: '_services._dns-sd._udp' using a DNS-SD records command-line test tool (i.e. 'dns-sd -B _services._dns-sd._udp' or 'avahi-browse _services._dns-sd._udp -r')" - PICS: MCORE.DD.COMMISSIONING_SUBTYPE_V && MCORE.DD.COMMISSIONING_SUBTYPE_T + PICS: MCORE.DD.COMMISSIONING_SUBTYPE_V || MCORE.DD.COMMISSIONING_SUBTYPE_T verification: | Vendor specific, take DUT out of commissioning mode dns-sd -B _services._dns-sd._udp diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml index 4e5244b7acec8f..e026d4840f4cb3 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml @@ -31,7 +31,7 @@ tests: ./chip-tool wakeonlan read macaddress 1 1 ./chip-tv-casting-app wakeonlan read macaddress 1 1 - On TH Verify that the response contains a 48-bit MAC Address. Record the MAC address. + On TH, verify that the response contains a 48-bit MAC Address of the DUT and verify if the value reported in this is matching with the actual Mac address. [1654248817.394846][3637:3643] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0503 Attribute 0x0000_0000 DataVersion: 3900236652 [1654248817.394895][3637:3643] CHIP:TOO: MACAddress: e4:5f:01:69:61:b1 [1654248817.394982][3637:3643] CHIP:EM: Sending Standalone Ack for MessageCounter:15292555 on exchange 12123i diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index e9c0e9c448f4ce..7ce317fb69837b 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -157,6 +157,7 @@ tests: attribute: "InstalledOpenLimitLift" PICS: WNCV.S.A0010 response: + saveAs: InstalledOpenLimitLift constraints: type: int16u minValue: 0 @@ -169,6 +170,7 @@ tests: attribute: "InstalledClosedLimitLift" PICS: WNCV.S.A0011 response: + saveAs: InstalledClosedLimitLift constraints: type: int16u minValue: 0 @@ -181,6 +183,7 @@ tests: attribute: "InstalledOpenLimitTilt" PICS: WNCV.S.A0012 response: + saveAs: InstalledOpenLimitTilt constraints: type: int16u minValue: 0 @@ -193,6 +196,7 @@ tests: attribute: "InstalledClosedLimitTilt" PICS: WNCV.S.A0013 response: + saveAs: InstalledClosedLimitTilt constraints: type: int16u minValue: 0 @@ -238,24 +242,46 @@ tests: - label: "3d: read the RO optional attribute default: CurrentPositionLift" command: "readAttribute" attribute: "CurrentPositionLift" - PICS: WNCV.S.A0003 + PICS: WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011 response: constraints: type: int16u minValue: 0 maxValue: 65535 + ### Attribute[ 3]: CurrentPositionLift ==================== + - label: "3d: read the RO optional attribute default: CurrentPositionLift" + command: "readAttribute" + attribute: "CurrentPositionLift" + PICS: WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011 + response: + constraints: + type: int16u + minValue: InstalledOpenLimitLift + maxValue: InstalledClosedLimitLift + ### Attribute[ 4]: CurrentPositionTilt ==================== - label: "3e: read the RO optional attribute default: CurrentPositionTilt" command: "readAttribute" attribute: "CurrentPositionTilt" - PICS: WNCV.S.A0004 + PICS: WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013 response: constraints: type: int16u minValue: 0 maxValue: 65535 + ### Attribute[ 4]: CurrentPositionTilt ==================== + - label: "3e: read the RO optional attribute default: CurrentPositionTilt" + command: "readAttribute" + attribute: "CurrentPositionTilt" + PICS: WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013 + response: + constraints: + type: int16u + minValue: InstalledOpenLimitTilt + maxValue: InstalledClosedLimitTilt + ### Attribute[ 5]: NumberOfActuationsLift ==================== - label: "3f: read the RO optional attribute default: NumberOfActuationsLift" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 17d1cda23a1000..88161ae0aa880c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -49985,7 +49985,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand class Test_TC_WNCV_2_1Suite : public TestCommand { public: - Test_TC_WNCV_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_1", 24, credsIssuerConfig) + Test_TC_WNCV_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_2_1", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -50006,6 +50006,11 @@ class Test_TC_WNCV_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint16_t InstalledOpenLimitLift; + uint16_t InstalledClosedLimitLift; + uint16_t InstalledOpenLimitTilt; + uint16_t InstalledClosedLimitTilt; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -50123,6 +50128,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + InstalledOpenLimitLift = value; } break; case 12: @@ -50133,6 +50139,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + InstalledClosedLimitLift = value; } break; case 13: @@ -50143,6 +50150,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + InstalledOpenLimitTilt = value; } break; case 14: @@ -50153,6 +50161,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + InstalledClosedLimitTilt = value; } break; case 15: @@ -50196,6 +50205,16 @@ class Test_TC_WNCV_2_1Suite : public TestCommand } 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(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, InstalledOpenLimitLift)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, InstalledClosedLimitLift)); + } + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -50205,7 +50224,17 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, InstalledOpenLimitTilt)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, InstalledClosedLimitTilt)); + } + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -50215,7 +50244,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -50225,7 +50254,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -50235,7 +50264,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; - case 23: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -50374,36 +50403,50 @@ class Test_TC_WNCV_2_1Suite : public TestCommand } case 18: { LogStep(18, "3d: read the RO optional attribute default: CurrentPositionLift"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionLift::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "3e: read the RO optional attribute default: CurrentPositionTilt"); - VerifyOrDo(!ShouldSkip("WNCV.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "3d: read the RO optional attribute default: CurrentPositionLift"); + VerifyOrDo(!ShouldSkip("WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, - WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); + WindowCovering::Attributes::CurrentPositionLift::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "3f: read the RO optional attribute default: NumberOfActuationsLift"); + LogStep(20, "3e: read the RO optional attribute default: CurrentPositionTilt"); + VerifyOrDo(!ShouldSkip("WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, + WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "3e: read the RO optional attribute default: CurrentPositionTilt"); + VerifyOrDo(!ShouldSkip("WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, + WindowCovering::Attributes::CurrentPositionTilt::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, "3f: read the RO optional attribute default: NumberOfActuationsLift"); VerifyOrDo(!ShouldSkip("WNCV.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::NumberOfActuationsLift::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "3g: read the RO optional attribute default: NumberOfActuationsTilt"); + case 23: { + LogStep(23, "3g: read the RO optional attribute default: NumberOfActuationsTilt"); VerifyOrDo(!ShouldSkip("WNCV.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::NumberOfActuationsTilt::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "3h: read the RO optional attribute default: CurrentPositionLiftPercentage"); + case 24: { + LogStep(24, "3h: read the RO optional attribute default: CurrentPositionLiftPercentage"); VerifyOrDo(!ShouldSkip("WNCV.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "3i:read the RO optional attribute default: CurrentPositionTiltPercentage"); + case 25: { + LogStep(25, "3i:read the RO optional attribute default: CurrentPositionTiltPercentage"); VerifyOrDo(!ShouldSkip("WNCV.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, true, chip::NullOptional); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 02612b178a6cb4..44bd2cbae17798 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -65702,53 +65702,69 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); - if (ShouldSkip("WNCV.S.A0003")) { + if (ShouldSkip("WNCV.S.A0003 && !WNCV.S.A0010 && !WNCV.S.A0011")) { NextTest(); return; } err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); - if (ShouldSkip("WNCV.S.A0004")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : 3d: read the RO optional attribute default: CurrentPositionLift\n"); + if (ShouldSkip("WNCV.S.A0003 && WNCV.S.A0010 && WNCV.S.A0011")) { NextTest(); return; } - err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_19(); + err = Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); - if (ShouldSkip("WNCV.S.A0005")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); + if (ShouldSkip("WNCV.S.A0004 && !WNCV.S.A0012 && !WNCV.S.A0013")) { NextTest(); return; } - err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_20(); + err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); - if (ShouldSkip("WNCV.S.A0006")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : 3e: read the RO optional attribute default: CurrentPositionTilt\n"); + if (ShouldSkip("WNCV.S.A0004 && WNCV.S.A0012 && WNCV.S.A0013")) { NextTest(); return; } - err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_21(); + err = Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21(); break; case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : 3f: read the RO optional attribute default: NumberOfActuationsLift\n"); + if (ShouldSkip("WNCV.S.A0005")) { + NextTest(); + return; + } + err = Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : 3g: read the RO optional attribute default: NumberOfActuationsTilt\n"); + if (ShouldSkip("WNCV.S.A0006")) { + NextTest(); + return; + } + err = Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23(); + break; + case 24: ChipLogProgress( - chipTool, " ***** Test Step 22 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); + chipTool, " ***** Test Step 24 : 3h: read the RO optional attribute default: CurrentPositionLiftPercentage\n"); if (ShouldSkip("WNCV.S.A0008")) { NextTest(); return; } - err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_22(); + err = Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24(); break; - case 23: + case 25: ChipLogProgress( - chipTool, " ***** Test Step 23 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); + chipTool, " ***** Test Step 25 : 3i:read the RO optional attribute default: CurrentPositionTiltPercentage\n"); if (ShouldSkip("WNCV.S.A0009")) { NextTest(); return; } - err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_23(); + err = Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25(); break; } @@ -65833,6 +65849,12 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -65846,7 +65868,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -66101,6 +66123,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledOpenLimitLift; CHIP_ERROR Test2eReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_11() { @@ -66117,12 +66140,16 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("installedOpenLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitLift", [value unsignedShortValue], 65535U)); + { + InstalledOpenLimitLift = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledClosedLimitLift; CHIP_ERROR Test2fReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_12() { @@ -66139,12 +66166,16 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("installedClosedLimitLift", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitLift", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitLift", [value unsignedShortValue], 65535U)); + { + InstalledClosedLimitLift = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledOpenLimitTilt; CHIP_ERROR Test2gReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_13() { @@ -66161,12 +66192,16 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("installedOpenLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedOpenLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedOpenLimitTilt", [value unsignedShortValue], 65535U)); + { + InstalledOpenLimitTilt = value; + } NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull InstalledClosedLimitTilt; CHIP_ERROR Test2hReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_14() { @@ -66183,6 +66218,9 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("installedClosedLimitTilt", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("installedClosedLimitTilt", [value unsignedShortValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("installedClosedLimitTilt", [value unsignedShortValue], 65535U)); + { + InstalledClosedLimitTilt = value; + } NextTest(); }]; @@ -66281,7 +66319,34 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_19() + CHIP_ERROR Test3dReadTheRoOptionalAttributeDefaultCurrentPositionLift_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionLift", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLift", [value unsignedShortValue], InstalledOpenLimitLift)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLift", [value unsignedShortValue], InstalledClosedLimitLift)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66306,7 +66371,34 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_20() + CHIP_ERROR Test3eReadTheRoOptionalAttributeDefaultCurrentPositionTilt_21() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentPositionTilt", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTilt", [value unsignedShortValue], InstalledOpenLimitTilt)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTilt", [value unsignedShortValue], InstalledClosedLimitTilt)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test3fReadTheRoOptionalAttributeDefaultNumberOfActuationsLift_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66328,7 +66420,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_21() + CHIP_ERROR Test3gReadTheRoOptionalAttributeDefaultNumberOfActuationsTilt_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66350,7 +66442,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_22() + CHIP_ERROR Test3hReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -66377,7 +66469,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_23() + CHIP_ERROR Test3ireadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_25() { MTRBaseDevice * device = GetDevice("alpha");