Mbed OS Reference
Loading...
Searching...
No Matches
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
}
 Location of sensor on the body. More...
 

Public Member Functions

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

Detailed Description

Member Enumeration Documentation

◆ SensorLocation_t

Location of sensor on the body.

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 

Eardrum.

Definition at line 43 of file HealthThermometerService.h.

Constructor & Destructor Documentation

◆ HealthThermometerService()

HealthThermometerService ( BLE _ble,
float  initialTemp,
uint8_t  _location 
)

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

Parameters
[in]_bleReference to the BLE device.
[in]initialTempInitial value in celsius.
[in]_location

Definition at line 62 of file HealthThermometerService.h.

Member Function Documentation

◆ updateTemperature()

void updateTemperature ( float  temperature)

Update the temperature being broadcast.

Parameters
[in]temperatureFloating point value of the temperature.

Definition at line 81 of file HealthThermometerService.h.

◆ updateLocation()

void updateLocation ( SensorLocation_t  loc)

Update the location.

Parameters
locNew location value.

Definition at line 91 of file HealthThermometerService.h.