@@ -58,7 +58,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
58
58
*/
59
59
void emberAfDoorLockClusterInitCallback (EndpointId endpoint) {}
60
60
61
- bool emberAfPluginDoorLockOnDoorLockCommand (chip::EndpointId endpointId, const Optional<ByteSpan> & pinCode,
61
+ bool emberAfPluginDoorLockOnDoorLockCommand (chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
62
+ const Nullable<chip::NodeId> & nodeId, const Optional<chip::ByteSpan> & pinCode,
62
63
OperationErrorEnum & err)
63
64
{
64
65
ChipLogProgress (Zcl, " Door Lock App: Lock Command endpoint=%d" , endpointId);
@@ -70,7 +71,8 @@ bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const O
70
71
return status;
71
72
}
72
73
73
- bool emberAfPluginDoorLockOnDoorUnlockCommand (chip::EndpointId endpointId, const Optional<ByteSpan> & pinCode,
74
+ bool emberAfPluginDoorLockOnDoorUnlockCommand (chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
75
+ const Nullable<chip::NodeId> & nodeId, const Optional<chip::ByteSpan> & pinCode,
74
76
OperationErrorEnum & err)
75
77
{
76
78
ChipLogProgress (Zcl, " Door Lock App: Unlock Command endpoint=%d" , endpointId);
@@ -82,6 +84,20 @@ bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const
82
84
83
85
return status;
84
86
}
87
+ // TODO : Add helper function to call from the Unlock command if we establish Unbolt doesn't need a different behaviour than Unlock
88
+ bool emberAfPluginDoorLockOnDoorUnboltCommand (chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
89
+ const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
90
+ OperationErrorEnum & err)
91
+ {
92
+ ChipLogProgress (Zcl, " Door Lock App: Unbolt Command endpoint=%d" , endpointId);
93
+ bool status = LockMgr ().Unlock (endpointId, pinCode, err);
94
+ if (status == true )
95
+ {
96
+ LockMgr ().InitiateAction (AppEvent::kEventType_Lock , LockManager::UNLOCK_ACTION);
97
+ }
98
+
99
+ return status;
100
+ }
85
101
86
102
bool emberAfPluginDoorLockGetCredential (chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType,
87
103
EmberAfPluginDoorLockCredentialInfo & credential)
0 commit comments