|
| virtual | ~BaseNvs () noexcept=default |
| | Virtual destructor to ensure proper cleanup.
|
| |
| | BaseNvs (const BaseNvs &)=delete |
| |
| BaseNvs & | operator= (const BaseNvs &)=delete |
| |
| bool | EnsureInitialized () |
| | Ensures that the NVS storage is initialized (lazy initialization).
|
| |
| bool | EnsureDeinitialized () |
| | Ensures that the NVS storage is deinitialized.
|
| |
| bool | IsInitialized () const noexcept |
| | Check if storage is initialized.
|
| |
| virtual hf_nvs_err_t | Initialize () noexcept=0 |
| | Initialize the storage system and open the namespace.
|
| |
| virtual hf_nvs_err_t | Deinitialize () noexcept=0 |
| | Deinitialize the storage system and close the namespace.
|
| |
| virtual hf_nvs_err_t | SetU32 (const char *key, hf_u32_t value) noexcept=0 |
| | Store a 32-bit unsigned integer value.
|
| |
| virtual hf_nvs_err_t | GetU32 (const char *key, hf_u32_t &value) noexcept=0 |
| | Retrieve a 32-bit unsigned integer value.
|
| |
| virtual hf_nvs_err_t | SetString (const char *key, const char *value) noexcept=0 |
| | Store a string value.
|
| |
| virtual hf_nvs_err_t | GetString (const char *key, char *buffer, size_t buffer_size, size_t *actual_size=nullptr) noexcept=0 |
| | Retrieve a string value.
|
| |
| virtual hf_nvs_err_t | SetBlob (const char *key, const void *data, size_t data_size) noexcept=0 |
| | Store binary data (blob).
|
| |
| virtual hf_nvs_err_t | GetBlob (const char *key, void *buffer, size_t buffer_size, size_t *actual_size=nullptr) noexcept=0 |
| | Retrieve binary data (blob).
|
| |
| virtual hf_nvs_err_t | EraseKey (const char *key) noexcept=0 |
| | Remove a key from storage.
|
| |
| virtual hf_nvs_err_t | Commit () noexcept=0 |
| | Commit any pending writes to non-volatile storage.
|
| |
| virtual bool | KeyExists (const char *key) noexcept=0 |
| | Check if a key exists in storage.
|
| |
| virtual hf_nvs_err_t | GetSize (const char *key, size_t &size) noexcept=0 |
| | Get the size of a stored value.
|
| |
| const char * | GetNamespace () const noexcept |
| | Get the namespace name.
|
| |
| virtual const char * | GetDescription () const noexcept=0 |
| | Get description of this storage implementation.
|
| |
| virtual size_t | GetMaxKeyLength () const noexcept=0 |
| | Get maximum key length supported.
|
| |
| virtual size_t | GetMaxValueSize () const noexcept=0 |
| | Get maximum value size supported.
|
| |
| virtual hf_nvs_err_t | ResetStatistics () noexcept |
| | Reset NVS operation statistics.
|
| |
| virtual hf_nvs_err_t | ResetDiagnostics () noexcept |
| | Reset NVS diagnostic information.
|
| |
| virtual hf_nvs_err_t | GetStatistics (hf_nvs_statistics_t &statistics) const noexcept |
| | Get NVS operation statistics.
|
| |
| virtual hf_nvs_err_t | GetDiagnostics (hf_nvs_diagnostics_t &diagnostics) const noexcept |
| | Get NVS diagnostic information.
|
| |
Abstract base class for non-volatile storage operations.
This class provides a consistent interface for non-volatile storage across different hardware platforms and storage mechanisms. It supports key-value storage with various data types and namespace organization.
Key Features:
- Namespace-based organization
- Multiple data type support (uint32_t, string, blob)
- Atomic operations
- Error handling and status reporting
- Platform-agnostic interface
- Lazy initialization pattern
- Note
- Implementations should handle platform-specific details internally
-
This class is designed to be thread-safe when properly implemented