-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand attribute persistence provider api (#27611)
* Modified the AttributePersistenceProvider ReadValue function signiture to take the required attribute information directly rather than as a EmberAfAttributeMetadata structure. * Expanded AttributePersistanceProvider API to include reading and wirting of uint8 and nullable uint8 * Templated the AttributePersistanceProvider read and wiret function to work for all uint types. * Fixed AttributePersistanceProvider accepted types. Added read helper for type bool. * Restyled by clang-format * Fixed mismatched size return error of DefaultAttributePersistenceProvider * Started work on tests for the AttributePersistenceProvider. * Added unit tests for AttributePersistenceProvider testing the storage and retrival of all unsigned types and their nullable veriaties, bool and ByteSpan. Tested for small buffer errors. * Changed the type of aSize in ReadValue to size_t * Removed the dependancy on generated code in the AttributePersistencezprovider.h * Added static funtctions to get the KVS null representation for different types. * Added functions to read and write nullable bools and accompanying tests. * Incorporated boolean tests in the scalar test. * Added failure before init test * Restyled by clang-format * Fixed after merge. * Removed the failure on init test as it may have been causing seg faults in some tests. * Renamed GetNull -> GetNullValueForNullableType * Added the initialisation of valueReadBack and added a new templated function for nullable types to avoid the error: The left operand of '==' is a garbage value, on some platforms. * Added handline of signed ints and accompanying tests. * Added handline of nullable signed ints and accompanying tests. * Type cast null. * Restyled by clang-format * Changed shift bit to be af the same type are the return val. * Added tests got GetNull functions --------- Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
1 parent
5aa9e87
commit 693d5ee
Showing
10 changed files
with
591 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.