nRF51 SDK - S130 SoftDevice
|
Blood Pressure Service module. More...
Data Structures | |
struct | ble_bps_evt_t |
Blood Pressure Service event. More... | |
struct | ieee_float16_t |
SFLOAT format (IEEE-11073 16-bit FLOAT, defined as a 16-bit vlue with 12-bit mantissa and 4-bit exponent. More... | |
struct | ble_bps_init_t |
Blood Pressure Service init structure. This contains all options and data needed for initialization of the service. More... | |
struct | ble_bps_s |
Blood Pressure Service structure. This contains various status information for the service. More... | |
struct | ble_bps_meas_s |
Blood Pressure Service measurement structure. This contains a Blood Pressure measurement. More... | |
Macros | |
#define | BLE_BPS_FEATURE_BODY_MOVEMENT_BIT (0x01 << 0) |
#define | BLE_BPS_FEATURE_CUFF_FIT_BIT (0x01 << 1) |
#define | BLE_BPS_FEATURE_IRREGULAR_PULSE_BIT (0x01 << 2) |
#define | BLE_BPS_FEATURE_PULSE_RATE_RANGE_BIT (0x01 << 3) |
#define | BLE_BPS_FEATURE_MEASUREMENT_POSITION_BIT (0x01 << 4) |
#define | BLE_BPS_FEATURE_MULTIPLE_BOND_BIT (0x01 << 5) |
Typedefs | |
typedef struct ble_bps_s | ble_bps_t |
typedef void(* | ble_bps_evt_handler_t )(ble_bps_t *p_bps, ble_bps_evt_t *p_evt) |
Blood Pressure Service event handler type. | |
typedef struct ble_bps_meas_s | ble_bps_meas_t |
Blood Pressure Service measurement structure. This contains a Blood Pressure measurement. | |
Enumerations | |
enum | ble_bps_evt_type_t { BLE_BPS_EVT_INDICATION_ENABLED, BLE_BPS_EVT_INDICATION_DISABLED, BLE_BPS_EVT_INDICATION_CONFIRMED } |
Blood Pressure Service event type. More... | |
Functions | |
uint32_t | ble_bps_init (ble_bps_t *p_bps, const ble_bps_init_t *p_bps_init) |
Function for initializing the Blood Pressure Service. More... | |
void | ble_bps_on_ble_evt (ble_bps_t *p_bps, ble_evt_t *p_ble_evt) |
Function for handling the Application's BLE Stack events. More... | |
uint32_t | ble_bps_measurement_send (ble_bps_t *p_bps, ble_bps_meas_t *p_bps_meas) |
Function for sending blood pressure measurement if indication has been enabled. More... | |
uint32_t | ble_bps_is_indication_enabled (ble_bps_t *p_bps, bool *p_indication_enabled) |
Function for checking if indication of Blood Pressure Measurement is currently enabled. More... | |
Blood Pressure Service module.
This module implements the Blood Pressure Service.
If an event handler is supplied by the application, the Blood Pressure Service will generate Blood Pressure Service events to the application.
#define BLE_BPS_FEATURE_BODY_MOVEMENT_BIT (0x01 << 0) |
Body Movement Detection Support bit.
#define BLE_BPS_FEATURE_CUFF_FIT_BIT (0x01 << 1) |
Cuff Fit Detection Support bit.
#define BLE_BPS_FEATURE_IRREGULAR_PULSE_BIT (0x01 << 2) |
Irregular Pulse Detection Support bit.
#define BLE_BPS_FEATURE_MEASUREMENT_POSITION_BIT (0x01 << 4) |
Measurement Position Detection Support bit.
#define BLE_BPS_FEATURE_MULTIPLE_BOND_BIT (0x01 << 5) |
Multiple Bond Support bit.
#define BLE_BPS_FEATURE_PULSE_RATE_RANGE_BIT (0x01 << 3) |
Pulse Rate Range Detection Support bit.
enum ble_bps_evt_type_t |
Blood Pressure Service event type.
uint32_t ble_bps_init | ( | ble_bps_t * | p_bps, |
const ble_bps_init_t * | p_bps_init | ||
) |
Function for initializing the Blood Pressure Service.
[out] | p_bps | Blood Pressure Service structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular service instance. |
[in] | p_bps_init | Information needed to initialize the service. |
uint32_t ble_bps_is_indication_enabled | ( | ble_bps_t * | p_bps, |
bool * | p_indication_enabled | ||
) |
Function for checking if indication of Blood Pressure Measurement is currently enabled.
[in] | p_bps | Blood Pressure Service structure. |
[out] | p_indication_enabled | TRUE if indication is enabled, FALSE otherwise. |
uint32_t ble_bps_measurement_send | ( | ble_bps_t * | p_bps, |
ble_bps_meas_t * | p_bps_meas | ||
) |
Function for sending blood pressure measurement if indication has been enabled.
The application calls this function after having performed a Blood Pressure measurement. If indication has been enabled, the measurement data is encoded and sent to the client.
[in] | p_bps | Blood Pressure Service structure. |
[in] | p_bps_meas | Pointer to new blood pressure measurement. |
Function for handling the Application's BLE Stack events.
Handles all events from the BLE stack of interest to the Blood Pressure Service.
[in] | p_bps | Blood Pressure Service structure. |
[in] | p_ble_evt | Event received from the BLE stack. |