|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Persistent storage with mandatory integrity checking on read (ADR-001). More...
Files | |
| file | src/oal/nvm/rte_nvm.c |
| NVM service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_nvm_register() (ADR-005). | |
Data Structures | |
| struct | rte_nvm_config_t |
| Configuration for rte_nvm_open(). More... | |
Typedefs | |
| typedef struct rte_nvm_impl_s * | rte_nvm_handle_t |
| Opaque handle to an open NVM region, returned by rte_nvm_open(). | |
Functions | |
| RTE_DECLARE_STORAGE (rte_nvm_storage_t, 64U) | |
| Caller-owned, fixed-size storage backing one rte_nvm_handle_t. | |
| rte_status_t | rte_nvm_open (rte_nvm_storage_t *storage, const rte_nvm_config_t *config, rte_nvm_handle_t *out_handle) |
| Opens (creating if necessary) a named NVM region. | |
| rte_status_t | rte_nvm_read (rte_nvm_handle_t handle, size_t offset, void *out_buffer, size_t buffer_size) |
| Reads and integrity-checks data from an NVM region. | |
| rte_status_t | rte_nvm_write (rte_nvm_handle_t handle, size_t offset, const void *buffer, size_t buffer_size) |
| Writes data and its integrity metadata to an NVM region. | |
| rte_status_t | rte_nvm_sync (rte_nvm_handle_t handle) |
| Forces any buffered writes to durable storage. | |
| rte_status_t | rte_nvm_close (rte_nvm_handle_t handle) |
| Closes an NVM region handle. | |
Persistent storage with mandatory integrity checking on read (ADR-001).
| typedef struct rte_nvm_impl_s* rte_nvm_handle_t |
Opaque handle to an open NVM region, returned by rte_nvm_open().
| rte_status_t rte_nvm_open | ( | rte_nvm_storage_t * | storage, |
| const rte_nvm_config_t * | config, | ||
| rte_nvm_handle_t * | out_handle ) |
Opens (creating if necessary) a named NVM region.
| storage | Caller-owned storage for the handle's state. Must not be NULL. |
| config | Region configuration. Must not be NULL; config->region_name must not be NULL and config->region_size must be > 0. |
| out_handle | Receives the opened region's handle. Must not be NULL. |
| rte_status_t rte_nvm_read | ( | rte_nvm_handle_t | handle, |
| size_t | offset, | ||
| void * | out_buffer, | ||
| size_t | buffer_size ) |
Reads and integrity-checks data from an NVM region.
| handle | Open region handle. Must not be NULL. |
| offset | Byte offset within the region to read from. |
| out_buffer | Destination buffer. Must not be NULL. |
| buffer_size | Number of bytes to read into out_buffer; must be > 0. |
| rte_status_t rte_nvm_write | ( | rte_nvm_handle_t | handle, |
| size_t | offset, | ||
| const void * | buffer, | ||
| size_t | buffer_size ) |
Writes data and its integrity metadata to an NVM region.
| handle | Open region handle. Must not be NULL. |
| offset | Byte offset within the region to write to. |
| buffer | Source data. Must not be NULL. |
| buffer_size | Number of bytes to write from buffer; must be > 0. |
| rte_status_t rte_nvm_sync | ( | rte_nvm_handle_t | handle | ) |
Forces any buffered writes to durable storage.
| handle | Open region handle. Must not be NULL. |
| rte_status_t rte_nvm_close | ( | rte_nvm_handle_t | handle | ) |
Closes an NVM region handle.
| handle | Handle to close. Must not be NULL. Invalid to use after this call. |