HeartRateService
People practicing physical activities use heart rate monitors to track their pulse in real time and improve their physical performances.
The Bluetooth Heart Rate Service defines how data from a heart rate sensor should be exposed through a BLE link. The standard nature of the service allows seamless operations between collectors - usually smartphone applications - and heart rate monitors conforming to the service.
The HeartRateService class implements the Bluetooth Heart Rate service as defined by the Bluetooth body. Makers of BLE enabled fitness devices can use it to expose interoperably heart rate sensor data.
Note: The Bluetooth Heart Rate Service is part of the Bluetooth Heart Rate Profile, which defines behaviors that a Bluetooth heart rate sensor expects. You must ensure that your application conforms to the heart rate profile to guarantee interoperability of your heart rate sensors.
HeartRateService class reference
Data Structures | |
struct | HeartRateValueBytes |
Public Types |
Public Member Functions | |
HeartRateService (BLE &_ble, uint16_t hrmCounter, BodySensorLocation location) | |
Construct and initialize a heart rate service. More... | |
void | updateHeartRate (uint16_t hrmCounter) |
Update the heart rate that the service exposes. More... |
Protected Member Functions | |
void | setupService () |
Construct and add to the GattServer the heart rate service. More... |
Related content
- Bluetooth Heart Rate Service specification.
- Bluetooth Heart Rate Profile specification.