|
libxr
1.0
Want to be the best embedded framework
|
ESP32 NVS 数据库存储实现 / ESP32 NVS-backed database implementation. More...
#include <esp32_nvs_flash_database.hpp>
Public Member Functions | |
| ESP32NvsFlashDatabase (const char *namespace_name="storage") | |
| 构造并初始化 NVS / Construct and initialize NVS storage | |
| bool | IsValid () const |
| 查询初始化状态 / Check initialization state | |
Private Member Functions | |
| ErrorCode | Add (KeyBase &key) override |
| 添加新键到数据库 (Add a new key to the database). | |
| ErrorCode | Get (KeyBase &key) override |
| 从数据库获取键的值 (Retrieve the key's value from the database). | |
| ErrorCode | Set (KeyBase &key, RawData data) override |
| 设置数据库中的键值 (Set the key's value in the database). | |
Private Attributes | |
| const char * | namespace_ |
| bool | valid_ {false} |
ESP32 NVS 数据库存储实现 / ESP32 NVS-backed database implementation.
Definition at line 17 of file esp32_nvs_flash_database.hpp.
|
inlineexplicit |
构造并初始化 NVS / Construct and initialize NVS storage
| namespace_name | 命名空间名称 / Namespace name (default: "storage") |
Definition at line 24 of file esp32_nvs_flash_database.hpp.
|
inlineoverrideprivatevirtual |
添加新键到数据库 (Add a new key to the database).
| key | 需要添加的键 (Key to add). |
Implements LibXR::Database.
Definition at line 45 of file esp32_nvs_flash_database.hpp.
|
inlineoverrideprivatevirtual |
从数据库获取键的值 (Retrieve the key's value from the database).
| key | 需要获取的键 (Key to retrieve). |
Implements LibXR::Database.
Definition at line 47 of file esp32_nvs_flash_database.hpp.
|
inline |
查询初始化状态 / Check initialization state
Definition at line 39 of file esp32_nvs_flash_database.hpp.
|
inlineoverrideprivatevirtual |
设置数据库中的键值 (Set the key's value in the database).
| key | 目标键 (Target key). |
| data | 需要存储的新值 (New value to store). |
Implements LibXR::Database.
Definition at line 74 of file esp32_nvs_flash_database.hpp.
|
private |
Definition at line 42 of file esp32_nvs_flash_database.hpp.
|
private |
Definition at line 43 of file esp32_nvs_flash_database.hpp.