Select one of the symbols to view example projects that use it.
 
Outline
#define NVS_HANDLE_SIMPLE_HPP_
#include "intrusive_list.h"
#include "nvs_storage.hpp"
#include "nvs_platform.hpp"
#include "nvs_memory_management.hpp"
#include "nvs_handle.hpp"
nvs
Files
ESP-IDF
components
app_trace
app_update
bootloader_support
bt
cmock
console
cxx
driver
efuse
esp_adc
esp_app_format
esp_bootloader_format
esp_coex
esp_common
esp_driver_ana_cmpr
esp_driver_cam
esp_driver_dac
esp_driver_gpio
esp_driver_gptimer
esp_driver_i2c
esp_driver_i2s
esp_driver_jpeg
esp_driver_ledc
esp_driver_mcpwm
esp_driver_parlio
esp_driver_pcnt
esp_driver_rmt
esp_driver_sdio
esp_driver_sdm
esp_driver_sdmmc
esp_driver_sdspi
esp_driver_spi
esp_driver_tsens
esp_driver_uart
esp_driver_usb_serial_jtag
esp_eth
esp_event
esp_gdbstub
esp_hid
esp_http_client
esp_http_server
esp_https_ota
esp_https_server
esp_hw_support
esp_lcd
esp_local_ctrl
esp_mm
esp_netif
esp_partition
esp_phy
esp_pm
esp_psram
esp_ringbuf
esp_rom
esp_security
esp_system
esp_timer
esp_vfs_console
esp_wifi
esp-tls
espcoredump
hal
heap
http_parser
ieee802154
log
mqtt
newlib
nvs_flash
include
private_include
src
nvs_sec_provider
openthread
perfmon
protobuf-c
protocomm
pthread
rt
sdmmc
soc
spi_flash
spiffs
tcp_transport
ulp
unity
vfs
wear_levelling
wifi_provisioning
wpa_supplicant
xtensa
examples
lwIP
FreeRTOS
cJSON
mbedTLS
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/nvs_flash/src/nvs_handle_simple.hpp
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef NVS_HANDLE_SIMPLE_HPP_ #define NVS_HANDLE_SIMPLE_HPP_ #include "intrusive_list.h" #include "nvs_storage.hpp" #include "nvs_platform.hpp" #include "nvs_memory_management.hpp" #include "nvs_handle.hpp"5 includes namespace nvs { /** * @brief This class implements NVSHandle according to the ESP32's flash and partitioning scheme. * * It is used by both the C API and the C++ API. The main responsibility is to check whether the handle is valid * and in the right read/write mode and then forward the calls to the storage object. * * For more details about the general member functions, see nvs_handle.hpp. *//* ... */ class NVSHandleSimple : public intrusive_list_node<NVSHandleSimple>, public NVSHandle, public ExceptionlessAllocatable { friend class NVSPartitionManager; public: NVSHandleSimple(bool readOnly, uint8_t nsIndex, Storage *StoragePtr) : mStoragePtr(StoragePtr), mNsIndex(nsIndex), mReadOnly(readOnly), valid(1) { }{ ... } ~NVSHandleSimple(); esp_err_t set_typed_item(ItemType datatype, const char *key, const void *data, size_t dataSize) override; esp_err_t get_typed_item(ItemType datatype, const char *key, void *data, size_t dataSize) override; esp_err_t set_string(const char *key, const char *str) override; esp_err_t set_blob(const char *key, const void *blob, size_t len) override; esp_err_t get_string(const char *key, char *out_str, size_t len) override; esp_err_t get_blob(const char *key, void *out_blob, size_t len) override; esp_err_t get_item_size(ItemType datatype, const char *key, size_t &size) override; esp_err_t find_key(const char *key, nvs_type_t &nvstype) override; esp_err_t erase_item(const char *key) override; esp_err_t erase_all() override; esp_err_t commit() override; esp_err_t get_used_entry_count(size_t &usedEntries) override; esp_err_t getItemDataSize(ItemType datatype, const char *key, size_t &dataSize); void debugDump(); esp_err_t fillStats(nvs_stats_t &nvsStats); esp_err_t calcEntriesInNamespace(size_t &usedEntries); bool findEntry(nvs_opaque_iterator_t *it, const char *name); bool findEntryNs(nvs_opaque_iterator_t *it); bool nextEntry(nvs_opaque_iterator_t *it); const char *get_partition_name() const; Storage *get_storage() const; ... private: /** * The underlying storage's object. *//* ... */ Storage *mStoragePtr; /** * Numeric representation of the namespace as it is saved in flash (see README.rst for further details). *//* ... */ uint8_t mNsIndex; /** * Whether this handle is marked as read-only or read-write. * 0 indicates read-only, any other value read-write. *//* ... */ uint8_t mReadOnly; /** * Indicates the validity of this handle. * Upon opening, a handle is valid. It becomes invalid if the underlying storage is de-initialized. *//* ... */ uint8_t valid;... }{...}; }{...} // nvs /* ... */ #endif // NVS_HANDLE_SIMPLE_HPP_
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.