|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
NVM service: validates parameters, then dispatches to the backend registered via sapi_nvm_register_backend() (ADR-005). More...
#include "safeapi/oal/nvm/sapi_nvm.h"#include "safeapi/utils/lifecycle/sapi_lifecycle.h"#include "safeapi_backend/nvm/sapi_nvm_backend.h"Go to the source code of this file.
Functions | |
| sapi_status_t | sapi_nvm_register_backend (const sapi_nvm_backend_t *backend) |
| Registers the backend implementation used by every sapi_nvm_* call (ADR-005 section 2.1). Call once at startup. | |
| sapi_status_t | sapi_nvm_open (sapi_nvm_storage_t *storage, const sapi_nvm_config_t *config, sapi_nvm_handle_t *out_handle) |
| Opens (creating if necessary) a named NVM region. | |
| sapi_status_t | sapi_nvm_read (sapi_nvm_handle_t handle, size_t offset, void *out_buffer, size_t buffer_size) |
| Reads and integrity-checks data from an NVM region. | |
| sapi_status_t | sapi_nvm_write (sapi_nvm_handle_t handle, size_t offset, const void *buffer, size_t buffer_size) |
| Writes data and its integrity metadata to an NVM region. | |
| sapi_status_t | sapi_nvm_sync (sapi_nvm_handle_t handle) |
| Forces any buffered writes to durable storage. | |
| sapi_status_t | sapi_nvm_close (sapi_nvm_handle_t handle) |
| Closes an NVM region handle. | |
Variables | |
| static const sapi_nvm_backend_t * | s_backend = NULL |
| Currently registered backend, or NULL if none (ADR-005). | |
NVM service: validates parameters, then dispatches to the backend registered via sapi_nvm_register_backend() (ADR-005).
Definition in file sapi_nvm.c.
|
static |
Currently registered backend, or NULL if none (ADR-005).
Local makros Local types declarations Local variables declarations
Definition at line 17 of file sapi_nvm.c.