Go to the documentation of this file.
59 #ifndef VS_STORAGE_HAL_H
60 #define VS_STORAGE_HAL_H
63 #include <sys/types.h>
66 namespace VirgilIoTKit {
70 #define VS_STORAGE_ELEMENT_ID_MAX (32)
148 const uint8_t *in_data,
233 #endif //VS_STORAGE_HAL_H
vs_status_e
Status code.
Definition: status_code.h:77
void * vs_storage_file_t
File descriptor.
Definition: storage_hal.h:84
vs_status_e(* vs_rpi_storage_sync_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_file_t file)
Synchronise storage element.
Definition: storage_hal.h:117
#define VS_STORAGE_ELEMENT_ID_MAX
Definition: storage_hal.h:70
vs_storage_open_hal_t open
Open storage element.
Definition: storage_hal.h:206
vs_storage_file_t(* vs_storage_open_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_element_id_t id)
Open storage element.
Definition: storage_hal.h:104
vs_storage_deinit_hal_t deinit
Destroy storage context.
Definition: storage_hal.h:204
ssize_t(* vs_storage_file_size_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_element_id_t id)
Get storage element size.
Definition: storage_hal.h:175
vs_status_e vs_impl_own_firmware_descriptor(void *descriptor)
Load currently executed firmware descriptor.
vs_storage_impl_data_ctx_t impl_data
Storage element specific data.
Definition: storage_hal.h:223
uint8_t vs_storage_element_id_t[VS_STORAGE_ELEMENT_ID_MAX]
Definition: storage_hal.h:72
void * vs_storage_impl_data_ctx_t
File context.
Definition: storage_hal.h:78
vs_storage_impl_func_t impl_func
Implementations.
Definition: storage_hal.h:222
vs_status_e(* vs_storage_del_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_element_id_t id)
Delete storage element.
Definition: storage_hal.h:186
vs_status_e(* vs_storage_load_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_file_t file, size_t offset, uint8_t *out_data, size_t data_sz)
Load storage element.
Definition: storage_hal.h:161
Status codes and macroses.
vs_storage_file_size_hal_t size
Get storage element size.
Definition: storage_hal.h:212
size_t file_sz_limit
Maximum size of storage element.
Definition: storage_hal.h:224
vs_rpi_storage_sync_t sync
Synchronize storage element cache with storage.
Definition: storage_hal.h:207
vs_storage_save_hal_t save
Save storage element.
Definition: storage_hal.h:210
vs_storage_del_hal_t del
Delete storage element.
Definition: storage_hal.h:214
Storage element context.
Definition: storage_hal.h:221
vs_status_e(* vs_storage_deinit_hal_t)(vs_storage_impl_data_ctx_t storage_ctx)
Destroy storage context.
Definition: storage_hal.h:94
vs_status_e(* vs_storage_save_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, const vs_storage_file_t file, size_t offset, const uint8_t *in_data, size_t data_sz)
Save storage element.
Definition: storage_hal.h:144
vs_status_e(* vs_storage_close_hal_t)(const vs_storage_impl_data_ctx_t storage_ctx, vs_storage_file_t file)
Close storage element.
Definition: storage_hal.h:130
vs_storage_load_hal_t load
Load storage element.
Definition: storage_hal.h:211
vs_storage_close_hal_t close
Close storage element.
Definition: storage_hal.h:208
Storage implementation.
Definition: storage_hal.h:203