18#ifndef NIMBLE_CPP_EDDYSTONETLM_H_
19#define NIMBLE_CPP_EDDYSTONETLM_H_
22#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER)
28# define EDDYSTONE_TLM_FRAME_TYPE 0x20
38 uint8_t frameType{EDDYSTONE_TLM_FRAME_TYPE};
41 uint16_t temp{23 * 256};
44 } __attribute__((packed));
54 void setData(
const uint8_t* data, uint8_t length);
55 void setData(
const BeaconData& data);
64 uint16_t beaconUUID{0xFEAA};
65 BeaconData m_eddystoneData;
Representation of a beacon. See:
Definition NimBLEEddystoneTLM.h:35
void setData(const uint8_t *data, uint8_t length)
Set the raw data for the beacon advertisement.
Definition NimBLEEddystoneTLM.cpp:148
void setVersion(uint8_t version)
Set the version to advertise.
Definition NimBLEEddystoneTLM.cpp:183
const BeaconData getData()
Retrieve the data that is being advertised.
Definition NimBLEEddystoneTLM.cpp:35
void setUUID(const NimBLEUUID &l_uuid)
Set the UUID to advertise.
Definition NimBLEEddystoneTLM.cpp:171
uint32_t getCount()
Get the count of advertisements sent.
Definition NimBLEEddystoneTLM.cpp:75
void setCount(uint32_t advCount)
Set the advertisement count.
Definition NimBLEEddystoneTLM.cpp:207
int16_t getTemp()
Get the temperature being advertised.
Definition NimBLEEddystoneTLM.cpp:67
std::string toString()
Get a string representation of the beacon.
Definition NimBLEEddystoneTLM.cpp:91
void setTime(uint32_t tmil)
Set the advertisement time.
Definition NimBLEEddystoneTLM.cpp:215
NimBLEUUID getUUID()
Get the UUID being advertised.
Definition NimBLEEddystoneTLM.cpp:43
uint32_t getTime()
Get the advertisement time.
Definition NimBLEEddystoneTLM.cpp:83
void setVolt(uint16_t volt)
Set the battery voltage to advertise.
Definition NimBLEEddystoneTLM.cpp:191
uint8_t getVersion()
Get the version being advertised.
Definition NimBLEEddystoneTLM.cpp:51
void setTemp(int16_t temp)
Set the temperature to advertise.
Definition NimBLEEddystoneTLM.cpp:199
uint16_t getVolt()
Get the battery voltage.
Definition NimBLEEddystoneTLM.cpp:59
A model of a BLE UUID.
Definition NimBLEUUID.h:41