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 f5be77fa8a415b..4bba5cc8cccd5c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -56230,8 +56230,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: @@ -56282,8 +56281,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: @@ -56321,8 +56319,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: @@ -56358,8 +56355,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: @@ -56395,8 +56391,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: @@ -56432,8 +56427,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: @@ -56469,8 +56463,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: @@ -56506,8 +56499,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: @@ -56543,8 +56535,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: @@ -56615,7 +56606,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: @@ -56651,7 +56642,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: @@ -56686,8 +56677,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: @@ -56739,8 +56729,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: @@ -56799,8 +56788,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: @@ -56819,8 +56807,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: @@ -56877,8 +56864,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: @@ -56933,8 +56919,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: @@ -56953,8 +56938,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: @@ -57195,7 +57179,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: @@ -57257,7 +57241,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: @@ -57277,7 +57261,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: @@ -57323,7 +57307,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: @@ -57343,7 +57327,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: @@ -57369,8 +57353,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: @@ -57404,7 +57387,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: @@ -57421,7 +57404,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: @@ -57438,7 +57421,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: @@ -57477,8 +57460,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: @@ -57504,8 +57486,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: @@ -57566,8 +57547,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: @@ -57583,8 +57563,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: @@ -57600,8 +57579,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: @@ -57627,8 +57605,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: @@ -57654,8 +57631,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: @@ -57681,8 +57657,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: @@ -57708,8 +57683,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: @@ -57773,8 +57747,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: @@ -57852,8 +57825,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 a0fb6be8ae2403..212c0a5571ef9d 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -94798,8 +94798,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -94966,8 +94965,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95094,8 +95092,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95198,8 +95195,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95302,8 +95298,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95406,8 +95401,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95510,8 +95504,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95614,8 +95607,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95718,8 +95710,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -95962,7 +95953,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(); @@ -96065,7 +96056,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(); @@ -96193,8 +96184,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96340,8 +96330,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96515,8 +96504,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96568,8 +96556,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96782,8 +96769,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -96913,8 +96899,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -96966,8 +96951,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -97734,7 +97718,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(); @@ -97874,7 +97858,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(); @@ -97947,7 +97931,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(); @@ -98038,7 +98022,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(); @@ -98111,7 +98095,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(); @@ -98181,8 +98165,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98301,7 +98284,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(); @@ -98351,7 +98334,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(); @@ -98401,7 +98384,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(); @@ -98482,8 +98465,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98553,8 +98535,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -98761,8 +98742,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98811,8 +98791,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98861,8 +98840,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); } NextTest(); @@ -98932,8 +98910,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99003,8 +98980,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99074,8 +99050,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 4U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99145,8 +99120,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 5U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99316,8 +99290,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest(); @@ -99637,8 +99610,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); } NextTest();