![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This is the client for the Body Composition Service. More...
This is the client for the Body Composition Service.
Data Structures | |
struct | st_ble_bcc_evt_data_t |
Body Composition Service Client event data. More... | |
struct | st_ble_bcc_hdls_t |
Body Composition Service attribute handles. More... | |
struct | st_ble_bcc_init_param_t |
Body Composition Service initialization parameters. More... | |
struct | st_ble_bcc_connect_param_t |
Body Composition Service Client connection parameters. More... | |
struct | st_ble_bcc_disconnect_param_t |
Body Composition Service disconnection parameters. More... | |
struct | st_ble_bcc_body_composition_feature_t |
Body Composition Feature characteristic parameters. More... | |
struct | st_ble_bcc_body_composition_measurement_t |
Body Composition Measurement characteristic parameters. More... | |
Typedefs | |
typedef void(* | ble_bcc_app_cb_t) (uint16_t type, ble_status_t result, st_ble_bcc_evt_data_t *p_data) |
Body Composition Service Client event callback. More... | |
Enumerations | |
enum | e_ble_bcc_event_t { BLE_BCC_EVENT_BODY_COMPOSITION_FEATURE_READ_RSP, BLE_BCC_EVENT_BODY_COMPOSITION_MEASUREMENT_HDL_VAL_IND, BLE_BCC_EVENT_CLI_CNFG_WRITE_RSP, BLE_BCC_EVENT_ERROR_RSP } |
Body Composition Service Client event type. More... | |
enum | e_ble_bcc_body_composition_measurement_t { BLE_BCC_BODY_COMPOSITION_MEASUREMENT_USER_ID_UNKNOWN_USER = 255 } |
User ID enumeration. More... | |
Functions | |
ble_status_t | R_BLE_BCC_Init (const st_ble_bcc_init_param_t *p_param) |
Initialize Body Composition Service Client. More... | |
ble_status_t | R_BLE_BCC_Connect (uint16_t conn_hdl, const st_ble_bcc_connect_param_t *p_param) |
Perform Body Composition Service Client connection settings. More... | |
ble_status_t | R_BLE_BCC_Disconnect (uint16_t conn_hdl, st_ble_bcc_disconnect_param_t *p_param) |
Retrieve Body Composition Service Client connection specific settings before disconnection. More... | |
ble_status_t | R_BLE_BCC_ReadBodyCompositionFeature (uint16_t conn_hdl) |
Read Body Composition Feature characteristic value from remote GATT database. More... | |
ble_status_t | R_BLE_BCC_SetBodyCompositionMeasurementCliCnfg (uint16_t conn_hdl, uint16_t cli_cnfg) |
Set Body Composition Measurement characteristic cli cnfg. More... | |
void | R_BLE_BCC_ServDiscCb (uint16_t conn_hdl, uint8_t idx, uint16_t type, void *p_param) |
uint32_t | R_BLE_BCC_GetVersion (void) |
Return version of the BCC service client. More... | |
Variables | |
const uint8_t | BLE_BCC_UUID [BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Service UUID. More... | |
const uint8_t | BLE_BCC_BODY_COMPOSITION_FEATURE_UUID [BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Feature characteristic UUID. More... | |
const uint8_t | BLE_BCC_BODY_COMPOSITION_MEASUREMENT_UUID [BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Measurement characteristic UUID. More... | |
#define BLE_BCC_BODY_COMPOSITION_FEATURE_LEN (4) |
Body Composition Feature characteristic value length.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_LEN (30) |
Body Composition Measurement characteristic value length.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_TIME_STAMP_SUPPORTED (1 << 0) |
Time Stamp Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_MULTIPLE_USERS_SUPPORTED (1 << 1) |
Multiple Users Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_BASAL_METABOLISM_SUPPORTED (1 << 2) |
Basal Metabolism Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_MUSCLE_PERCENTAGE_SUPPORTED (1 << 3) |
Muscle Percentage Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_MUSCLE_MASS_SUPPORTED (1 << 4) |
Muscle Mass Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_FAT_FREE_MASS_SUPPORTED (1 << 5) |
Fat Free Mass Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_SOFT_LEAN_MASS_SUPPORTED (1 << 6) |
Soft Lean Mass Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_BODY_WATER_MASS_SUPPORTED (1 << 7) |
Body Water Mass Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_IMPEDANCE_SUPPORTED (1 << 8) |
Impedance Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_WEIGHT_SUPPORTED (1 << 9) |
Weight Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_HEIGHT_SUPPORTED (1 << 10) |
Height Supported bit.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_MASS_MEASUREMENT_RESOLUTION (((1 << 4) - 1) << 11) |
Mass Measurement Resolution bits.
#define BLE_BCC_BODY_COMPOSITION_FEATURE_HEIGHT_MEASUREMENT_RESOLUTION (((1 << 3) - 1) << 15) |
Height Measurement Resolution bits.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_MEASUREMENT_UNITS (1 << 0) |
Measurement Units bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_TIME_STAMP_PRESENT (1 << 1) |
Time Stamp Present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_USER_ID_PRESENT (1 << 2) |
User ID present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_BASAL_METABOLISM_PRESENT (1 << 3) |
Basal Metabolism present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_MUSCLE_PERCENTAGE_PRESENT (1 << 4) |
Muscle Percentage present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_MUSCLE_MASS_PRESENT (1 << 5) |
Muscle Mass present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_FAT_FREE_MASS_PRESENT (1 << 6) |
Fat Free Mass present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_SOFT_LEAN_MASS_PRESENT (1 << 7) |
Soft Lean Mass present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_BODY_WATER_MASS_PRESENT (1 << 8) |
Body Water Mass present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_IMPEDANCE_PRESENT (1 << 9) |
Impedance present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_WEIGHT_PRESENT (1 << 10) |
Weight present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_HEIGHT_PRESENT (1 << 11) |
Height present bit.
#define BLE_BCC_BODY_COMPOSITION_MEASUREMENT_FLAGS_MULTIPLE_PACKET_MEASUREMENT (1 << 12) |
Multiple Packet Measurement bit.
typedef void(* ble_bcc_app_cb_t) (uint16_t type, ble_status_t result, st_ble_bcc_evt_data_t *p_data) |
Body Composition Service Client event callback.
enum e_ble_bcc_event_t |
Body Composition Service Client event type.
ble_status_t R_BLE_BCC_Init | ( | const st_ble_bcc_init_param_t * | p_param | ) |
Initialize Body Composition Service Client.
This function shall be called once at startup.
[in] | p_param | Pointer to Body Composition Service Client initialization parameters. |
ble_status_t R_BLE_BCC_Connect | ( | uint16_t | conn_hdl, |
const st_ble_bcc_connect_param_t * | p_param | ||
) |
Perform Body Composition Service Client connection settings.
This function shall be called on each connection establishment.
[in] | conn_hdl | Connection handle. |
[in] | p_param | Pointer to Connection parameters. |
ble_status_t R_BLE_BCC_Disconnect | ( | uint16_t | conn_hdl, |
st_ble_bcc_disconnect_param_t * | p_param | ||
) |
Retrieve Body Composition Service Client connection specific settings before disconnection.
This function shall be called on each disconnection.
[in] | conn_hdl | Connection handle. |
[in] | p_param | Pointer to Disconnection parameters. |
ble_status_t R_BLE_BCC_ReadBodyCompositionFeature | ( | uint16_t | conn_hdl | ) |
Read Body Composition Feature characteristic value from remote GATT database.
[in] | conn_hdl | Connection handle |
ble_status_t R_BLE_BCC_SetBodyCompositionMeasurementCliCnfg | ( | uint16_t | conn_hdl, |
uint16_t | cli_cnfg | ||
) |
Set Body Composition Measurement characteristic cli cnfg.
[in] | conn_hdl | Connection handle. |
[in] | cli_cnfg | Body Composition Measurement characteristic cli cnfg to set. |
uint32_t R_BLE_BCC_GetVersion | ( | void | ) |
Return version of the BCC service client.
const uint8_t BLE_BCC_UUID[BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Service UUID.
const uint8_t BLE_BCC_BODY_COMPOSITION_FEATURE_UUID[BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Feature characteristic UUID.
const uint8_t BLE_BCC_BODY_COMPOSITION_MEASUREMENT_UUID[BLE_GATT_16_BIT_UUID_SIZE] |
Body Composition Measurement characteristic UUID.