summaryrefslogtreecommitdiff
path: root/sensor/patchedBLE/src/BLEEddystoneURL.h
blob: 0b538c07d00c4417a4ce33e287b48447c9b61cf0 (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
39
40
41
42
43
/*
 * BLEEddystoneURL.cpp
 *
 *  Created on: Mar 12, 2018
 *      Author: pcbreflux
 */
 
#ifndef _BLEEddystoneURL_H_
#define _BLEEddystoneURL_H_
#include "BLEUUID.h"
 
#define EDDYSTONE_URL_FRAME_TYPE 0x10
 
/**
 * @brief Representation of a beacon.
 * See:
 * * https://github.com/google/eddystone
 */
class BLEEddystoneURL {
public:
BLEEddystoneURL();
std::string getData();
BLEUUID  getUUID();
int8_t   getPower();
std::string getURL();
std::string getDecodedURL();
void setData(std::string data);
void setUUID(BLEUUID l_uuid);
void setPower(int8_t advertisedTxPower);
void setURL(std::string url);
 
private:
uint16_t beaconUUID;
uint8_t  lengthURL;
struct {
uint8_t frameType;
int8_t  advertisedTxPower;
uint8_t url[16];
} __attribute__((packed)) m_eddystoneData;
 
}// BLEEddystoneURL 
 
#endif /* _BLEEddystoneURL_H_ */