@@ -116,10 +116,10 @@ using namespace EFR32DoorLock::ResourceRanges;
116
116
117
117
struct LockUserInfo
118
118
{
119
- char userName[DOOR_LOCK_USER_NAME_BUFFER_SIZE];
119
+ char userName[DOOR_LOCK_USER_NAME_BUFFER_SIZE];
120
120
size_t userNameSize;
121
- uint32_t userUniqueId;
122
- UserStatusEnum userStatus;
121
+ uint32_t userUniqueId;
122
+ UserStatusEnum userStatus;
123
123
UserTypeEnum userType;
124
124
CredentialRuleEnum credentialRule;
125
125
chip::EndpointId endpointId;
@@ -271,21 +271,38 @@ class LockManager
271
271
272
272
EFR32DoorLock::LockInitParams::LockParam LockParams;
273
273
274
- static StorageKeyName LockUserEndpoint (uint16_t userIndex, chip::EndpointId endpoint) { return StorageKeyName::Formatted (" g/lu/%x/e/%x" , userIndex, endpoint); }
275
- static StorageKeyName LockCredentialEndpoint (uint16_t credentialIndex, chip::EndpointId endpoint) { return StorageKeyName::Formatted (" g/lc/%x/e/%x" , credentialIndex, endpoint); }
276
- static StorageKeyName LockUserCredentialMap (uint16_t userIndex) { return StorageKeyName::Formatted (" g/lu/%x/lc" , userIndex); } // Stores all the credential indices that belong to a user
277
- static StorageKeyName LockUserWeekDayScheduleEndpoint (uint16_t userIndex, uint16_t scheduleIndex, chip::EndpointId endpoint) { return StorageKeyName::Formatted (" g/lu/%x/lw/%x/e/%x" , userIndex, scheduleIndex, endpoint); }
278
- static StorageKeyName LockUserYearDayScheduleEndpoint (uint16_t userIndex, uint16_t scheduleIndex, chip::EndpointId endpoint) { return StorageKeyName::Formatted (" g/lu/%x/ly/%x/e/%x" , userIndex, scheduleIndex, endpoint); }
279
- static StorageKeyName LockHolidayScheduleEndpoint (uint16_t scheduleIndex, chip::EndpointId endpoint) { return StorageKeyName::Formatted (" g/lh/%x/e/%x" , scheduleIndex, endpoint); }
274
+ static StorageKeyName LockUserEndpoint (uint16_t userIndex, chip::EndpointId endpoint)
275
+ {
276
+ return StorageKeyName::Formatted (" g/lu/%x/e/%x" , userIndex, endpoint);
277
+ }
278
+ static StorageKeyName LockCredentialEndpoint (uint16_t credentialIndex, chip::EndpointId endpoint)
279
+ {
280
+ return StorageKeyName::Formatted (" g/lc/%x/e/%x" , credentialIndex, endpoint);
281
+ }
282
+ static StorageKeyName LockUserCredentialMap (uint16_t userIndex)
283
+ {
284
+ return StorageKeyName::Formatted (" g/lu/%x/lc" , userIndex);
285
+ } // Stores all the credential indices that belong to a user
286
+ static StorageKeyName LockUserWeekDayScheduleEndpoint (uint16_t userIndex, uint16_t scheduleIndex, chip::EndpointId endpoint)
287
+ {
288
+ return StorageKeyName::Formatted (" g/lu/%x/lw/%x/e/%x" , userIndex, scheduleIndex, endpoint);
289
+ }
290
+ static StorageKeyName LockUserYearDayScheduleEndpoint (uint16_t userIndex, uint16_t scheduleIndex, chip::EndpointId endpoint)
291
+ {
292
+ return StorageKeyName::Formatted (" g/lu/%x/ly/%x/e/%x" , userIndex, scheduleIndex, endpoint);
293
+ }
294
+ static StorageKeyName LockHolidayScheduleEndpoint (uint16_t scheduleIndex, chip::EndpointId endpoint)
295
+ {
296
+ return StorageKeyName::Formatted (" g/lh/%x/e/%x" , scheduleIndex, endpoint);
297
+ }
280
298
281
299
LockUserInfo userInStorage;
282
- LockCredentialInfo credentialInStorage;
300
+ LockCredentialInfo credentialInStorage;
283
301
WeekDayScheduleInfo weekDayScheduleInStorage;
284
302
YearDayScheduleInfo yearDayScheduleInStorage;
285
303
HolidayScheduleInfo holidayScheduleInStorage;
286
304
CredentialStruct mCredential ;
287
305
CredentialStruct mCredentials [kMaxCredentialsPerUser ];
288
-
289
306
};
290
307
291
308
LockManager & LockMgr ();
0 commit comments