diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 178d9fa8aee7c9..2b308f7c95a9d5 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -581,6 +581,7 @@ server cluster DoorLock = 257 { readonly attribute int16u numberOfRFIDUsersSupported = 19; readonly attribute int8u numberOfWeekDaySchedulesSupportedPerUser = 20; readonly attribute int8u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute int8u numberOfHolidaySchedulesSupported = 22; readonly attribute int8u maxPINCodeLength = 23; readonly attribute int8u minPINCodeLength = 24; readonly attribute int8u maxRFIDCodeLength = 25; @@ -650,6 +651,21 @@ server cluster DoorLock = 257 { INT16U userIndex = 1; } + request struct SetHolidayScheduleRequest { + INT8U holidayIndex = 0; + epoch_s localStartTime = 1; + epoch_s localEndTime = 2; + DlOperatingMode operatingMode = 3; + } + + request struct GetHolidayScheduleRequest { + INT8U holidayIndex = 0; + } + + request struct ClearHolidayScheduleRequest { + INT8U holidayIndex = 0; + } + request struct SetUserRequest { DlDataOperationType operationType = 0; INT16U userIndex = 1; @@ -704,6 +720,14 @@ server cluster DoorLock = 257 { optional epoch_s localEndTime = 4; } + response struct GetHolidayScheduleResponse = 18 { + INT8U holidayIndex = 0; + DlStatus status = 1; + optional epoch_s localStartTime = 2; + optional epoch_s localEndTime = 3; + optional DlOperatingMode operatingMode = 4; + } + response struct GetUserResponse = 28 { INT16U userIndex = 0; nullable CHAR_STRING userName = 1; @@ -740,6 +764,9 @@ server cluster DoorLock = 257 { command access(invoke: administer) SetYearDaySchedule(SetYearDayScheduleRequest): DefaultSuccess = 14; command access(invoke: administer) GetYearDaySchedule(GetYearDayScheduleRequest): GetYearDayScheduleResponse = 15; command access(invoke: administer) ClearYearDaySchedule(ClearYearDayScheduleRequest): DefaultSuccess = 16; + command access(invoke: administer) SetHolidaySchedule(SetHolidayScheduleRequest): DefaultSuccess = 17; + command access(invoke: administer) GetHolidaySchedule(GetHolidayScheduleRequest): GetHolidayScheduleResponse = 18; + command access(invoke: administer) ClearHolidaySchedule(ClearHolidayScheduleRequest): DefaultSuccess = 19; timed command access(invoke: administer) SetUser(SetUserRequest): DefaultSuccess = 26; command access(invoke: administer) GetUser(GetUserRequest): GetUserResponse = 27; timed command access(invoke: administer) ClearUser(ClearUserRequest): DefaultSuccess = 29; @@ -2116,6 +2143,7 @@ endpoint 1 { ram attribute numberOfRFIDUsersSupported default = 10; ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10; ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfHolidaySchedulesSupported default = 10; ram attribute maxPINCodeLength default = 8; ram attribute minPINCodeLength default = 6; ram attribute maxRFIDCodeLength default = 20; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 195b1c60afc6b1..74239a7960c87c 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -95282,6 +95282,10 @@ class DL_UsersAndCredentials : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 112 : Try to create sixth PIN credential and make sure it fails\n"); err = TestTryToCreateSixthPinCredentialAndMakeSureItFails_112(); break; + case 113: + ChipLogProgress(chipTool, " ***** Test Step 113 : Final clean-up\n"); + err = TestFinalCleanUp_113(); + break; } if (CHIP_NO_ERROR != err) { @@ -95632,6 +95636,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { case 112: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -95645,7 +95652,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 113; + const uint16_t mTestCount = 114; chip::Optional mNodeId; chip::Optional mCluster; @@ -100888,6 +100895,26 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestFinalCleanUp_113() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Final clean-up Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class DL_LockUnlock : public TestCommandBridge { @@ -101344,322 +101371,498 @@ class DL_Schedules : public TestCommandBridge { err = TestGetMaxNumberOfYearDaySchedulesForUserAndVerifyDefaultValue_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Create Week Day schedule with 0 index\n"); - err = TestCreateWeekDayScheduleWith0Index_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Get Max number of Holiday schedules and verify default value\n"); + err = TestGetMaxNumberOfHolidaySchedulesAndVerifyDefaultValue_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Create Week Day schedule with out-of-bounds index\n"); - err = TestCreateWeekDayScheduleWithOutOfBoundsIndex_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Create Week Day schedule with 0 index\n"); + err = TestCreateWeekDayScheduleWith0Index_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Create Week Day schedule with 0 user index\n"); - err = TestCreateWeekDayScheduleWith0UserIndex_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Create Week Day schedule with out-of-bounds index\n"); + err = TestCreateWeekDayScheduleWithOutOfBoundsIndex_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Create Week Day schedule with out-of-bounds user index\n"); - err = TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Create Week Day schedule with 0 user index\n"); + err = TestCreateWeekDayScheduleWith0UserIndex_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Create Week Day schedule for non-existing user\n"); - err = TestCreateWeekDayScheduleForNonExistingUser_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Create Week Day schedule with out-of-bounds user index\n"); + err = TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Create Week Day schedule with 0 days mask\n"); - err = TestCreateWeekDayScheduleWith0DaysMask_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Create Week Day schedule for non-existing user\n"); + err = TestCreateWeekDayScheduleForNonExistingUser_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Create Week Day schedule for Sunday and Monday\n"); - err = TestCreateWeekDayScheduleForSundayAndMonday_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Create Week Day schedule with 0 days mask\n"); + err = TestCreateWeekDayScheduleWith0DaysMask_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Create Week Day schedule for Sunday Wednesday and Saturday\n"); - err = TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Create Week Day schedule for Sunday and Monday\n"); + err = TestCreateWeekDayScheduleForSundayAndMonday_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Create Week Day schedule with invalid start hour\n"); - err = TestCreateWeekDayScheduleWithInvalidStartHour_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Create Week Day schedule for Sunday Wednesday and Saturday\n"); + err = TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Create Week Day schedule with invalid start minute\n"); - err = TestCreateWeekDayScheduleWithInvalidStartMinute_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Create Week Day schedule with invalid start hour\n"); + err = TestCreateWeekDayScheduleWithInvalidStartHour_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Create Week Day schedule with invalid end hour\n"); - err = TestCreateWeekDayScheduleWithInvalidEndHour_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Create Week Day schedule with invalid start minute\n"); + err = TestCreateWeekDayScheduleWithInvalidStartMinute_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Create Week Day schedule with invalid end minute\n"); - err = TestCreateWeekDayScheduleWithInvalidEndMinute_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Create Week Day schedule with invalid end hour\n"); + err = TestCreateWeekDayScheduleWithInvalidEndHour_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Create Week Day schedule with start hour later that end hour\n"); - err = TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Create Week Day schedule with invalid end minute\n"); + err = TestCreateWeekDayScheduleWithInvalidEndMinute_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Create Week Day schedule with start minute later that end minute when hours are equal\n"); - err = TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Create Week Day schedule with start hour later that end hour\n"); + err = TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Make sure that previous operations did not create a schedule\n"); - err = TestMakeSureThatPreviousOperationsDidNotCreateASchedule_19(); + ChipLogProgress(chipTool, + " ***** Test Step 19 : Create Week Day schedule with start minute later that end minute when hours are equal\n"); + err = TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Get Week Day schedule with 0 index\n"); - err = TestGetWeekDayScheduleWith0Index_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Make sure that previous operations did not create a schedule\n"); + err = TestMakeSureThatPreviousOperationsDidNotCreateASchedule_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Get Week Day schedule with out-of-bounds index\n"); - err = TestGetWeekDayScheduleWithOutOfBoundsIndex_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Get Week Day schedule with 0 index\n"); + err = TestGetWeekDayScheduleWith0Index_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Get Week Day schedule with 0 user index\n"); - err = TestGetWeekDayScheduleWith0UserIndex_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Get Week Day schedule with out-of-bounds index\n"); + err = TestGetWeekDayScheduleWithOutOfBoundsIndex_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Get Week Day schedule with out-of-bounds user index\n"); - err = TestGetWeekDayScheduleWithOutOfBoundsUserIndex_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Get Week Day schedule with 0 user index\n"); + err = TestGetWeekDayScheduleWith0UserIndex_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Get Week Day schedule with non-existing user index\n"); - err = TestGetWeekDayScheduleWithNonExistingUserIndex_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Get Week Day schedule with out-of-bounds user index\n"); + err = TestGetWeekDayScheduleWithOutOfBoundsUserIndex_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Create Year Day schedule with 0 index\n"); - err = TestCreateYearDayScheduleWith0Index_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Get Week Day schedule with non-existing user index\n"); + err = TestGetWeekDayScheduleWithNonExistingUserIndex_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Create Year Day schedule with out-of-bounds index\n"); - err = TestCreateYearDayScheduleWithOutOfBoundsIndex_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : Create Year Day schedule with 0 index\n"); + err = TestCreateYearDayScheduleWith0Index_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Create Year Day schedule with 0 user index\n"); - err = TestCreateYearDayScheduleWith0UserIndex_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Create Year Day schedule with out-of-bounds index\n"); + err = TestCreateYearDayScheduleWithOutOfBoundsIndex_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Create Year Day schedule with out-of-bounds user index\n"); - err = TestCreateYearDayScheduleWithOutOfBoundsUserIndex_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Create Year Day schedule with 0 user index\n"); + err = TestCreateYearDayScheduleWith0UserIndex_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Create Year Day schedule for non-existing user\n"); - err = TestCreateYearDayScheduleForNonExistingUser_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Create Year Day schedule with out-of-bounds user index\n"); + err = TestCreateYearDayScheduleWithOutOfBoundsUserIndex_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Create Year Day schedule with start hour later that end hour\n"); - err = TestCreateYearDayScheduleWithStartHourLaterThatEndHour_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Create Year Day schedule for non-existing user\n"); + err = TestCreateYearDayScheduleForNonExistingUser_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Make sure that previous operations did not create a schedule\n"); - err = TestMakeSureThatPreviousOperationsDidNotCreateASchedule_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Create Year Day schedule with start hour later that end hour\n"); + err = TestCreateYearDayScheduleWithStartHourLaterThatEndHour_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Get Year Day schedule with 0 index\n"); - err = TestGetYearDayScheduleWith0Index_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Make sure that previous operations did not create a schedule\n"); + err = TestMakeSureThatPreviousOperationsDidNotCreateASchedule_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Get Year Day schedule with out-of-bounds index\n"); - err = TestGetYearDayScheduleWithOutOfBoundsIndex_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Get Year Day schedule with 0 index\n"); + err = TestGetYearDayScheduleWith0Index_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Get Year Day schedule with 0 user index\n"); - err = TestGetYearDayScheduleWith0UserIndex_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Get Year Day schedule with out-of-bounds index\n"); + err = TestGetYearDayScheduleWithOutOfBoundsIndex_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Get Year Day schedule with out-of-bounds user index\n"); - err = TestGetYearDayScheduleWithOutOfBoundsUserIndex_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Get Year Day schedule with 0 user index\n"); + err = TestGetYearDayScheduleWith0UserIndex_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Get Year Day schedule with non-existing user index\n"); - err = TestGetYearDayScheduleWithNonExistingUserIndex_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Get Year Day schedule with out-of-bounds user index\n"); + err = TestGetYearDayScheduleWithOutOfBoundsUserIndex_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Create Week Day schedule with valid parameters\n"); - err = TestCreateWeekDayScheduleWithValidParameters_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Get Year Day schedule with non-existing user index\n"); + err = TestGetYearDayScheduleWithNonExistingUserIndex_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Verify created schedule\n"); - err = TestVerifyCreatedSchedule_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Create Holiday schedule with 0 index\n"); + err = TestCreateHolidayScheduleWith0Index_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Create Year Day schedule with valid parameters\n"); - err = TestCreateYearDayScheduleWithValidParameters_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Create Holiday schedule with out-of-bounds index\n"); + err = TestCreateHolidayScheduleWithOutOfBoundsIndex_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Verify created schedule\n"); - err = TestVerifyCreatedSchedule_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Create Holiday schedule with start hour later that end hour\n"); + err = TestCreateHolidayScheduleWithStartHourLaterThatEndHour_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Clear Week Day schedule with 0 index\n"); - err = TestClearWeekDayScheduleWith0Index_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : Create Holiday schedule with invalid operating mode\n"); + err = TestCreateHolidayScheduleWithInvalidOperatingMode_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Clear Week Day schedule with out-of-bounds index\n"); - err = TestClearWeekDayScheduleWithOutOfBoundsIndex_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Make sure that previous operations did not create a schedule\n"); + err = TestMakeSureThatPreviousOperationsDidNotCreateASchedule_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Clear Week Day schedule with 0 user index\n"); - err = TestClearWeekDayScheduleWith0UserIndex_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Get Holiday schedule with 0 index\n"); + err = TestGetHolidayScheduleWith0Index_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Clear Week Day schedule with out-of-bounds user index\n"); - err = TestClearWeekDayScheduleWithOutOfBoundsUserIndex_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Get Holiday schedule with out-of-bounds index\n"); + err = TestGetHolidayScheduleWithOutOfBoundsIndex_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Clear Week Day schedule with non-existing user\n"); - err = TestClearWeekDayScheduleWithNonExistingUser_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : Create Holiday schedule with valid parameters\n"); + err = TestCreateHolidayScheduleWithValidParameters_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Clear Year Day schedule with 0 index\n"); - err = TestClearYearDayScheduleWith0Index_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : Verify created schedule\n"); + err = TestVerifyCreatedSchedule_46(); break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Clear Year Day schedule with out-of-bounds index\n"); - err = TestClearYearDayScheduleWithOutOfBoundsIndex_47(); + ChipLogProgress(chipTool, " ***** Test Step 47 : Create Week Day schedule with valid parameters\n"); + err = TestCreateWeekDayScheduleWithValidParameters_47(); break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Clear Year Day schedule with 0 user index\n"); - err = TestClearYearDayScheduleWith0UserIndex_48(); + ChipLogProgress(chipTool, " ***** Test Step 48 : Verify created schedule\n"); + err = TestVerifyCreatedSchedule_48(); break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Clear Year Day schedule with out-of-bounds user index\n"); - err = TestClearYearDayScheduleWithOutOfBoundsUserIndex_49(); + ChipLogProgress(chipTool, " ***** Test Step 49 : Create Year Day schedule with valid parameters\n"); + err = TestCreateYearDayScheduleWithValidParameters_49(); break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Clear Year Day schedule with non-existing user\n"); - err = TestClearYearDayScheduleWithNonExistingUser_50(); + ChipLogProgress(chipTool, " ***** Test Step 50 : Verify created schedule\n"); + err = TestVerifyCreatedSchedule_50(); break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Make sure that week day schedule was not deleted\n"); - err = TestMakeSureThatWeekDayScheduleWasNotDeleted_51(); + ChipLogProgress(chipTool, " ***** Test Step 51 : Clear Week Day schedule with 0 index\n"); + err = TestClearWeekDayScheduleWith0Index_51(); break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Make sure that year day schedule was not deleted\n"); - err = TestMakeSureThatYearDayScheduleWasNotDeleted_52(); + ChipLogProgress(chipTool, " ***** Test Step 52 : Clear Week Day schedule with out-of-bounds index\n"); + err = TestClearWeekDayScheduleWithOutOfBoundsIndex_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Create another Week Day schedule with valid parameters\n"); - err = TestCreateAnotherWeekDayScheduleWithValidParameters_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Clear Week Day schedule with 0 user index\n"); + err = TestClearWeekDayScheduleWith0UserIndex_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Verify created week day schedule\n"); - err = TestVerifyCreatedWeekDaySchedule_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : Clear Week Day schedule with out-of-bounds user index\n"); + err = TestClearWeekDayScheduleWithOutOfBoundsUserIndex_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Create another Year Day schedule with valid parameters\n"); - err = TestCreateAnotherYearDayScheduleWithValidParameters_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : Clear Week Day schedule with non-existing user\n"); + err = TestClearWeekDayScheduleWithNonExistingUser_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Verify created year day schedule\n"); - err = TestVerifyCreatedYearDaySchedule_56(); + ChipLogProgress(chipTool, " ***** Test Step 56 : Make sure that week day schedule was not deleted\n"); + err = TestMakeSureThatWeekDayScheduleWasNotDeleted_56(); break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Clear a single week day schedule for the first user\n"); - err = TestClearASingleWeekDayScheduleForTheFirstUser_57(); + ChipLogProgress(chipTool, " ***** Test Step 57 : Make sure that year day schedule was not deleted\n"); + err = TestMakeSureThatYearDayScheduleWasNotDeleted_57(); break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Verify cleared week day schedule\n"); - err = TestVerifyClearedWeekDaySchedule_58(); + ChipLogProgress(chipTool, " ***** Test Step 58 : Make sure that holiday schedule was not deleted\n"); + err = TestMakeSureThatHolidayScheduleWasNotDeleted_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Clear all remaining week day schedules for the first user\n"); - err = TestClearAllRemainingWeekDaySchedulesForTheFirstUser_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Clear Year Day schedule with 0 index\n"); + err = TestClearYearDayScheduleWith0Index_59(); break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Verify cleared week schedule\n"); - err = TestVerifyClearedWeekSchedule_60(); + ChipLogProgress(chipTool, " ***** Test Step 60 : Clear Year Day schedule with out-of-bounds index\n"); + err = TestClearYearDayScheduleWithOutOfBoundsIndex_60(); break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Make sure that first year day schedule was not deleted\n"); - err = TestMakeSureThatFirstYearDayScheduleWasNotDeleted_61(); + ChipLogProgress(chipTool, " ***** Test Step 61 : Clear Year Day schedule with 0 user index\n"); + err = TestClearYearDayScheduleWith0UserIndex_61(); break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Make sure that second year day schedule was not deleted\n"); - err = TestMakeSureThatSecondYearDayScheduleWasNotDeleted_62(); + ChipLogProgress(chipTool, " ***** Test Step 62 : Clear Year Day schedule with out-of-bounds user index\n"); + err = TestClearYearDayScheduleWithOutOfBoundsUserIndex_62(); break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Create another Week Day schedule with valid parameters\n"); - err = TestCreateAnotherWeekDayScheduleWithValidParameters_63(); + ChipLogProgress(chipTool, " ***** Test Step 63 : Clear Year Day schedule with non-existing user\n"); + err = TestClearYearDayScheduleWithNonExistingUser_63(); break; case 64: - ChipLogProgress(chipTool, " ***** Test Step 64 : Clear a single year day schedule for the first user\n"); - err = TestClearASingleYearDayScheduleForTheFirstUser_64(); + ChipLogProgress(chipTool, " ***** Test Step 64 : Make sure that week day schedule was not deleted\n"); + err = TestMakeSureThatWeekDayScheduleWasNotDeleted_64(); break; case 65: - ChipLogProgress(chipTool, " ***** Test Step 65 : Verify cleared year day schedule\n"); - err = TestVerifyClearedYearDaySchedule_65(); + ChipLogProgress(chipTool, " ***** Test Step 65 : Make sure that year day schedule was not deleted\n"); + err = TestMakeSureThatYearDayScheduleWasNotDeleted_65(); break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Clear all remaining year schedules for the first user\n"); - err = TestClearAllRemainingYearSchedulesForTheFirstUser_66(); + ChipLogProgress(chipTool, " ***** Test Step 66 : Make sure that holiday schedule was not deleted\n"); + err = TestMakeSureThatHolidayScheduleWasNotDeleted_66(); break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Verify that second year day schedule was cleared\n"); - err = TestVerifyThatSecondYearDayScheduleWasCleared_67(); + ChipLogProgress(chipTool, " ***** Test Step 67 : Clear Holiday schedule with 0 index\n"); + err = TestClearHolidayScheduleWith0Index_67(); break; case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Verify created week day schedule\n"); - err = TestVerifyCreatedWeekDaySchedule_68(); + ChipLogProgress(chipTool, " ***** Test Step 68 : Clear Holiday schedule with out-of-bounds index\n"); + err = TestClearHolidayScheduleWithOutOfBoundsIndex_68(); break; case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Clear all remaining week day schedules for the first user\n"); - err = TestClearAllRemainingWeekDaySchedulesForTheFirstUser_69(); + ChipLogProgress(chipTool, " ***** Test Step 69 : Make sure that week day schedule was not deleted\n"); + err = TestMakeSureThatWeekDayScheduleWasNotDeleted_69(); break; case 70: - ChipLogProgress( - chipTool, " ***** Test Step 70 : Create new user without credential so we can add more schedules to it\n"); - err = TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_70(); + ChipLogProgress(chipTool, " ***** Test Step 70 : Make sure that year day schedule was not deleted\n"); + err = TestMakeSureThatYearDayScheduleWasNotDeleted_70(); break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Create Week Day schedule with valid parameters for first user\n"); - err = TestCreateWeekDayScheduleWithValidParametersForFirstUser_71(); + ChipLogProgress(chipTool, " ***** Test Step 71 : Make sure that holiday schedule was not deleted\n"); + err = TestMakeSureThatHolidayScheduleWasNotDeleted_71(); break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Verify created week day schedule for first user\n"); - err = TestVerifyCreatedWeekDayScheduleForFirstUser_72(); + ChipLogProgress(chipTool, " ***** Test Step 72 : Create another Week Day schedule with valid parameters\n"); + err = TestCreateAnotherWeekDayScheduleWithValidParameters_72(); break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Create Year Day schedule for first user\n"); - err = TestCreateYearDayScheduleForFirstUser_73(); + ChipLogProgress(chipTool, " ***** Test Step 73 : Verify created week day schedule\n"); + err = TestVerifyCreatedWeekDaySchedule_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Verify created year day schedule for first\n"); - err = TestVerifyCreatedYearDayScheduleForFirst_74(); + ChipLogProgress(chipTool, " ***** Test Step 74 : Create another Year Day schedule with valid parameters\n"); + err = TestCreateAnotherYearDayScheduleWithValidParameters_74(); break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Create Week Day schedule with valid parameters for second user\n"); - err = TestCreateWeekDayScheduleWithValidParametersForSecondUser_75(); + ChipLogProgress(chipTool, " ***** Test Step 75 : Verify created year day schedule\n"); + err = TestVerifyCreatedYearDaySchedule_75(); break; case 76: - ChipLogProgress(chipTool, " ***** Test Step 76 : Verify created week day schedule for first user\n"); - err = TestVerifyCreatedWeekDayScheduleForFirstUser_76(); + ChipLogProgress(chipTool, " ***** Test Step 76 : Create another Holiday schedule with valid parameters\n"); + err = TestCreateAnotherHolidayScheduleWithValidParameters_76(); break; case 77: - ChipLogProgress(chipTool, " ***** Test Step 77 : Create Year Day schedule for second user\n"); - err = TestCreateYearDayScheduleForSecondUser_77(); + ChipLogProgress(chipTool, " ***** Test Step 77 : Verify created holiday schedule\n"); + err = TestVerifyCreatedHolidaySchedule_77(); break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Verify created year day schedule for first\n"); - err = TestVerifyCreatedYearDayScheduleForFirst_78(); + ChipLogProgress(chipTool, " ***** Test Step 78 : Clear a single week day schedule for the first user\n"); + err = TestClearASingleWeekDayScheduleForTheFirstUser_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Cleanup\n"); - err = TestCleanup_79(); + ChipLogProgress(chipTool, " ***** Test Step 79 : Verify cleared week day schedule\n"); + err = TestVerifyClearedWeekDaySchedule_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Make sure clearing first user also cleared week day schedules\n"); - err = TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_80(); + ChipLogProgress(chipTool, " ***** Test Step 80 : Clear all remaining week day schedules for the first user\n"); + err = TestClearAllRemainingWeekDaySchedulesForTheFirstUser_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Make sure clearing first user also cleared year day schedules\n"); - err = TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_81(); + ChipLogProgress(chipTool, " ***** Test Step 81 : Verify cleared week schedule\n"); + err = TestVerifyClearedWeekSchedule_81(); break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Make sure clearing second user also cleared week day schedules\n"); - err = TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_82(); + ChipLogProgress(chipTool, " ***** Test Step 82 : Make sure that first year day schedule was not deleted\n"); + err = TestMakeSureThatFirstYearDayScheduleWasNotDeleted_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Make sure clearing second user also cleared year day schedules\n"); - err = TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_83(); + ChipLogProgress(chipTool, " ***** Test Step 83 : Make sure that second year day schedule was not deleted\n"); + err = TestMakeSureThatSecondYearDayScheduleWasNotDeleted_83(); + break; + case 84: + ChipLogProgress(chipTool, " ***** Test Step 84 : Make sure that first holiday schedule was not deleted\n"); + err = TestMakeSureThatFirstHolidayScheduleWasNotDeleted_84(); + break; + case 85: + ChipLogProgress(chipTool, " ***** Test Step 85 : Make sure that second holiday schedule was not deleted\n"); + err = TestMakeSureThatSecondHolidayScheduleWasNotDeleted_85(); + break; + case 86: + ChipLogProgress(chipTool, " ***** Test Step 86 : Create another Week Day schedule with valid parameters\n"); + err = TestCreateAnotherWeekDayScheduleWithValidParameters_86(); + break; + case 87: + ChipLogProgress(chipTool, " ***** Test Step 87 : Clear a single year day schedule for the first user\n"); + err = TestClearASingleYearDayScheduleForTheFirstUser_87(); + break; + case 88: + ChipLogProgress(chipTool, " ***** Test Step 88 : Verify cleared year day schedule\n"); + err = TestVerifyClearedYearDaySchedule_88(); + break; + case 89: + ChipLogProgress(chipTool, " ***** Test Step 89 : Clear all remaining year schedules for the first user\n"); + err = TestClearAllRemainingYearSchedulesForTheFirstUser_89(); + break; + case 90: + ChipLogProgress(chipTool, " ***** Test Step 90 : Verify that second year day schedule was cleared\n"); + err = TestVerifyThatSecondYearDayScheduleWasCleared_90(); + break; + case 91: + ChipLogProgress(chipTool, " ***** Test Step 91 : Verify created week day schedule\n"); + err = TestVerifyCreatedWeekDaySchedule_91(); + break; + case 92: + ChipLogProgress(chipTool, " ***** Test Step 92 : Clear all remaining week day schedules for the first user\n"); + err = TestClearAllRemainingWeekDaySchedulesForTheFirstUser_92(); + break; + case 93: + ChipLogProgress( + chipTool, " ***** Test Step 93 : Create new user without credential so we can add more schedules to it\n"); + err = TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_93(); + break; + case 94: + ChipLogProgress(chipTool, " ***** Test Step 94 : Create Week Day schedule with valid parameters for first user\n"); + err = TestCreateWeekDayScheduleWithValidParametersForFirstUser_94(); + break; + case 95: + ChipLogProgress(chipTool, " ***** Test Step 95 : Verify created week day schedule for first user\n"); + err = TestVerifyCreatedWeekDayScheduleForFirstUser_95(); + break; + case 96: + ChipLogProgress(chipTool, " ***** Test Step 96 : Create Year Day schedule for first user\n"); + err = TestCreateYearDayScheduleForFirstUser_96(); + break; + case 97: + ChipLogProgress(chipTool, " ***** Test Step 97 : Verify created year day schedule for first\n"); + err = TestVerifyCreatedYearDayScheduleForFirst_97(); + break; + case 98: + ChipLogProgress(chipTool, " ***** Test Step 98 : Create Week Day schedule with valid parameters for second user\n"); + err = TestCreateWeekDayScheduleWithValidParametersForSecondUser_98(); + break; + case 99: + ChipLogProgress(chipTool, " ***** Test Step 99 : Verify created week day schedule for first user\n"); + err = TestVerifyCreatedWeekDayScheduleForFirstUser_99(); + break; + case 100: + ChipLogProgress(chipTool, " ***** Test Step 100 : Create Year Day schedule for second user\n"); + err = TestCreateYearDayScheduleForSecondUser_100(); + break; + case 101: + ChipLogProgress(chipTool, " ***** Test Step 101 : Verify created year day schedule for first\n"); + err = TestVerifyCreatedYearDayScheduleForFirst_101(); + break; + case 102: + ChipLogProgress(chipTool, " ***** Test Step 102 : Cleanup the user\n"); + err = TestCleanupTheUser_102(); + break; + case 103: + ChipLogProgress(chipTool, " ***** Test Step 103 : Make sure clearing first user also cleared week day schedules\n"); + err = TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_103(); + break; + case 104: + ChipLogProgress(chipTool, " ***** Test Step 104 : Make sure clearing first user also cleared year day schedules\n"); + err = TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_104(); + break; + case 105: + ChipLogProgress(chipTool, " ***** Test Step 105 : Make sure clearing second user also cleared week day schedules\n"); + err = TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_105(); + break; + case 106: + ChipLogProgress(chipTool, " ***** Test Step 106 : Make sure clearing second user also cleared year day schedules\n"); + err = TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_106(); + break; + case 107: + ChipLogProgress(chipTool, " ***** Test Step 107 : Make sure that first holiday schedule was not deleted\n"); + err = TestMakeSureThatFirstHolidayScheduleWasNotDeleted_107(); + break; + case 108: + ChipLogProgress(chipTool, " ***** Test Step 108 : Make sure that second holiday schedule was not deleted\n"); + err = TestMakeSureThatSecondHolidayScheduleWasNotDeleted_108(); + break; + case 109: + ChipLogProgress(chipTool, " ***** Test Step 109 : Create another Holiday schedule at the last slot\n"); + err = TestCreateAnotherHolidayScheduleAtTheLastSlot_109(); + break; + case 110: + ChipLogProgress(chipTool, " ***** Test Step 110 : Verify Created Holiday Schedule\n"); + err = TestVerifyCreatedHolidaySchedule_110(); + break; + case 111: + ChipLogProgress(chipTool, " ***** Test Step 111 : Create new PIN credential and schedule user\n"); + err = TestCreateNewPinCredentialAndScheduleUser_111(); + break; + case 112: + ChipLogProgress(chipTool, " ***** Test Step 112 : Create Week Day schedule for first user\n"); + err = TestCreateWeekDayScheduleForFirstUser_112(); + break; + case 113: + ChipLogProgress(chipTool, " ***** Test Step 113 : Create Year Day schedule for first user\n"); + err = TestCreateYearDayScheduleForFirstUser_113(); + break; + case 114: + ChipLogProgress(chipTool, " ***** Test Step 114 : Clear a single holiday schedule\n"); + err = TestClearASingleHolidaySchedule_114(); + break; + case 115: + ChipLogProgress(chipTool, " ***** Test Step 115 : Make sure that first holiday schedule was not deleted\n"); + err = TestMakeSureThatFirstHolidayScheduleWasNotDeleted_115(); + break; + case 116: + ChipLogProgress(chipTool, " ***** Test Step 116 : Make sure that second holiday schedule was deleted\n"); + err = TestMakeSureThatSecondHolidayScheduleWasDeleted_116(); + break; + case 117: + ChipLogProgress(chipTool, " ***** Test Step 117 : Make sure that third holiday schedule was not deleted\n"); + err = TestMakeSureThatThirdHolidayScheduleWasNotDeleted_117(); + break; + case 118: + ChipLogProgress( + chipTool, " ***** Test Step 118 : Make sure clearing holiday schedule did not clear week day schedule\n"); + err = TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_118(); + break; + case 119: + ChipLogProgress( + chipTool, " ***** Test Step 119 : Make sure clearing holiday schedule did not clear year day schedule\n"); + err = TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_119(); + break; + case 120: + ChipLogProgress(chipTool, " ***** Test Step 120 : Clear all remaining holiday schedules\n"); + err = TestClearAllRemainingHolidaySchedules_120(); + break; + case 121: + ChipLogProgress(chipTool, " ***** Test Step 121 : Make sure that first holiday is still deleted\n"); + err = TestMakeSureThatFirstHolidayIsStillDeleted_121(); + break; + case 122: + ChipLogProgress(chipTool, " ***** Test Step 122 : Make sure that second holiday schedule was deleted\n"); + err = TestMakeSureThatSecondHolidayScheduleWasDeleted_122(); + break; + case 123: + ChipLogProgress(chipTool, " ***** Test Step 123 : Make sure that third holiday schedule was not deleted\n"); + err = TestMakeSureThatThirdHolidayScheduleWasNotDeleted_123(); + break; + case 124: + ChipLogProgress( + chipTool, " ***** Test Step 124 : Make sure clearing holiday schedule did not clear week day schedule\n"); + err = TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_124(); + break; + case 125: + ChipLogProgress( + chipTool, " ***** Test Step 125 : Make sure clearing holiday schedule did not clear year day schedule\n"); + err = TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_125(); + break; + case 126: + ChipLogProgress(chipTool, " ***** Test Step 126 : Final Cleanup\n"); + err = TestFinalCleanup_126(); break; } @@ -101688,7 +101891,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); @@ -101700,10 +101903,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); @@ -101730,7 +101933,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -101748,7 +101951,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); @@ -101760,13 +101963,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -101787,58 +101990,58 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 50: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -101850,19 +102053,19 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 63: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -101874,10 +102077,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -101924,82 +102127,211 @@ class DL_Schedules : public TestCommandBridge { case 83: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 84; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; - params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; - params.userIndex = nil; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and schedule user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull NumberOfTotalUsersSupported; - - CHIP_ERROR TestGetNumberOfSupportedUsers_2() - { + case 84: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 85: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 86: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 87: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 88: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 89: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 90: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 91: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 92: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 93: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 94: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 95: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 96: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 97: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 98: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 99: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 100: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 101: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 102: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 103: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 104: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 105: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 106: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 110: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 112: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 114: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 115: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 116: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 117: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 118: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 119: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 120: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 121: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 122: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 123: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 124: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 125: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 126: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 127; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + + params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = nil; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and schedule user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull NumberOfTotalUsersSupported; + + CHIP_ERROR TestGetNumberOfSupportedUsers_2() + { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102077,8 +102409,35 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull NumberOfHolidaySchedulesSupported; + + CHIP_ERROR TestGetMaxNumberOfHolidaySchedulesAndVerifyDefaultValue_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get Max number of Holiday schedules and verify default value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfHolidaySchedulesSupported", actualValue, 10)); + } + { + NumberOfHolidaySchedulesSupported = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } - CHIP_ERROR TestCreateWeekDayScheduleWith0Index_5() + CHIP_ERROR TestCreateWeekDayScheduleWith0Index_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102103,7 +102462,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsIndex_6() + CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsIndex_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102128,7 +102487,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWith0UserIndex_7() + CHIP_ERROR TestCreateWeekDayScheduleWith0UserIndex_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102153,7 +102512,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_8() + CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102178,7 +102537,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleForNonExistingUser_9() + CHIP_ERROR TestCreateWeekDayScheduleForNonExistingUser_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102203,7 +102562,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWith0DaysMask_10() + CHIP_ERROR TestCreateWeekDayScheduleWith0DaysMask_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102228,7 +102587,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleForSundayAndMonday_11() + CHIP_ERROR TestCreateWeekDayScheduleForSundayAndMonday_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102253,7 +102612,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_12() + CHIP_ERROR TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102278,7 +102637,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartHour_13() + CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartHour_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102303,7 +102662,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartMinute_14() + CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartMinute_15() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102328,7 +102687,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndHour_15() + CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndHour_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102353,7 +102712,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndMinute_16() + CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndMinute_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102378,7 +102737,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_17() + CHIP_ERROR TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_18() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102403,7 +102762,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_18() + CHIP_ERROR TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102430,7 +102789,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_19() + CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102467,7 +102826,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetWeekDayScheduleWith0Index_20() + CHIP_ERROR TestGetWeekDayScheduleWith0Index_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102504,7 +102863,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsIndex_21() + CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsIndex_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102542,7 +102901,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetWeekDayScheduleWith0UserIndex_22() + CHIP_ERROR TestGetWeekDayScheduleWith0UserIndex_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102579,7 +102938,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsUserIndex_23() + CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsUserIndex_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102617,7 +102976,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetWeekDayScheduleWithNonExistingUserIndex_24() + CHIP_ERROR TestGetWeekDayScheduleWithNonExistingUserIndex_25() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102654,7 +103013,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWith0Index_25() + CHIP_ERROR TestCreateYearDayScheduleWith0Index_26() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102676,7 +103035,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsIndex_26() + CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsIndex_27() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102698,7 +103057,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWith0UserIndex_27() + CHIP_ERROR TestCreateYearDayScheduleWith0UserIndex_28() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102720,7 +103079,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsUserIndex_28() + CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsUserIndex_29() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102742,7 +103101,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleForNonExistingUser_29() + CHIP_ERROR TestCreateYearDayScheduleForNonExistingUser_30() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102764,7 +103123,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_30() + CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_31() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102786,7 +103145,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_31() + CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_32() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102823,7 +103182,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetYearDayScheduleWith0Index_32() + CHIP_ERROR TestGetYearDayScheduleWith0Index_33() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102860,7 +103219,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsIndex_33() + CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsIndex_34() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102898,7 +103257,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetYearDayScheduleWith0UserIndex_34() + CHIP_ERROR TestGetYearDayScheduleWith0UserIndex_35() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102935,7 +103294,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsUserIndex_35() + CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsUserIndex_36() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -102973,7 +103332,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestGetYearDayScheduleWithNonExistingUserIndex_36() + CHIP_ERROR TestGetYearDayScheduleWithNonExistingUserIndex_37() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103010,50 +103369,301 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithValidParameters_37() + CHIP_ERROR TestCreateHolidayScheduleWith0Index_38() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; - [cluster setWeekDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"Create Holiday schedule with 0 index Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedSchedule_38() + CHIP_ERROR TestCreateHolidayScheduleWithOutOfBoundsIndex_39() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1]; + params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + [cluster setHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with out-of-bounds index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; - { - id actualValue = values.weekDayIndex; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateHolidayScheduleWithStartHourLaterThatEndHour_40() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + [cluster setHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with start hour later that end hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateHolidayScheduleWithInvalidOperatingMode_41() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:5]; + [cluster setHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_42() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGetHolidayScheduleWith0Index_43() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Get Holiday schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 0)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGetHolidayScheduleWithOutOfBoundsIndex_44() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Get Holiday schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue( + "holidayIndex", actualValue, [NumberOfHolidaySchedulesSupported unsignedCharValue] + 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateHolidayScheduleWithValidParameters_45() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + [cluster setHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with valid parameters Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedSchedule_46() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateWeekDayScheduleWithValidParameters_47() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.daysMask = [NSNumber numberWithUnsignedChar:1]; + params.startHour = [NSNumber numberWithUnsignedChar:15]; + params.startMinute = [NSNumber numberWithUnsignedChar:16]; + params.endHour = [NSNumber numberWithUnsignedChar:18]; + params.endMinute = [NSNumber numberWithUnsignedChar:0]; + [cluster setWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedSchedule_48() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); } @@ -103098,7 +103708,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleWithValidParameters_39() + CHIP_ERROR TestCreateYearDayScheduleWithValidParameters_49() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103121,7 +103731,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedSchedule_40() + CHIP_ERROR TestVerifyCreatedSchedule_50() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103168,7 +103778,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearWeekDayScheduleWith0Index_41() + CHIP_ERROR TestClearWeekDayScheduleWith0Index_51() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103188,7 +103798,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsIndex_42() + CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsIndex_52() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103208,7 +103818,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearWeekDayScheduleWith0UserIndex_43() + CHIP_ERROR TestClearWeekDayScheduleWith0UserIndex_53() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103228,7 +103838,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsUserIndex_44() + CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsUserIndex_54() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103248,7 +103858,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearWeekDayScheduleWithNonExistingUser_45() + CHIP_ERROR TestClearWeekDayScheduleWithNonExistingUser_55() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103268,49 +103878,204 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearYearDayScheduleWith0Index_46() + CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_56() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with 0 index Error: %@", err); + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + } - CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsIndex_47() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with out-of-bounds index Error: %@", err); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + } - return CHIP_NO_ERROR; - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15)); + } - CHIP_ERROR TestClearYearDayScheduleWith0UserIndex_48() - { - CHIPDevice * device = GetDevice("alpha"); + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); + } + + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 18)); + } + + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_57() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_58() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearYearDayScheduleWith0Index_59() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsIndex_60() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearYearDayScheduleWith0UserIndex_61() + { + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103328,7 +104093,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsUserIndex_49() + CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsUserIndex_62() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103348,7 +104113,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearYearDayScheduleWithNonExistingUser_50() + CHIP_ERROR TestClearYearDayScheduleWithNonExistingUser_63() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103368,7 +104133,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_51() + CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_64() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103430,7 +104195,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_52() + CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_65() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103477,51 +104242,109 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_53() + CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_66() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; - [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedWeekDaySchedule_54() + CHIP_ERROR TestClearHolidayScheduleWith0Index_67() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + [cluster clearHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear Holiday schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearHolidayScheduleWithOutOfBoundsIndex_68() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + [cluster clearHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear Holiday schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_69() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); } { @@ -103536,27 +104359,27 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 15)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 18)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); } NextTest(); @@ -103565,48 +104388,25 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateAnotherYearDayScheduleWithValidParameters_55() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; - [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Year Day schedule with valid parameters Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyCreatedYearDaySchedule_56() + CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_70() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule Error: %@", err); + NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); } { @@ -103621,12 +104421,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); } { id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); } NextTest(); @@ -103635,56 +104435,44 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearASingleWeekDayScheduleForTheFirstUser_57() + CHIP_ERROR TestMakeSureThatHolidayScheduleWasNotDeleted_71() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a single week day schedule for the first user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyClearedWeekDaySchedule_58() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared week day schedule Error: %@", err); + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); } { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); } { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); } NextTest(); @@ -103693,28 +104481,33 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_59() + CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_72() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + params.daysMask = [NSNumber numberWithUnsignedChar:2]; + params.startHour = [NSNumber numberWithUnsignedChar:0]; + params.startMinute = [NSNumber numberWithUnsignedChar:0]; + params.endHour = [NSNumber numberWithUnsignedChar:23]; + params.endMinute = [NSNumber numberWithUnsignedChar:59]; + [cluster setWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyClearedWeekSchedule_60() + CHIP_ERROR TestVerifyCreatedWeekDaySchedule_73() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103726,7 +104519,7 @@ class DL_Schedules : public TestCommandBridge { [cluster getWeekDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared week schedule Error: %@", err); + NSLog(@"Verify created week day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103742,54 +104535,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 0)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMakeSureThatFirstYearDayScheduleWasNotDeleted_61() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params - completionHandler:^( - CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first year day schedule was not deleted Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); } { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0)); } { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); } { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23)); } { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); } NextTest(); @@ -103798,7 +104569,30 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureThatSecondYearDayScheduleWasNotDeleted_62() + CHIP_ERROR TestCreateAnotherYearDayScheduleWithValidParameters_74() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create another Year Day schedule with valid parameters Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedYearDaySchedule_75() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -103810,7 +104604,7 @@ class DL_Schedules : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second year day schedule was not deleted Error: %@", err); + NSLog(@"Verify created year day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103845,23 +104639,20 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_63() + CHIP_ERROR TestCreateAnotherHolidayScheduleWithValidParameters_76() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; - [cluster setWeekDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.localStartTime = [NSNumber numberWithUnsignedInt:123456UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:1234567UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:1]; + [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + NSLog(@"Create another Holiday schedule with valid parameters Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103871,18 +104662,64 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearASingleYearDayScheduleForTheFirstUser_64() + CHIP_ERROR TestVerifyCreatedHolidaySchedule_77() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created holiday schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearASingleWeekDayScheduleForTheFirstUser_78() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params + [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a single year day schedule for the first user Error: %@", err); + NSLog(@"Clear a single week day schedule for the first user Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103892,25 +104729,25 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyClearedYearDaySchedule_65() + CHIP_ERROR TestVerifyClearedWeekDaySchedule_79() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params + [cluster getWeekDayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared year day schedule Error: %@", err); + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify cleared week day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); } { @@ -103929,18 +104766,18 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllRemainingYearSchedulesForTheFirstUser_66() + CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_80() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:254]; + __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params + [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining year schedules for the first user Error: %@", err); + NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103950,25 +104787,25 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatSecondYearDayScheduleWasCleared_67() + CHIP_ERROR TestVerifyClearedWeekSchedule_81() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params + [cluster getWeekDayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that second year day schedule was cleared Error: %@", err); + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify cleared week schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2)); } { @@ -103987,25 +104824,25 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedWeekDaySchedule_68() + CHIP_ERROR TestMakeSureThatFirstYearDayScheduleWasNotDeleted_82() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params + [cluster getYearDayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that first year day schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); } { @@ -104019,28 +104856,13 @@ class DL_Schedules : public TestCommandBridge { } { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); - } - - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); - } - - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); - } - - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); } { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); } NextTest(); @@ -104049,54 +104871,1088 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_69() + CHIP_ERROR TestMakeSureThatSecondYearDayScheduleWasNotDeleted_83() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that second year day schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_84() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasNotDeleted_85() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_86() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.daysMask = [NSNumber numberWithUnsignedChar:2]; + params.startHour = [NSNumber numberWithUnsignedChar:0]; + params.startMinute = [NSNumber numberWithUnsignedChar:0]; + params.endHour = [NSNumber numberWithUnsignedChar:23]; + params.endMinute = [NSNumber numberWithUnsignedChar:59]; + [cluster setWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearASingleYearDayScheduleForTheFirstUser_87() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + NSLog(@"Clear a single year day schedule for the first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyClearedYearDaySchedule_88() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify cleared year day schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearAllRemainingYearSchedulesForTheFirstUser_89() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining year schedules for the first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatSecondYearDayScheduleWasCleared_90() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify that second year day schedule was cleared Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedWeekDaySchedule_91() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created week day schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); + } + + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + } + + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + } + + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + } + + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_92() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster clearWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_93() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.userName = nil; + params.userUniqueId = nil; + params.userStatus = nil; + params.userType = nil; + params.credentialRule = nil; + [cluster setUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create new user without credential so we can add more schedules to it Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForFirstUser_94() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.daysMask = [NSNumber numberWithUnsignedChar:1]; + params.startHour = [NSNumber numberWithUnsignedChar:0]; + params.startMinute = [NSNumber numberWithUnsignedChar:0]; + params.endHour = [NSNumber numberWithUnsignedChar:23]; + params.endMinute = [NSNumber numberWithUnsignedChar:59]; + [cluster setWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_95() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created week day schedule for first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + } + + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + } + + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + } + + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + } + + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateYearDayScheduleForFirstUser_96() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_97() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created year day schedule for first Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForSecondUser_98() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.daysMask = [NSNumber numberWithUnsignedChar:64]; + params.startHour = [NSNumber numberWithUnsignedChar:23]; + params.startMinute = [NSNumber numberWithUnsignedChar:0]; + params.endHour = [NSNumber numberWithUnsignedChar:23]; + params.endMinute = [NSNumber numberWithUnsignedChar:59]; + [cluster setWeekDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_99() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created week day schedule for first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 64)); + } + + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 23)); + } + + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + } + + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + } + + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateYearDayScheduleForSecondUser_100() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:55555UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:7777777UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for second user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_101() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created year day schedule for first Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 55555UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 7777777UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCleanupTheUser_102() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; + [cluster clearUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Cleanup the user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_103() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure clearing first user also cleared week day schedules Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_104() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure clearing first user also cleared year day schedules Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_105() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + [cluster getWeekDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure clearing second user also cleared week day schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_70() + CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_106() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userName = nil; - params.userUniqueId = nil; + [cluster getYearDayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure clearing second user also cleared year day schedules Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_107() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasNotDeleted_108() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateAnotherHolidayScheduleAtTheLastSlot_109() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; + params.localStartTime = [NSNumber numberWithUnsignedInt:1UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:100UL]; + params.operatingMode = [NSNumber numberWithUnsignedChar:4]; + [cluster setHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create another Holiday schedule at the last slot Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyCreatedHolidaySchedule_110() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify Created Holiday Schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); + } + + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_111() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + + params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.userIndex = nil; params.userStatus = nil; params.userType = nil; - params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user without credential so we can add more schedules to it Error: %@", err); + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and schedule user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForFirstUser_71() + CHIP_ERROR TestCreateWeekDayScheduleForFirstUser_112() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -104112,7 +105968,30 @@ class DL_Schedules : public TestCommandBridge { params.endMinute = [NSNumber numberWithUnsignedChar:59]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); + NSLog(@"Create Week Day schedule for first user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateYearDayScheduleForFirstUser_113() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; + params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; + [cluster setYearDayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for first user Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -104122,30 +106001,44 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_72() + CHIP_ERROR TestClearASingleHolidaySchedule_114() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster clearHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear a single holiday schedule Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatFirstHolidayScheduleWasNotDeleted_115() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); } { @@ -104154,28 +106047,18 @@ class DL_Schedules : public TestCommandBridge { } { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); - } - - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); - } - - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); } { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); } { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); } NextTest(); @@ -104184,53 +106067,55 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleForFirstUser_73() + CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasDeleted_116() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; - [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for first user Error: %@", err); + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + } + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_74() + CHIP_ERROR TestMakeSureThatThirdHolidayScheduleWasNotDeleted_117() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; + [cluster getHolidayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); } { @@ -104240,39 +106125,18 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); } { id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForSecondUser_75() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.daysMask = [NSNumber numberWithUnsignedChar:64]; - params.startHour = [NSNumber numberWithUnsignedChar:23]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; - [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4)); + } NextTest(); }]; @@ -104280,30 +106144,30 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_76() + CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_118() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); } { id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } { @@ -104313,12 +106177,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 64)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 23)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0)); } { @@ -104342,30 +106206,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateYearDayScheduleForSecondUser_77() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.localStartTime = [NSNumber numberWithUnsignedInt:55555UL]; - params.localEndTime = [NSNumber numberWithUnsignedInt:7777777UL]; - [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for second user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_78() + CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_119() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -104377,7 +106218,7 @@ class DL_Schedules : public TestCommandBridge { [cluster getYearDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -104398,12 +106239,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 55555UL)); + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); } { id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 7777777UL)); + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); } NextTest(); @@ -104412,50 +106253,44 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanup_79() + CHIP_ERROR TestClearAllRemainingHolidaySchedules_120() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearUserParams alloc] init]; - params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; - [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup Error: %@", err); + __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:254]; + [cluster clearHolidayScheduleWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining holiday schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_80() + CHIP_ERROR TestMakeSureThatFirstHolidayIsStillDeleted_121() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getWeekDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + [cluster getHolidayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared week day schedules Error: %@", err); + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that first holiday is still deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); } { @@ -104469,30 +106304,55 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_81() + CHIP_ERROR TestMakeSureThatSecondHolidayScheduleWasDeleted_122() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getYearDayScheduleWithParams:params + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + [cluster getHolidayScheduleWithParams:params completionHandler:^( - CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared year day schedules Error: %@", err); + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); } { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestMakeSureThatThirdHolidayScheduleWasNotDeleted_123() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; + [cluster getHolidayScheduleWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); } { @@ -104506,35 +106366,60 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_82() + CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearWeekDaySchedule_124() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared week day schedules Error: %@", err); + NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); } { id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + } + + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + } + + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + } + + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + } + + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); } NextTest(); @@ -104543,7 +106428,7 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_83() + CHIP_ERROR TestMakeSureClearingHolidayScheduleDidNotClearYearDaySchedule_125() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -104551,11 +106436,11 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; - params.userIndex = [NSNumber numberWithUnsignedShort:2U]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared year day schedules Error: %@", err); + NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -104566,12 +106451,22 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } + + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); } NextTest(); @@ -104579,6 +106474,26 @@ class DL_Schedules : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestFinalCleanup_126() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; + [cluster clearUserWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Final Cleanup Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_DL_2_2 : public TestCommandBridge { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index b7bb364d792898..e25fdfa6a75a62 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -54823,7 +54823,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { public: DL_UsersAndCredentialsSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("DL_UsersAndCredentials", 113, credsIssuerConfig) + TestCommand("DL_UsersAndCredentials", 114, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56608,6 +56608,9 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); } break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -58209,6 +58212,16 @@ class DL_UsersAndCredentialsSuite : public TestCommand ); } + case 113: { + LogStep(113, "Final clean-up"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } @@ -58445,7 +58458,7 @@ class DL_LockUnlockSuite : public TestCommand class DL_SchedulesSuite : public TestCommand { public: - DL_SchedulesSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_Schedules", 84, credsIssuerConfig) + DL_SchedulesSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_Schedules", 127, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -58469,6 +58482,7 @@ class DL_SchedulesSuite : public TestCommand uint16_t NumberOfTotalUsersSupported; uint8_t NumberOfWeekDaySchedulesSupportedPerUser; uint8_t NumberOfYearDaySchedulesSupportedPerUser; + uint8_t NumberOfHolidaySchedulesSupported; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -58531,7 +58545,14 @@ class DL_SchedulesSuite : public TestCommand } break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("numberOfHolidaySchedulesSupported", value, 10)); + + NumberOfHolidaySchedulesSupported = value; + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); @@ -58543,10 +58564,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); @@ -58573,6 +58594,9 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58584,7 +58608,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58596,7 +58620,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58609,7 +58633,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58621,7 +58645,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58633,7 +58657,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58645,9 +58669,6 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); - break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; @@ -58658,12 +58679,15 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58675,7 +58699,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58687,7 +58711,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58700,7 +58724,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58712,7 +58736,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58724,7 +58748,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 133)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58736,10 +58760,75 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 37: + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } break; - case 38: + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 0)); + + VerifyOrReturn(CheckValue("status", value.status, 133)); + } + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn( + CheckValue("holidayIndex", value.holidayIndex, static_cast(NumberOfHolidaySchedulesSupported + 1))); + + VerifyOrReturn(CheckValue("status", value.status, 133)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 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)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58766,10 +58855,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); } break; - case 39: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58787,37 +58876,22 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); } break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); - break; - case 46: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; - case 47: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; - case 48: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; - case 49: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; - case 50: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 51: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -58844,7 +58918,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); } break; - case 52: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58862,88 +58936,138 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); } break; - case 53: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + } break; - case 54: + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 61: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 62: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 63: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); } break; - case 55: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 56: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); - VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); } break; - case 57: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 58: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + VerifyOrReturn(CheckValue("status", value.status, 0)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); } break; - case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 67: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); break; - case 60: + case 68: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + break; + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + + VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); + + VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); + + VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); + + VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); } break; - case 61: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58961,31 +59085,209 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); } break; - case 62: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); - - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); - VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + } + break; + case 72: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 73: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2)); + + VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + + VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + } + break; + case 74: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 75: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); } break; - case 63: + case 76: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 64: + case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + } break; - case 65: + case 78: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 79: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 80: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 81: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 82: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + } + break; + case 83: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); + } + break; + case 84: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + } + break; + case 85: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + } + break; + case 86: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 87: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 88: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -58997,10 +59299,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 66: + case 89: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 67: + case 90: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -59012,7 +59314,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 68: + case 91: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -59039,16 +59341,16 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); } break; - case 69: + case 92: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 70: + case 93: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 71: + case 94: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 72: + case 95: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -59075,10 +59377,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); } break; - case 73: + case 96: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 74: + case 97: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -59096,10 +59398,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); } break; - case 75: + case 98: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 76: + case 99: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -59126,10 +59428,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); } break; - case 77: + case 100: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 78: + case 101: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; @@ -59147,10 +59449,10 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 7777777UL)); } break; - case 79: + case 102: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 80: + case 103: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; @@ -59162,41 +59464,298 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 139)); } break; - case 81: + case 104: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 105: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 106: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + } + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + } + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 110: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4)); + } + break; + case 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + } + break; + case 112: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 114: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 115: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + } + break; + case 116: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 117: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); + + VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4)); + } + break; + case 118: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + + VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + + VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + } + break; + case 119: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); + + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); + } + break; + case 120: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 121: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 122: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 123: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); + + VerifyOrReturn(CheckValue("status", value.status, 139)); + } + break; + case 124: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + + VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + + VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + + VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + } + break; + case 125: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); - } - break; - case 82: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4)); + VerifyOrReturn(CheckValue("status", value.status, 0)); - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); + VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); + VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValuePresent("localEndTime", value.localEndTime)); + VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 888888888UL)); } break; - case 83: + case 126: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); - - VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - - VerifyOrReturn(CheckValue("status", value.status, 139)); - } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -59254,7 +59813,12 @@ class DL_SchedulesSuite : public TestCommand DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Create Week Day schedule with 0 index"); + LogStep(5, "Get Max number of Holiday schedules and verify default value"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Create Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 0; @@ -59269,8 +59833,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 6: { - LogStep(6, "Create Week Day schedule with out-of-bounds index"); + case 7: { + LogStep(7, "Create Week Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); @@ -59285,8 +59849,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 7: { - LogStep(7, "Create Week Day schedule with 0 user index"); + case 8: { + LogStep(8, "Create Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59301,8 +59865,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 8: { - LogStep(8, "Create Week Day schedule with out-of-bounds user index"); + case 9: { + LogStep(9, "Create Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59317,8 +59881,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 9: { - LogStep(9, "Create Week Day schedule for non-existing user"); + case 10: { + LogStep(10, "Create Week Day schedule for non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59333,8 +59897,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 10: { - LogStep(10, "Create Week Day schedule with 0 days mask"); + case 11: { + LogStep(11, "Create Week Day schedule with 0 days mask"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59349,8 +59913,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 11: { - LogStep(11, "Create Week Day schedule for Sunday and Monday"); + case 12: { + LogStep(12, "Create Week Day schedule for Sunday and Monday"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59365,8 +59929,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 12: { - LogStep(12, "Create Week Day schedule for Sunday Wednesday and Saturday"); + case 13: { + LogStep(13, "Create Week Day schedule for Sunday Wednesday and Saturday"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59381,8 +59945,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 13: { - LogStep(13, "Create Week Day schedule with invalid start hour"); + case 14: { + LogStep(14, "Create Week Day schedule with invalid start hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59397,8 +59961,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 14: { - LogStep(14, "Create Week Day schedule with invalid start minute"); + case 15: { + LogStep(15, "Create Week Day schedule with invalid start minute"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59413,8 +59977,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 15: { - LogStep(15, "Create Week Day schedule with invalid end hour"); + case 16: { + LogStep(16, "Create Week Day schedule with invalid end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59429,8 +59993,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 16: { - LogStep(16, "Create Week Day schedule with invalid end minute"); + case 17: { + LogStep(17, "Create Week Day schedule with invalid end minute"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59445,8 +60009,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 17: { - LogStep(17, "Create Week Day schedule with start hour later that end hour"); + case 18: { + LogStep(18, "Create Week Day schedule with start hour later that end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59461,8 +60025,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 18: { - LogStep(18, "Create Week Day schedule with start minute later that end minute when hours are equal"); + case 19: { + LogStep(19, "Create Week Day schedule with start minute later that end minute when hours are equal"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59477,8 +60041,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 19: { - LogStep(19, "Make sure that previous operations did not create a schedule"); + case 20: { + LogStep(20, "Make sure that previous operations did not create a schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59488,8 +60052,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 20: { - LogStep(20, "Get Week Day schedule with 0 index"); + case 21: { + LogStep(21, "Get Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 0; @@ -59499,8 +60063,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 21: { - LogStep(21, "Get Week Day schedule with out-of-bounds index"); + case 22: { + LogStep(22, "Get Week Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); @@ -59510,8 +60074,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 22: { - LogStep(22, "Get Week Day schedule with 0 user index"); + case 23: { + LogStep(23, "Get Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59521,8 +60085,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 23: { - LogStep(23, "Get Week Day schedule with out-of-bounds user index"); + case 24: { + LogStep(24, "Get Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59532,8 +60096,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 24: { - LogStep(24, "Get Week Day schedule with non-existing user index"); + case 25: { + LogStep(25, "Get Week Day schedule with non-existing user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59543,8 +60107,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 25: { - LogStep(25, "Create Year Day schedule with 0 index"); + case 26: { + LogStep(26, "Create Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 0; @@ -59556,8 +60120,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 26: { - LogStep(26, "Create Year Day schedule with out-of-bounds index"); + case 27: { + LogStep(27, "Create Year Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); @@ -59569,8 +60133,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 27: { - LogStep(27, "Create Year Day schedule with 0 user index"); + case 28: { + LogStep(28, "Create Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59582,8 +60146,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 28: { - LogStep(28, "Create Year Day schedule with out-of-bounds user index"); + case 29: { + LogStep(29, "Create Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59595,8 +60159,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 29: { - LogStep(29, "Create Year Day schedule for non-existing user"); + case 30: { + LogStep(30, "Create Year Day schedule for non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59608,8 +60172,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 30: { - LogStep(30, "Create Year Day schedule with start hour later that end hour"); + case 31: { + LogStep(31, "Create Year Day schedule with start hour later that end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59621,8 +60185,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 31: { - LogStep(31, "Make sure that previous operations did not create a schedule"); + case 32: { + LogStep(32, "Make sure that previous operations did not create a schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59632,8 +60196,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 32: { - LogStep(32, "Get Year Day schedule with 0 index"); + case 33: { + LogStep(33, "Get Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 0; @@ -59643,8 +60207,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 33: { - LogStep(33, "Get Year Day schedule with out-of-bounds index"); + case 34: { + LogStep(34, "Get Year Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); @@ -59654,8 +60218,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 34: { - LogStep(34, "Get Year Day schedule with 0 user index"); + case 35: { + LogStep(35, "Get Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59665,8 +60229,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 35: { - LogStep(35, "Get Year Day schedule with out-of-bounds user index"); + case 36: { + LogStep(36, "Get Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59676,8 +60240,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 36: { - LogStep(36, "Get Year Day schedule with non-existing user index"); + case 37: { + LogStep(37, "Get Year Day schedule with non-existing user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59687,8 +60251,113 @@ class DL_SchedulesSuite : public TestCommand ); } - case 37: { - LogStep(37, "Create Week Day schedule with valid parameters"); + case 38: { + LogStep(38, "Create Holiday schedule with 0 index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = 0; + value.localStartTime = 12345UL; + value.localEndTime = 12345689UL; + value.operatingMode = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 39: { + LogStep(39, "Create Holiday schedule with out-of-bounds index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = static_cast(NumberOfHolidaySchedulesSupported + 1); + value.localStartTime = 12345UL; + value.localEndTime = 12345689UL; + value.operatingMode = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 40: { + LogStep(40, "Create Holiday schedule with start hour later that end hour"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = 1; + value.localStartTime = 12345689UL; + value.localEndTime = 12345688UL; + value.operatingMode = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 41: { + LogStep(41, "Create Holiday schedule with invalid operating mode"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = 1; + value.localStartTime = 12345UL; + value.localEndTime = 12345689UL; + value.operatingMode = static_cast(5); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 42: { + LogStep(42, "Make sure that previous operations did not create a schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 43: { + LogStep(43, "Get Holiday schedule with 0 index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 0; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 44: { + LogStep(44, "Get Holiday schedule with out-of-bounds index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = static_cast(NumberOfHolidaySchedulesSupported + 1); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 45: { + LogStep(45, "Create Holiday schedule with valid parameters"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = 1; + value.localStartTime = 12345UL; + value.localEndTime = 12345689UL; + value.operatingMode = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 46: { + LogStep(46, "Verify created schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 47: { + LogStep(47, "Create Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59703,8 +60372,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 38: { - LogStep(38, "Verify created schedule"); + case 48: { + LogStep(48, "Verify created schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59714,8 +60383,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 39: { - LogStep(39, "Create Year Day schedule with valid parameters"); + case 49: { + LogStep(49, "Create Year Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59727,8 +60396,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 40: { - LogStep(40, "Verify created schedule"); + case 50: { + LogStep(50, "Verify created schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59738,8 +60407,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 41: { - LogStep(41, "Clear Week Day schedule with 0 index"); + case 51: { + LogStep(51, "Clear Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 0; @@ -59749,8 +60418,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 42: { - LogStep(42, "Clear Week Day schedule with out-of-bounds index"); + case 52: { + LogStep(52, "Clear Week Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); @@ -59760,8 +60429,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 43: { - LogStep(43, "Clear Week Day schedule with 0 user index"); + case 53: { + LogStep(53, "Clear Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59771,8 +60440,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 44: { - LogStep(44, "Clear Week Day schedule with out-of-bounds user index"); + case 54: { + LogStep(54, "Clear Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59782,8 +60451,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 45: { - LogStep(45, "Clear Week Day schedule with non-existing user"); + case 55: { + LogStep(55, "Clear Week Day schedule with non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59793,8 +60462,40 @@ class DL_SchedulesSuite : public TestCommand ); } - case 46: { - LogStep(46, "Clear Year Day schedule with 0 index"); + case 56: { + LogStep(56, "Make sure that week day schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; + value.weekDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 57: { + LogStep(57, "Make sure that year day schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; + value.yearDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 58: { + LogStep(58, "Make sure that holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 59: { + LogStep(59, "Clear Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 0; @@ -59804,8 +60505,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 47: { - LogStep(47, "Clear Year Day schedule with out-of-bounds index"); + case 60: { + LogStep(60, "Clear Year Day schedule with out-of-bounds index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); @@ -59815,8 +60516,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 48: { - LogStep(48, "Clear Year Day schedule with 0 user index"); + case 61: { + LogStep(61, "Clear Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59826,8 +60527,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 49: { - LogStep(49, "Clear Year Day schedule with out-of-bounds user index"); + case 62: { + LogStep(62, "Clear Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59837,8 +60538,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 50: { - LogStep(50, "Clear Year Day schedule with non-existing user"); + case 63: { + LogStep(63, "Clear Year Day schedule with non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59848,8 +60549,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 51: { - LogStep(51, "Make sure that week day schedule was not deleted"); + case 64: { + LogStep(64, "Make sure that week day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59859,8 +60560,60 @@ class DL_SchedulesSuite : public TestCommand ); } - case 52: { - LogStep(52, "Make sure that year day schedule was not deleted"); + case 65: { + LogStep(65, "Make sure that year day schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; + value.yearDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 66: { + LogStep(66, "Make sure that holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 67: { + LogStep(67, "Clear Holiday schedule with 0 index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; + value.holidayIndex = 0; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 68: { + LogStep(68, "Clear Holiday schedule with out-of-bounds index"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; + value.holidayIndex = static_cast(NumberOfYearDaySchedulesSupportedPerUser + 1); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 69: { + LogStep(69, "Make sure that week day schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; + value.weekDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 70: { + LogStep(70, "Make sure that year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59870,8 +60623,18 @@ class DL_SchedulesSuite : public TestCommand ); } - case 53: { - LogStep(53, "Create another Week Day schedule with valid parameters"); + case 71: { + LogStep(71, "Make sure that holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 72: { + LogStep(72, "Create another Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 2; @@ -59886,8 +60649,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 54: { - LogStep(54, "Verify created week day schedule"); + case 73: { + LogStep(73, "Verify created week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 2; @@ -59897,8 +60660,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 55: { - LogStep(55, "Create another Year Day schedule with valid parameters"); + case 74: { + LogStep(74, "Create another Year Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 2; @@ -59910,8 +60673,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 56: { - LogStep(56, "Verify created year day schedule"); + case 75: { + LogStep(75, "Verify created year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 2; @@ -59921,8 +60684,31 @@ class DL_SchedulesSuite : public TestCommand ); } - case 57: { - LogStep(57, "Clear a single week day schedule for the first user"); + case 76: { + LogStep(76, "Create another Holiday schedule with valid parameters"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = 2; + value.localStartTime = 123456UL; + value.localEndTime = 1234567UL; + value.operatingMode = static_cast(1); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 77: { + LogStep(77, "Verify created holiday schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 78: { + LogStep(78, "Clear a single week day schedule for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59932,8 +60718,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 58: { - LogStep(58, "Verify cleared week day schedule"); + case 79: { + LogStep(79, "Verify cleared week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -59943,8 +60729,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 59: { - LogStep(59, "Clear all remaining week day schedules for the first user"); + case 80: { + LogStep(80, "Clear all remaining week day schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 254; @@ -59954,8 +60740,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 60: { - LogStep(60, "Verify cleared week schedule"); + case 81: { + LogStep(81, "Verify cleared week schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 2; @@ -59965,8 +60751,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 61: { - LogStep(61, "Make sure that first year day schedule was not deleted"); + case 82: { + LogStep(82, "Make sure that first year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -59976,8 +60762,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 62: { - LogStep(62, "Make sure that second year day schedule was not deleted"); + case 83: { + LogStep(83, "Make sure that second year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 2; @@ -59987,8 +60773,28 @@ class DL_SchedulesSuite : public TestCommand ); } - case 63: { - LogStep(63, "Create another Week Day schedule with valid parameters"); + case 84: { + LogStep(84, "Make sure that first holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 85: { + LogStep(85, "Make sure that second holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 86: { + LogStep(86, "Create another Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -60003,8 +60809,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 64: { - LogStep(64, "Clear a single year day schedule for the first user"); + case 87: { + LogStep(87, "Clear a single year day schedule for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -60014,8 +60820,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 65: { - LogStep(65, "Verify cleared year day schedule"); + case 88: { + LogStep(88, "Verify cleared year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -60025,8 +60831,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 66: { - LogStep(66, "Clear all remaining year schedules for the first user"); + case 89: { + LogStep(89, "Clear all remaining year schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; value.yearDayIndex = 254; @@ -60036,8 +60842,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 67: { - LogStep(67, "Verify that second year day schedule was cleared"); + case 90: { + LogStep(90, "Verify that second year day schedule was cleared"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 2; @@ -60047,8 +60853,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 68: { - LogStep(68, "Verify created week day schedule"); + case 91: { + LogStep(91, "Verify created week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -60058,8 +60864,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 69: { - LogStep(69, "Clear all remaining week day schedules for the first user"); + case 92: { + LogStep(92, "Clear all remaining week day schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; value.weekDayIndex = 254; @@ -60069,8 +60875,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 70: { - LogStep(70, "Create new user without credential so we can add more schedules to it"); + case 93: { + LogStep(93, "Create new user without credential so we can add more schedules to it"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; value.operationType = static_cast(0); @@ -60085,8 +60891,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 71: { - LogStep(71, "Create Week Day schedule with valid parameters for first user"); + case 94: { + LogStep(94, "Create Week Day schedule with valid parameters for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -60101,8 +60907,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 72: { - LogStep(72, "Verify created week day schedule for first user"); + case 95: { + LogStep(95, "Verify created week day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -60112,8 +60918,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 73: { - LogStep(73, "Create Year Day schedule for first user"); + case 96: { + LogStep(96, "Create Year Day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 4; @@ -60125,8 +60931,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 74: { - LogStep(74, "Verify created year day schedule for first"); + case 97: { + LogStep(97, "Verify created year day schedule for first"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 4; @@ -60136,8 +60942,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 75: { - LogStep(75, "Create Week Day schedule with valid parameters for second user"); + case 98: { + LogStep(98, "Create Week Day schedule with valid parameters for second user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 4; @@ -60152,8 +60958,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 76: { - LogStep(76, "Verify created week day schedule for first user"); + case 99: { + LogStep(99, "Verify created week day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 4; @@ -60163,8 +60969,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 77: { - LogStep(77, "Create Year Day schedule for second user"); + case 100: { + LogStep(100, "Create Year Day schedule for second user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -60176,8 +60982,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 78: { - LogStep(78, "Verify created year day schedule for first"); + case 101: { + LogStep(101, "Verify created year day schedule for first"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -60187,8 +60993,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 79: { - LogStep(79, "Cleanup"); + case 102: { + LogStep(102, "Cleanup the user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 65534U; @@ -60197,8 +61003,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 80: { - LogStep(80, "Make sure clearing first user also cleared week day schedules"); + case 103: { + LogStep(103, "Make sure clearing first user also cleared week day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 1; @@ -60208,8 +61014,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 81: { - LogStep(81, "Make sure clearing first user also cleared year day schedules"); + case 104: { + LogStep(104, "Make sure clearing first user also cleared year day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 4; @@ -60219,8 +61025,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 82: { - LogStep(82, "Make sure clearing second user also cleared week day schedules"); + case 105: { + LogStep(105, "Make sure clearing second user also cleared week day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; value.weekDayIndex = 4; @@ -60230,8 +61036,8 @@ class DL_SchedulesSuite : public TestCommand ); } - case 83: { - LogStep(83, "Make sure clearing second user also cleared year day schedules"); + case 106: { + LogStep(106, "Make sure clearing second user also cleared year day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; value.yearDayIndex = 1; @@ -60241,6 +61047,230 @@ class DL_SchedulesSuite : public TestCommand ); } + case 107: { + LogStep(107, "Make sure that first holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 108: { + LogStep(108, "Make sure that second holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 109: { + LogStep(109, "Create another Holiday schedule at the last slot"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; + value.holidayIndex = NumberOfHolidaySchedulesSupported; + value.localStartTime = 1UL; + value.localEndTime = 100UL; + value.operatingMode = static_cast(4); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 110: { + LogStep(110, "Verify Created Holiday Schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = NumberOfHolidaySchedulesSupported; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 111: { + LogStep(111, "Create new PIN credential and schedule user"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 1U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + value.userIndex.SetNull(); + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 112: { + LogStep(112, "Create Week Day schedule for first user"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; + value.weekDayIndex = 1; + value.userIndex = 1U; + value.daysMask = static_cast>(1); + value.startHour = 0; + value.startMinute = 0; + value.endHour = 23; + value.endMinute = 59; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 113: { + LogStep(113, "Create Year Day schedule for first user"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; + value.yearDayIndex = 1; + value.userIndex = 1U; + value.localStartTime = 9000UL; + value.localEndTime = 888888888UL; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 114: { + LogStep(114, "Clear a single holiday schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 115: { + LogStep(115, "Make sure that first holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 116: { + LogStep(116, "Make sure that second holiday schedule was deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 117: { + LogStep(117, "Make sure that third holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = NumberOfHolidaySchedulesSupported; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 118: { + LogStep(118, "Make sure clearing holiday schedule did not clear week day schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; + value.weekDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 119: { + LogStep(119, "Make sure clearing holiday schedule did not clear year day schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; + value.yearDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 120: { + LogStep(120, "Clear all remaining holiday schedules"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; + value.holidayIndex = 254; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 121: { + LogStep(121, "Make sure that first holiday is still deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 1; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 122: { + LogStep(122, "Make sure that second holiday schedule was deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = 2; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 123: { + LogStep(123, "Make sure that third holiday schedule was not deleted"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; + value.holidayIndex = NumberOfHolidaySchedulesSupported; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, + chip::NullOptional + + ); + } + case 124: { + LogStep(124, "Make sure clearing holiday schedule did not clear week day schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; + value.weekDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 125: { + LogStep(125, "Make sure clearing holiday schedule did not clear year day schedule"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; + value.yearDayIndex = 1; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, + chip::NullOptional + + ); + } + case 126: { + LogStep(126, "Final Cleanup"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; + value.userIndex = 65534U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } diff --git a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp index df6e20c7b712be..ee9e1c2f571c47 100644 --- a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp @@ -226,6 +226,33 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::SetHolidaySchedule::Id: { + Commands::SetHolidaySchedule::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfDoorLockClusterSetHolidayScheduleCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GetHolidaySchedule::Id: { + Commands::GetHolidaySchedule::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfDoorLockClusterGetHolidayScheduleCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ClearHolidaySchedule::Id: { + Commands::ClearHolidaySchedule::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfDoorLockClusterClearHolidayScheduleCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::SetUser::Id: { Commands::SetUser::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); diff --git a/zzz_generated/lock-app/zap-generated/access.h b/zzz_generated/lock-app/zap-generated/access.h index 15851d1a390ef2..76b4457db0de0d 100644 --- a/zzz_generated/lock-app/zap-generated/access.h +++ b/zzz_generated/lock-app/zap-generated/access.h @@ -201,6 +201,9 @@ 257, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: ClearYearDaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: SetHolidaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: GetHolidaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: ClearHolidaySchedule, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ 257, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ @@ -244,6 +247,9 @@ 14, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ 15, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ 16, /* Cluster: Door Lock, Command: ClearYearDaySchedule, Privilege: administer */ \ + 17, /* Cluster: Door Lock, Command: SetHolidaySchedule, Privilege: administer */ \ + 18, /* Cluster: Door Lock, Command: GetHolidaySchedule, Privilege: administer */ \ + 19, /* Cluster: Door Lock, Command: ClearHolidaySchedule, Privilege: administer */ \ 26, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ 27, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ 29, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ @@ -287,6 +293,9 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearYearDaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetHolidaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetHolidaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearHolidaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index a849fb4901ee18..79ff7fc06534d4 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -169,7 +169,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 242 +#define GENERATED_ATTRIBUTE_COUNT 243 #define GENERATED_ATTRIBUTES \ { \ \ @@ -508,6 +508,7 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfRFIDUsersSupported */ \ { 0x00000014, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfWeekDaySchedulesSupportedPerUser */ \ { 0x00000015, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfYearDaySchedulesSupportedPerUser */ \ + { 0x00000016, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfHolidaySchedulesSupported */ \ { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(8) }, /* MaxPINCodeLength */ \ { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x00000019, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(20) }, /* MaxRFIDCodeLength */ \ @@ -686,6 +687,9 @@ 0x0000000E /* SetYearDaySchedule */, \ 0x0000000F /* GetYearDaySchedule */, \ 0x00000010 /* ClearYearDaySchedule */, \ + 0x00000011 /* SetHolidaySchedule */, \ + 0x00000012 /* GetHolidaySchedule */, \ + 0x00000013 /* ClearHolidaySchedule */, \ 0x0000001A /* SetUser */, \ 0x0000001B /* GetUser */, \ 0x0000001D /* ClearUser */, \ @@ -693,9 +697,10 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=89)*/ \ + /* GeneratedCommandList (index=92)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ + 0x00000012 /* GetHolidayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ 0x00000023 /* SetCredentialResponse */, \ 0x00000025 /* GetCredentialStatusResponse */, \ @@ -999,12 +1004,12 @@ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ .attributes = ZAP_ATTRIBUTE_INDEX(215), \ - .attributeCount = 27, \ - .clusterSize = 41, \ + .attributeCount = 28, \ + .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ) ,\ },\ } @@ -1017,7 +1022,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 498 }, { ZAP_CLUSTER_INDEX(21), 6, 194 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 498 }, { ZAP_CLUSTER_INDEX(21), 6, 195 }, \ } // Largest attribute size is needed for various buffers @@ -1029,7 +1034,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (692) +#define ATTRIBUTE_MAX_SIZE (693) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2)