diff --git a/examples/lock-app/lock-common/include/LockEndpoint.h b/examples/lock-app/lock-common/include/LockEndpoint.h index 6f456c991805ab..63af4f46b0de30 100644 --- a/examples/lock-app/lock-common/include/LockEndpoint.h +++ b/examples/lock-app/lock-common/include/LockEndpoint.h @@ -109,6 +109,8 @@ class LockEndpoint bool weekDayScheduleInAction(uint16_t userIndex) const; bool yearDayScheduleInAction(uint16_t userIndex) const; + static void OnLockActionCompleteCallback(chip::System::Layer *, void * callbackContext); + chip::EndpointId mEndpointId; DlLockState mLockState; DoorStateEnum mDoorState; diff --git a/examples/lock-app/lock-common/src/LockEndpoint.cpp b/examples/lock-app/lock-common/src/LockEndpoint.cpp index 8db0f4da97a4bd..760f4a1b4b18e9 100644 --- a/examples/lock-app/lock-common/src/LockEndpoint.cpp +++ b/examples/lock-app/lock-common/src/LockEndpoint.cpp @@ -18,10 +18,27 @@ #include "LockEndpoint.h" #include #include +#include +#include using chip::to_underlying; using chip::app::DataModel::MakeNullable; +struct LockActionData +{ + chip::EndpointId endpointId; + DlLockState lockState; + OperationSourceEnum opSource; + Nullable userIndex; + uint16_t credentialIndex; + Nullable> credentials; + Nullable fabricIdx; + Nullable nodeId; + bool moving = false; +}; + +LockActionData currentAction; + bool LockEndpoint::Lock(const Nullable & fabricIdx, const Nullable & nodeId, const Optional & pin, OperationErrorEnum & err, OperationSourceEnum opSource) { @@ -34,7 +51,7 @@ bool LockEndpoint::Unlock(const Nullable & fabricIdx, const N if (DoorLockServer::Instance().SupportsUnbolt(mEndpointId)) { // If Unbolt is supported Unlock is supposed to pull the latch - setLockState(fabricIdx, nodeId, DlLockState::kUnlatched, pin, err, opSource); + return setLockState(fabricIdx, nodeId, DlLockState::kUnlatched, pin, err, opSource); } return setLockState(fabricIdx, nodeId, DlLockState::kUnlocked, pin, err, opSource); @@ -410,7 +427,21 @@ bool LockEndpoint::setLockState(const Nullable & fabricIdx, c ChipLogProgress(Zcl, "Door Lock App: setting door lock state to \"%s\" [endpointId=%d]", lockStateToString(lockState), mEndpointId); - DoorLockServer::Instance().SetLockState(mEndpointId, lockState, opSource); + if (currentAction.moving == true) + { + return false; + } + + currentAction.moving = true; + currentAction.endpointId = mEndpointId; + currentAction.lockState = lockState; + currentAction.opSource = opSource; + currentAction.userIndex = NullNullable; + currentAction.fabricIdx = fabricIdx; + currentAction.nodeId = nodeId; + + // simulate 3s lock movement duration + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(3), OnLockActionCompleteCallback, nullptr); return true; } @@ -475,15 +506,57 @@ bool LockEndpoint::setLockState(const Nullable & fabricIdx, c "Lock App: specified PIN code was found in the database, setting door lock state to \"%s\" [endpointId=%d,userIndex=%u]", lockStateToString(lockState), mEndpointId, userIndex); - mLockState = lockState; - LockOpCredentials userCredential[] = { { CredentialTypeEnum::kPin, uint16_t(credentialIndex) } }; - auto userCredentials = MakeNullable>(userCredential); - DoorLockServer::Instance().SetLockState(mEndpointId, mLockState, opSource, MakeNullable(static_cast(userIndex + 1)), - userCredentials, fabricIdx, nodeId); + if (currentAction.moving == true) + { + return false; + } + + currentAction.moving = true; + currentAction.endpointId = mEndpointId; + currentAction.lockState = lockState; + currentAction.opSource = opSource; + currentAction.userIndex = MakeNullable(static_cast(userIndex + 1)); + currentAction.credentialIndex = credentialIndex; + currentAction.fabricIdx = fabricIdx; + currentAction.nodeId = nodeId; + + // simulate 3s lock movement duration + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(3), OnLockActionCompleteCallback, nullptr); return true; } +void LockEndpoint::OnLockActionCompleteCallback(chip::System::Layer *, void * callbackContext) +{ + if (currentAction.userIndex == NullNullable) + { + DoorLockServer::Instance().SetLockState(currentAction.endpointId, currentAction.lockState, currentAction.opSource, + NullNullable, NullNullable, currentAction.fabricIdx, currentAction.nodeId); + } + else + { + LockOpCredentials userCredential[] = { { CredentialTypeEnum::kPin, currentAction.credentialIndex } }; + auto userCredentials = MakeNullable>(userCredential); + + DoorLockServer::Instance().SetLockState(currentAction.endpointId, currentAction.lockState, currentAction.opSource, + currentAction.userIndex, userCredentials, currentAction.fabricIdx, + currentAction.nodeId); + } + + // move back to Unlocked after Unlatch + if (currentAction.lockState == DlLockState::kUnlatched) + { + currentAction.lockState = DlLockState::kUnlocked; + + // simulate 1s lock movement duration + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnLockActionCompleteCallback, nullptr); + } + else + { + currentAction.moving = false; + } +} + bool LockEndpoint::weekDayScheduleInAction(uint16_t userIndex) const { const auto & user = mLockUsers[userIndex]; diff --git a/src/app/tests/suites/DL_LockUnlock.yaml b/src/app/tests/suites/DL_LockUnlock.yaml index 97c76a559f7296..8dc84f3f466294 100644 --- a/src/app/tests/suites/DL_LockUnlock.yaml +++ b/src/app/tests/suites/DL_LockUnlock.yaml @@ -18,7 +18,7 @@ config: nodeId: 0x12344321 cluster: "Door Lock" endpoint: 1 - timeout: 25 + timeout: 100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -33,6 +33,14 @@ tests: command: "UnlockDoor" timedInteractionTimeoutMs: 10000 + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -43,6 +51,14 @@ tests: command: "LockDoor" timedInteractionTimeoutMs: 10000 + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" @@ -53,6 +69,14 @@ tests: command: "UnboltDoor" timedInteractionTimeoutMs: 10000 + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -63,6 +87,14 @@ tests: command: "LockDoor" timedInteractionTimeoutMs: 10000 + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" @@ -149,6 +181,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Read the LockOperation event list" command: "readEvent" event: "LockOperation" @@ -267,6 +307,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" @@ -331,6 +379,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -345,6 +401,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" @@ -379,6 +443,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -393,6 +465,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" @@ -473,6 +553,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -487,6 +575,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Create a disabled user and credential" command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -537,6 +633,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Unlocked" command: "readAttribute" attribute: "LockState" @@ -567,6 +671,14 @@ tests: - name: "PINCode" value: "123456" + - label: "Wait for lock action to complete" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + - label: "Verify that lock state attribute value is set to Locked" command: "readAttribute" attribute: "LockState" diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7ec8b02994c977..87ede7ab3b9324 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -94729,7 +94729,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand class DL_LockUnlockSuite : public TestCommand { public: - DL_LockUnlockSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_LockUnlock", 58, credsIssuerConfig) + DL_LockUnlockSuite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("DL_LockUnlock", 72, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -94739,7 +94739,7 @@ class DL_LockUnlockSuite : public TestCommand ~DL_LockUnlockSuite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(25)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(100)); } private: chip::Optional mNodeId; @@ -94767,6 +94767,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94775,10 +94779,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94787,10 +94795,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94799,10 +94811,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 7: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94811,10 +94827,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 9: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -94825,13 +94841,13 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 11: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 13: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94840,10 +94856,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 14: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: switch (mTestSubStepIndex) { case 0: @@ -94966,7 +94986,7 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 16: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -94975,10 +94995,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 18: + case 23: switch (mTestSubStepIndex) { case 0: @@ -95014,7 +95034,7 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 19: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95023,10 +95043,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 20: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95035,28 +95059,32 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 22: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 24: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 27: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 28: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95065,10 +95093,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 30: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95077,16 +95109,20 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 32: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 33: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 34: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95095,10 +95131,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 36: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95107,7 +95147,7 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 38: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -95115,19 +95155,19 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 10U)); } break; - case 39: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 40: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 41: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 42: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 43: + case 53: switch (mTestSubStepIndex) { case 0: @@ -95144,14 +95184,18 @@ class DL_LockUnlockSuite : public TestCommand break; } break; - case 44: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 45: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95160,10 +95204,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 47: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 48: + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -95175,10 +95223,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; - case 49: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 50: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95187,10 +95235,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 51: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 64: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95199,10 +95251,10 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 53: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 54: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95211,10 +95263,14 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; - case 55: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 56: + case 69: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -95223,7 +95279,7 @@ class DL_LockUnlockSuite : public TestCommand VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; - case 57: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -95258,12 +95314,19 @@ class DL_LockUnlockSuite : public TestCommand ); } case 2: { - LogStep(2, "Verify that lock state attribute value is set to Unlocked"); + LogStep(2, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "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 3: { - LogStep(3, "Try to lock the door without a PIN"); + case 4: { + LogStep(4, "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, @@ -95271,13 +95334,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 4: { - LogStep(4, "Verify that lock state attribute value is set to Locked"); + case 5: { + LogStep(5, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "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 5: { - LogStep(5, "Try to unbolt the door without PIN"); + case 7: { + LogStep(7, "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, @@ -95285,13 +95355,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 6: { - LogStep(6, "Verify that lock state attribute value is set to Unlocked"); + case 8: { + LogStep(8, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "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"); + case 10: { + LogStep(10, "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, @@ -95299,13 +95376,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 8: { - LogStep(8, "Verify that lock state attribute value is set to Locked"); + case 11: { + LogStep(11, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "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"); + case 13: { + LogStep(13, "Create new lock/unlock user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type value; value.operationType = static_cast(0); @@ -95325,8 +95409,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 10: { - LogStep(10, "Create new PIN credential and associate it with lock/unlock user, with userIndex != credentialIndex"); + case 14: { + LogStep(14, "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); @@ -95344,16 +95428,16 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 11: { - LogStep(11, "Set the WrongCodeEntryLimit to big value so that we can test incorrect PIN entry"); + case 15: { + LogStep(15, "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 12: { - LogStep(12, "Try to unlock the door with invalid PIN"); + case 16: { + LogStep(16, "Try to unlock the door with invalid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -95363,13 +95447,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 13: { - LogStep(13, "Verify that lock state attribute value is set to Locked"); + case 17: { + LogStep(17, "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 14: { - LogStep(14, "Try to unlock the door with valid PIN"); + case 18: { + LogStep(18, "Try to unlock the door with valid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -95379,19 +95463,26 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 15: { - LogStep(15, "Read the LockOperation event list"); + case 19: { + LogStep(19, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "Read the LockOperation event list"); mTestSubStepCount = 7; return ReadEvent(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Events::LockOperation::Id, false, chip::NullOptional); } - case 16: { - LogStep(16, "Verify that lock state attribute value is set to Unlocked"); + case 21: { + LogStep(21, "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 17: { - LogStep(17, "Try to lock the door with invalid PIN"); + case 22: { + LogStep(22, "Try to lock the door with invalid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95401,19 +95492,19 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 18: { - LogStep(18, "Read the LockOperationError event list; verify null UserIndex and Credentials"); + case 23: { + LogStep(23, "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 19: { - LogStep(19, "Verify that lock state attribute value is set to Unlocked"); + case 24: { + LogStep(24, "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 20: { - LogStep(20, "Try to lock the door with valid PIN"); + case 25: { + LogStep(25, "Try to lock the door with valid PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95423,21 +95514,28 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 21: { - LogStep(21, "Verify that lock state attribute value is set to Locked"); + case 26: { + LogStep(26, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 27: { + LogStep(27, "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 22: { - LogStep(22, "Set OperatingMode to NoRemoteLockUnlock"); + case 28: { + LogStep(28, "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 23: { - LogStep(23, "Try to unlock the door when OperatingMode is NoRemoteLockUnlock"); + case 29: { + LogStep(29, "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, @@ -95445,24 +95543,24 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 24: { - LogStep(24, "Set OperatingMode to Normal"); + case 30: { + LogStep(30, "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 25: { - LogStep(25, "Set the WrongCodeEntryLimit to small value so we can test lockout"); + case 31: { + LogStep(31, "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 26: { - LogStep(26, "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(); @@ -95472,8 +95570,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 27: { - LogStep(27, "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(); @@ -95483,8 +95581,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 28: { - LogStep(28, "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(); @@ -95494,13 +95592,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 29: { - LogStep(29, "Verify that lock state attribute value is set to Unlocked"); + case 35: { + LogStep(35, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 36: { + LogStep(36, "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 30: { - LogStep(30, "Lock the door back prior to next tests"); + case 37: { + LogStep(37, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95510,13 +95615,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 31: { - LogStep(31, "Verify that lock state attribute value is set to Locked"); + case 38: { + LogStep(38, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 39: { + LogStep(39, "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 32: { - LogStep(32, "Try to unlock the door with invalid PIN for the first time"); + case 40: { + LogStep(40, "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(); @@ -95526,8 +95638,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 33: { - LogStep(33, "Try to unlock the door with invalid PIN for the second time"); + case 41: { + LogStep(41, "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(); @@ -95537,8 +95649,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 34: { - LogStep(34, "Try to unlock the door with valid PIN for the third time"); + case 42: { + LogStep(42, "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(); @@ -95548,13 +95660,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 35: { - LogStep(35, "Verify that lock state attribute value is set to Unlocked"); + case 43: { + LogStep(43, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 44: { + LogStep(44, "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 36: { - LogStep(36, "Lock the door back prior to next tests"); + case 45: { + LogStep(45, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95564,18 +95683,25 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 37: { - LogStep(37, "Verify that lock state attribute value is set to Locked"); + case 46: { + LogStep(46, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 47: { + LogStep(47, "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 38: { - LogStep(38, "Read the lockout timeout"); + case 48: { + LogStep(48, "Read the lockout timeout"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Try to unlock the door with invalid PIN for the first time"); + case 49: { + LogStep(49, "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(); @@ -95585,8 +95711,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 40: { - LogStep(40, "Try to unlock the door with invalid PIN for the second time"); + case 50: { + LogStep(50, "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(); @@ -95596,8 +95722,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 41: { - LogStep(41, "Try to unlock the door with invalid PIN for the third time"); + case 51: { + LogStep(51, "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(); @@ -95607,8 +95733,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 42: { - LogStep(42, "Try to unlock the door with valid PIN and make sure it fails due to lockout"); + case 52: { + LogStep(52, "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(); @@ -95618,21 +95744,21 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 43: { - LogStep(43, "Read the DoorLockAlarm event list; verify WrongEntryCodeLimit alarm has been generated"); + case 53: { + LogStep(53, "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 44: { - LogStep(44, "Wait for the lockout to end"); + case 54: { + LogStep(54, "Wait for the lockout to end"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 45: { - LogStep(45, "Try to unlock the door with valid PIN and make sure it succeeds"); + case 55: { + LogStep(55, "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(); @@ -95642,13 +95768,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 46: { - LogStep(46, "Verify that lock state attribute value is set to Unlocked"); + case 56: { + LogStep(56, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 57: { + LogStep(57, "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 47: { - LogStep(47, "Lock the door back prior to next tests"); + case 58: { + LogStep(58, "Lock the door back prior to next tests"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95658,8 +95791,15 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 48: { - LogStep(48, "Create a disabled user and credential"); + case 59: { + LogStep(59, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 60: { + LogStep(60, "Create a disabled user and credential"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -95677,8 +95817,8 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 49: { - LogStep(49, "Try to unlock the door with disabled user PIN"); + case 61: { + LogStep(61, "Try to unlock the door with disabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -95688,13 +95828,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 50: { - LogStep(50, "Verify that lock state attribute value is set to Locked"); + case 62: { + LogStep(62, "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 51: { - LogStep(51, "Unlock the door with enabled user PIN"); + case 63: { + LogStep(63, "Unlock the door with enabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; value.PINCode.Emplace(); @@ -95704,13 +95844,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 52: { - LogStep(52, "Verify that lock state attribute value is set to Unlocked"); + case 64: { + LogStep(64, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 65: { + LogStep(65, "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 53: { - LogStep(53, "Try to lock the door with disabled user PIN"); + case 66: { + LogStep(66, "Try to lock the door with disabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95720,13 +95867,13 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 54: { - LogStep(54, "Verify that lock state attribute value stays Unlocked"); + case 67: { + LogStep(67, "Verify that lock state attribute value stays Unlocked"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::LockState::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Lock the door with enabled user PIN"); + case 68: { + LogStep(68, "Lock the door with enabled user PIN"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; value.PINCode.Emplace(); @@ -95736,13 +95883,20 @@ class DL_LockUnlockSuite : public TestCommand ); } - case 56: { - LogStep(56, "Verify that lock state attribute value is set to Locked"); + case 69: { + LogStep(69, "Wait for lock action to complete"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 70: { + LogStep(70, "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 57: { - LogStep(57, "Clean all the users and credentials"); + case 71: { + LogStep(71, "Clean all the users and credentials"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 65534U;