5 #ifndef HERALD_BLE_ADVERT_TYPES_H
6 #define HERALD_BLE_ADVERT_TYPES_H
8 #include "../../datatype/data.h"
25 constexpr
auto to_integral(T e) {
return static_cast<std::underlying_type_t<T>
>(e); }
29 enum class BLEAdvertSegmentType : int {
32 serviceUUID16IncompleteList = 0x02,
33 serviceUUID16CompleteList = 0x03,
34 serviceUUID32IncompleteList = 0x04,
35 serviceUUID32CompleteList = 0x05,
36 serviceUUID128IncompleteList = 0x06,
37 serviceUUID128CompleteList = 0x07,
38 deviceNameShortened = 0x08,
39 deviceNameComplete = 0x09,
42 simplePairingHash = 0x0E,
43 simplePairingRandomiser = 0x0F,
49 manufacturerData = 0xFF
52 BLEAdvertSegmentType typeFor(
int code);
56 BLEAdvertSegmentType type;
66 std::size_t dataLength;
67 std::vector<BLEAdvertSegment> segments;
69 dataLength(dl), segments(segs) {};
74 enum class BLEAdvertManufacturers : uint16_t {
77 heraldUnregistered = 0xfaff
82 std::uint16_t manufacturer;
The main data workhorse class of the Herald API.
Definition: data.h:33
Contains all low-level Herald datatype implementations.
Definition: base64_string.h:14
Acts as a non-global memory arena for arbitrary classes.
Definition: aggregates.h:15
Definition: ble_advert_types.h:89
Definition: ble_advert_types.h:81
Definition: ble_advert_types.h:55
Definition: ble_advert_types.h:65