@@ -50,66 +50,18 @@ bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const
50
50
return LockManager::Instance ().Unlock (endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote );
51
51
}
52
52
53
- // UnlockWithTimeout
54
-
55
- // =============================================================================
56
- // Users and credentials access callbacks
57
- // =============================================================================
58
-
59
- // SetWeekDaySchedule
60
- DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
61
- DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute,
62
- uint8_t endHour, uint8_t endMinute)
63
- {
64
- return LockManager::Instance ().SetSchedule (endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute,
65
- endHour, endMinute);
66
- }
67
-
68
- // GetWeekDaySchedule
69
- DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
70
- EmberAfPluginDoorLockWeekDaySchedule & schedule)
71
- {
72
- return LockManager::Instance ().GetSchedule (endpointId, weekdayIndex, userIndex, schedule);
73
- }
74
-
75
- // emberAfDoorLockClusterClearWeekDayScheduleCallback was handled in src/app/clusters/door-lock-server/door-lock-server.cpp
76
- // And finally call into emberAfPluginDoorLockSetSchedule
77
-
78
- // SetYearDaySchedule
79
- DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
80
- DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime)
81
- {
82
- return LockManager::Instance ().SetSchedule (endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime);
83
- }
84
-
85
- // GetYearDaySchedule
86
- DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
87
- EmberAfPluginDoorLockYearDaySchedule & schedule)
88
- {
89
- return LockManager::Instance ().GetSchedule (endpointId, yearDayIndex, userIndex, schedule);
90
- }
91
-
92
- // emberAfDoorLockClusterClearYearDayScheduleCallback was handled in src/app/clusters/door-lock-server/door-lock-server.cpp
93
- // And finally call into emberAfPluginDoorLockSetSchedule
94
-
95
- // SetHolidaySchedule
96
- DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status,
97
- uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode)
53
+ bool emberAfPluginDoorLockOnDoorUnboltCommand (chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
54
+ const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
55
+ OperationErrorEnum & err)
98
56
{
99
- return LockManager::Instance ().SetSchedule (endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode );
57
+ return LockManager::Instance ().Unbolt (endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum:: kRemote );
100
58
}
101
59
102
- // GetHolidaySchedule
103
- DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t holidayIndex,
104
- EmberAfPluginDoorLockHolidaySchedule & schedule)
60
+ bool emberAfPluginDoorLockGetUser (chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user)
105
61
{
106
- return LockManager::Instance ().GetSchedule (endpointId, holidayIndex, schedule );
62
+ return LockManager::Instance ().GetUser (endpointId, userIndex, user );
107
63
}
108
64
109
- // emberAfDoorLockClusterClearHolidayScheduleCallback was handled in src/app/clusters/door-lock-server/door-lock-server.cpp
110
- // And finally call into emberAfPluginDoorLockSetSchedule
111
-
112
- // SetUser
113
65
bool emberAfPluginDoorLockSetUser (chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator,
114
66
chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId,
115
67
UserStatusEnum userStatus, UserTypeEnum usertype, CredentialRuleEnum credentialRule,
@@ -120,16 +72,12 @@ bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userInde
120
72
credentialRule, credentials, totalCredentials);
121
73
}
122
74
123
- // GetUser
124
- bool emberAfPluginDoorLockGetUser (chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user )
75
+ bool emberAfPluginDoorLockGetCredential (chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType,
76
+ EmberAfPluginDoorLockCredentialInfo & credential )
125
77
{
126
- return LockManager::Instance ().GetUser (endpointId, userIndex, user );
78
+ return LockManager::Instance ().GetCredential (endpointId, credentialIndex, credentialType, credential );
127
79
}
128
80
129
- // emberAfDoorLockClusterClearUserCallback was handled in src/app/clusters/door-lock-server/door-lock-server.cpp
130
- // And finally call into emberAfPluginDoorLockSetCredential and emberAfPluginDoorLockSetUser
131
-
132
- // SetCredential
133
81
bool emberAfPluginDoorLockSetCredential (chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator,
134
82
chip::FabricIndex modifier, DlCredentialStatus credentialStatus,
135
83
CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData)
@@ -138,22 +86,42 @@ bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t cr
138
86
credentialData);
139
87
}
140
88
141
- // GetCredential
142
- bool emberAfPluginDoorLockGetCredential (chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType,
143
- EmberAfPluginDoorLockCredentialInfo & credential)
89
+ DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
90
+ EmberAfPluginDoorLockWeekDaySchedule & schedule)
144
91
{
145
- return LockManager::Instance ().GetCredential (endpointId, credentialIndex, credentialType, credential );
92
+ return LockManager::Instance ().GetSchedule (endpointId, weekdayIndex, userIndex, schedule );
146
93
}
147
94
148
- // emberAfDoorLockClusterClearCredentialCallback was handled in src/app/clusters/door-lock-server/door-lock-server.cpp
149
- // And finally call into emberAfPluginDoorLockSetCredential and emberAfPluginDoorLockSetUser
95
+ DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t holidayIndex,
96
+ EmberAfPluginDoorLockHolidaySchedule & schedule)
97
+ {
98
+ return LockManager::Instance ().GetSchedule (endpointId, holidayIndex, schedule);
99
+ }
150
100
151
- // UnboltDoor
152
- bool emberAfPluginDoorLockOnDoorUnboltCommand (chip::EndpointId endpointId, const Nullable<chip::FabricIndex> & fabricIdx,
153
- const Nullable<chip::NodeId> & nodeId, const Optional<ByteSpan> & pinCode,
154
- OperationErrorEnum & err)
101
+ DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex,
102
+ DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute,
103
+ uint8_t endHour, uint8_t endMinute)
155
104
{
156
- return LockManager::Instance ().Unbolt (endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote );
105
+ return LockManager::Instance ().SetSchedule (endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute,
106
+ endHour, endMinute);
107
+ }
108
+
109
+ DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
110
+ DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime)
111
+ {
112
+ return LockManager::Instance ().SetSchedule (endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime);
113
+ }
114
+
115
+ DlStatus emberAfPluginDoorLockGetSchedule (chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex,
116
+ EmberAfPluginDoorLockYearDaySchedule & schedule)
117
+ {
118
+ return LockManager::Instance ().GetSchedule (endpointId, yearDayIndex, userIndex, schedule);
119
+ }
120
+
121
+ DlStatus emberAfPluginDoorLockSetSchedule (chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status,
122
+ uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode)
123
+ {
124
+ return LockManager::Instance ().SetSchedule (endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode);
157
125
}
158
126
159
127
void emberAfDoorLockClusterInitCallback (EndpointId endpoint)
0 commit comments