Minor temporary patch to allow DFU packet callback

Fork of BLE_API by Bluetooth Low Energy

Embed: (wiki syntax)

« Back to documentation index

HealthThermometerService Class Reference

HealthThermometerService Class Reference

BLE Health Thermometer Service. More...

#include <HealthThermometerService.h>

Public Types

enum  SensorLocation_t {
  LOCATION_ARMPIT = 1, LOCATION_BODY, LOCATION_EAR, LOCATION_FINGER,
  LOCATION_GI_TRACT, LOCATION_MOUTH, LOCATION_RECTUM, LOCATION_TOE,
  LOCATION_EAR_DRUM
}

Public Member Functions

 HealthThermometerService (BLEDevice &_ble, float initialTemp, uint8_t _location)
 Add the Health Thermometer Service to an existing ble object, initialize with temperature and location.
void updateTemperature (float temperature)
 Update the temperature being broadcast.
void updateLocation (SensorLocation_t loc)
 Update the location.

Detailed Description

BLE Health Thermometer Service.

This service provides the location of the thermometer and the temperature.
Service: https://developer.bluetooth.org/gatt/profiles/Pages/ProfileViewer.aspx?u=org.bluetooth.profile.health_thermometer.xml
Temperature Measurement: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.temperature_measurement.xml
Temperature Type: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.temperature_type.xml

Definition at line 29 of file HealthThermometerService.h.


Member Enumeration Documentation

Enumerator:
LOCATION_ARMPIT 

armpit

LOCATION_BODY 

body

LOCATION_EAR 

ear

LOCATION_FINGER 

finger

LOCATION_GI_TRACT 

GI tract

LOCATION_MOUTH 

mouth

LOCATION_RECTUM 

rectum

LOCATION_TOE 

toe

LOCATION_EAR_DRUM 

ear drum

Definition at line 35 of file HealthThermometerService.h.


Constructor & Destructor Documentation

HealthThermometerService ( BLEDevice _ble,
float  initialTemp,
uint8_t  _location 
)

Add the Health Thermometer Service to an existing ble object, initialize with temperature and location.

Parameters:
ref]_ble reference to the BLE device
[in]initialTempinitial value in celsius
[in]_location

Definition at line 54 of file HealthThermometerService.h.


Member Function Documentation

void updateLocation ( SensorLocation_t  loc )

Update the location.

Parameters:
locnew location value.

Definition at line 85 of file HealthThermometerService.h.

void updateTemperature ( float  temperature )

Update the temperature being broadcast.

Parameters:
[in]temperatureFloating point value of the temperature

Definition at line 73 of file HealthThermometerService.h.