diff --git a/examples/lock-app/linux/include/LockEndpoint.h b/examples/lock-app/linux/include/LockEndpoint.h index bee91e7265239f..6654afbdb0278e 100644 --- a/examples/lock-app/linux/include/LockEndpoint.h +++ b/examples/lock-app/linux/include/LockEndpoint.h @@ -36,6 +36,7 @@ struct LockUserInfo struct LockCredentialInfo; struct WeekDaysScheduleInfo; struct YearDayScheduleInfo; +struct HolidayScheduleInfo; static constexpr size_t DOOR_LOCK_CREDENTIAL_INFO_MAX_DATA_SIZE = 20; @@ -43,12 +44,14 @@ class LockEndpoint { public: LockEndpoint(chip::EndpointId endpointId, uint16_t numberOfLockUsersSupported, uint16_t numberOfCredentialsSupported, - uint8_t weekDaySchedulesPerUser, uint8_t yearDaySchedulesPerUser, uint8_t numberOfCredentialsPerUser) : + uint8_t weekDaySchedulesPerUser, uint8_t yearDaySchedulesPerUser, uint8_t numberOfCredentialsPerUser, + uint8_t numberOfHolidaySchedules) : mEndpointId{ endpointId }, mLockState{ DlLockState::kLocked }, mLockUsers(numberOfLockUsersSupported), mLockCredentials(numberOfCredentialsSupported + 1), mWeekDaySchedules(numberOfLockUsersSupported, std::vector(weekDaySchedulesPerUser)), - mYearDaySchedules(numberOfLockUsersSupported, std::vector(yearDaySchedulesPerUser)) + mYearDaySchedules(numberOfLockUsersSupported, std::vector(yearDaySchedulesPerUser)), + mHolidaySchedules(numberOfHolidaySchedules) { for (auto & lockUser : mLockUsers) { @@ -74,10 +77,14 @@ class LockEndpoint DlStatus GetSchedule(uint8_t weekDayIndex, uint16_t userIndex, EmberAfPluginDoorLockWeekDaySchedule & schedule); DlStatus GetSchedule(uint8_t yearDayIndex, uint16_t userIndex, EmberAfPluginDoorLockYearDaySchedule & schedule); + DlStatus GetSchedule(uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule); + DlStatus SetSchedule(uint8_t weekDayIndex, uint16_t userIndex, DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute); DlStatus SetSchedule(uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime); + DlStatus SetSchedule(uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime, + DlOperatingMode operatingMode); private: bool setLockState(DlLockState lockState, const Optional & pin, DlOperationError & err); @@ -92,6 +99,7 @@ class LockEndpoint std::vector mLockCredentials; std::vector> mWeekDaySchedules; std::vector> mYearDaySchedules; + std::vector mHolidaySchedules; }; struct LockCredentialInfo @@ -115,3 +123,9 @@ struct YearDayScheduleInfo DlScheduleStatus status; EmberAfPluginDoorLockYearDaySchedule schedule; }; + +struct HolidayScheduleInfo +{ + DlScheduleStatus status; + EmberAfPluginDoorLockHolidaySchedule schedule; +}; diff --git a/examples/lock-app/linux/include/LockManager.h b/examples/lock-app/linux/include/LockManager.h index 56c5535fee095b..9631796e2b7d82 100644 --- a/examples/lock-app/linux/include/LockManager.h +++ b/examples/lock-app/linux/include/LockManager.h @@ -49,10 +49,14 @@ class LockManager EmberAfPluginDoorLockWeekDaySchedule & schedule); DlStatus GetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, EmberAfPluginDoorLockYearDaySchedule & schedule); + DlStatus GetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule); + DlStatus SetSchedule(chip::EndpointId endpointId, uint8_t weekDayIndex, uint16_t userIndex, DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute); DlStatus SetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime); + DlStatus SetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, + uint32_t localEndTime, DlOperatingMode operatingMode); static LockManager & Instance(); diff --git a/examples/lock-app/linux/src/LockEndpoint.cpp b/examples/lock-app/linux/src/LockEndpoint.cpp index 404fecebff0913..03f1ed92e835fc 100644 --- a/examples/lock-app/linux/src/LockEndpoint.cpp +++ b/examples/lock-app/linux/src/LockEndpoint.cpp @@ -294,6 +294,40 @@ DlStatus LockEndpoint::SetSchedule(uint8_t yearDayIndex, uint16_t userIndex, DlS return DlStatus::kSuccess; } +DlStatus LockEndpoint::GetSchedule(uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + if (0 == holidayIndex || holidayIndex > mHolidaySchedules.size()) + { + return DlStatus::kFailure; + } + + const auto & scheduleInStorage = mHolidaySchedules[holidayIndex - 1]; + if (DlScheduleStatus::kAvailable == scheduleInStorage.status) + { + return DlStatus::kNotFound; + } + + schedule = scheduleInStorage.schedule; + return DlStatus::kSuccess; +} + +DlStatus LockEndpoint::SetSchedule(uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime, + DlOperatingMode operatingMode) +{ + if (0 == holidayIndex || holidayIndex > mHolidaySchedules.size()) + { + return DlStatus::kFailure; + } + + auto & scheduleInStorage = mHolidaySchedules[holidayIndex - 1]; + scheduleInStorage.schedule.localStartTime = localStartTime; + scheduleInStorage.schedule.localEndTime = localEndTime; + scheduleInStorage.schedule.operatingMode = operatingMode; + scheduleInStorage.status = status; + + return DlStatus::kSuccess; +} + bool LockEndpoint::setLockState(DlLockState lockState, const Optional & pin, DlOperationError & err) { if (!pin.HasValue()) diff --git a/examples/lock-app/linux/src/LockManager.cpp b/examples/lock-app/linux/src/LockManager.cpp index 2858be79db2f74..c5cb21f86b8ea2 100644 --- a/examples/lock-app/linux/src/LockManager.cpp +++ b/examples/lock-app/linux/src/LockManager.cpp @@ -89,15 +89,25 @@ bool LockManager::InitEndpoint(chip::EndpointId endpointId) numberOfYearDaySchedulesPerUser = 10; } + uint8_t numberOfHolidaySchedules = 0; + if (!DoorLockServer::Instance().GetNumberOfHolidaySchedulesSupported(endpointId, numberOfHolidaySchedules)) + { + ChipLogError( + Zcl, + "Unable to get number of supported holiday schedules when initializing lock endpoint, defaulting to 10 [endpointId=%d]", + endpointId); + numberOfYearDaySchedulesPerUser = 10; + } + mEndpoints.emplace_back(endpointId, numberOfSupportedUsers, numberOfSupportedCredentials, numberOfWeekDaySchedulesPerUser, - numberOfYearDaySchedulesPerUser, numberOfCredentialsSupportedPerUser); + numberOfYearDaySchedulesPerUser, numberOfCredentialsSupportedPerUser, numberOfHolidaySchedules); ChipLogProgress(Zcl, "Initialized new lock door endpoint " "[id=%d,users=%d,credentials=%d,weekDaySchedulesPerUser=%d,yearDaySchedulesPerUser=%d," - "numberOfCredentialsSupportedPerUser=%d]", + "numberOfCredentialsSupportedPerUser=%d,holidaySchedules=%d]", endpointId, numberOfSupportedUsers, numberOfSupportedCredentials, numberOfWeekDaySchedulesPerUser, - numberOfYearDaySchedulesPerUser, numberOfCredentialsSupportedPerUser); + numberOfYearDaySchedulesPerUser, numberOfCredentialsSupportedPerUser, numberOfHolidaySchedules); return true; } @@ -227,6 +237,32 @@ DlStatus LockManager::SetSchedule(chip::EndpointId endpointId, uint8_t yearDayIn return lockEndpoint->SetSchedule(yearDayIndex, userIndex, status, localStartTime, localEndTime); } +DlStatus LockManager::GetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + auto lockEndpoint = getEndpoint(endpointId); + if (nullptr == lockEndpoint) + { + ChipLogError(Zcl, "Unable to get the holiday schedule - endpoint does not exist or not initialized [endpointId=%d]", + endpointId); + return DlStatus::kFailure; + } + return lockEndpoint->GetSchedule(holidayIndex, schedule); +} + +DlStatus LockManager::SetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode) +{ + auto lockEndpoint = getEndpoint(endpointId); + if (nullptr == lockEndpoint) + { + ChipLogError(Zcl, "Unable to set the holiday schedule - endpoint does not exist or not initialized [endpointId=%d]", + endpointId); + return DlStatus::kFailure; + } + return lockEndpoint->SetSchedule(holidayIndex, status, localStartTime, localEndTime, operatingMode); +} + LockEndpoint * LockManager::getEndpoint(chip::EndpointId endpointId) { for (auto & mEndpoint : mEndpoints) diff --git a/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp b/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp index ae696ef58c7d86..b5ef3a760d64dc 100644 --- a/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp +++ b/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp @@ -56,6 +56,12 @@ DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t w return LockManager::Instance().GetSchedule(endpointId, weekdayIndex, userIndex, schedule); } +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + return LockManager::Instance().GetSchedule(endpointId, holidayIndex, schedule); +} + DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute) @@ -76,6 +82,12 @@ DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t y return LockManager::Instance().GetSchedule(endpointId, yearDayIndex, userIndex, schedule); } +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode) +{ + return LockManager::Instance().SetSchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode); +} + void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1fd3d998899224..e60c6e0cc09767 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -587,6 +587,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; @@ -656,6 +657,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; @@ -710,6 +726,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; @@ -746,6 +770,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; @@ -2144,6 +2171,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/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 04a7905e06bf85..94aa2fa5e09b6c 100755 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -7133,6 +7133,30 @@ "incoming": 1, "outgoing": 0 }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, { "name": "SetUser", "code": 26, @@ -7225,6 +7249,14 @@ "incoming": 0, "outgoing": 1 }, + { + "name": "GetHolidayScheduleResponse", + "code": 18, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, { "name": "GetUserResponse", "code": 28, @@ -7465,11 +7497,11 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8193,5 +8225,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 939d4a3baf7a40..a2272df65c966b 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -197,6 +197,12 @@ bool DoorLockServer::GetNumberOfCredentialsSupportedPerUser(chip::EndpointId end Attributes::NumberOfCredentialsSupportedPerUser::Get, numberOfCredentialsSupportedPerUser); } +bool DoorLockServer::GetNumberOfHolidaySchedulesSupported(chip::EndpointId endpointId, uint8_t & numberOfHolidaySchedules) +{ + return GetAttribute(endpointId, Attributes::NumberOfHolidaySchedulesSupported::Id, + Attributes::NumberOfHolidaySchedulesSupported::Get, numberOfHolidaySchedules); +} + void DoorLockServer::SetUserCommandHandler(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType & commandData) @@ -2275,13 +2281,13 @@ DlStatus DoorLockServer::clearYearDaySchedule(chip::EndpointId endpointId, uint1 DlStatus DoorLockServer::clearYearDaySchedules(chip::EndpointId endpointId, uint16_t userIndex) { - uint8_t weekDaySchedulesPerUser = 0; - if (!GetNumberOfYearDaySchedulesPerUserSupported(endpointId, weekDaySchedulesPerUser)) + uint8_t yearDaySchedulesPerUser = 0; + if (!GetNumberOfYearDaySchedulesPerUserSupported(endpointId, yearDaySchedulesPerUser)) { return DlStatus::kFailure; } - for (uint8_t i = 1; i <= weekDaySchedulesPerUser; ++i) + for (uint8_t i = 1; i <= yearDaySchedulesPerUser; ++i) { auto status = clearYearDaySchedule(endpointId, userIndex, i); if (DlStatus::kSuccess != status) @@ -2312,6 +2318,72 @@ void DoorLockServer::sendGetYearDayScheduleResponse(chip::app::CommandHandler * commandObj->AddResponse(commandPath, response); } +bool DoorLockServer::holidayIndexValid(chip::EndpointId endpointId, uint8_t holidayIndex) +{ + uint8_t holidaysSupported; + if (!GetNumberOfHolidaySchedulesSupported(endpointId, holidaysSupported)) + { + return false; + } + + // appclusters, 5.2.4.22-25: year day index changes from 1 to maxNumberOfHolidaySchedules + if (0 == holidayIndex || holidayIndex > holidaysSupported) + { + return false; + } + return true; +} + +DlStatus DoorLockServer::clearHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex) +{ + auto status = + emberAfPluginDoorLockSetSchedule(endpointId, holidayIndex, DlScheduleStatus::kAvailable, 0, 0, DlOperatingMode::kNormal); + if (DlStatus::kSuccess != status && DlStatus::kNotFound != status) + { + ChipLogError( + Zcl, "[ClearHolidaySchedule] Unable to clear the schedule - internal error [endpointId=%d,scheduleIndex=%d,status=%u]", + endpointId, holidayIndex, to_underlying(status)); + return status; + } + return DlStatus::kSuccess; +} + +DlStatus DoorLockServer::clearHolidaySchedules(chip::EndpointId endpointId) +{ + uint8_t totalHolidaySchedules = 0; + if (!GetNumberOfHolidaySchedulesSupported(endpointId, totalHolidaySchedules)) + { + return DlStatus::kFailure; + } + + for (uint8_t i = 1; i <= totalHolidaySchedules; ++i) + { + auto status = clearHolidaySchedule(endpointId, i); + if (DlStatus::kSuccess != status) + { + return status; + } + } + return DlStatus::kSuccess; +} + +void DoorLockServer::sendHolidayScheduleResponse(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, uint8_t holidayIndex, + DlStatus status, uint32_t localStartTime, uint32_t localEndTime, + DlOperatingMode operatingMode) +{ + VerifyOrDie(nullptr != commandObj); + + auto response = Commands::GetHolidayScheduleResponse::Type{ holidayIndex, status }; + if (DlStatus::kSuccess == status) + { + response.localStartTime = Optional(localStartTime); + response.localEndTime = Optional(localEndTime); + response.operatingMode = Optional(operatingMode); + } + commandObj->AddResponse(commandPath, response); +} + EmberAfStatus DoorLockServer::clearCredential(chip::EndpointId endpointId, chip::FabricIndex modifier, chip::NodeId sourceNodeId, DlCredentialType credentialType, uint16_t credentialIndex, bool sendUserChangeEvent) { @@ -2634,6 +2706,149 @@ DlLockDataType DoorLockServer::credentialTypeToLockDataType(DlCredentialType cre return DlLockDataType::kUnspecified; } +void DoorLockServer::setHolidaySchedule(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + uint8_t holidayIndex, uint32_t localStartTime, uint32_t localEndTime, + DlOperatingMode operatingMode) +{ + VerifyOrDie(nullptr != commandObj); + + auto endpointId = commandPath.mEndpointId; + if (!SupportsSchedules(endpointId)) + { + emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return; + } + + emberAfDoorLockClusterPrintln("[SetHolidaySchedule] incoming command [endpointId=%d]", endpointId); + + if (!holidayIndexValid(endpointId, holidayIndex)) + { + emberAfDoorLockClusterPrintln( + "[SetHolidaySchedule] Unable to add schedule - index out of range [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_FIELD); + return; + } + + if (localEndTime <= localStartTime) + { + emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Unable to add schedule - schedule ends earlier than starts" + "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 "]", + endpointId, holidayIndex, localStartTime, localEndTime); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_FIELD); + return; + } + + if (operatingMode > DlOperatingMode::kPassage) + { + emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Unable to add schedule - operating mode is out of range" + "[endpointId=%d,scheduleIndex=%d,localStarTime=%" PRIu32 ",localEndTime=%" PRIu32 + ", operatingMode=%d]", + endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_FIELD); + return; + } + + auto status = emberAfPluginDoorLockSetSchedule(endpointId, holidayIndex, DlScheduleStatus::kOccupied, localStartTime, + localEndTime, operatingMode); + if (DlStatus::kSuccess != status) + { + ChipLogError(Zcl, "[SetHolidaySchedule] Unable to add schedule - internal error [endpointId=%d,scheduleIndex=%d,status=%u]", + endpointId, holidayIndex, to_underlying(status)); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + return; + } + + emberAfDoorLockClusterPrintln("[SetHolidaySchedule] Successfully created new schedule " + "[endpointId=%d,scheduleIndex=%d,localStartTime=%" PRIu32 ",endTime=%" PRIu32 + ",operatingMode=%d]", + endpointId, holidayIndex, localStartTime, localEndTime, to_underlying(operatingMode)); + + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); +} + +void DoorLockServer::getHolidaySchedule(chip::app::CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + uint8_t holidayIndex) +{ + auto endpointId = commandPath.mEndpointId; + if (!SupportsSchedules(endpointId)) + { + emberAfDoorLockClusterPrintln("[GetHolidaySchedule] Ignore command (not supported) [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return; + } + emberAfDoorLockClusterPrintln("[GetHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); + + if (!holidayIndexValid(endpointId, holidayIndex)) + { + emberAfDoorLockClusterPrintln( + "[GetYearDaySchedule] Unable to get schedule - index out of range [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); + sendHolidayScheduleResponse(commandObj, commandPath, holidayIndex, DlStatus::kInvalidField); + return; + } + + EmberAfPluginDoorLockHolidaySchedule scheduleInfo{}; + auto status = emberAfPluginDoorLockGetSchedule(endpointId, holidayIndex, scheduleInfo); + if (DlStatus::kSuccess != status) + { + sendHolidayScheduleResponse(commandObj, commandPath, holidayIndex, status); + return; + } + sendHolidayScheduleResponse(commandObj, commandPath, holidayIndex, DlStatus::kSuccess, scheduleInfo.localStartTime, + scheduleInfo.localEndTime, scheduleInfo.operatingMode); +} + +void DoorLockServer::clearHolidaySchedule(chip::app::CommandHandler * commandObj, + const chip::app::ConcreteCommandPath & commandPath, uint8_t holidayIndex) +{ + auto endpointId = commandPath.mEndpointId; + if (!SupportsSchedules(endpointId)) + { + emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Ignore command (not supported) [endpointId=%d]", endpointId); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return; + } + emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] incoming command [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); + + if (!holidayIndexValid(endpointId, holidayIndex) && 0xFE != holidayIndex) + { + emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Holiday index is out of range [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return; + } + + DlStatus clearStatus = DlStatus::kSuccess; + if (0xFE == holidayIndex) + { + emberAfDoorLockClusterPrintln( + "[ClearHolidaySchedule] Clearing all holiday schedules for a single user [endpointId=%d,scheduleIndex=%d]", endpointId, + holidayIndex); + clearStatus = clearHolidaySchedules(endpointId); + } + else + { + emberAfDoorLockClusterPrintln("[ClearHolidaySchedule] Clearing a single schedule [endpointId=%d,scheduleIndex=%d]", + endpointId, holidayIndex); + clearStatus = clearHolidaySchedule(endpointId, holidayIndex); + } + + if (DlStatus::kSuccess != clearStatus) + { + emberAfDoorLockClusterPrintln( + "[ClearHolidaySchedule] Unable to clear the user schedules - app error [endpointId=%d,scheduleIndex=%d,status=%u]", + endpointId, holidayIndex, to_underlying(clearStatus)); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + return; + } + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); +} + bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, DlLockOperationType opType, RemoteLockOpHandler opHandler, const Optional & pinCode) @@ -2976,10 +3191,8 @@ bool emberAfDoorLockClusterSetHolidayScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("SetHolidaySchedule: command not implemented"); - - // TODO: Implement setting holiday schedule - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + DoorLockServer::Instance().setHolidaySchedule(commandObj, commandPath, commandData.holidayIndex, commandData.localStartTime, + commandData.localEndTime, commandData.operatingMode); return true; } @@ -2987,10 +3200,7 @@ bool emberAfDoorLockClusterGetHolidayScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("GetHolidaySchedule: command not implemented"); - - // TODO: Implement getting holiday schedule - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + DoorLockServer::Instance().getHolidaySchedule(commandObj, commandPath, commandData.holidayIndex); return true; } @@ -2998,10 +3208,7 @@ bool emberAfDoorLockClusterClearHolidayScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::DecodableType & commandData) { - emberAfDoorLockClusterPrintln("ClearHolidaySchedule: command not implemented"); - - // TODO: Implement clearing holiday schedule - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + DoorLockServer::Instance().clearHolidaySchedule(commandObj, commandPath, commandData.holidayIndex); return true; } @@ -3250,6 +3457,12 @@ DlStatus __attribute__((weak)) emberAfPluginDoorLockGetSchedule(chip::EndpointId return DlStatus::kFailure; } +DlStatus __attribute__((weak)) +emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + return DlStatus::kFailure; +} + DlStatus __attribute__((weak)) emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, DlScheduleStatus status, DlDaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute) @@ -3264,6 +3477,13 @@ emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayInd return DlStatus::kFailure; } +DlStatus __attribute__((weak)) +emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode) +{ + return DlStatus::kFailure; +} + // ============================================================================= // Timer callbacks // ============================================================================= diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index bf982cc8d6b8f4..c9d84a35aa8d94 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -43,6 +43,7 @@ using chip::app::Clusters::DoorLock::DlDoorState; using chip::app::Clusters::DoorLock::DlLockDataType; using chip::app::Clusters::DoorLock::DlLockOperationType; using chip::app::Clusters::DoorLock::DlLockState; +using chip::app::Clusters::DoorLock::DlOperatingMode; using chip::app::Clusters::DoorLock::DlOperationError; using chip::app::Clusters::DoorLock::DlOperationSource; using chip::app::Clusters::DoorLock::DlStatus; @@ -91,6 +92,7 @@ class DoorLockServer bool GetNumberOfWeekDaySchedulesPerUserSupported(chip::EndpointId endpointId, uint8_t & numberOfWeekDaySchedulesPerUser); bool GetNumberOfYearDaySchedulesPerUserSupported(chip::EndpointId endpointId, uint8_t & numberOfYearDaySchedulesPerUser); bool GetNumberOfCredentialsSupportedPerUser(chip::EndpointId endpointId, uint8_t & numberOfCredentialsSupportedPerUser); + bool GetNumberOfHolidaySchedulesSupported(chip::EndpointId endpointId, uint8_t & numberOfHolidaySchedules); void SetUserCommandHandler(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType & commandData); @@ -251,12 +253,30 @@ class DoorLockServer uint8_t yearDayIndex, uint16_t userIndex, DlStatus status, uint32_t localStartTime = 0, uint32_t localEndTime = 0); + bool holidayIndexValid(chip::EndpointId endpointId, uint8_t holidayIndex); + + DlStatus clearHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex); + DlStatus clearHolidaySchedules(chip::EndpointId endpointId); + + void sendHolidayScheduleResponse(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + uint8_t holidayIndex, DlStatus status, uint32_t localStartTime = 0, uint32_t localEndTime = 0, + DlOperatingMode operatingMode = DlOperatingMode::kNormal); + bool sendRemoteLockUserChange(chip::EndpointId endpointId, DlLockDataType dataType, DlDataOperationType operation, chip::NodeId nodeId, chip::FabricIndex fabricIndex, uint16_t userIndex = 0, uint16_t dataIndex = 0); DlLockDataType credentialTypeToLockDataType(DlCredentialType credentialType); + void setHolidaySchedule(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + uint8_t holidayIndex, uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode); + + void getHolidaySchedule(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + uint8_t holidayIndex); + + void clearHolidaySchedule(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + uint8_t holidayIndex); + /** * @brief Common handler for LockDoor, UnlockDoor, UnlockWithTimeout commands * @@ -354,6 +374,18 @@ class DoorLockServer friend void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId); + friend bool emberAfDoorLockClusterSetHolidayScheduleCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::DecodableType & commandData); + + friend bool emberAfDoorLockClusterGetHolidayScheduleCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::DecodableType & commandData); + + friend bool emberAfDoorLockClusterClearHolidayScheduleCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::DecodableType & commandData); + EmberEventControl AutolockEvent; /**< for automatic relock scheduling */ static DoorLockServer instance; @@ -427,6 +459,18 @@ struct EmberAfPluginDoorLockYearDaySchedule * the local timezone and DST offset on the day represented by the value. */ }; +/** + * @brief Structure that holds holiday schedule information. + */ +struct EmberAfPluginDoorLockHolidaySchedule +{ + uint32_t localStartTime; /** The starting time for the Holiday schedule in Epoch Time in Seconds with local time offset based + on the local timezone and DST offset on the day represented by the value. */ + uint32_t localEndTime; /** The ending time for the Holiday schedule in Epoch Time in Seconds with local time offset based on + * the local timezone and DST offset on the day represented by the value. */ + DlOperatingMode operatingMode; /** Operating mode during the schedule. */ +}; + /** * @brief This callback is called when Door Lock cluster needs to access the Week Day schedule in the schedules database. * @@ -460,6 +504,21 @@ DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t w DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, EmberAfPluginDoorLockYearDaySchedule & schedule); +/** + * @brief This callback is called when Door Lock cluster needs to access the Holiday schedule in the schedules database. + * + * @param endpointId ID of the endpoint which contains the lock. + * @param holidayIndex Index of the holiday schedule to access. It is guaranteed to be within limits declared in the spec for + * holiday schedule (from 1 up to NumberOfHolidaySchedulesSupported) + * @param[out] schedule Resulting holiday schedule. + * + * @retval DlStatus::kSuccess if schedule was retrieved successfully + * @retval DlStatus::kNotFound if the schedule or user does not exist + * @retval DlStatus::kFailure in case of any other failure + */ +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule); + /** * @brief This callback is called when Door Lock cluster needs to create, modify or clear the week day schedule in schedules * database. @@ -509,6 +568,29 @@ DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t w DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime); +/** + * @brief This callback is called when Door Lock cluster needs to create, modify or clear the holiday schedule in schedules + * database. + * + * @param endpointId ID of the endpoint which contains the lock. + * @param holidayIndex Index of the holiday schedule to access. It is guaranteed to be within limits declared in the spec for + * holiday schedule (from 1 up to NumberOfHolidaySchedulesSupported). + * @param status New status of the schedule slot (occupied/available). DlScheduleStatus::kAvailable means that the + * schedules must be deleted. + * @param localStartTime The starting time for the Year Day schedule in Epoch Time in Seconds with local time offset based on the + * local timezone and DST offset on the day represented by the value. + * @param localEndTime The ending time for the Year Day schedule in Epoch Time in Seconds with local time offset based on the local + * timezone and DST offset on the day represented by the value. \p localEndTime is guaranteed to be greater than + * \p localStartTime. + * @param operatingMode The operating mode to use during this Holiday schedule start/end time. + * + * @retval DlStatus::kSuccess if schedule was successfully modified + * @retval DlStatus::kNotFound if the schedule or user does not exist + * @retval DlStatus::kFailure in case of any other failure + */ +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, DlOperatingMode operatingMode); + // ============================================================================= // Pre-change callbacks for cluster attributes // ============================================================================= diff --git a/src/app/tests/suites/DL_Schedules.yaml b/src/app/tests/suites/DL_Schedules.yaml index 9ae6efb6bd7337..4c2d23875d33f5 100644 --- a/src/app/tests/suites/DL_Schedules.yaml +++ b/src/app/tests/suites/DL_Schedules.yaml @@ -79,6 +79,13 @@ tests: saveAs: NumberOfYearDaySchedulesSupportedPerUser value: 10 + - label: "Get Max number of Holiday schedules and verify default value" + command: "readAttribute" + attribute: "NumberOfHolidaySchedulesSupported" + response: + saveAs: NumberOfHolidaySchedulesSupported + value: 10 + # # Excercise SetWeekDay schedules with invalid parameters # @@ -592,8 +599,9 @@ tests: value: 1 - name: "status" value: 0x8B + # - # Excercise GetWeekDay schedules with invalid parameters + # Excercise GetYearDay schedules with invalid parameters # - label: "Get Year Day schedule with 0 index" command: "GetYearDaySchedule" @@ -680,6 +688,144 @@ tests: - name: "status" value: 0x8B + # + # Excercise Set Holiday schedules with invalid parameters + # + - label: "Create Holiday schedule with 0 index" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + response: + error: INVALID_FIELD + + - label: "Create Holiday schedule with out-of-bounds index" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + 1 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + response: + error: INVALID_FIELD + + - label: "Create Holiday schedule with start hour later that end hour" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + - name: "localStartTime" + value: 12345689 + - name: "localEndTime" + value: 12345688 + - name: "operatingMode" + value: 0 + response: + error: INVALID_FIELD + + - label: "Create Holiday schedule with invalid operating mode" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 5 + response: + error: INVALID_FIELD + + - label: "Make sure that previous operations did not create a schedule" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x8B + + # + # Excercise Get Holiday schedules with invalid parameters + # + - label: "Get Holiday schedule with 0 index" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 0 + response: + values: + - name: "holidayIndex" + value: 0 + - name: "status" + value: 0x85 + + - label: "Get Holiday schedule with out-of-bounds index" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + 1 + response: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + 1 + - name: "status" + value: 0x85 + + # Verify that schedule creation works + - label: "Create Holiday schedule with valid parameters" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + - label: "Verify created schedule" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + - label: "Create Week Day schedule with valid parameters" command: "SetWeekDaySchedule" arguments: @@ -818,6 +964,73 @@ tests: response: error: NOT_FOUND + - label: "Make sure that week day schedule was not deleted" + command: "GetWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "daysMask" + value: 0x01 + - name: "startHour" + value: 15 + - name: "startMinute" + value: 16 + - name: "endHour" + value: 18 + - name: "endMinute" + value: 00 + + - label: "Make sure that year day schedule was not deleted" + command: "GetYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + + - label: "Make sure that holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + # # Excercise ClearYearDay schedules with invalid parameters # @@ -924,6 +1137,112 @@ tests: - name: "localEndTime" value: 12345689 + - label: "Make sure that holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + # Excercise ClearHolidaySchedule with invalid parameters + - label: "Clear Holiday schedule with 0 index" + command: "ClearHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 0 + response: + error: INVALID_FIELD + + - label: "Clear Holiday schedule with out-of-bounds index" + command: "ClearHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfYearDaySchedulesSupportedPerUser + 1 + response: + error: INVALID_FIELD + + - label: "Make sure that week day schedule was not deleted" + command: "GetWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "daysMask" + value: 0x01 + - name: "startHour" + value: 15 + - name: "startMinute" + value: 16 + - name: "endHour" + value: 18 + - name: "endMinute" + value: 00 + + - label: "Make sure that year day schedule was not deleted" + command: "GetYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + + - label: "Make sure that holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + # Verify that clearing schedules works - label: "Create another Week Day schedule with valid parameters" command: "SetWeekDaySchedule" arguments: @@ -1004,12 +1323,44 @@ tests: - name: "localEndTime" value: 888888888 - - label: "Clear a single week day schedule for the first user" - command: "ClearWeekDaySchedule" + - label: "Create another Holiday schedule with valid parameters" + command: "SetHolidaySchedule" arguments: values: - - name: "weekDayIndex" - value: 1 + - name: "holidayIndex" + value: 2 + - name: "localStartTime" + value: 123456 + - name: "localEndTime" + value: 1234567 + - name: "operatingMode" + value: 1 + + - label: "Verify created holiday schedule" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + response: + values: + - name: "holidayIndex" + value: 2 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 123456 + - name: "localEndTime" + value: 1234567 + - name: "operatingMode" + value: 1 + + - label: "Clear a single week day schedule for the first user" + command: "ClearWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 - name: "userIndex" value: 1 @@ -1098,6 +1449,44 @@ tests: - name: "localEndTime" value: 888888888 + - label: "Make sure that first holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + - label: "Make sure that second holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + response: + values: + - name: "holidayIndex" + value: 2 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 123456 + - name: "localEndTime" + value: 1234567 + - name: "operatingMode" + value: 1 + # We create it to test that clearing year day schedules does not delete week day schedules - label: "Create another Week Day schedule with valid parameters" command: "SetWeekDaySchedule" @@ -1387,7 +1776,7 @@ tests: - name: "localEndTime" value: 7777777 - - label: "Cleanup" + - label: "Cleanup the user" command: "ClearUser" timedInteractionTimeoutMs: 10000 arguments: @@ -1462,3 +1851,346 @@ tests: value: 2 - name: "status" value: 0x8B + + # Make sure that all the manipulations did not affect the holiday schedules + - label: "Make sure that first holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + - label: "Make sure that second holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + response: + values: + - name: "holidayIndex" + value: 2 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 123456 + - name: "localEndTime" + value: 1234567 + - name: "operatingMode" + value: 1 + + - label: "Create another Holiday schedule at the last slot" + command: "SetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + - name: "localStartTime" + value: 1 + - name: "localEndTime" + value: 100 + - name: "operatingMode" + value: 4 + + - label: "Verify Created Holiday Schedule" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + response: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 1 + - name: "localEndTime" + value: 100 + - name: "operatingMode" + value: 4 + + # Those steps are required to validate that clearing holiday schedules does not delete weekday and year day schedules + - label: "Create new PIN credential and schedule user" + command: "SetCredential" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "operationType" + value: 0 + - name: "credential" + value: { CredentialType: 1, CredentialIndex: 1 } + - name: "credentialData" + value: "123456" + - name: "userIndex" + value: null + - name: "userStatus" + value: null + - name: "userType" + value: null + response: + values: + - name: "status" + value: 0x00 + - name: "userIndex" + value: 1 + - name: "nextCredentialIndex" + value: 2 + + - label: "Create Week Day schedule for first user" + command: "SetWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "daysMask" + value: 0x01 + - name: "startHour" + value: 0 + - name: "startMinute" + value: 0 + - name: "endHour" + value: 23 + - name: "endMinute" + value: 59 + + - label: "Create Year Day schedule for first user" + command: "SetYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "localStartTime" + value: 9000 + - name: "localEndTime" + value: 888888888 + + # Start clearing holiday schedules + - label: "Clear a single holiday schedule" + command: "ClearHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + + - label: "Make sure that first holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 12345 + - name: "localEndTime" + value: 12345689 + - name: "operatingMode" + value: 0 + + - label: "Make sure that second holiday schedule was deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + response: + values: + - name: "holidayIndex" + value: 2 + - name: "status" + value: 0x8B + + - label: "Make sure that third holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + response: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 1 + - name: "localEndTime" + value: 100 + - name: "operatingMode" + value: 4 + + - label: + "Make sure clearing holiday schedule did not clear week day schedule" + command: "GetWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "daysMask" + value: 0x01 + - name: "startHour" + value: 0 + - name: "startMinute" + value: 0 + - name: "endHour" + value: 23 + - name: "endMinute" + value: 59 + + - label: + "Make sure clearing holiday schedule did not clear year day schedule" + command: "GetYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 9000 + - name: "localEndTime" + value: 888888888 + + - label: "Clear all remaining holiday schedules" + command: "ClearHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 0xFE + + - label: "Make sure that first holiday is still deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 1 + response: + values: + - name: "holidayIndex" + value: 1 + - name: "status" + value: 0x8B + + - label: "Make sure that second holiday schedule was deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: 2 + response: + values: + - name: "holidayIndex" + value: 2 + - name: "status" + value: 0x8B + + - label: "Make sure that third holiday schedule was not deleted" + command: "GetHolidaySchedule" + arguments: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + response: + values: + - name: "holidayIndex" + value: NumberOfHolidaySchedulesSupported + - name: "status" + value: 0x8B + + - label: + "Make sure clearing holiday schedule did not clear week day schedule" + command: "GetWeekDaySchedule" + arguments: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "weekDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "daysMask" + value: 0x01 + - name: "startHour" + value: 0 + - name: "startMinute" + value: 0 + - name: "endHour" + value: 23 + - name: "endMinute" + value: 59 + + - label: + "Make sure clearing holiday schedule did not clear year day schedule" + command: "GetYearDaySchedule" + arguments: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + response: + values: + - name: "yearDayIndex" + value: 1 + - name: "userIndex" + value: 1 + - name: "status" + value: 0x0 + - name: "localStartTime" + value: 9000 + - name: "localEndTime" + value: 888888888 + + - label: "Final Cleanup" + command: "ClearUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "userIndex" + value: 0xFFFE diff --git a/src/app/tests/suites/DL_UsersAndCredentials.yaml b/src/app/tests/suites/DL_UsersAndCredentials.yaml index 8c4058d5793744..d71a0ee70ee4fa 100644 --- a/src/app/tests/suites/DL_UsersAndCredentials.yaml +++ b/src/app/tests/suites/DL_UsersAndCredentials.yaml @@ -2517,3 +2517,11 @@ tests: value: null - name: "nextCredentialIndex" value: 7 + + - label: "Final clean-up" + command: "ClearUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "userIndex" + value: 1 diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 8e6ea8db55c2b1..eec368ab3f6bd7 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -9423,7 +9423,7 @@ "code": 17, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -9431,7 +9431,7 @@ "code": 18, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -9439,7 +9439,7 @@ "code": 19, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { 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 c51367252f4f47..9e44ddd7ead3eb 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -97164,6 +97164,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) { @@ -97514,6 +97518,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. @@ -97527,7 +97534,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; @@ -102770,6 +102777,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 { @@ -103226,322 +103253,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; } @@ -103570,7 +103773,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)); @@ -103582,10 +103785,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)); @@ -103612,7 +103815,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)); @@ -103630,7 +103833,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)); @@ -103642,13 +103845,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)); @@ -103669,58 +103872,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)); @@ -103732,19 +103935,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)); @@ -103756,10 +103959,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)); @@ -103806,82 +104009,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); @@ -103959,8 +104291,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]; @@ -103985,7 +104344,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]; @@ -104010,7 +104369,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]; @@ -104035,7 +104394,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]; @@ -104060,7 +104419,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]; @@ -104085,7 +104444,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]; @@ -104110,7 +104469,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]; @@ -104135,7 +104494,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]; @@ -104160,7 +104519,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]; @@ -104185,7 +104544,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]; @@ -104210,7 +104569,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]; @@ -104235,7 +104594,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]; @@ -104260,7 +104619,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]; @@ -104285,7 +104644,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]; @@ -104312,7 +104671,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]; @@ -104349,7 +104708,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]; @@ -104386,7 +104745,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]; @@ -104424,7 +104783,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]; @@ -104461,7 +104820,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]; @@ -104499,7 +104858,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]; @@ -104536,7 +104895,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]; @@ -104558,7 +104917,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]; @@ -104580,7 +104939,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]; @@ -104602,7 +104961,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]; @@ -104624,7 +104983,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]; @@ -104646,7 +105005,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]; @@ -104668,7 +105027,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]; @@ -104705,7 +105064,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]; @@ -104742,7 +105101,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]; @@ -104780,7 +105139,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]; @@ -104817,7 +105176,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]; @@ -104855,7 +105214,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]; @@ -104892,50 +105251,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)); } @@ -104980,7 +105590,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]; @@ -105003,7 +105613,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]; @@ -105050,7 +105660,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]; @@ -105070,7 +105680,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]; @@ -105090,7 +105700,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]; @@ -105110,7 +105720,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]; @@ -105130,7 +105740,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]; @@ -105150,49 +105760,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); @@ -105210,7 +105975,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]; @@ -105230,7 +105995,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]; @@ -105250,7 +106015,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]; @@ -105312,7 +106077,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]; @@ -105359,51 +106124,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)); } { @@ -105418,27 +106241,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(); @@ -105447,48 +106270,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)); } { @@ -105503,12 +106303,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(); @@ -105517,56 +106317,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(); @@ -105575,28 +106363,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]; @@ -105608,7 +106401,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)); @@ -105624,54 +106417,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(); @@ -105680,7 +106451,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]; @@ -105692,7 +106486,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)); @@ -105727,23 +106521,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)); @@ -105753,18 +106544,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)); @@ -105774,25 +106611,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)); } { @@ -105811,18 +106648,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)); @@ -105832,25 +106669,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)); } { @@ -105869,25 +106706,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)); } { @@ -105901,28 +106738,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(); @@ -105931,54 +106753,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]; @@ -105994,7 +107850,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)); @@ -106004,30 +107883,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)); } { @@ -106036,28 +107929,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(); @@ -106066,53 +107949,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)); } { @@ -106122,39 +108007,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(); }]; @@ -106162,30 +108026,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)); } { @@ -106195,12 +108059,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)); } { @@ -106224,30 +108088,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]; @@ -106259,7 +108100,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)); @@ -106280,12 +108121,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(); @@ -106294,50 +108135,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)); } { @@ -106351,30 +108186,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)); } { @@ -106388,35 +108248,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(); @@ -106425,7 +108310,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]; @@ -106433,11 +108318,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)); @@ -106448,12 +108333,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(); @@ -106461,6 +108356,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 bff137ed1a47f9..e7b587c935e8ee 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -55954,7 +55954,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); @@ -57739,6 +57739,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)); } @@ -59340,6 +59343,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; } @@ -59576,7 +59589,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); @@ -59600,6 +59613,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; } @@ -59662,7 +59676,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)); @@ -59674,10 +59695,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)); @@ -59704,6 +59725,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; @@ -59715,7 +59739,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; @@ -59727,7 +59751,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; @@ -59740,7 +59764,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; @@ -59752,7 +59776,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; @@ -59764,7 +59788,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; @@ -59776,9 +59800,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; @@ -59789,12 +59810,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; @@ -59806,7 +59830,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; @@ -59818,7 +59842,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; @@ -59831,7 +59855,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; @@ -59843,7 +59867,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; @@ -59855,7 +59879,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; @@ -59867,10 +59891,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; @@ -59897,10 +59986,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; @@ -59918,37 +60007,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; @@ -59975,7 +60049,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; @@ -59993,88 +60067,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; @@ -60092,31 +60216,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; @@ -60128,10 +60430,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; @@ -60143,7 +60445,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; @@ -60170,16 +60472,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; @@ -60206,10 +60508,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; @@ -60227,10 +60529,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; @@ -60257,10 +60559,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; @@ -60278,10 +60580,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; @@ -60293,41 +60595,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)); @@ -60385,7 +60944,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; @@ -60400,8 +60964,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); @@ -60416,8 +60980,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; @@ -60432,8 +60996,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; @@ -60448,8 +61012,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; @@ -60464,8 +61028,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; @@ -60480,8 +61044,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; @@ -60496,8 +61060,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; @@ -60512,8 +61076,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; @@ -60528,8 +61092,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; @@ -60544,8 +61108,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; @@ -60560,8 +61124,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; @@ -60576,8 +61140,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; @@ -60592,8 +61156,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; @@ -60608,8 +61172,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; @@ -60619,8 +61183,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; @@ -60630,8 +61194,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); @@ -60641,8 +61205,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; @@ -60652,8 +61216,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; @@ -60663,8 +61227,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; @@ -60674,8 +61238,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; @@ -60687,8 +61251,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); @@ -60700,8 +61264,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; @@ -60713,8 +61277,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; @@ -60726,8 +61290,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; @@ -60739,8 +61303,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; @@ -60752,8 +61316,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; @@ -60763,8 +61327,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; @@ -60774,8 +61338,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); @@ -60785,8 +61349,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; @@ -60796,8 +61360,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; @@ -60807,8 +61371,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; @@ -60818,8 +61382,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; @@ -60834,8 +61503,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; @@ -60845,8 +61514,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; @@ -60858,8 +61527,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; @@ -60869,8 +61538,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; @@ -60880,8 +61549,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); @@ -60891,8 +61560,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; @@ -60902,8 +61571,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; @@ -60913,8 +61582,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; @@ -60924,8 +61593,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; @@ -60935,8 +61636,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); @@ -60946,8 +61647,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; @@ -60957,8 +61658,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; @@ -60968,8 +61669,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; @@ -60979,8 +61680,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; @@ -60990,8 +61691,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; @@ -61001,8 +61754,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; @@ -61017,8 +61780,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; @@ -61028,8 +61791,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; @@ -61041,8 +61804,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; @@ -61052,8 +61815,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; @@ -61063,8 +61849,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; @@ -61074,8 +61860,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; @@ -61085,8 +61871,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; @@ -61096,8 +61882,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; @@ -61107,8 +61893,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; @@ -61118,8 +61904,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; @@ -61134,8 +61940,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; @@ -61145,8 +61951,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; @@ -61156,8 +61962,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; @@ -61167,8 +61973,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; @@ -61178,8 +61984,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; @@ -61189,8 +61995,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; @@ -61200,8 +62006,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); @@ -61216,8 +62022,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; @@ -61232,8 +62038,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; @@ -61243,8 +62049,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; @@ -61256,8 +62062,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; @@ -61267,8 +62073,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; @@ -61283,8 +62089,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; @@ -61294,8 +62100,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; @@ -61307,8 +62113,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; @@ -61318,8 +62124,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; @@ -61328,8 +62134,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; @@ -61339,8 +62145,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; @@ -61350,8 +62156,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; @@ -61361,8 +62167,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; @@ -61372,6 +62178,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 d87cf2cbae535a..37d525f498b921 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 7e0b45dae4cf7b..e1fc3d4a4c50dc 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 */ \ @@ -243,6 +246,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 */ \ @@ -285,6 +291,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 454f94063c05a4..4e6f974a76d24d 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 259 +#define GENERATED_ATTRIBUTE_COUNT 260 #define GENERATED_ATTRIBUTES \ { \ \ @@ -527,6 +527,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 */ \ @@ -701,6 +702,9 @@ 0x0000000E /* SetYearDaySchedule */, \ 0x0000000F /* GetYearDaySchedule */, \ 0x00000010 /* ClearYearDaySchedule */, \ + 0x00000011 /* SetHolidaySchedule */, \ + 0x00000012 /* GetHolidaySchedule */, \ + 0x00000013 /* ClearHolidaySchedule */, \ 0x0000001A /* SetUser */, \ 0x0000001B /* GetUser */, \ 0x0000001D /* ClearUser */, \ @@ -708,9 +712,10 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=86)*/ \ + /* GeneratedCommandList (index=89)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ + 0x00000012 /* GetHolidayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ 0x00000023 /* SetCredentialResponse */, \ 0x00000025 /* GetCredentialStatusResponse */, \ @@ -1014,12 +1019,12 @@ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ .attributes = ZAP_ATTRIBUTE_INDEX(232), \ - .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( 70 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ },\ } @@ -1032,7 +1037,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 552 }, { ZAP_CLUSTER_INDEX(21), 6, 206 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 552 }, { ZAP_CLUSTER_INDEX(21), 6, 207 }, \ } // Largest attribute size is needed for various buffers @@ -1044,7 +1049,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 (758) +#define ATTRIBUTE_MAX_SIZE (759) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2)