Select one of the symbols to view example projects that use it.
 
Outline
#define nvs_item_hash_list_h
#include "nvs.h"
#include "nvs_types.hpp"
#include "nvs_memory_management.hpp"
#include "intrusive_list.h"
nvs
Files
loading (4/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/nvs_flash/src/nvs_item_hash_list.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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef nvs_item_hash_list_h #define nvs_item_hash_list_h #include "nvs.h" #include "nvs_types.hpp" #include "nvs_memory_management.hpp" #include "intrusive_list.h" namespace nvs { class HashList { public: HashList(); ~HashList(); esp_err_t insert(const Item& item, size_t index); bool erase(const size_t index); size_t find(size_t start, const Item& item); void clear(); ... private: HashList(const HashList& other); const HashList& operator= (const HashList& rhs); ... protected: struct HashListNode { HashListNode() : mIndex(0xff), mHash(0) { }{ ... } HashListNode(uint32_t hash, size_t index) : mIndex((uint32_t) index), mHash(hash) { }{ ... } uint32_t mIndex : 8; uint32_t mHash : 24; }{ ... }; struct HashListBlock : public intrusive_list_node<HashList::HashListBlock>, public ExceptionlessAllocatable { HashListBlock(); static const size_t BYTE_SIZE = 128; static const size_t ENTRY_COUNT = (BYTE_SIZE - sizeof(intrusive_list_node<HashListBlock>) - sizeof(size_t)) / 4; size_t mCount = 0; HashListNode mNodes[ENTRY_COUNT]; }{...}; typedef intrusive_list<HashListBlock> TBlockList; TBlockList mBlockList;... }{ ... }; // class HashList }{...} // namespace nvs /* ... */ #endif /* nvs_item_hash_list_h */
Details