8 #ifndef COMPONENTS_CPP_UTILS_CPPNVS_H_
9 #define COMPONENTS_CPP_UTILS_CPPNVS_H_
18 NVS(std::string name, nvs_open_mode openMode = NVS_READWRITE);
23 void erase(std::string key);
24 int get(std::string key, std::string* result,
bool isBlob =
false);
25 int get(std::string key, uint8_t* result,
size_t& length);
26 int get(std::string key, uint32_t& value);
27 void set(std::string key, std::string data,
bool isBlob =
false);
28 void set(std::string key, uint32_t value);
29 void set(std::string key, uint8_t* data,
size_t length);
void erase()
Erase ALL the keys in the namespace.
Definition: CPPNVS.cpp:52
void commit()
Commit any work performed in the namespace.
Definition: CPPNVS.cpp:44
NVS(std::string name, nvs_open_mode openMode=NVS_READWRITE)
Constructor.
Definition: CPPNVS.cpp:23
virtual ~NVS()
Desctructor.
Definition: CPPNVS.cpp:36
void set(std::string key, std::string data, bool isBlob=false)
Set the string/blob value by key.
Definition: CPPNVS.cpp:123
Provide Non Volatile Storage access.
Definition: CPPNVS.h:16