We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fec2d7a commit 2640c44Copy full SHA for 2640c44
src/NimBLEBeacon.h
@@ -24,6 +24,7 @@
24
class NimBLEUUID;
25
26
# include <cstdint>
27
+# include <vector>
28
29
/**
30
* @brief Representation of a beacon.
@@ -40,6 +41,10 @@ class NimBLEBeacon {
40
41
uint16_t major{};
42
uint16_t minor{};
43
int8_t signalPower{};
44
+ operator std::vector<uint8_t> () const {
45
+ return std::vector<uint8_t>(reinterpret_cast<const uint8_t*>(this),
46
+ reinterpret_cast<const uint8_t*>(this) + sizeof(BeaconData));
47
+ }
48
} __attribute__((packed));
49
50
const BeaconData& getData();
0 commit comments