My Project
 All Classes Functions Variables Pages
BLEBeacon.h
1 /*
2  * BLEBeacon2.h
3  *
4  * Created on: Jan 4, 2018
5  * Author: kolban
6  */
7 
8 #ifndef COMPONENTS_CPP_UTILS_BLEBEACON_H_
9 #define COMPONENTS_CPP_UTILS_BLEBEACON_H_
10 #include "BLEUUID.h"
16 class BLEBeacon {
17 private:
18  struct {
19  uint16_t manufacturerId;
20  uint8_t subType;
21  uint8_t subTypeLength;
22  uint8_t proximityUUID[16];
23  uint16_t major;
24  uint16_t minor;
25  int8_t signalPower;
26  } __attribute__((packed)) m_beaconData;
27 public:
28  BLEBeacon();
29  std::string getData();
30  uint16_t getMajor();
31  uint16_t getMinor();
32  uint16_t getManufacturerId();
33  BLEUUID getProximityUUID();
34  int8_t getSignalPower();
35  void setData(std::string data);
36  void setMajor(uint16_t major);
37  void setMinor(uint16_t minor);
38  void setManufacturerId(uint16_t manufacturerId);
39  void setProximityUUID(BLEUUID uuid);
40  void setSignalPower(int8_t signalPower);
41 }; // BLEBeacon
42 
43 #endif /* COMPONENTS_CPP_UTILS_BLEBEACON_H_ */
Representation of a beacon. See:
Definition: BLEBeacon.h:16