@@ -141,33 +141,37 @@ bool LockManager::IsValidHolidayScheduleIndex(uint8_t scheduleIndex)
141141bool LockManager::ReadConfigValues ()
142142{
143143 size_t outLen;
144- PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_LockUser , reinterpret_cast <uint8_t *>(&mLockUsers ),
145- sizeof (EmberAfPluginDoorLockUserInfo) * MATTER_ARRAY_SIZE (mLockUsers ), outLen);
144+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
145+ PSOC6Config::kConfigKey_LockUser , reinterpret_cast <uint8_t *>(&mLockUsers ),
146+ sizeof (EmberAfPluginDoorLockUserInfo) * MATTER_ARRAY_SIZE (mLockUsers ), outLen);
146147
147- PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_Credential , reinterpret_cast <uint8_t *>(&mLockCredentials ),
148- sizeof (EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes , outLen);
148+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
149+ PSOC6Config::kConfigKey_Credential , reinterpret_cast <uint8_t *>(&mLockCredentials ),
150+ sizeof (EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes , outLen);
149151
150- PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_LockUserName , reinterpret_cast < uint8_t *>( mUserNames ) ,
151- sizeof (mUserNames ), outLen);
152+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_LockUserName ,
153+ reinterpret_cast < uint8_t *>( mUserNames ), sizeof (mUserNames ), outLen);
152154
153- PSOC6Config::ReadConfigValueBin (PSOC6Config:: kConfigKey_CredentialData , reinterpret_cast < uint8_t *>( mCredentialData ),
154- sizeof (mCredentialData ), outLen);
155+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
156+ PSOC6Config:: kConfigKey_CredentialData , reinterpret_cast < uint8_t *>( mCredentialData ), sizeof (mCredentialData ), outLen);
155157
156- PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_UserCredentials , reinterpret_cast <uint8_t *>(mCredentials ),
157- sizeof (CredentialStruct) * LockParams.numberOfUsers * kMaxCredentials , outLen);
158+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
159+ PSOC6Config::kConfigKey_UserCredentials , reinterpret_cast <uint8_t *>(mCredentials ),
160+ sizeof (CredentialStruct) * LockParams.numberOfUsers * kMaxCredentials , outLen);
158161
159- PSOC6Config::ReadConfigValueBin (PSOC6Config:: kConfigKey_WeekDaySchedules , reinterpret_cast < uint8_t *>( mWeekdaySchedule ),
160- sizeof (EmberAfPluginDoorLockWeekDaySchedule) * LockParams. numberOfWeekdaySchedulesPerUser *
161- LockParams.numberOfUsers ,
162- outLen);
162+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
163+ PSOC6Config:: kConfigKey_WeekDaySchedules , reinterpret_cast < uint8_t *>( mWeekdaySchedule ),
164+ sizeof (EmberAfPluginDoorLockWeekDaySchedule) * LockParams. numberOfWeekdaySchedulesPerUser * LockParams.numberOfUsers ,
165+ outLen);
163166
164- PSOC6Config::ReadConfigValueBin (PSOC6Config:: kConfigKey_YearDaySchedules , reinterpret_cast < uint8_t *>( mYeardaySchedule ),
165- sizeof (EmberAfPluginDoorLockYearDaySchedule) * LockParams. numberOfYeardaySchedulesPerUser *
166- LockParams.numberOfUsers ,
167- outLen);
167+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
168+ PSOC6Config:: kConfigKey_YearDaySchedules , reinterpret_cast < uint8_t *>( mYeardaySchedule ),
169+ sizeof (EmberAfPluginDoorLockYearDaySchedule) * LockParams. numberOfYeardaySchedulesPerUser * LockParams.numberOfUsers ,
170+ outLen);
168171
169- PSOC6Config::ReadConfigValueBin (PSOC6Config::kConfigKey_HolidaySchedules , reinterpret_cast <uint8_t *>(&(mHolidaySchedule )),
170- sizeof (EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules , outLen);
172+ TEMPORARY_RETURN_IGNORED PSOC6Config::ReadConfigValueBin (
173+ PSOC6Config::kConfigKey_HolidaySchedules , reinterpret_cast <uint8_t *>(&(mHolidaySchedule )),
174+ sizeof (EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules , outLen);
171175
172176 return true ;
173177}
@@ -392,14 +396,16 @@ bool LockManager::SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip:
392396 userInStorage.credentials = chip::Span<const CredentialStruct>(mCredentials [userIndex], totalCredentials);
393397
394398 // Save user information in NVM flash
395- PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_LockUser , reinterpret_cast <const uint8_t *>(&mLockUsers ),
396- sizeof (EmberAfPluginDoorLockUserInfo) * LockParams.numberOfUsers );
399+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_LockUser ,
400+ reinterpret_cast <const uint8_t *>(&mLockUsers ),
401+ sizeof (EmberAfPluginDoorLockUserInfo) * LockParams.numberOfUsers );
397402
398- PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_UserCredentials , reinterpret_cast <const uint8_t *>(mCredentials ),
399- sizeof (CredentialStruct) * LockParams.numberOfUsers * kMaxCredentials );
403+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
404+ PSOC6Config::kConfigKey_UserCredentials , reinterpret_cast <const uint8_t *>(mCredentials ),
405+ sizeof (CredentialStruct) * LockParams.numberOfUsers * kMaxCredentials );
400406
401- PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_LockUserName , reinterpret_cast < const uint8_t *>( mUserNames ) ,
402- sizeof (mUserNames ));
407+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_LockUserName ,
408+ reinterpret_cast < const uint8_t *>( mUserNames ), sizeof (mUserNames ));
403409
404410 ChipLogProgress (Zcl, " Successfully set the user [mEndpointId=%d,index=%d]" , endpointId, userIndex);
405411
@@ -480,11 +486,12 @@ bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credential
480486 chip::ByteSpan{ mCredentialData [to_underlying (credentialType)][credentialIndex], credentialData.size () };
481487
482488 // Save credential information in NVM flash
483- PSOC6Config::WriteConfigValueBin (PSOC6Config::kConfigKey_Credential , reinterpret_cast <const uint8_t *>(&mLockCredentials ),
484- sizeof (EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes );
489+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
490+ PSOC6Config::kConfigKey_Credential , reinterpret_cast <const uint8_t *>(&mLockCredentials ),
491+ sizeof (EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes );
485492
486- PSOC6Config::WriteConfigValueBin (PSOC6Config:: kConfigKey_CredentialData , reinterpret_cast < const uint8_t *>(& mCredentialData ),
487- sizeof (mCredentialData ));
493+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
494+ PSOC6Config:: kConfigKey_CredentialData , reinterpret_cast < const uint8_t *>(& mCredentialData ), sizeof (mCredentialData ));
488495
489496 ChipLogProgress (Zcl, " Successfully set the credential [credentialType=%u]" , to_underlying (credentialType));
490497
@@ -539,9 +546,9 @@ DlStatus LockManager::SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t we
539546 scheduleInStorage.status = status;
540547
541548 // Save schedule information in NVM flash
542- PSOC6Config::WriteConfigValueBin (PSOC6Config:: kConfigKey_WeekDaySchedules , reinterpret_cast < const uint8_t *>( mWeekdaySchedule ),
543- sizeof (EmberAfPluginDoorLockWeekDaySchedule) * LockParams. numberOfWeekdaySchedulesPerUser *
544- LockParams.numberOfUsers );
549+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
550+ PSOC6Config:: kConfigKey_WeekDaySchedules , reinterpret_cast < const uint8_t *>( mWeekdaySchedule ),
551+ sizeof (EmberAfPluginDoorLockWeekDaySchedule) * LockParams. numberOfWeekdaySchedulesPerUser * LockParams.numberOfUsers );
545552
546553 return DlStatus::kSuccess ;
547554}
@@ -588,9 +595,9 @@ DlStatus LockManager::SetYeardaySchedule(chip::EndpointId endpointId, uint8_t ye
588595 scheduleInStorage.status = status;
589596
590597 // Save schedule information in NVM flash
591- PSOC6Config::WriteConfigValueBin (PSOC6Config:: kConfigKey_YearDaySchedules , reinterpret_cast < const uint8_t *>( mYeardaySchedule ),
592- sizeof (EmberAfPluginDoorLockYearDaySchedule) * LockParams. numberOfYeardaySchedulesPerUser *
593- LockParams.numberOfUsers );
598+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
599+ PSOC6Config:: kConfigKey_YearDaySchedules , reinterpret_cast < const uint8_t *>( mYeardaySchedule ),
600+ sizeof (EmberAfPluginDoorLockYearDaySchedule) * LockParams. numberOfYeardaySchedulesPerUser * LockParams.numberOfUsers );
594601
595602 return DlStatus::kSuccess ;
596603}
@@ -632,9 +639,9 @@ DlStatus LockManager::SetHolidaySchedule(chip::EndpointId endpointId, uint8_t ho
632639 scheduleInStorage.status = status;
633640
634641 // Save schedule information in NVM flash
635- PSOC6Config::WriteConfigValueBin (PSOC6Config:: kConfigKey_HolidaySchedules ,
636- reinterpret_cast <const uint8_t *>(&(mHolidaySchedule )),
637- sizeof (EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules );
642+ TEMPORARY_RETURN_IGNORED PSOC6Config::WriteConfigValueBin (
643+ PSOC6Config:: kConfigKey_HolidaySchedules , reinterpret_cast <const uint8_t *>(&(mHolidaySchedule )),
644+ sizeof (EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules );
638645
639646 return DlStatus::kSuccess ;
640647}
0 commit comments