adaptation for book and plug demo

Dependents:   BookAndPlug

Fork of BLE_API by Bluetooth Low Energy

Embed: (wiki syntax)

« Back to documentation index

EnvironmentalService Class Reference

EnvironmentalService Class Reference

BLE Environmental Service. More...

#include <EnvironmentalService.h>

Public Member Functions

 EnvironmentalService (BLE &_ble)
 EnvironmentalService constructor.
void updateHumidity (HumidityType_t newHumidityVal)
 Update humidity characteristic.
void updatePressure (PressureType_t newPressureVal)
 Update pressure characteristic.
void updateTemperature (float newTemperatureVal)
 Update temperature characteristic.

Detailed Description

BLE Environmental Service.

This service provides temperature, humidity and pressure measurement. Service: https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.environmental_sensing.xml Temperature: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.temperature.xml Humidity: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.humidity.xml Pressure: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.pressure.xml

Definition at line 30 of file EnvironmentalService.h.


Constructor & Destructor Documentation

EnvironmentalService ( BLE _ble )

EnvironmentalService constructor.

Parameters:
bleReference to BLE device.
temperature_enEnable this characteristic.
humidity_enEnable this characteristic.
pressure_enEnable this characteristic.

Definition at line 43 of file EnvironmentalService.h.


Member Function Documentation

void updateHumidity ( HumidityType_t  newHumidityVal )

Update humidity characteristic.

Parameters:
newHumidityValNew humidity measurement.

Definition at line 68 of file EnvironmentalService.h.

void updatePressure ( PressureType_t  newPressureVal )

Update pressure characteristic.

Parameters:
newPressureValNew pressure measurement.

Definition at line 78 of file EnvironmentalService.h.

void updateTemperature ( float  newTemperatureVal )

Update temperature characteristic.

Parameters:
newTemperatureValNew temperature measurement.

Definition at line 88 of file EnvironmentalService.h.