Home
last modified time | relevance | path

Searched refs:ItemType (Results 1 – 18 of 18) sorted by relevance

/hal_espressif-3.6.0/components/nvs_flash/src/
Dnvs_storage.cpp43 while (p.findItem(Page::NS_ANY, ItemType::BLOB_IDX, nullptr, itemIndex, item) == ESP_OK) { in populateBlobIndices()
72 while (p.findItem(Page::NS_ANY, ItemType::BLOB_DATA, nullptr, itemIndex, item) == ESP_OK) { in eraseOrphanDataBlobs()
104 while (p.findItem(Page::NS_INDEX, ItemType::U8, nullptr, itemIndex, item) == ESP_OK) { in init()
148 esp_err_t Storage::findItem(uint8_t nsIndex, ItemType datatype, const char* key, Page* &page, Item&… in findItem()
211 err = page.writeItem(nsIndex, ItemType::BLOB_DATA, key, in writeMultiPageBlob()
247 … err = getCurrentPage().writeItem(nsIndex, ItemType::BLOB_IDX, key, item.data, sizeof(item.data)); in writeMultiPageBlob()
257 it->mPage->eraseItem(nsIndex, ItemType::BLOB_DATA, key, ii++); in writeMultiPageBlob()
264 esp_err_t Storage::writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data,… in writeItem()
274 if (datatype == ItemType::BLOB) { in writeItem()
275 err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item); in writeItem()
[all …]
Dnvs_types.hpp43 inline bool isVariableLengthType(ItemType type) in isVariableLengthType()
45 return (type == ItemType::BLOB || in isVariableLengthType()
46 type == ItemType::SZ || in isVariableLengthType()
47 type == ItemType::BLOB_DATA); in isVariableLengthType()
56 ItemType datatype;
85 …Item(uint8_t nsIndex, ItemType datatype, uint8_t span, const char* key_, uint8_t chunkIdx = CHUNK_… in Item()
Dnvs_handle_simple.cpp24 esp_err_t NVSHandleSimple::set_typed_item(ItemType datatype, const char *key, const void* data, siz… in set_typed_item()
32 esp_err_t NVSHandleSimple::get_typed_item(ItemType datatype, const char *key, void* data, size_t da… in get_typed_item()
44 return mStoragePtr->writeItem(mNsIndex, nvs::ItemType::SZ, key, str, strlen(str) + 1); in set_string()
52 return mStoragePtr->writeItem(mNsIndex, nvs::ItemType::BLOB, key, blob, len); in set_blob()
59 return mStoragePtr->readItem(mNsIndex, nvs::ItemType::SZ, key, out_str, len); in get_string()
66 return mStoragePtr->readItem(mNsIndex, nvs::ItemType::BLOB, key, out_blob, len); in get_blob()
69 esp_err_t NVSHandleSimple::get_item_size(ItemType datatype, const char *key, size_t &size) in get_item_size()
Dnvs_storage.hpp76 …esp_err_t writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, size_t …
78 …esp_err_t readItem(uint8_t nsIndex, ItemType datatype, const char* key, void* data, size_t dataSiz…
80 … esp_err_t getItemDataSize(uint8_t nsIndex, ItemType datatype, const char* key, size_t& dataSize);
82 esp_err_t eraseItem(uint8_t nsIndex, ItemType datatype, const char* key);
98 return eraseItem(nsIndex, ItemType::ANY, key); in eraseItem()
153 …esp_err_t findItem(uint8_t nsIndex, ItemType datatype, const char* key, Page* &page, Item& item, u…
Dnvs_page.hpp96 …esp_err_t writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, size_t …
98 …esp_err_t readItem(uint8_t nsIndex, ItemType datatype, const char* key, void* data, size_t dataSiz…
100 …esp_err_t cmpItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, size_t da…
102 …esp_err_t eraseItem(uint8_t nsIndex, ItemType datatype, const char* key, uint8_t chunkIdx = CHUNK_…
104 …esp_err_t findItem(uint8_t nsIndex, ItemType datatype, const char* key, uint8_t chunkIdx = CHUNK_A…
106 …esp_err_t findItem(uint8_t nsIndex, ItemType datatype, const char* key, size_t &itemIndex, Item& i…
202 static constexpr size_t getAlignmentForType(ItemType type) in getAlignmentForType()
Dnvs_handle_simple.hpp45 …esp_err_t set_typed_item(ItemType datatype, const char *key, const void *data, size_t dataSize) ov…
47 …esp_err_t get_typed_item(ItemType datatype, const char *key, void *data, size_t dataSize) override;
57 esp_err_t get_item_size(ItemType datatype, const char *key, size_t &size) override;
67 esp_err_t getItemDataSize(ItemType datatype, const char *key, size_t &dataSize);
Dnvs_handle_locked.hpp50 esp_err_t get_item_size(ItemType datatype, const char *key, size_t &size) override;
61 …esp_err_t set_typed_item(ItemType datatype, const char *key, const void* data, size_t dataSize) ov…
63 …esp_err_t get_typed_item(ItemType datatype, const char *key, void* data, size_t dataSize) override;
Dnvs_handle_locked.cpp45 esp_err_t NVSHandleLocked::get_item_size(ItemType datatype, const char *key, size_t &size) { in get_item_size()
70 esp_err_t NVSHandleLocked::set_typed_item(ItemType datatype, const char *key, const void* data, siz… in set_typed_item()
75 esp_err_t NVSHandleLocked::get_typed_item(ItemType datatype, const char *key, void* data, size_t da… in get_typed_item()
Dnvs_page.cpp166 esp_err_t Page::writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, si… in writeItem()
266 esp_err_t Page::readItem(uint8_t nsIndex, ItemType datatype, const char* key, void* data, size_t da… in readItem()
317 esp_err_t Page::cmpItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data, size… in cmpItem()
369 esp_err_t Page::eraseItem(uint8_t nsIndex, ItemType datatype, const char* key, uint8_t chunkIdx, Ve… in eraseItem()
380 esp_err_t Page::findItem(uint8_t nsIndex, ItemType datatype, const char* key, uint8_t chunkIdx, Ver… in findItem()
808 esp_err_t Page::findItem(uint8_t nsIndex, ItemType datatype, const char* key, size_t &itemIndex, It… in findItem()
829 if (nsIndex != NS_ANY && datatype != ItemType::ANY && key != NULL) { in findItem()
874 && datatype == ItemType::BLOB_DATA in findItem()
880 if (datatype == ItemType::BLOB_IDX in findItem()
885 if (datatype == ItemType::BLOB_IDX in findItem()
[all …]
Dnvs_pagemanager.cpp68 while (lastPage.findItem(Page::NS_ANY, ItemType::ANY, nullptr, itemIndex, item) == ESP_OK) { in load()
84 if ((it == last) && (item.datatype == ItemType::BLOB_IDX)) { in load()
90 … (it->eraseItem(item.nsIndex, ItemType::BLOB, item.key, item.chunkIndex) == ESP_OK)) { in load()
Dnvs_api.cpp489 static esp_err_t nvs_get_str_or_blob(nvs_handle_t c_handle, nvs::ItemType type, const char* key, vo… in nvs_get_str_or_blob()
521 return nvs_get_str_or_blob(c_handle, nvs::ItemType::SZ, key, out_value, length); in nvs_get_str()
526 return nvs_get_str_or_blob(c_handle, nvs::ItemType::BLOB, key, out_value, length); in nvs_get_blob()
/hal_espressif-3.6.0/components/nvs_flash/include/
Dnvs_handle.hpp15 enum class ItemType : uint8_t { enum
165 virtual esp_err_t get_item_size(ItemType datatype, const char *key, size_t &size) = 0;
204 …virtual esp_err_t set_typed_item(ItemType datatype, const char *key, const void* data, size_t data…
206 …virtual esp_err_t get_typed_item(ItemType datatype, const char *key, void* data, size_t dataSize) …
247 constexpr ItemType itemTypeOf() in itemTypeOf()
249 return static_cast<ItemType>(((std::is_signed<T>::value)?0x10:0x00) | sizeof(T)); in itemTypeOf()
256 constexpr ItemType itemTypeOf() in itemTypeOf()
258 return static_cast<ItemType>(((std::is_signed<T>::value)?0x10:0x00) | sizeof(T)); in itemTypeOf()
262 constexpr ItemType itemTypeOf(const T&) in itemTypeOf()
/hal_espressif-3.6.0/components/nvs_flash/test_nvs_host/
Dtest_nvs.cpp57 item1.datatype = ItemType::I32;
76 item2.datatype = ItemType::U32;
99 CHECK(page.writeItem(1, ItemType::I32, "intval1", &val1, sizeof(val1)) == ESP_OK);
101 CHECK(page.writeItem(2, ItemType::I32, "intval1", &val2, sizeof(val2)) == ESP_OK);
104 CHECK(page.readItem(2, ItemType::I32, "intval1", &readVal, sizeof(readVal)) == ESP_OK);
115 CHECK(page.writeItem(1, ItemType::I32, "intval1", &val, sizeof(val)) == ESP_OK);
116 … CHECK(page.readItem(1, ItemType::U32, "intval1", &val, sizeof(val)) == ESP_ERR_NVS_TYPE_MISMATCH);
125 CHECK(page.writeItem(1, ItemType::I32, "intval1", &val, sizeof(val)) == ESP_OK);
182 CHECK(page.writeItem(1, ItemType::I32, "dummy", &val, sizeof(val)) == ESP_OK);
202 CHECK(page.writeItem(1, ItemType::SZ, "foobaar", str, len + 1) == ESP_OK);
[all …]
Dtest_nvs_storage.cpp43 CHECK(storage->writeItem(ns_index, ItemType::BLOB, "test_blob", blob, sizeof(blob)) == ESP_OK);
46 …CHECK(storage->writeItem(ns_index, ItemType::BLOB, "test_blob", blob_new, sizeof(blob_new)) == ESP…
/hal_espressif-3.6.0/components/nvs_flash/host_test/nvs_page_test/main/
Dnvs_page_test.cpp215 …TEST_ASSERT_EQUAL(ESP_FAIL, page.writeItem(1, nvs::ItemType::U8, "test", &write_data, sizeof(write… in test_Page_write__initialize_write_failure()
228 …TEST_ASSERT_EQUAL(ESP_FAIL, fix.page.writeItem(1, nvs::ItemType::U8, "test", &write_data, sizeof(w… in test_Page_write__write_data_fails()
253 …TEST_ASSERT_EQUAL(ESP_OK, fix.page.writeItem(1, nvs::ItemType::U8, "test_key", &write_data, sizeof… in test_page_write__write_correct_entry_state()
276 …TEST_ASSERT_EQUAL(ESP_OK, fix.page.writeItem(1, nvs::ItemType::U8, "test_key", &write_data, sizeof… in test_Page_write__write_correct_data()
429 ItemType::BLOB_DATA, in test_Page_readItem__blob_read_data_fails()
463 ItemType::BLOB_DATA, in test_Page_readItem__corrupt_data_erase_failure()
503 ItemType::BLOB_DATA, in test_Page_readItem__blob_corrupt_data()
532 ItemType::BLOB_DATA, in test_Page_readItem__blob_read_entry_suceeds()
615 ItemType::BLOB_DATA, in test_Page_cmpItem__blob_data_mismatch()
640 ItemType::BLOB_DATA, in test_Page_cmpItem__blob_data_match()
[all …]
/hal_espressif-3.6.0/docs/zh_CN/api-reference/storage/
Dnvs_flash.rst310 … 一个字节表示的值的数据类型,:component_file:`nvs_flash/include/nvs_handle.hpp` 下的 :cpp:type:`ItemType` 枚举了可能的类型。
/hal_espressif-3.6.0/docs/en/api-reference/storage/
Dnvs_flash.rst310 …One byte indicating the value data type. See the :cpp:type:`ItemType` enumeration in :component_fi…
/hal_espressif-3.6.0/tools/test_idf_size/
Doverflow_esp32c3.map537 …_flash.a(nvs_storage.cpp.obj) (nvs::Page::writeItem(unsigned char, nvs::ItemType, char const*, voi…
35507 …000004200afe8 nvs::Storage::findItem(unsigned char, nvs::ItemType, char const*, nvs…
35522 …000004200b64c nvs::Storage::readItem(unsigned char, nvs::ItemType, char const*, voi…
35525 …00004200b6e0 nvs::Storage::writeItem(unsigned char, nvs::ItemType, char const*, voi…
35531 …x000000004200bada nvs::Storage::eraseItem(unsigned char, nvs::ItemType, char const*)
35537 …00bbbe nvs::Storage::getItemDataSize(unsigned char, nvs::ItemType, char const*, uns…
35553 …0000004200bd06 nvs::NVSHandleSimple::set_typed_item(nvs::ItemType, char const*, voi…
35559 …0000004200bd78 nvs::NVSHandleSimple::get_typed_item(nvs::ItemType, char const*, voi…
35571 …0x000000004200be5a nvs::NVSHandleSimple::get_item_size(nvs::ItemType, char const*, …
35700 …0x000000004200cbdc nvs::Page::writeItem(unsigned char, nvs::ItemType, char const*, …
[all …]