|
libxr
1.0
Want to be the best embedded framework
|
Public Member Functions | |
| ESP32NvsFlashDatabase (const char *namespace_name="storage") | |
| 构造函数,初始化 NVS 和命名空间 | |
| bool | IsValid () const |
| 数据库是否有效初始化 | |
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} |
Definition at line 14 of file esp32_nvs_flash_database.hpp.
|
inlineexplicit |
构造函数,初始化 NVS 和命名空间
| namespace_name | 命名空间名,默认 "storage" |
Definition at line 21 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 42 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 44 of file esp32_nvs_flash_database.hpp.
|
inline |
|
inlineoverrideprivatevirtual |
设置数据库中的键值 (Set the key's value in the database).
| key | 目标键 (Target key). |
| data | 需要存储的新值 (New value to store). |
Implements LibXR::Database.
Definition at line 71 of file esp32_nvs_flash_database.hpp.
|
private |
Definition at line 39 of file esp32_nvs_flash_database.hpp.
|
private |
Definition at line 40 of file esp32_nvs_flash_database.hpp.