Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Body Composition Service Server

This service exposes data related to body composition from a body composition analyzer intended for consumer healthcare and sports/fitness applications. More...

Detailed Description

This service exposes data related to body composition from a body composition analyzer intended for consumer healthcare and sports/fitness applications.

Data Structures

struct  st_ble_bcs_evt_data_t
 Body Composition Service event data. More...
 
struct  st_ble_bcs_init_param_t
 Body Composition Service initialization parameters. More...
 
struct  st_ble_bcs_connect_param_t
 Body Composition Service connection parameters. More...
 
struct  st_ble_bcs_disconnect_param_t
 Body Composition Service disconnection parameters. More...
 
struct  st_ble_bcs_body_composition_feature_t
 Body Composition Feature characteristic parameters. More...
 
struct  st_ble_bcs_body_composition_measurement_t
 Body Composition Measurement characteristic parameters. More...
 

Typedefs

typedef void(* ble_bcs_app_cb_t) (uint16_t type, ble_status_t result, st_ble_bcs_evt_data_t *p_data)
 Body Composition Service event callback. More...
 

Enumerations

enum  e_ble_bcs_event_t {
  BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_CLI_CNFG_ENABLED,
  BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_CLI_CNFG_DISABLED,
  BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_HDL_VAL_CNF,
  BLE_BCS_EVENT_BODY_COMPOSITION_FEATURE_READ_REQ
}
 Body Composition Service event type. More...
 
enum  e_ble_bcs_body_composition_measurement_t { BLE_BCS_BODY_COMPOSITION_MEASUREMENT_USER_ID_UNKNOWN_USER = 255 }
 User ID enumeration. More...
 
enum  e_ble_bcs_body_composition_feature_mass_measurement_resolution_t {
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_UNSPECIFIED,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_1_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_5_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_2_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_1_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_05_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_02_LB,
  BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_01_LB
}
 Mass Measurement Resolution enumeration. More...
 
enum  e_ble_bcs_body_composition_feature_height_measurement_resolution_t {
  BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_UNSPECIFIED,
  BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_1_INCH,
  BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_0_5_INCH,
  BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_0_1_INCH
}
 Height Measurement Resolution enumeration. More...
 

Functions

ble_status_t R_BLE_BCS_Init (const st_ble_bcs_init_param_t *p_param)
 Initialize Body Composition Service. More...
 
ble_status_t R_BLE_BCS_Connect (uint16_t conn_hdl, const st_ble_bcs_connect_param_t *p_param)
 Perform Body Composition Service connection settings. More...
 
ble_status_t R_BLE_BCS_Disconnect (uint16_t conn_hdl, st_ble_bcs_disconnect_param_t *p_param)
 Retrieve Body Composition Service connection specific settings before disconnection. More...
 
ble_status_t R_BLE_BCS_GetBodyCompositionFeature (st_ble_bcs_body_composition_feature_t *p_app_value)
 Get Body Composition Feature characteristic value from local GATT database. More...
 
ble_status_t R_BLE_BCS_SetBodyCompositionFeature (const st_ble_bcs_body_composition_feature_t *p_app_value)
 Set Body Composition Feature characteristic value to local GATT database. More...
 
ble_status_t R_BLE_BCS_IndicateBodyCompositionMeasurement (uint16_t conn_hdl, const st_ble_bcs_body_composition_measurement_t *p_app_value)
 Send Body Composition Measurement indication. More...
 
uint32_t R_BLE_BCS_GetVersion (void)
 Return version of the BCC service server. More...
 

Typedef Documentation

◆ ble_bcs_app_cb_t

typedef void(* ble_bcs_app_cb_t) (uint16_t type, ble_status_t result, st_ble_bcs_evt_data_t *p_data)

Body Composition Service event callback.

Enumeration Type Documentation

◆ e_ble_bcs_event_t

Body Composition Service event type.

Enumerator
BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_CLI_CNFG_ENABLED 

Body Composition Measurement characteristic cli cnfg enabled event

BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_CLI_CNFG_DISABLED 

Body Composition Measurement characteristic cli cnfg disabled event

BLE_BCS_EVENT_BODY_COMPOSITION_MEASUREMENT_HDL_VAL_CNF 

Body Composition Measurement characteristic handle value confiration event

BLE_BCS_EVENT_BODY_COMPOSITION_FEATURE_READ_REQ 

Body Composition Feature characteristic read request event

◆ e_ble_bcs_body_composition_measurement_t

User ID enumeration.

Enumerator
BLE_BCS_BODY_COMPOSITION_MEASUREMENT_USER_ID_UNKNOWN_USER 

Unknown User

◆ e_ble_bcs_body_composition_feature_mass_measurement_resolution_t

Mass Measurement Resolution enumeration.

Enumerator
BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_UNSPECIFIED 

Not Specified

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_1_LB 

Resolution of 0.5 kg or 1 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_5_LB 

Resolution of 0.2 kg or 0.5 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_2_LB 

Resolution of 0.1 kg or 0.2 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_1_LB 

Resolution of 0.05 kg or 0.1 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_05_LB 

Resolution of 0.02 kg or 0.05 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_02_LB 

Resolution of 0.01 kg or 0.02 lb

BLE_BCS_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION_0_01_LB 

Resolution of 0.005 kg or 0.01 lb

◆ e_ble_bcs_body_composition_feature_height_measurement_resolution_t

Height Measurement Resolution enumeration.

Enumerator
BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_UNSPECIFIED 

Resolution Not Specified

BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_1_INCH 

Resolution of 0.01 meter or 1 inch

BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_0_5_INCH 

Resolution of 0.005 meter or 0.5 inch

BLE_BCS_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION_0_1_INCH 

Resolution of 0.001 meter or 0.1 inch

Function Documentation

◆ R_BLE_BCS_Init()

ble_status_t R_BLE_BCS_Init ( const st_ble_bcs_init_param_t p_param)

Initialize Body Composition Service.

This function shall be called once at startup.

Parameters
[in]p_paramPointer to Body Composition Service initialization parameters.
Returns

◆ R_BLE_BCS_Connect()

ble_status_t R_BLE_BCS_Connect ( uint16_t  conn_hdl,
const st_ble_bcs_connect_param_t p_param 
)

Perform Body Composition Service connection settings.

This function shall be called on each connection establishment.

Parameters
[in]conn_hdlConnection handle.
[in]p_paramPointer to Connection parameters.
Returns
ble_status_t

◆ R_BLE_BCS_Disconnect()

ble_status_t R_BLE_BCS_Disconnect ( uint16_t  conn_hdl,
st_ble_bcs_disconnect_param_t p_param 
)

Retrieve Body Composition Service connection specific settings before disconnection.

This function shall be called on each disconnection.

Parameters
[in]conn_hdlConnection handle.
[in]p_paramPointer to Disconnection parameters.
Returns
ble_status_t

◆ R_BLE_BCS_GetBodyCompositionFeature()

ble_status_t R_BLE_BCS_GetBodyCompositionFeature ( st_ble_bcs_body_composition_feature_t p_app_value)

Get Body Composition Feature characteristic value from local GATT database.

Parameters
[out]p_app_valuePointer to Retrieved Body Composition Feature characteristic value.
Returns
ble_status_t

◆ R_BLE_BCS_SetBodyCompositionFeature()

ble_status_t R_BLE_BCS_SetBodyCompositionFeature ( const st_ble_bcs_body_composition_feature_t p_app_value)

Set Body Composition Feature characteristic value to local GATT database.

Parameters
[in]p_app_valuePointer to Body Composition Feature characteristic value to set.
Returns
ble_status_t

◆ R_BLE_BCS_IndicateBodyCompositionMeasurement()

ble_status_t R_BLE_BCS_IndicateBodyCompositionMeasurement ( uint16_t  conn_hdl,
const st_ble_bcs_body_composition_measurement_t p_app_value 
)

Send Body Composition Measurement indication.

Parameters
[in]conn_hdlConnection handle.
[in]p_app_valuePointer to Body Composition Measurement value to send.
Returns
ble_status_t

◆ R_BLE_BCS_GetVersion()

uint32_t R_BLE_BCS_GetVersion ( void  )

Return version of the BCC service server.

Returns
version