Skip to content

Commit

Permalink
Generate WrongCodeEntryLimit DoorLockAlarm event when lockout is enga…
Browse files Browse the repository at this point in the history
…ged (#25436)

* Generate WrongCodeEntryLimit DoorLockAlarm event when lockout is engaged (#25420)
Update DL_LockUnlock YAML test to test for event.

* Fix restyle issue

* trigger GitHub actions

* Generate WrongCodeEntryLimit DoorLockAlarm event when lockout is engaged (#25420)
Update DL_LockUnlock YAML test to test for event.

* Fix restyle issue
  • Loading branch information
jrhees-cae authored and pull[bot] committed Oct 11, 2023
1 parent 70576e1 commit 1247187
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 41 deletions.
2 changes: 2 additions & 0 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ bool DoorLockServer::engageLockout(chip::EndpointId endpointId)

emberAfDoorLockClusterPrintln("Lockout engaged [endpointId=%d,lockoutTimeout=%d]", endpointId, lockoutTimeout);

SendLockAlarmEvent(endpointId, AlarmCodeEnum::kWrongCodeEntryLimit);

emberAfPluginDoorLockLockoutStarted(endpointId, endpointContext->lockoutEndTimestamp);

return true;
Expand Down
8 changes: 8 additions & 0 deletions src/app/tests/suites/DL_LockUnlock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ tests:
response:
error: FAILURE

- label:
"Read the DoorLockAlarm event list; verify WrongEntryCodeLimit alarm
has been generated"
command: "readEvent"
event: "DoorLockAlarm"
response:
value: { "AlarmCode": 4 }

- label: "Wait for the lockout to end"
cluster: "DelayCommands"
command: "WaitForMs"
Expand Down
105 changes: 64 additions & 41 deletions zzz_generated/chip-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1247187

Please sign in to comment.