diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index b087a5f8a997cc..cb63dd3b8dcf89 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2857,6 +2857,10 @@ server cluster DoorLock = 257 { nullable CredentialStruct credential = 0; } + request struct UnboltDoorRequest { + optional OCTET_STRING PINCode = 0; + } + response struct GetUserResponse = 28 { INT16U userIndex = 0; nullable CHAR_STRING userName = 1; @@ -2898,6 +2902,7 @@ server cluster DoorLock = 257 { timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } /** Provides an interface for controlling and adjusting automatic window coverings. */ @@ -5246,7 +5251,7 @@ endpoint 1 { ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; ram attribute requirePINforRemoteOperation default = 0; - ram attribute featureMap default = 0xD13; + ram attribute featureMap default = 0x1D13; ram attribute clusterRevision default = 6; } diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 4cea97853c4758..1f0ba89e00f3d8 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -13359,6 +13359,14 @@ "source": "client", "incoming": 1, "outgoing": 0 + }, + { + "name": "UnboltDoor", + "code": 39, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -14048,7 +14056,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xD13", + "defaultValue": "0x1D13", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/cc13x2x7_26x2x7/src/LockManager.cpp b/examples/lock-app/cc13x2x7_26x2x7/src/LockManager.cpp index 57cd1964dd92a1..babc79cfc5b5f7 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/src/LockManager.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/src/LockManager.cpp @@ -638,6 +638,8 @@ const char * LockManager::lockStateToString(DlLockState lockState) const return "Locked"; case DlLockState::kUnlocked: return "Unlocked"; + case DlLockState::kUnlatched: + return "Unlatched"; case DlLockState::kUnknownEnumValue: break; default: diff --git a/examples/lock-app/lock-common/include/LockEndpoint.h b/examples/lock-app/lock-common/include/LockEndpoint.h index cabbf5822e211e..6e1fb0311f29b4 100644 --- a/examples/lock-app/lock-common/include/LockEndpoint.h +++ b/examples/lock-app/lock-common/include/LockEndpoint.h @@ -66,6 +66,7 @@ class LockEndpoint bool Lock(const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource); bool Unlock(const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource); + bool Unbolt(const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource); bool GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) const; bool SetUser(uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, const chip::CharSpan & userName, diff --git a/examples/lock-app/lock-common/include/LockManager.h b/examples/lock-app/lock-common/include/LockManager.h index 9eb313aa5d276c..eb6d6e99d51e66 100644 --- a/examples/lock-app/lock-common/include/LockManager.h +++ b/examples/lock-app/lock-common/include/LockManager.h @@ -39,6 +39,8 @@ class LockManager OperationSourceEnum opSource); bool Unlock(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource); + bool Unbolt(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err, + OperationSourceEnum opSource); bool GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user); bool SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 83f5d0bb709e85..7e46fae3f0c759 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2154,6 +2154,10 @@ server cluster DoorLock = 257 { nullable CredentialStruct credential = 0; } + request struct UnboltDoorRequest { + optional OCTET_STRING PINCode = 0; + } + response struct GetWeekDayScheduleResponse = 12 { INT8U weekDayIndex = 0; INT16U userIndex = 1; @@ -2226,6 +2230,7 @@ server cluster DoorLock = 257 { timed command access(invoke: administer) SetCredential(SetCredentialRequest): SetCredentialResponse = 34; command access(invoke: administer) GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; } endpoint 0 { @@ -2595,7 +2600,7 @@ endpoint 1 { ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; ram attribute requirePINforRemoteOperation default = 0; - ram attribute featureMap default = 0xDB3; + ram attribute featureMap default = 0x1DB3; ram attribute clusterRevision default = 6; } } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index f35e6abf2103f9..dac3c3102d34c8 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -7023,6 +7023,14 @@ "source": "client", "incoming": 1, "outgoing": 0 + }, + { + "name": "UnboltDoor", + "code": 39, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -7736,7 +7744,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xDB3", + "defaultValue": "0x1DB3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/lock-common/src/LockEndpoint.cpp b/examples/lock-app/lock-common/src/LockEndpoint.cpp index eaa24aa1d6f07a..ec090b03f44e3c 100644 --- a/examples/lock-app/lock-common/src/LockEndpoint.cpp +++ b/examples/lock-app/lock-common/src/LockEndpoint.cpp @@ -28,6 +28,17 @@ bool LockEndpoint::Lock(const Optional & pin, OperationErrorEnum } bool LockEndpoint::Unlock(const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource) +{ + if (DoorLockServer::Instance().SupportsUnbolt(mEndpointId)) + { + // If Unbolt is supported Unlock is supposed to pull the latch + setLockState(DlLockState::kUnlatched, pin, err, opSource); + } + + return setLockState(DlLockState::kUnlocked, pin, err, opSource); +} + +bool LockEndpoint::Unbolt(const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource) { return setLockState(DlLockState::kUnlocked, pin, err, opSource); } diff --git a/examples/lock-app/lock-common/src/LockManager.cpp b/examples/lock-app/lock-common/src/LockManager.cpp index 9507c4e8fcf0dc..f904005340a1fc 100644 --- a/examples/lock-app/lock-common/src/LockManager.cpp +++ b/examples/lock-app/lock-common/src/LockManager.cpp @@ -158,6 +158,18 @@ bool LockManager::Unlock(chip::EndpointId endpointId, const OptionalUnlock(pin, err, opSource); } +bool LockManager::Unbolt(chip::EndpointId endpointId, const Optional & pin, OperationErrorEnum & err, + OperationSourceEnum opSource) +{ + auto lockEndpoint = getEndpoint(endpointId); + if (nullptr == lockEndpoint) + { + ChipLogError(Zcl, "Unable to unbolt the door - endpoint does not exist or not initialized [endpointId=%d]", endpointId); + return false; + } + return lockEndpoint->Unbolt(pin, err, opSource); +} + bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) { auto lockEndpoint = getEndpoint(endpointId); diff --git a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp index 28c790df650e87..bbecc8ef6ce178 100644 --- a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp +++ b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp @@ -40,6 +40,12 @@ bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const return LockManager::Instance().Unlock(endpointId, pinCode, err, OperationSourceEnum::kRemote); } +bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Optional & pinCode, + OperationErrorEnum & err) +{ + return LockManager::Instance().Unbolt(endpointId, pinCode, err, OperationSourceEnum::kRemote); +} + bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) { return LockManager::Instance().GetUser(endpointId, userIndex, user); diff --git a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp index f820ab88b582a5..9db680168dd637 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp @@ -58,6 +58,13 @@ emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Opti return false; } +bool __attribute__((weak)) +emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err) +{ + err = OperationErrorEnum::kUnspecified; + return false; +} + void __attribute__((weak)) emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId) {} // ============================================================================= 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 f63248d022676b..ef9101a7807dd7 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -114,10 +114,21 @@ bool DoorLockServer::SetLockState(chip::EndpointId endpointId, DlLockState newLo // DlLockState::kNotFullyLocked has no appropriate event to send. Also it is unclear whether // it should schedule auto-relocking. So skip it here. Check for supported states explicitly // to handle possible enum extending in future. - VerifyOrReturnError(DlLockState::kLocked == newLockState || DlLockState::kUnlocked == newLockState, success); + VerifyOrReturnError(DlLockState::kLocked == newLockState || DlLockState::kUnlocked == newLockState || + DlLockState::kUnlatched == newLockState, + success); // Send LockOperation event - auto opType = (DlLockState::kLocked == newLockState) ? LockOperationTypeEnum::kLock : LockOperationTypeEnum::kUnlock; + auto opType = LockOperationTypeEnum::kUnlock; + + if (DlLockState::kLocked == newLockState) + { + opType = LockOperationTypeEnum::kLock; + } + else if (DlLockState::kUnlatched == newLockState) + { + opType = LockOperationTypeEnum::kUnlatch; + } SendLockOperationEvent(endpointId, opType, opSource, OperationErrorEnum::kUnspecified, userIndex, Nullable(), Nullable(), credentials, success); @@ -3296,7 +3307,8 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma const chip::app::ConcreteCommandPath & commandPath, LockOperationTypeEnum opType, RemoteLockOpHandler opHandler, const Optional & pinCode) { - VerifyOrDie(LockOperationTypeEnum::kLock == opType || LockOperationTypeEnum::kUnlock == opType); + VerifyOrDie(LockOperationTypeEnum::kLock == opType || LockOperationTypeEnum::kUnlock == opType || + LockOperationTypeEnum::kUnlatch == opType); VerifyOrDie(nullptr != opHandler); EndpointId endpoint = commandPath.mEndpointId; @@ -3421,9 +3433,27 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma credentials.SetNonNull(foundCred); } + // Failed Unlatch requests SHALL generate only a LockOperationError event with LockOperationType set to Unlock + if (LockOperationTypeEnum::kUnlatch == opType && !success) + { + opType = LockOperationTypeEnum::kUnlock; + } + SendLockOperationEvent(endpoint, opType, OperationSourceEnum::kRemote, reason, pinUserIdx, Nullable(getFabricIndex(commandObj)), Nullable(getNodeId(commandObj)), credentials, success); + + // SHALL generate a LockOperation event with LockOperationType set to Unlatch when the unlatched state is reached and a + // LockOperation event with LockOperationType set to Unlock when the lock successfully completes the unlock. But as the current + // implementation here is sending LockOperation events immediately we're sending both events immediately. + // https://github.com/project-chip/connectedhomeip/issues/26925 + if (LockOperationTypeEnum::kUnlatch == opType && success) + { + SendLockOperationEvent(endpoint, LockOperationTypeEnum::kUnlock, OperationSourceEnum::kRemote, reason, pinUserIdx, + Nullable(getFabricIndex(commandObj)), + Nullable(getNodeId(commandObj)), credentials, success); + } + return success; } @@ -3525,7 +3555,14 @@ bool emberAfDoorLockClusterUnlockDoorCallback( { emberAfDoorLockClusterPrintln("Received command: UnlockDoor"); - if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, LockOperationTypeEnum::kUnlock, + LockOperationTypeEnum lockOp = LockOperationTypeEnum::kUnlock; + + if (DoorLockServer::Instance().SupportsUnbolt(commandPath.mEndpointId)) + { + lockOp = LockOperationTypeEnum::kUnlatch; + } + + if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, lockOp, emberAfPluginDoorLockOnDoorUnlockCommand, commandData.PINCode)) { // appclusters.pdf 5.3.3.25: @@ -3547,7 +3584,14 @@ bool emberAfDoorLockClusterUnlockWithTimeoutCallback( { emberAfDoorLockClusterPrintln("Received command: UnlockWithTimeout"); - if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, LockOperationTypeEnum::kUnlock, + LockOperationTypeEnum lockOp = LockOperationTypeEnum::kUnlock; + + if (DoorLockServer::Instance().SupportsUnbolt(commandPath.mEndpointId)) + { + lockOp = LockOperationTypeEnum::kUnlatch; + } + + if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, lockOp, emberAfPluginDoorLockOnDoorUnlockCommand, commandData.PINCode)) { // appclusters.pdf 5.3.4.3: @@ -3563,6 +3607,28 @@ bool emberAfDoorLockClusterUnlockWithTimeoutCallback( return true; } +bool emberAfDoorLockClusterUnboltDoorCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::UnboltDoor::DecodableType & commandData) +{ + emberAfDoorLockClusterPrintln("Received command: UnboltDoor"); + + if (DoorLockServer::Instance().HandleRemoteLockOperation(commandObj, commandPath, LockOperationTypeEnum::kUnlock, + emberAfPluginDoorLockOnDoorUnboltCommand, commandData.PINCode)) + { + // appclusters.pdf 5.3.3.25: + // The number of seconds to wait after unlocking a lock before it automatically locks again. 0=disabled. If set, unlock + // operations from any source will be timed. For one time unlock with timeout use the specific command. + uint32_t autoRelockTime = 0; + + VerifyOrReturnError(DoorLockServer::Instance().GetAutoRelockTime(commandPath.mEndpointId, autoRelockTime), true); + VerifyOrReturnError(0 != autoRelockTime, true); + DoorLockServer::Instance().ScheduleAutoRelock(commandPath.mEndpointId, autoRelockTime); + } + + return true; +} + bool emberAfDoorLockClusterSetUserCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType & commandData) 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 5728a4a891c559..05d1d5ee7e56bd 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -185,6 +185,8 @@ class DoorLockServer return GetFeatures(endpointId).Has(Feature::kUser) && SupportsAnyCredential(endpointId); } + inline bool SupportsUnbolt(chip::EndpointId endpointId) { return GetFeatures(endpointId).Has(Feature::kUnbolt); } + bool OnFabricRemoved(chip::EndpointId endpointId, chip::FabricIndex fabricIndex); static void DoorLockOnAutoRelockCallback(chip::System::Layer *, void * callbackContext); @@ -490,6 +492,10 @@ class DoorLockServer chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::DecodableType & commandData); + friend bool emberAfDoorLockClusterUnboltDoorCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::UnboltDoor::DecodableType & commandData); + friend bool emberAfDoorLockClusterSetHolidayScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::DecodableType & commandData); @@ -910,6 +916,19 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Optional & pinCode, OperationErrorEnum & err); +/** + * @brief User handler for UnboltDoor command (server) + * + * @param endpointId endpoint for which UnboltDoor command is called + * @param pinCode PIN code (optional) + * @param err error code if door unbolting failed (set only if retval==false) + * + * @retval true on success + * @retval false if error happenned (err should be set to appropriate error code) + */ +bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Optional & pinCode, + OperationErrorEnum & err); + /** * @brief This callback is called when the AutoRelock timer is expired. * diff --git a/src/app/tests/suites/DL_LockUnlock.yaml b/src/app/tests/suites/DL_LockUnlock.yaml index ed071e49368501..97c76a559f7296 100644 --- a/src/app/tests/suites/DL_LockUnlock.yaml +++ b/src/app/tests/suites/DL_LockUnlock.yaml @@ -49,6 +49,26 @@ tests: response: value: 1 + - label: "Try to unbolt the door without PIN" + command: "UnboltDoor" + timedInteractionTimeoutMs: 10000 + + - label: "Verify that lock state attribute value is set to Unlocked" + command: "readAttribute" + attribute: "LockState" + response: + value: 2 + + - label: "Try to lock the door without a PIN" + command: "LockDoor" + timedInteractionTimeoutMs: 10000 + + - label: "Verify that lock state attribute value is set to Locked" + command: "readAttribute" + attribute: "LockState" + response: + value: 1 + - label: "Create new lock/unlock user" command: "SetUser" timedInteractionTimeoutMs: 10000 @@ -133,6 +153,14 @@ tests: command: "readEvent" event: "LockOperation" response: + - values: + - value: + { + "LockOperationType": 4, + "OperationSource": 7, + "UserIndex": null, + "Credentials": null, + } - values: - value: { @@ -149,6 +177,31 @@ tests: "UserIndex": null, "Credentials": null, } + - values: + - value: + { + "LockOperationType": 1, + "OperationSource": 7, + "UserIndex": null, + "Credentials": null, + } + - values: + - value: + { + "LockOperationType": 0, + "OperationSource": 7, + "UserIndex": null, + "Credentials": null, + } + - values: + - value: + { + "LockOperationType": 4, + "OperationSource": 7, + "UserIndex": 1, + "Credentials": + [{ "CredentialType": 1, "CredentialIndex": 2 }], + } - values: - value: { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1d762fc94185b8..99657f82346338 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -85183,7 +85183,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand class DL_LockUnlockSuite : public TestCommand { public: - DL_LockUnlockSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_LockUnlock", 54, credsIssuerConfig) + DL_LockUnlockSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_LockUnlock", 58, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85245,6 +85245,30 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("lockState", value)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("lockState", value)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85255,13 +85279,13 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 7: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 9: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85270,10 +85294,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 10: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 15: switch (mTestSubStepIndex) { case 0: @@ -85281,7 +85305,7 @@ class DL_LockUnlockSuite : public TestCommand { chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 4U)); VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); @@ -85294,7 +85318,7 @@ class DL_LockUnlockSuite : public TestCommand { chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 0U)); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); @@ -85303,6 +85327,70 @@ class DL_LockUnlockSuite : public TestCommand mTestSubStepIndex++; break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 0U)); + VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); + VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); + VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); + VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); + } + mTestSubStepIndex++; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 1U)); + VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); + VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); + VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); + VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); + } + mTestSubStepIndex++; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 0U)); + VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); + VerifyOrReturn(CheckValueNull("lockOperation.userIndex", value.userIndex)); + VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); + VerifyOrReturn(CheckValueNull("lockOperation.credentials.Value()", value.credentials.Value())); + } + mTestSubStepIndex++; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("lockOperation.lockOperationType", value.lockOperationType, 4U)); + VerifyOrReturn(CheckValue("lockOperation.operationSource", value.operationSource, 7U)); + VerifyOrReturn(CheckValueNonNull("lockOperation.userIndex", value.userIndex)); + VerifyOrReturn(CheckValue("lockOperation.userIndex.Value()", value.userIndex.Value(), 1U)); + VerifyOrReturn(CheckValuePresent("lockOperation.credentials", value.credentials)); + VerifyOrReturn(CheckValueNonNull("lockOperation.credentials.Value()", value.credentials.Value())); + { + auto iter_3 = value.credentials.Value().Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "lockOperation.credentials.Value().Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialType", + iter_3.GetValue().credentialType, 1U)); + VerifyOrReturn(CheckValue("lockOperation.credentials.Value().Value()[0].credentialIndex", + iter_3.GetValue().credentialIndex, 2U)); + VerifyOrReturn(CheckNoMoreListItems( + "lockOperation.credentials.Value().Value()", iter_3, 1)); + } + } + mTestSubStepIndex++; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Events::LockOperation::DecodableType value; @@ -85332,7 +85420,7 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85341,10 +85429,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 14: + case 18: switch (mTestSubStepIndex) { case 0: @@ -85380,7 +85468,7 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 15: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85389,10 +85477,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 16: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85401,28 +85489,28 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 18: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 20: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 23: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 24: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85431,10 +85519,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 26: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85443,16 +85531,16 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 28: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 29: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 30: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85461,10 +85549,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 32: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85473,7 +85561,7 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 34: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -85481,19 +85569,19 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 10U)); } break; - case 35: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 36: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 37: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 38: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 39: + case 43: switch (mTestSubStepIndex) { case 0: @@ -85510,14 +85598,14 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 40: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 41: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85526,10 +85614,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 43: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85541,10 +85629,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; - case 45: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 46: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85553,10 +85641,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 47: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 48: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85565,10 +85653,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 49: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 50: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85577,10 +85665,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 51: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -85589,7 +85677,7 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 53: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -85643,7 +85731,35 @@ class DL_LockUnlockSuite : public TestCommand chip::NullOptional); } case 5: { - LogStep(5, "Create new lock/unlock user"); + LogStep(5, "Try to unbolt the door without PIN"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnboltDoor::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 6: { + LogStep(6, "Verify that lock state attribute value is set to Unlocked"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "Try to lock the door without a PIN"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 8: { + LogStep(8, "Verify that lock state attribute value is set to Locked"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "Create new lock/unlock user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; value.operationType = static_cast(0); @@ -85663,8 +85779,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 6: { - LogStep(6, "Create new PIN credential and associate it with lock/unlock user, with userIndex != credentialIndex"); + case 10: { + LogStep(10, "Create new PIN credential and associate it with lock/unlock user, with userIndex != credentialIndex"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -85682,16 +85798,16 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 7: { - LogStep(7, "Set the WrongCodeEntryLimit to big value so that we can test incorrect PIN entry"); + case 11: { + LogStep(11, "Set the WrongCodeEntryLimit to big value so that we can test incorrect PIN entry"); ListFreer listFreer; uint8_t value; value = 20U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Try to unlock the door with invalid PIN"); + case 12: { + LogStep(12, "Try to unlock the door with invalid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85701,13 +85817,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 9: { - LogStep(9, "Verify that lock state attribute value is set to Locked"); + case 13: { + LogStep(13, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Try to unlock the door with valid PIN"); + case 14: { + LogStep(14, "Try to unlock the door with valid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85717,19 +85833,19 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 11: { - LogStep(11, "Read the LockOperation event list"); - mTestSubStepCount = 3; + case 15: { + LogStep(15, "Read the LockOperation event list"); + mTestSubStepCount = 7; return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::LockOperation::Id, false, chip::NullOptional); } - case 12: { - LogStep(12, "Verify that lock state attribute value is set to Unlocked"); + case 16: { + LogStep(16, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Try to lock the door with invalid PIN"); + case 17: { + LogStep(17, "Try to lock the door with invalid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -85739,19 +85855,19 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 14: { - LogStep(14, "Read the LockOperationError event list; verify null UserIndex and Credentials"); + case 18: { + LogStep(18, "Read the LockOperationError event list; verify null UserIndex and Credentials"); mTestSubStepCount = 2; return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::LockOperationError::Id, false, chip::NullOptional); } - case 15: { - LogStep(15, "Verify that lock state attribute value is set to Unlocked"); + case 19: { + LogStep(19, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Try to lock the door with valid PIN"); + case 20: { + LogStep(20, "Try to lock the door with valid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -85761,21 +85877,21 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 17: { - LogStep(17, "Verify that lock state attribute value is set to Locked"); + case 21: { + LogStep(21, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Set OperatingMode to NoRemoteLockUnlock"); + case 22: { + LogStep(22, "Set OperatingMode to NoRemoteLockUnlock"); ListFreer listFreer; chip::app::Clusters::DoorLock::OperatingModeEnum value; value = static_cast(3); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 19: { - LogStep(19, "Try to unlock the door when OperatingMode is NoRemoteLockUnlock"); + case 23: { + LogStep(23, "Try to unlock the door when OperatingMode is NoRemoteLockUnlock"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, @@ -85783,24 +85899,24 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 20: { - LogStep(20, "Set OperatingMode to Normal"); + case 24: { + LogStep(24, "Set OperatingMode to Normal"); ListFreer listFreer; chip::app::Clusters::DoorLock::OperatingModeEnum value; value = static_cast(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::OperatingMode::Id, value, chip::NullOptional, chip::NullOptional); } - case 21: { - LogStep(21, "Set the WrongCodeEntryLimit to small value so we can test lockout"); + case 25: { + LogStep(25, "Set the WrongCodeEntryLimit to small value so we can test lockout"); ListFreer listFreer; uint8_t value; value = 3U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 22: { - LogStep(22, "Try to unlock the door with invalid PIN for the first time"); + case 26: { + LogStep(26, "Try to unlock the door with invalid PIN for the first time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85810,8 +85926,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 23: { - LogStep(23, "Try to unlock the door with invalid PIN for the second time"); + case 27: { + LogStep(27, "Try to unlock the door with invalid PIN for the second time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85821,8 +85937,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 24: { - LogStep(24, "Try to unlock the door with valid PIN for the third time"); + case 28: { + LogStep(28, "Try to unlock the door with valid PIN for the third time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85832,13 +85948,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 25: { - LogStep(25, "Verify that lock state attribute value is set to Unlocked"); + case 29: { + LogStep(29, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Lock the door back prior to next tests"); + case 30: { + LogStep(30, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -85848,13 +85964,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 27: { - LogStep(27, "Verify that lock state attribute value is set to Locked"); + case 31: { + LogStep(31, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Try to unlock the door with invalid PIN for the first time"); + case 32: { + LogStep(32, "Try to unlock the door with invalid PIN for the first time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85864,8 +85980,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 29: { - LogStep(29, "Try to unlock the door with invalid PIN for the second time"); + case 33: { + LogStep(33, "Try to unlock the door with invalid PIN for the second time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85875,8 +85991,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 30: { - LogStep(30, "Try to unlock the door with valid PIN for the third time"); + case 34: { + LogStep(34, "Try to unlock the door with valid PIN for the third time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85886,13 +86002,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 31: { - LogStep(31, "Verify that lock state attribute value is set to Unlocked"); + case 35: { + LogStep(35, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Lock the door back prior to next tests"); + case 36: { + LogStep(36, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -85902,18 +86018,18 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 33: { - LogStep(33, "Verify that lock state attribute value is set to Locked"); + case 37: { + LogStep(37, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Read the lockout timeout"); + case 38: { + LogStep(38, "Read the lockout timeout"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Try to unlock the door with invalid PIN for the first time"); + case 39: { + LogStep(39, "Try to unlock the door with invalid PIN for the first time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85923,8 +86039,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 36: { - LogStep(36, "Try to unlock the door with invalid PIN for the second time"); + case 40: { + LogStep(40, "Try to unlock the door with invalid PIN for the second time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85934,8 +86050,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 37: { - LogStep(37, "Try to unlock the door with invalid PIN for the third time"); + case 41: { + LogStep(41, "Try to unlock the door with invalid PIN for the third time"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85945,8 +86061,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 38: { - LogStep(38, "Try to unlock the door with valid PIN and make sure it fails due to lockout"); + case 42: { + LogStep(42, "Try to unlock the door with valid PIN and make sure it fails due to lockout"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85956,21 +86072,21 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 39: { - LogStep(39, "Read the DoorLockAlarm event list; verify WrongEntryCodeLimit alarm has been generated"); + case 43: { + LogStep(43, "Read the DoorLockAlarm event list; verify WrongEntryCodeLimit alarm has been generated"); mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::DoorLockAlarm::Id, false, chip::NullOptional); } - case 40: { - LogStep(40, "Wait for the lockout to end"); + case 44: { + LogStep(44, "Wait for the lockout to end"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 41: { - LogStep(41, "Try to unlock the door with valid PIN and make sure it succeeds"); + case 45: { + LogStep(45, "Try to unlock the door with valid PIN and make sure it succeeds"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -85980,13 +86096,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 42: { - LogStep(42, "Verify that lock state attribute value is set to Unlocked"); + case 46: { + LogStep(46, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "Lock the door back prior to next tests"); + case 47: { + LogStep(47, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -85996,8 +86112,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 44: { - LogStep(44, "Create a disabled user and credential"); + case 48: { + LogStep(48, "Create a disabled user and credential"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -86015,8 +86131,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 45: { - LogStep(45, "Try to unlock the door with disabled user PIN"); + case 49: { + LogStep(49, "Try to unlock the door with disabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -86026,13 +86142,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 46: { - LogStep(46, "Verify that lock state attribute value is set to Locked"); + case 50: { + LogStep(50, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Unlock the door with enabled user PIN"); + case 51: { + LogStep(51, "Unlock the door with enabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -86042,13 +86158,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 48: { - LogStep(48, "Verify that lock state attribute value is set to Unlocked"); + case 52: { + LogStep(52, "Verify that lock state attribute value is set to Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Try to lock the door with disabled user PIN"); + case 53: { + LogStep(53, "Try to lock the door with disabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -86058,13 +86174,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 50: { - LogStep(50, "Verify that lock state attribute value stays Unlocked"); + case 54: { + LogStep(54, "Verify that lock state attribute value stays Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Lock the door with enabled user PIN"); + case 55: { + LogStep(55, "Lock the door with enabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -86074,13 +86190,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 52: { - LogStep(52, "Verify that lock state attribute value is set to Locked"); + case 56: { + LogStep(56, "Verify that lock state attribute value is set to Locked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "Clean all the users and credentials"); + case 57: { + LogStep(57, "Clean all the users and credentials"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 65534U;