IKeyValueStore
#include "crosspad/settings/IKeyValueStore.hpp"Generated from crosspad/settings/IKeyValueStore.hpp in crosspad-core. Edit the header’s doxygen comments to change this page.
crosspad::IKeyValueStore
Section titled “crosspad::IKeyValueStore”Abstract interface for key-value persistence.
Platform implementations:
- ESP-IDF: NvsKeyValueStore (wraps NVS)
- Arduino: PreferencesKeyValueStore (wraps NVS via Preferences.h)
- Linux: FileKeyValueStore (wraps filesystem)
Members
| Member | Description |
|---|---|
init | Platform only The platform calls it once at start-up (crosspad_platform_init). |
saveBool | |
saveU8 | |
saveI32 | |
readBool | |
readU8 | |
readI32 | |
eraseAll | Erase all persisted data (factory reset) |
Methods
Platform only The platform calls it once at start-up (crosspad_platform_init).
virtual bool init() = 0saveBool
Section titled “saveBool”virtual void saveBool(const char *ns, const char *key, bool value) = 0saveU8
Section titled “saveU8”virtual void saveU8(const char *ns, const char *key, uint8_t value) = 0saveI32
Section titled “saveI32”virtual void saveI32(const char *ns, const char *key, int32_t value) = 0readBool
Section titled “readBool”virtual bool readBool(const char *ns, const char *key, bool defaultVal) = 0readU8
Section titled “readU8”virtual uint8_t readU8(const char *ns, const char *key, uint8_t defaultVal) = 0readI32
Section titled “readI32”virtual int32_t readI32(const char *ns, const char *key, int32_t defaultVal) = 0eraseAll
Section titled “eraseAll”virtual void eraseAll() = 0Erase all persisted data (factory reset)
Declared in crosspad/settings/IKeyValueStore.hpp:14.