blob: 92a7f9a46dc65bfd288d33c10911860437f0ae4e (
plain)
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
|
#ifndef COMPONENTS_CPP_UTILS_BLEVALUE_H_ #define COMPONENTS_CPP_UTILS_BLEVALUE_H_ #include "sdkconfig.h" #if defined(CONFIG_BT_ENABLED) #include <string>
class BLEValue { public: BLEValue(); void addPart(std::string part); void addPart(uint8_t* pData, size_t length); void cancel(); void commit(); uint8_t* getData(); size_t getLength(); uint16_t getReadOffset(); std::string getValue(); void setReadOffset(uint16_t readOffset); void setValue(std::string value); void setValue(uint8_t* pData, size_t length); private: std::string m_accumulation; uint16_t m_readOffset; std::string m_value; }; #endif #endif
|