Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
BLESensor Class Referenceabstract

Defines a bluetooth low energy (BLE) interface for integrating new sensors into the DG firmware. More...

#include <BLESensor.hpp>

Inheritance diagram for BLESensor:

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.
 

Detailed Description

Defines a bluetooth low energy (BLE) interface for integrating new sensors into the DG firmware.

Member Function Documentation

◆ getSensorType()

virtual std::string BLESensor::getSensorType ( )
pure virtual

get the sensor type as a string

Returns a string which identifies the sensor. Usually contains both the generic identifier constructed of brand and model, and the unique MAC address.

Implemented in KKMK6P, and MinewS1.

◆ toJSON()

virtual std::string BLESensor::toJSON ( double  temp,
double  humidity 
)
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.

Parameters
[in]tempThe temperature as a double in Celsius
[in]humidityThe humidity as a double in relative humidity

Implemented in KKMK6P, and MinewS1.


The documentation for this class was generated from the following file: