KV Storage#
Provides persistent storage interface for key mapped values.
Functions#
Initialize the key value storage subsystem.
Deinitialize the key value storage subsystem.
Get a value using its group and key IDs.
Get the size of a value using its group and key IDs.
Set a value using its group and key IDs.
Delete a value using its group and key IDs.
Delete all values in a group.
Macros#
Maximum length in bytes for the Key-Value store.
Group ID for the internal protocol of the Key-Value storage.
Group ID for the internal configuration of the Key-Value storage.
Group ID for the internal bulk data transfer of the Key-Value storage.
Function Documentation#
sid_pal_storage_kv_init#
sid_error_t sid_pal_storage_kv_init (void )
Initialize the key value storage subsystem.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sid_pal_storage_kv_deinit#
sid_error_t sid_pal_storage_kv_deinit (void )
Deinitialize the key value storage subsystem.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sid_pal_storage_kv_record_get#
sid_error_t sid_pal_storage_kv_record_get (uint16_t group, uint16_t key, void * p_data, uint32_t len)
Get a value using its group and key IDs.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | group | Group |
uint16_t | [in] | key | Key |
void * | [out] | p_data | Pointer to output buffer to contain the value |
uint32_t | [in] | len | Maximum length of buffer pointed to by p_data in bytes |
sid_pal_storage_kv_record_get_len#
sid_error_t sid_pal_storage_kv_record_get_len (uint16_t group, uint16_t key, uint32_t * p_len)
Get the size of a value using its group and key IDs.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | group | Group |
uint16_t | [in] | key | Key |
uint32_t * | [out] | p_len | Pointer to integer to contain the size of the value in bytes |
sid_pal_storage_kv_record_set#
sid_error_t sid_pal_storage_kv_record_set (uint16_t group, uint16_t key, void const * p_data, uint32_t len)
Set a value using its group and key IDs.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | group | Group |
uint16_t | [in] | key | Key |
void const * | [in] | p_data | Pointer to input buffer which contains the value |
uint32_t | [in] | len | The size of the input value in bytes |
sid_pal_storage_kv_record_delete#
sid_error_t sid_pal_storage_kv_record_delete (uint16_t group, uint16_t key)
Delete a value using its group and key IDs.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | group | Group |
uint16_t | [in] | key | Key |
sid_pal_storage_kv_group_delete#
sid_error_t sid_pal_storage_kv_group_delete (uint16_t group)
Delete all values in a group.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | group | Group |