Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TLMFrame Class Reference
Class that encapsulates data that belongs to the Eddystone-TLM frame. More...
#include <TLMFrame.h>
Public Member Functions | |
| TLMFrame (uint8_t tlmVersionIn=0, uint16_t tlmBatteryVoltageIn=0, uint16_t tlmBeaconTemperatureIn=0x8000, uint32_t tlmPduCountIn=0, uint32_t tlmTimeSinceBootIn=0) | |
| Construct a new instance of this class. | |
| void | setTLMData (uint8_t tlmVersionIn=0) |
| Set the Eddystone-TLM version number. | |
| void | constructTLMFrame (uint8_t *rawFrame) |
| Construct the raw bytes of the Eddystone-TLM frame that will be directly used in the advertising packets. | |
| size_t | getRawFrameSize (void) const |
| Get the size of the Eddystone-TLM frame constructed with the current state of the TLMFrame object. | |
| void | updateTimeSinceBoot (uint32_t nowInMillis) |
| Update the time since boot. | |
| void | updateBatteryVoltage (uint16_t tlmBatteryVoltageIn) |
| Update the Battery Voltage. | |
| void | updateBeaconTemperature (uint16_t tlmBeaconTemperatureIn) |
| Update the Beacon Temperature. | |
| void | updatePduCount (void) |
| Increment the current PDU counter by 1. | |
| uint16_t | getBatteryVoltage (void) const |
| Get the current Battery Voltage. | |
| uint16_t | getBeaconTemperature (void) const |
| Get the current Beacon Temperature. | |
| uint8_t | getTLMVersion (void) const |
| Get the current TLM Version number. | |
Detailed Description
Class that encapsulates data that belongs to the Eddystone-TLM frame.
For more information refer to https://github.com/google/eddystone/tree/master/eddystone-tlm.
Definition at line 26 of file TLMFrame.h.
Constructor & Destructor Documentation
| TLMFrame | ( | uint8_t | tlmVersionIn = 0, |
| uint16_t | tlmBatteryVoltageIn = 0, |
||
| uint16_t | tlmBeaconTemperatureIn = 0x8000, |
||
| uint32_t | tlmPduCountIn = 0, |
||
| uint32_t | tlmTimeSinceBootIn = 0 |
||
| ) |
Construct a new instance of this class.
- Parameters:
-
[in] tlmVersionIn Eddystone-TLM version number to use. [in] tlmBatteryVoltageIn Initial value for the Eddystone-TLM Battery Voltage. [in] tlmBeaconTemperatureIn Initial value for the Eddystone-TLM Beacon Temperature. [in] tlmPduCountIn Initial value for the Eddystone-TLM Advertising PDU Count. [in] tlmTimeSinceBootIn Intitial value for the Eddystone-TLM time since boot timer. 8 This timer has a 0.1 second resolution.
Definition at line 19 of file TLMFrame.cpp.
Member Function Documentation
| void constructTLMFrame | ( | uint8_t * | rawFrame ) |
Construct the raw bytes of the Eddystone-TLM frame that will be directly used in the advertising packets.
- Parameters:
-
[in] rawFrame Pointer to the location where the raw frame will be stored.
Definition at line 45 of file TLMFrame.cpp.
| uint16_t getBatteryVoltage | ( | void | ) | const |
Get the current Battery Voltage.
- Returns:
- The Battery Voltage.
Definition at line 92 of file TLMFrame.cpp.
| uint16_t getBeaconTemperature | ( | void | ) | const |
Get the current Beacon Temperature.
- Returns:
- The Beacon Temperature.
Definition at line 97 of file TLMFrame.cpp.
| size_t getRawFrameSize | ( | void | ) | const |
Get the size of the Eddystone-TLM frame constructed with the current state of the TLMFrame object.
- Returns:
- The size in bytes of the Eddystone-TLM frame.
Definition at line 66 of file TLMFrame.cpp.
| uint8_t getTLMVersion | ( | void | ) | const |
Get the current TLM Version number.
- Returns:
- The TLM Version number.
Definition at line 102 of file TLMFrame.cpp.
| void setTLMData | ( | uint8_t | tlmVersionIn = 0 ) |
Set the Eddystone-TLM version number.
Definition at line 33 of file TLMFrame.cpp.
| void updateBatteryVoltage | ( | uint16_t | tlmBatteryVoltageIn ) |
Update the Battery Voltage.
- Parameters:
-
[in] tlmBatteryVoltageIn The new Battery Voltage value.
Definition at line 77 of file TLMFrame.cpp.
| void updateBeaconTemperature | ( | uint16_t | tlmBeaconTemperatureIn ) |
Update the Beacon Temperature.
- Parameters:
-
[in] tlmBeaconTemperatureIn The new Beacon Temperature value.
Definition at line 82 of file TLMFrame.cpp.
| void updatePduCount | ( | void | ) |
Increment the current PDU counter by 1.
Definition at line 87 of file TLMFrame.cpp.
| void updateTimeSinceBoot | ( | uint32_t | nowInMillis ) |
Update the time since boot.
- Parameters:
-
[in] nowInMillis The time since boot in milliseconds.
Definition at line 71 of file TLMFrame.cpp.
Generated on Tue Jul 12 2022 19:55:16 by
1.7.2