nRF51 SDK: Blood Pressure Service

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
Blood Pressure Service
BLE Services

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
| Blood Pressure Service structure. This contains various status information for the service.
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...

## Detailed Description

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.

Note
  The application must propagate BLE stack events to the Blood Pressure Service module by calling ble_bps_on_ble_evt() from the from the ble_stack_handler function.
  Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.

## Macro Definition Documentation

#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.

## Enumeration Type Documentation

enum ble_bps_evt_type_t

Blood Pressure Service event type.

Enumerator
BLE_BPS_EVT_INDICATION_ENABLED | Blood Pressure value indication enabled event.
BLE_BPS_EVT_INDICATION_DISABLED | Blood Pressure value indication disabled event.
BLE_BPS_EVT_INDICATION_CONFIRMED | Confirmation of a blood pressure measurement indication has been received.

## Function Documentation

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.

Parameters

  [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.

Returns
  NRF_SUCCESS on successful initialization of service, otherwise an error code.

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.

Parameters

  [in] | p_bps | Blood Pressure Service structure.
  [out] | p_indication_enabled | TRUE if indication is enabled, FALSE otherwise.

Returns
  NRF_SUCCESS on success, otherwise an error code.

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.

Parameters

  [in] | p_bps | Blood Pressure Service structure.
  [in] | p_bps_meas | Pointer to new blood pressure measurement.

Returns
  NRF_SUCCESS on success, otherwise an error code.

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.

Handles all events from the BLE stack of interest to the Blood Pressure Service.

Parameters

  [in] | p_bps | Blood Pressure Service structure.
  [in] | p_ble_evt | Event received from the BLE stack.