Wirepas SDK
|
A small number of bytes is reserved for the application in the same area where the stack firmware stores its own persistent settings (the Settings library, wms_settings.h). The Storage library can be used to read and write this data. Currently, 32 bytes is reserved for the application.
Library services are accessed via lib_storage handle.
Definition in file wms_storage.h.
Go to the source code of this file.
Typedefs | |
typedef app_res_e(* | app_lib_storage_write_persistent_f) (const void *bytes, size_t num_bytes) |
Write data to persistent storage. More... | |
typedef app_res_e(* | app_lib_storage_read_persistent_f) (void *bytes, size_t num_bytes) |
Read data written to persistent storage. More... | |
typedef size_t(* | app_lib_storage_get_persistent_max_size_f) (void) |
Get persistent maximum size. More... | |
Data Structures | |
struct | app_lib_storage_t |
Macros | |
#define | APP_LIB_STORAGE_NAME 0x7713d6af |
Library symbolic name. More... | |
#define | APP_LIB_STORAGE_VERSION 0x200 |
Maximum supported library version. More... | |
typedef size_t(* app_lib_storage_get_persistent_max_size_f) (void) |
Get persistent maximum size.
Return the size of persistent area reserved for application, in bytes. Currently, returns 32.
Definition at line 72 of file wms_storage.h.
typedef app_res_e(* app_lib_storage_read_persistent_f) (void *bytes, size_t num_bytes) |
Read data written to persistent storage.
bytes | Pointer to buffer for reading bytes |
num_bytes | Total number of bytes to read |
Definition at line 60 of file wms_storage.h.
typedef app_res_e(* app_lib_storage_write_persistent_f) (const void *bytes, size_t num_bytes) |
Write data to persistent storage.
Write new data to the persistent area. All old data is erased, even if new data does not extend to the end of the end of the persistent area.
bytes | Pointer to bytes to write |
num_bytes | Total number of bytes to write |
Definition at line 47 of file wms_storage.h.
struct app_lib_storage_t |
The function table returned from app_open_library_f
Definition at line 77 of file wms_storage.h.
Data Fields | ||
---|---|---|
app_lib_storage_get_persistent_max_size_f | getPersistentMaxSize | |
app_lib_storage_read_persistent_f | readPersistent | |
app_lib_storage_write_persistent_f | writePersistent |
#define APP_LIB_STORAGE_NAME 0x7713d6af |
#define APP_LIB_STORAGE_VERSION 0x200 |
Maximum supported library version.
Definition at line 31 of file wms_storage.h.