diff --git a/examples/lock-app/efr32/include/LockManager.h b/examples/lock-app/efr32/include/LockManager.h index ba2deb7007ce04..e8c2d8d0f9f117 100644 --- a/examples/lock-app/efr32/include/LockManager.h +++ b/examples/lock-app/efr32/include/LockManager.h @@ -75,8 +75,8 @@ class LockManager bool GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialType credentialType, EmberAfPluginDoorLockCredentialInfo & credential) const; - bool SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialStatus credentialStatus, - DlCredentialType credentialType, const chip::ByteSpan & credentialData); + bool SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + DlCredentialStatus credentialStatus, DlCredentialType credentialType, const chip::ByteSpan & credentialData); bool setLockState(chip::EndpointId endpointId, DlLockState lockState, const Optional & pin, DlOperationError & err); diff --git a/examples/lock-app/efr32/src/LockManager.cpp b/examples/lock-app/efr32/src/LockManager.cpp index 1d2d30559a24d6..c74107594ef041 100644 --- a/examples/lock-app/efr32/src/LockManager.cpp +++ b/examples/lock-app/efr32/src/LockManager.cpp @@ -230,8 +230,12 @@ bool LockManager::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & us user.userUniqueId = userInDb.userUniqueId; user.userType = userInDb.userType; user.credentialRule = userInDb.credentialRule; - user.createdBy = userInDb.createdBy; - user.lastModifiedBy = userInDb.lastModifiedBy; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + user.creationSource = DlAssetSource::kMatterIM; + user.createdBy = userInDb.createdBy; + user.modificationSource = DlAssetSource::kMatterIM; + user.lastModifiedBy = userInDb.lastModifiedBy; ChipLogDetail(Zcl, "Found occupied user " @@ -318,6 +322,12 @@ bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credential } credential.credentialType = credentialInStorage.credentialType; credential.credentialData = credentialInStorage.credentialData; + credential.createdBy = credentialInStorage.createdBy; + credential.lastModifiedBy = credentialInStorage.lastModifiedBy; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + credential.creationSource = DlAssetSource::kMatterIM; + credential.modificationSource = DlAssetSource::kMatterIM; ChipLogDetail(Zcl, "Found occupied credential [type=%u,dataSize=%u]", to_underlying(credential.credentialType), credential.credentialData.size()); @@ -325,13 +335,14 @@ bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credential return true; } -bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialStatus credentialStatus, - DlCredentialType credentialType, const chip::ByteSpan & credentialData) +bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, DlCredentialType credentialType, + const chip::ByteSpan & credentialData) { ChipLogProgress(Zcl, "Door Lock App: LockManager::SetCredential " - "[credentialStatus=%u,credentialType=%u,credentialDataSize=%u]", - to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size()); + "[credentialStatus=%u,credentialType=%u,credentialDataSize=%u,creator=%d,modifier=%d]", + to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size(), creator, modifier); auto & credentialInStorage = mLockCredentials; if (credentialData.size() > DOOR_LOCK_CREDENTIAL_INFO_MAX_DATA_SIZE) @@ -344,6 +355,8 @@ bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credential } credentialInStorage.status = credentialStatus; credentialInStorage.credentialType = credentialType; + credentialInStorage.createdBy = creator; + credentialInStorage.lastModifiedBy = modifier; memcpy(mCredentialData, credentialData.data(), credentialData.size()); mCredentialData[credentialData.size()] = 0; diff --git a/examples/lock-app/efr32/src/ZclCallbacks.cpp b/examples/lock-app/efr32/src/ZclCallbacks.cpp index daf244afb477bf..c271f2dc65fd5a 100644 --- a/examples/lock-app/efr32/src/ZclCallbacks.cpp +++ b/examples/lock-app/efr32/src/ZclCallbacks.cpp @@ -90,10 +90,12 @@ bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t cr return LockMgr().GetCredential(endpointId, credentialIndex, credentialType, credential); } -bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, DlCredentialStatus credentialStatus, +bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, DlCredentialType credentialType, const chip::ByteSpan & credentialData) { - return LockMgr().SetCredential(endpointId, credentialIndex, credentialStatus, credentialType, credentialData); + return LockMgr().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType, + credentialData); } bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) diff --git a/examples/lock-app/linux/src/LockEndpoint.cpp b/examples/lock-app/linux/src/LockEndpoint.cpp index 03f1ed92e835fc..605fb1dd2f5537 100644 --- a/examples/lock-app/linux/src/LockEndpoint.cpp +++ b/examples/lock-app/linux/src/LockEndpoint.cpp @@ -55,8 +55,12 @@ bool LockEndpoint::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & u user.userUniqueId = userInDb.userUniqueId; user.userType = userInDb.userType; user.credentialRule = userInDb.credentialRule; - user.createdBy = userInDb.createdBy; - user.lastModifiedBy = userInDb.lastModifiedBy; + // So far there's no way to actually create the credential outside the matter, so here we always set the creation/modification + // source to Matter + user.creationSource = DlAssetSource::kMatterIM; + user.createdBy = userInDb.createdBy; + user.modificationSource = DlAssetSource::kMatterIM; + user.lastModifiedBy = userInDb.lastModifiedBy; ChipLogDetail(Zcl, "Found occupied user " @@ -151,8 +155,12 @@ bool LockEndpoint::GetCredential(uint16_t credentialIndex, DlCredentialType cred } credential.credentialType = credentialInStorage.credentialType; credential.credentialData = chip::ByteSpan(credentialInStorage.credentialData, credentialInStorage.credentialDataSize); - credential.createdBy = credentialInStorage.createdBy; - credential.lastModifiedBy = credentialInStorage.modifiedBy; + // So far there's no way to actually create the credential outside the matter, so here we always set the creation/modification + // source to Matter + credential.creationSource = DlAssetSource::kMatterIM; + credential.createdBy = credentialInStorage.createdBy; + credential.modificationSource = DlAssetSource::kMatterIM; + credential.lastModifiedBy = credentialInStorage.modifiedBy; ChipLogDetail(Zcl, "Found occupied credential [endpoint=%d,index=%u,type=%u,dataSize=%u,createdBy=%u,modifiedBy=%u]", mEndpointId, credentialIndex, to_underlying(credential.credentialType), 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 12d919766ce5b2..1fb048f055562d 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,29 @@ static constexpr uint32_t DOOR_LOCK_MAX_LOCK_TIMEOUT_SEC = MAX_INT32U_VALUE / (2 DoorLockServer DoorLockServer::instance; +class DoorLockClusterFabricDelegate : public chip::FabricTable::Delegate +{ + void OnFabricDeletedFromStorage(FabricTable & fabricTable, FabricIndex fabricIndex) override + { + for (auto endpointId : EnabledEndpointsWithServerCluster(chip::app::Clusters::DoorLock::Id)) + { + if (!DoorLockServer::Instance().OnFabricRemoved(endpointId, fabricIndex)) + { + ChipLogError(Zcl, + "Unable to handle fabric removal from the Door Lock Server instance [endpointId=%d,fabricIndex=%d]", + endpointId, fabricIndex); + } + } + } + + // Intentionally left blank + void OnFabricRetrievedFromStorage(FabricTable & fabricTable, FabricIndex fabricIndex) override {} + + // Intentionally left blank + void OnFabricPersistedToStorage(FabricTable & fabricTable, FabricIndex fabricIndex) override {} +}; +static DoorLockClusterFabricDelegate gFabricDelegate; + void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId); /********************************************************** @@ -358,18 +382,26 @@ void DoorLockServer::GetUserCommandHandler(chip::app::CommandHandler * commandOb } SuccessOrExit(err = writer->EndContainer(credentialsContainer)); } - SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kCreatorFabricIndex)), user.createdBy)); - SuccessOrExit( - err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kLastModifiedFabricIndex)), user.lastModifiedBy)); + // Append fabric IDs only if the user was created/modified by matter + if (user.creationSource == DlAssetSource::kMatterIM) + { + SuccessOrExit(err = + writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kCreatorFabricIndex)), user.createdBy)); + } + if (user.modificationSource == DlAssetSource::kMatterIM) + { + SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kLastModifiedFabricIndex)), + user.lastModifiedBy)); + } } else { emberAfDoorLockClusterPrintln("[GetUser] User not found [userIndex=%d]", userIndex); } - // appclusters, 5.2.4.36.1: We need to add next available user after userIndex if any. + // appclusters, 5.2.4.36.1: We need to add next occupied user after userIndex if any. uint16_t nextAvailableUserIndex = 0; - if (findUnoccupiedUserSlot(commandPath.mEndpointId, static_cast(userIndex + 1), nextAvailableUserIndex)) + if (findOccupiedUserSlot(commandPath.mEndpointId, static_cast(userIndex + 1), nextAvailableUserIndex)) { SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kNextUserIndex)), nextAvailableUserIndex)); @@ -670,54 +702,34 @@ void DoorLockServer::GetCredentialStatusCommandHandler( } } - uint16_t nextCredentialIndex = 0; - - CHIP_ERROR err = CHIP_NO_ERROR; - using ResponseFields = Commands::GetCredentialStatusResponse::Fields; - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ::Id, Commands::GetCredentialStatusResponse::Id }; - TLV::TLVWriter * writer = nullptr; - SuccessOrExit(err = commandObj->PrepareCommand(path)); - VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kCredentialExists)), credentialExists)); + Commands::GetCredentialStatusResponse::Type response{ .credentialExists = credentialExists }; if (credentialExists) { if (0 != userIndexWithCredential) { - SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kUserIndex)), userIndexWithCredential)); + response.userIndex.SetNonNull(userIndexWithCredential); } - if (kUndefinedFabricIndex != credentialInfo.createdBy) + if (credentialInfo.creationSource == DlAssetSource::kMatterIM) { - SuccessOrExit( - err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kCreatorFabricIndex)), credentialInfo.createdBy)); + response.creatorFabricIndex.SetNonNull(credentialInfo.createdBy); } - if (kUndefinedFabricIndex != credentialInfo.lastModifiedBy) + if (credentialInfo.modificationSource == DlAssetSource::kMatterIM) { - SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kLastModifiedFabricIndex)), - credentialInfo.lastModifiedBy)); + response.lastModifiedFabricIndex.SetNonNull(credentialInfo.lastModifiedBy); } } - if (findUnoccupiedCredentialSlot(commandPath.mEndpointId, credentialType, static_cast(credentialIndex + 1), - nextCredentialIndex)) + uint16_t nextCredentialIndex = 0; + if (findOccupiedCredentialSlot(commandPath.mEndpointId, credentialType, static_cast(credentialIndex + 1), + nextCredentialIndex)) { - SuccessOrExit(err = writer->Put(TLV::ContextTag(to_underlying(ResponseFields::kNextCredentialIndex)), nextCredentialIndex)); + response.nextCredentialIndex.SetNonNull(nextCredentialIndex); } - SuccessOrExit(err = commandObj->FinishCommand()); + commandObj->AddResponse(commandPath, response); emberAfDoorLockClusterPrintln("[GetCredentialStatus] Prepared credential status " "[endpointId=%d,credentialType=%u,credentialIndex=%d,userIndex=%d,nextCredentialIndex=%d]", commandPath.mEndpointId, to_underlying(credentialType), credentialIndex, userIndexWithCredential, nextCredentialIndex); - -exit: - if (CHIP_NO_ERROR != err) - { - ChipLogError(Zcl, - "[GetCredentialStatus] Error occurred when preparing response: %s " - "[endpointId=%d,credentialType=%u,credentialIndex=%d,userIndex=%d,nextCredentialIndex=%d]", - err.AsString(), commandPath.mEndpointId, to_underlying(credentialType), credentialIndex, - userIndexWithCredential, nextCredentialIndex); - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); - } } void DoorLockServer::ClearCredentialCommandHandler( @@ -1219,6 +1231,32 @@ bool DoorLockServer::HasFeature(chip::EndpointId endpointId, DoorLockFeature fea return success && ((featureMap & to_underlying(feature)) != 0); } +bool DoorLockServer::OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIndex fabricIndex) +{ + emberAfDoorLockClusterPrintln( + "[OnFabricRemoved] Handling a fabric removal from the door lock server [endpointId=%d,fabricIndex=%d]", endpointId, + fabricIndex); + + // Iterate over all the users and clean up the deleted fabric + if (!clearFabricFromUsers(endpointId, fabricIndex)) + { + ChipLogError(Zcl, "[OnFabricRemoved] Unable to cleanup fabric from users - internal error [endpointId=%d,fabricIndex=%d]", + endpointId, fabricIndex); + return false; + } + + // Iterate over all the credentials and clean up the fabrics + if (!clearFabricFromCredentials(endpointId, fabricIndex)) + { + ChipLogError(Zcl, + "[OnFabricRemoved] Unable to cleanup fabric from credentials - internal error [endpointId=%d,fabricIndex=%d]", + endpointId, fabricIndex); + return false; + } + + return true; +} + /********************************************************** * DoorLockServer private methods *********************************************************/ @@ -1368,6 +1406,32 @@ bool DoorLockServer::getMaxNumberOfCredentials(chip::EndpointId endpointId, DlCr return status; } +bool DoorLockServer::findOccupiedUserSlot(chip::EndpointId endpointId, uint16_t startIndex, uint16_t & userIndex) +{ + uint16_t maxNumberOfUsers; + VerifyOrReturnError(GetAttribute(endpointId, Attributes::NumberOfTotalUsersSupported::Id, + Attributes::NumberOfTotalUsersSupported::Get, maxNumberOfUsers), + false); + + userIndex = 0; + for (uint16_t i = startIndex; i <= maxNumberOfUsers; ++i) + { + EmberAfPluginDoorLockUserInfo user; + if (!emberAfPluginDoorLockGetUser(endpointId, i, user)) + { + ChipLogError(Zcl, "Unable to get user to check if slot is occupied: app error [userIndex=%d]", i); + return false; + } + + if (DlUserStatus::kAvailable != user.userStatus) + { + userIndex = i; + return true; + } + } + return false; +} + bool DoorLockServer::findUnoccupiedUserSlot(chip::EndpointId endpointId, uint16_t & userIndex) { return findUnoccupiedUserSlot(endpointId, 1, userIndex); @@ -1399,6 +1463,42 @@ bool DoorLockServer::findUnoccupiedUserSlot(chip::EndpointId endpointId, uint16_ return false; } +bool DoorLockServer::findOccupiedCredentialSlot(chip::EndpointId endpointId, DlCredentialType credentialType, uint16_t startIndex, + uint16_t & credentialIndex) +{ + uint16_t maxNumberOfCredentials = 0; + if (!getMaxNumberOfCredentials(endpointId, credentialType, maxNumberOfCredentials)) + { + return false; + } + + // Programming PIN index starts with 0, and it is assumed that it is unique. Therefore different bounds checking for that + // credential type + if (DlCredentialType::kProgrammingPIN == credentialType) + { + maxNumberOfCredentials--; + } + + for (uint16_t i = startIndex; i <= maxNumberOfCredentials; ++i) + { + EmberAfPluginDoorLockCredentialInfo info; + if (!emberAfPluginDoorLockGetCredential(endpointId, i, credentialType, info)) + { + ChipLogError(Zcl, "Unable to get credential: app error [endpointId=%d,credentialType=%u,credentialIndex=%d]", + endpointId, to_underlying(credentialType), i); + return false; + } + + if (DlCredentialStatus::kAvailable != info.status) + { + credentialIndex = i; + return true; + } + } + + return false; +} + bool DoorLockServer::findUnoccupiedCredentialSlot(chip::EndpointId endpointId, DlCredentialType credentialType, uint16_t startIndex, uint16_t & credentialIndex) { @@ -1729,6 +1829,53 @@ EmberAfStatus DoorLockServer::clearUser(chip::EndpointId endpointId, chip::Fabri return EMBER_ZCL_STATUS_SUCCESS; } +bool DoorLockServer::clearFabricFromUsers(chip::EndpointId endpointId, chip::FabricIndex fabricIndex) +{ + uint16_t maxNumberOfUsers; + VerifyOrReturnError(GetAttribute(endpointId, Attributes::NumberOfTotalUsersSupported::Id, + Attributes::NumberOfTotalUsersSupported::Get, maxNumberOfUsers), + false); + + for (uint16_t userIndex = 1; userIndex <= maxNumberOfUsers; ++userIndex) + { + EmberAfPluginDoorLockUserInfo user; + if (!emberAfPluginDoorLockGetUser(endpointId, userIndex, user)) + { + ChipLogError(Zcl, + "[OnFabricRemoved] Unable to get the user - internal error [endpointId=%d,fabricIndex=%d,userIndex=%d]", + endpointId, fabricIndex, userIndex); + continue; + } + + // Filter out unoccupied slots and users that don't have corresponding fabricIndex in the created/modified fields + if (DlUserStatus::kAvailable == user.userStatus || (fabricIndex != user.createdBy && fabricIndex != user.lastModifiedBy)) + { + continue; + } + + if (user.createdBy == fabricIndex) + { + user.createdBy = kUndefinedFabricIndex; + } + + if (user.lastModifiedBy == fabricIndex) + { + user.lastModifiedBy = kUndefinedFabricIndex; + } + + if (!emberAfPluginDoorLockSetUser(endpointId, userIndex, user.createdBy, user.lastModifiedBy, user.userName, + user.userUniqueId, user.userStatus, user.userType, user.credentialRule, + user.credentials.data(), user.credentials.size())) + { + ChipLogError( + Zcl, + "[OnFabricRemoved] Unable to update the user fabrics - internal error [endpointId=%d,fabricIndex=%d,userIndex=%d]", + endpointId, fabricIndex, userIndex); + } + } + return true; +} + DlStatus DoorLockServer::createNewCredentialAndUser(chip::EndpointId endpointId, chip::FabricIndex creatorFabricIdx, chip::NodeId sourceNodeId, const Nullable & userStatus, const Nullable & userType, const DlCredential & credential, @@ -2152,7 +2299,7 @@ bool DoorLockServer::credentialTypeSupported(chip::EndpointId endpointId, DlCred case DlCredentialType::kPin: return SupportsPIN(endpointId); case DlCredentialType::kRfid: - return SupportsPFID(endpointId); + return SupportsRFID(endpointId); default: return false; } @@ -2579,7 +2726,7 @@ EmberAfStatus DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip emberAfDoorLockClusterPrintln("[clearCredentials] All PIN credentials were cleared [endpointId=%d]", endpointId); } - if (SupportsPFID(endpointId)) + if (SupportsRFID(endpointId)) { auto status = clearCredentials(endpointId, modifier, sourceNodeId, DlCredentialType::kRfid); if (EMBER_ZCL_STATUS_SUCCESS != status) @@ -2659,6 +2806,101 @@ EmberAfStatus DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip return EMBER_ZCL_STATUS_SUCCESS; } +bool DoorLockServer::clearFabricFromCredentials(chip::EndpointId endpointId, DlCredentialType credentialType, + chip::FabricIndex fabricToRemove) +{ + uint16_t maxNumberOfCredentials = 0; + if (!getMaxNumberOfCredentials(endpointId, credentialType, maxNumberOfCredentials)) + { + ChipLogError( + Zcl, + "[clearFabricFromCredentials] Unable to get max number of credentials to clear - can't get max number of credentials " + "[endpointId=%d,credentialType=%u]", + endpointId, to_underlying(credentialType)); + return false; + } + + uint16_t startIndex = 1; + // Programming PIN is a special case -- it is unique and its index assumed to be 0. + if (DlCredentialType::kProgrammingPIN == credentialType) + { + startIndex = 0; + maxNumberOfCredentials--; + } + + for (uint16_t credentialIndex = startIndex; credentialIndex <= maxNumberOfCredentials; ++credentialIndex) + { + EmberAfPluginDoorLockCredentialInfo credential; + if (!emberAfPluginDoorLockGetCredential(endpointId, credentialIndex, credentialType, credential)) + { + ChipLogError( + Zcl, + "[clearFabricFromCredentials] Unable to clear fabric from credential - couldn't read credential from database " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,fabricIdToRemove=%d]", + endpointId, to_underlying(credentialType), credentialIndex, fabricToRemove); + + // Go on and try to clear all the remaining credentials + continue; + } + + if (DlCredentialStatus::kAvailable == credential.status || + (credential.createdBy != fabricToRemove && credential.lastModifiedBy != fabricToRemove)) + { + continue; + } + + if (credential.createdBy == fabricToRemove) + { + credential.createdBy = kUndefinedFabricIndex; + } + + if (credential.lastModifiedBy == fabricToRemove) + { + credential.lastModifiedBy = kUndefinedFabricIndex; + } + + if (!emberAfPluginDoorLockSetCredential(endpointId, credentialIndex, credential.createdBy, credential.lastModifiedBy, + credential.status, credential.credentialType, credential.credentialData)) + { + ChipLogError(Zcl, + "[clearFabricFromCredentials] Unable to clear fabric from credential - internal error " + "[endpointId=%d,credentialType=%u,credentialIndex=%d,fabricIdToRemove=%d]", + endpointId, to_underlying(credentialType), credentialIndex, fabricToRemove); + return false; + } + } + + return true; +} + +bool DoorLockServer::clearFabricFromCredentials(chip::EndpointId endpointId, chip::FabricIndex fabricToRemove) +{ + if (SupportsRFID(endpointId)) + { + clearFabricFromCredentials(endpointId, DlCredentialType::kRfid, fabricToRemove); + } + + if (SupportsPIN(endpointId)) + { + clearFabricFromCredentials(endpointId, DlCredentialType::kPin, fabricToRemove); + } + + if (SupportsFingers(endpointId)) + { + clearFabricFromCredentials(endpointId, DlCredentialType::kFingerprint, fabricToRemove); + clearFabricFromCredentials(endpointId, DlCredentialType::kFingerVein, fabricToRemove); + } + + if (SupportsFace(endpointId)) + { + clearFabricFromCredentials(endpointId, DlCredentialType::kFace, fabricToRemove); + } + + clearFabricFromCredentials(endpointId, DlCredentialType::kProgrammingPIN, fabricToRemove); + + return true; +} + bool DoorLockServer::sendRemoteLockUserChange(chip::EndpointId endpointId, DlLockDataType dataType, DlDataOperationType operation, chip::NodeId nodeId, chip::FabricIndex fabricIndex, uint16_t userIndex, uint16_t dataIndex) @@ -2669,13 +2911,13 @@ bool DoorLockServer::sendRemoteLockUserChange(chip::EndpointId endpointId, DlLoc event.operationSource = DlOperationSource::kRemote; if (0 != userIndex) { - event.userIndex = Nullable(userIndex); + event.userIndex.SetNonNull(userIndex); } - event.fabricIndex = Nullable(fabricIndex); - event.sourceNode = Nullable(nodeId); + event.fabricIndex.SetNonNull(fabricIndex); + event.sourceNode.SetNonNull(nodeId); if (0 != dataIndex) { - event.dataIndex = Nullable(dataIndex); + event.dataIndex.SetNonNull(dataIndex); } EventNumber eventNumber; @@ -3340,6 +3582,7 @@ void emberAfPluginDoorLockServerRelockEventHandler(void) {} void MatterDoorLockPluginServerInitCallback() { emberAfDoorLockClusterPrintln("Door Lock server initialized"); + Server::GetInstance().GetFabricTable().AddFabricDelegate(&gFabricDelegate); } void MatterDoorLockClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath) {} 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 8a08cf7c0b2f4a..25ccf346a953b2 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -160,7 +160,7 @@ class DoorLockServer inline bool SupportsPIN(chip::EndpointId endpointId) { return HasFeature(endpointId, DoorLockFeature::kPINCredentials); } - inline bool SupportsPFID(chip::EndpointId endpointId) { return HasFeature(endpointId, DoorLockFeature::kRFIDCredentials); } + inline bool SupportsRFID(chip::EndpointId endpointId) { return HasFeature(endpointId, DoorLockFeature::kRFIDCredentials); } inline bool SupportsFingers(chip::EndpointId endpointId) { return HasFeature(endpointId, DoorLockFeature::kFingerCredentials); } @@ -175,6 +175,8 @@ class DoorLockServer return HasFeature(endpointId, DoorLockFeature::kUsersManagement) && SupportsPIN(endpointId); } + bool OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIndex fabricIndex); + private: chip::FabricIndex getFabricIndex(const chip::app::CommandHandler * commandObj); chip::NodeId getNodeId(const chip::app::CommandHandler * commandObj); @@ -189,9 +191,13 @@ class DoorLockServer bool getCredentialRange(chip::EndpointId endpointId, DlCredentialType type, size_t & minSize, size_t & maxSize); bool getMaxNumberOfCredentials(chip::EndpointId endpointId, DlCredentialType credentialType, uint16_t & maxNumberOfCredentials); + bool findOccupiedUserSlot(chip::EndpointId endpointId, uint16_t startIndex, uint16_t & userIndex); + bool findUnoccupiedUserSlot(chip::EndpointId endpointId, uint16_t & userIndex); bool findUnoccupiedUserSlot(chip::EndpointId endpointId, uint16_t startIndex, uint16_t & userIndex); + bool findOccupiedCredentialSlot(chip::EndpointId endpointId, DlCredentialType credentialType, uint16_t startIndex, + uint16_t & credentialIndex); bool findUnoccupiedCredentialSlot(chip::EndpointId endpointId, DlCredentialType credentialType, uint16_t startIndex, uint16_t & credentialIndex); @@ -215,6 +221,8 @@ class DoorLockServer EmberAfStatus clearUser(chip::EndpointId endpointId, chip::FabricIndex modifierFabricId, chip::NodeId sourceNodeId, uint16_t userIndex, const EmberAfPluginDoorLockUserInfo & user, bool sendUserChangeEvent); + bool clearFabricFromUsers(chip::EndpointId endpointId, chip::FabricIndex fabricIndex); + DlStatus createNewCredentialAndUser(chip::EndpointId endpointId, chip::FabricIndex creatorFabricIdx, chip::NodeId sourceNodeId, const Nullable & userStatus, const Nullable & userType, const DlCredential & credential, const chip::ByteSpan & credentialData, @@ -247,6 +255,9 @@ class DoorLockServer EmberAfStatus clearCredentials(chip::EndpointId endpointId, chip::FabricIndex modifier, chip::NodeId sourceNodeId, DlCredentialType credentialType); + bool clearFabricFromCredentials(chip::EndpointId endpointId, DlCredentialType credentialType, chip::FabricIndex fabricToRemove); + bool clearFabricFromCredentials(chip::EndpointId endpointId, chip::FabricIndex fabricToRemove); + CHIP_ERROR sendSetCredentialResponse(chip::app::CommandHandler * commandObj, DlStatus status, uint16_t userIndex, uint16_t nextCredentialIndex); @@ -420,15 +431,25 @@ enum class DlCredentialStatus : uint8_t kOccupied = 0x01, /**< Indicates if credential slot is already occupied. */ }; +enum class DlAssetSource : uint8_t +{ + kUnspecified = 0x00, + kMatterIM = 0x01, +}; + /** * @brief Structure that holds the credential information. */ struct EmberAfPluginDoorLockCredentialInfo { - DlCredentialStatus status; /**< Indicates if credential slot is occupied or not. */ - DlCredentialType credentialType; /**< Specifies the type of the credential (PIN, RFID, etc.). */ - chip::ByteSpan credentialData; /**< Credential data bytes. */ - chip::FabricIndex createdBy; /**< ID of the fabric that created the user. */ + DlCredentialStatus status; /**< Indicates if credential slot is occupied or not. */ + DlCredentialType credentialType; /**< Specifies the type of the credential (PIN, RFID, etc.). */ + chip::ByteSpan credentialData; /**< Credential data bytes. */ + + DlAssetSource creationSource; + chip::FabricIndex createdBy; /**< Index of the fabric that created the user. */ + + DlAssetSource modificationSource; chip::FabricIndex lastModifiedBy; /**< ID of the fabric that modified the user. */ }; @@ -443,8 +464,12 @@ struct EmberAfPluginDoorLockUserInfo DlUserStatus userStatus; /**< Status of the user slot (available/occupied). */ DlUserType userType; /**< Type of the user. */ DlCredentialRule credentialRule; /**< Number of supported credentials. */ - chip::FabricIndex createdBy; /**< ID of the fabric that created the user. */ - chip::FabricIndex lastModifiedBy; /**< ID of the fabric that modified the user. */ + + DlAssetSource creationSource; + chip::FabricIndex createdBy; /**< ID of the fabric that created the user. */ + + DlAssetSource modificationSource; + chip::FabricIndex lastModifiedBy; /**< ID of the fabric that modified the user. */ }; /** diff --git a/src/app/tests/suites/DL_UsersAndCredentials.yaml b/src/app/tests/suites/DL_UsersAndCredentials.yaml index d71a0ee70ee4fa..34f28bfd95cf28 100644 --- a/src/app/tests/suites/DL_UsersAndCredentials.yaml +++ b/src/app/tests/suites/DL_UsersAndCredentials.yaml @@ -55,7 +55,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 2 + value: null - label: "Get number of supported users and verify default value" command: "readAttribute" @@ -130,7 +130,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Set user at the occupied index fails with appropriate response" command: "SetUser" @@ -202,7 +202,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Modify userUniqueId for existing user" command: "SetUser" @@ -251,7 +251,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Modify userStatus for existing user" command: "SetUser" @@ -300,7 +300,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Modify userType for existing user" command: "SetUser" @@ -349,7 +349,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Modify credentialRule for existing user" command: "SetUser" @@ -398,7 +398,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Modify all fields for existing user" command: "SetUser" @@ -447,7 +447,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Add another user with non-default fields" command: "SetUser" @@ -496,7 +496,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 3 + value: null - label: "Create user in the last slot" command: "SetUser" @@ -626,7 +626,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 3 # Slot 2 is still occupied + value: 2 # Slot 2 is still occupied - label: "Create new user in the cleared slot" command: "SetUser" @@ -676,7 +676,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 3 # Slot 2 is still occupied + value: 2 # Slot 2 is still occupied - label: "Clear user with index 0 fails" command: "ClearUser" @@ -733,7 +733,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 3 + value: null - label: "Read last cleared user and verify it is available" command: "GetUser" @@ -792,7 +792,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 2 + value: null - label: "Reading PIN credential with index 0 fails" command: "GetCredentialStatus" @@ -869,7 +869,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Verify created PIN credential" command: "GetCredentialStatus" @@ -888,7 +888,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextCredentialIndex" - value: 2 + value: null - label: "Create new PIN credential and user with index 0 fails" command: "SetCredential" @@ -992,7 +992,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 3 + value: null - label: "Create new RFID credential and add it to existing user" command: "SetCredential" @@ -1051,7 +1051,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Verify created credential" command: "GetCredentialStatus" @@ -1070,7 +1070,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextCredentialIndex" - value: 3 + value: null - label: "Create new RFID credential and user with index 0 fails" command: "SetCredential" @@ -1510,7 +1510,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 3 + value: 2 - label: "Create new RFID credential and add it to existing user" command: "SetCredential" @@ -1571,7 +1571,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 3 + value: 2 - label: "Clear first PIN credential" command: "ClearCredential" @@ -1598,7 +1598,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 6 + value: 2 - label: "Read the user back and make sure PIN credential is deleted" command: "GetUser" @@ -1632,7 +1632,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 3 + value: 2 - label: "Clear the second PIN credential" command: "ClearCredential" @@ -1659,7 +1659,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 6 + value: 4 - label: "Read the user back and make sure related user is deleted" command: "GetUser" @@ -1688,7 +1688,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 3 + value: null - label: "Create new RFID credential with user" command: "SetCredential" @@ -1741,7 +1741,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 2 + value: 5 - label: "Read back the second RFID credential and make sure it is deleted" command: "GetCredentialStatus" @@ -1760,7 +1760,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 3 + value: 5 - label: "Read back the third RFID credential and make sure it is deleted" command: "GetCredentialStatus" @@ -1779,7 +1779,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 6 + value: 5 - label: "Read the user related with first RFID back and make sure it has only @@ -1810,7 +1810,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Read the user related with second RFID back and make sure it is @@ -1841,7 +1841,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 3 + value: null - label: "Create new PIN credential with user" command: "SetCredential" @@ -1948,7 +1948,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 2 + value: null - label: "Read back the first RFID credential and make sure it is deleted" command: "GetCredentialStatus" @@ -1967,7 +1967,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 3 + value: null - label: "Read back the second PIN credential and make sure it is deleted" command: "GetCredentialStatus" @@ -1986,7 +1986,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextCredentialIndex" - value: 7 + value: null - label: "Read the user related with first PIN back and make sure it is deleted" @@ -2016,7 +2016,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 2 + value: null - label: "Read the user related with first RFID back and make sure it is @@ -2047,7 +2047,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 3 + value: null - label: "Read the user related with second PIN back and make sure it is @@ -2078,7 +2078,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 4 + value: null - label: "Read the user related with last RFID back and make sure it is deleted" @@ -2108,7 +2108,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 5 + value: null - label: "Create new Programming PIN credential with invalid index" command: "SetCredential" @@ -2189,7 +2189,7 @@ tests: - name: "lastModifiedFabricIndex" value: 1 - name: "nextUserIndex" - value: 2 + value: null - label: "Verify created programming PIN credential" command: "GetCredentialStatus" @@ -2340,7 +2340,7 @@ tests: - name: "lastModifiedFabricIndex" value: null - name: "nextUserIndex" - value: 2 + value: null - label: "Make sure programming PIN credential is deleted" command: "GetCredentialStatus" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d8b83514c0d0a3..32c2d676e9a665 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -56169,8 +56169,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 2: @@ -56221,8 +56220,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 7: @@ -56260,8 +56258,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 10: @@ -56297,8 +56294,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 12: @@ -56334,8 +56330,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 14: @@ -56371,8 +56366,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 16: @@ -56408,8 +56402,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 18: @@ -56445,8 +56438,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 20: @@ -56482,8 +56474,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 22: @@ -56554,7 +56545,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; case 28: @@ -56590,7 +56581,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; case 30: @@ -56625,8 +56616,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 34: @@ -56678,8 +56668,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 37: @@ -56738,8 +56727,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 41: @@ -56758,8 +56746,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 42: @@ -56816,8 +56803,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 48: @@ -56872,8 +56858,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 50: @@ -56892,8 +56877,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 51: @@ -57134,7 +57118,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; case 67: @@ -57196,7 +57180,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; case 69: @@ -57216,7 +57200,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; case 71: @@ -57262,7 +57246,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; case 72: @@ -57282,7 +57266,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; case 74: @@ -57308,8 +57292,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 75: @@ -57343,7 +57326,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); } break; case 78: @@ -57360,7 +57343,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); } break; case 79: @@ -57377,7 +57360,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); } break; case 80: @@ -57416,8 +57399,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 81: @@ -57443,8 +57425,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 82: @@ -57505,8 +57486,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 87: @@ -57522,8 +57502,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 88: @@ -57539,8 +57518,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; case 89: @@ -57566,8 +57544,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 90: @@ -57593,8 +57570,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 91: @@ -57620,8 +57596,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 4U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 92: @@ -57647,8 +57622,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 5U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 93: @@ -57712,8 +57686,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 96: @@ -57791,8 +57764,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } break; case 106: diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index a869ffdb549dc6..73b1dd2e2276af 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -94674,8 +94674,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -94842,8 +94841,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -94970,8 +94968,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95074,8 +95071,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95178,8 +95174,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95282,8 +95277,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95386,8 +95380,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95490,8 +95483,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95594,8 +95586,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95838,7 +95829,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); } NextTest(); @@ -95941,7 +95932,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); } NextTest(); @@ -96069,8 +96060,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96216,8 +96206,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96391,8 +96380,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96444,8 +96432,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96658,8 +96645,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96789,8 +96775,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96842,8 +96827,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -97610,7 +97594,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); } NextTest(); @@ -97750,7 +97734,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); } NextTest(); @@ -97823,7 +97807,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); } NextTest(); @@ -97914,7 +97898,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); } NextTest(); @@ -97987,7 +97971,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); } NextTest(); @@ -98057,8 +98041,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98177,7 +98160,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); } NextTest(); @@ -98227,7 +98210,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); } NextTest(); @@ -98277,7 +98260,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); } NextTest(); @@ -98358,8 +98341,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98429,8 +98411,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98637,8 +98618,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98687,8 +98667,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98737,8 +98716,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98808,8 +98786,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98879,8 +98856,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98950,8 +98926,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 4U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99021,8 +98996,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 5U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99192,8 +99166,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99513,8 +99486,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest();