8 #ifndef COMPONENTS_CPP_UTILS_BLE2904_H_
9 #define COMPONENTS_CPP_UTILS_BLE2904_H_
10 #include "sdkconfig.h"
11 #if defined(CONFIG_BT_ENABLED)
13 #include "BLEDescriptor.h"
20 uint16_t m_description;
22 } __attribute__((packed));
32 class BLE2904:
public BLEDescriptor {
35 static const uint8_t FORMAT_BOOLEAN = 1;
36 static const uint8_t FORMAT_UINT2 = 2;
37 static const uint8_t FORMAT_UINT4 = 3;
38 static const uint8_t FORMAT_UINT8 = 4;
39 static const uint8_t FORMAT_UINT12 = 5;
40 static const uint8_t FORMAT_UINT16 = 6;
41 static const uint8_t FORMAT_UINT24 = 7;
42 static const uint8_t FORMAT_UINT32 = 8;
43 static const uint8_t FORMAT_UINT48 = 9;
44 static const uint8_t FORMAT_UINT64 = 10;
45 static const uint8_t FORMAT_UINT128 = 11;
46 static const uint8_t FORMAT_SINT8 = 12;
47 static const uint8_t FORMAT_SINT12 = 13;
48 static const uint8_t FORMAT_SINT16 = 14;
49 static const uint8_t FORMAT_SINT24 = 15;
50 static const uint8_t FORMAT_SINT32 = 16;
51 static const uint8_t FORMAT_SINT48 = 17;
52 static const uint8_t FORMAT_SINT64 = 18;
53 static const uint8_t FORMAT_SINT128 = 19;
54 static const uint8_t FORMAT_FLOAT32 = 20;
55 static const uint8_t FORMAT_FLOAT64 = 21;
56 static const uint8_t FORMAT_SFLOAT16 = 22;
57 static const uint8_t FORMAT_SFLOAT32 = 23;
58 static const uint8_t FORMAT_IEEE20601 = 24;
59 static const uint8_t FORMAT_UTF8 = 25;
60 static const uint8_t FORMAT_UTF16 = 26;
61 static const uint8_t FORMAT_OPAQUE = 27;
63 void setDescription(uint16_t);
64 void setExponent(int8_t exponent);
65 void setFormat(uint8_t format);
66 void setNamespace(uint8_t namespace_value);
67 void setUnit(uint16_t unit);