Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LinkNode-Test by
HeartRateService Class Reference
BLE Service for HeartRate. More...
#include <HeartRateService.h>
Public Types | |
enum | { LOCATION_OTHER = 0, LOCATION_CHEST, LOCATION_WRIST, LOCATION_FINGER, LOCATION_HAND, LOCATION_EAR_LOBE, LOCATION_FOOT } |
Public Member Functions | |
HeartRateService (BLE &_ble, uint8_t hrmCounter, uint8_t location) | |
Constructor with 8-bit HRM Counter value. | |
HeartRateService (BLE &_ble, uint16_t hrmCounter, uint8_t location) | |
Constructor with a 16-bit HRM Counter value. | |
void | updateHeartRate (uint8_t hrmCounter) |
Set a new 8-bit value for the heart rate. | |
void | updateHeartRate (uint16_t hrmCounter) |
Set a new 16-bit value for the heart rate. | |
virtual void | onDataWritten (const GattWriteCallbackParams *params) |
This callback allows the heart rate service to receive updates to the controlPoint characteristic. |
Detailed Description
BLE Service for HeartRate.
This BLE Service contains the location of the sensor and the heart rate in beats per minute. Service: https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.heart_rate.xml HRM Char: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_measurement.xml Location: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.body_sensor_location.xml
Definition at line 29 of file HeartRateService.h.
Member Enumeration Documentation
anonymous enum |
- Enumerator:
LOCATION_OTHER Other location.
LOCATION_CHEST Chest.
LOCATION_WRIST Wrist.
LOCATION_FINGER Finger.
LOCATION_HAND Hand.
LOCATION_EAR_LOBE Earlobe.
LOCATION_FOOT Foot.
Definition at line 35 of file HeartRateService.h.
Constructor & Destructor Documentation
HeartRateService | ( | BLE & | _ble, |
uint8_t | hrmCounter, | ||
uint8_t | location | ||
) |
Constructor with 8-bit HRM Counter value.
- Parameters:
-
ref] _ble Reference to the underlying BLE. [in] hrmCounter (8-bit) Initial value for the HRM counter. [in] location Sensor's location.
Definition at line 56 of file HeartRateService.h.
HeartRateService | ( | BLE & | _ble, |
uint16_t | hrmCounter, | ||
uint8_t | location | ||
) |
Constructor with a 16-bit HRM Counter value.
- Parameters:
-
[in] _ble Reference to the underlying BLE. [in] hrmCounter (8-bit) Initial value for the HRM counter. [in] location Sensor's location.
Definition at line 77 of file HeartRateService.h.
Member Function Documentation
virtual void onDataWritten | ( | const GattWriteCallbackParams * | params ) | [virtual] |
This callback allows the heart rate service to receive updates to the controlPoint characteristic.
- Parameters:
-
[in] params Information about the characterisitc being updated.
Definition at line 117 of file HeartRateService.h.
void updateHeartRate | ( | uint8_t | hrmCounter ) |
Set a new 8-bit value for the heart rate.
- Parameters:
-
[in] hrmCounter Heart rate in BPM.
Definition at line 94 of file HeartRateService.h.
void updateHeartRate | ( | uint16_t | hrmCounter ) |
Set a new 16-bit value for the heart rate.
- Parameters:
-
[in] hrmCounter Heart rate in BPM.
Definition at line 105 of file HeartRateService.h.
Generated on Tue Jul 12 2022 16:00:25 by
