![]() |
Data Gator
Hardware and software documentation for the Data Gator project.
|
Defines a bluetooth low energy (BLE) interface for integrating new sensors into the DG firmware. More...
#include <BLESensor.hpp>
Public Member Functions | |
virtual std::string | toJSON (double temp, double humidity)=0 |
convert data values to JSON string object | |
virtual std::string | getSensorType ()=0 |
get the sensor type as a string | |
Public Attributes | |
std::string | name |
Name of the sensor... not unique, generally something generic such as brand and model. | |
std::string | mac_address |
Mac address of sensor BLE for unique ID. | |
Defines a bluetooth low energy (BLE) interface for integrating new sensors into the DG firmware.
|
pure virtual |
convert data values to JSON string object
Constructs as JSON formatted string from the data types which are available to be read from the sensor. Defaults to temperature and humidity.
[in] | temp | The temperature as a double in Celsius |
[in] | humidity | The humidity as a double in relative humidity |