Body composition service sample implementation API.
More...
|
| file | bcs.h |
| | Body Composition Service sample implementation API.
|
| |
|
| enum | bcs_unit_t { BCS_UNIT_SI,
BCS_UNIT_IMPERIAL
} |
| | BCS unit types. More...
|
| |
| enum | bcs_feat_t {
BCS_FEAT_TIME_STAMP = 0x000001,
BCS_FEAT_MULTIPLE_USERS = 0x000002,
BCS_FEAT_BASAL_METABOLISM = 0x000004,
BCS_FEAT_MUSCLE_PERCENTAGE = 0x000008,
BCS_FEAT_MUSCLE_MASS = 0x000010,
BCS_FEAT_FAT_FREE_MASS = 0x000020,
BCS_FEAT_SOFT_LEAN_MASS = 0x000040,
BCS_FEAT_BODY_WATER_MASS = 0x000080,
BCS_FEAT_IMPEDANCE = 0x000100,
BCS_FEAT_WEIGHT = 0x000200,
BCS_FEAT_HEIGHT = 0x000400,
BCS_FEAT_MASS_RES_05_KG = 0x000800,
BCS_FEAT_MASS_RES_02_KG = 0x001000,
BCS_FEAT_MASS_RES_01_KG = 0x001800,
BCS_FEAT_MASS_RES_005_KG = 0x002000,
BCS_FEAT_MASS_RES_002_KG = 0x002800,
BCS_FEAT_MASS_RES_001_KG = 0x003000,
BCS_FEAT_MASS_RES_0005_KG = 0x003800,
BCS_FEAT_MASS_RES_05_LB = 0x000800,
BCS_FEAT_MASS_RES_02_LB = 0x001000,
BCS_FEAT_MASS_RES_01_LB = 0x001800,
BCS_FEAT_MASS_RES_005_LB = 0x002000,
BCS_FEAT_MASS_RES_002_LB = 0x002800,
BCS_FEAT_MASS_RES_001_LB = 0x003000,
BCS_FEAT_MASS_RES_0005_LB = 0x003800,
BCS_FEAT_HEIGHT_RES_001_M = 0x008000,
BCS_FEAT_HEIGHT_RES_005_M = 0x010000,
BCS_FEAT_HEIGHT_RES_0001_M = 0x018000,
BCS_FEAT_HEIGHT_RES_1_INCH = 0x008000,
BCS_FEAT_HEIGHT_RES_05_INCH = 0x010000,
BCS_FEAT_HEIGHT_RES_01_INCH = 0x018000
} |
| | BCS feature types. More...
|
| |
Body composition service sample implementation API.
◆ bcs_feat_t
BCS feature types.
| Enumerator |
|---|
| BCS_FEAT_TIME_STAMP | Time stamp supported
|
| BCS_FEAT_MULTIPLE_USERS | Multiple users supported
|
| BCS_FEAT_BASAL_METABOLISM | Basal metabolism supported
|
| BCS_FEAT_MUSCLE_PERCENTAGE | Muscle percentage supported
|
| BCS_FEAT_MUSCLE_MASS | Muscle mass supported
|
| BCS_FEAT_FAT_FREE_MASS | Fat free mass supported
|
| BCS_FEAT_SOFT_LEAN_MASS | Soft lean mass supported
|
| BCS_FEAT_BODY_WATER_MASS | Body water mass supported
|
| BCS_FEAT_IMPEDANCE | Impedance supported
|
| BCS_FEAT_WEIGHT | Weight supported
|
| BCS_FEAT_HEIGHT | Height supported
|
| BCS_FEAT_MASS_RES_05_KG | Resolution of 0.5 kg
|
| BCS_FEAT_MASS_RES_02_KG | Resolution of 0.2 kg
|
| BCS_FEAT_MASS_RES_01_KG | Resolution of 0.1 kg
|
| BCS_FEAT_MASS_RES_005_KG | Resolution of 0.05 kg
|
| BCS_FEAT_MASS_RES_002_KG | Resolution of 0.02 kg
|
| BCS_FEAT_MASS_RES_001_KG | Resolution of 0.01 kg
|
| BCS_FEAT_MASS_RES_0005_KG | Resolution of 0.005 kg
|
| BCS_FEAT_MASS_RES_05_LB | Resolution of 1 lb
|
| BCS_FEAT_MASS_RES_02_LB | Resolution of 0.5 lb
|
| BCS_FEAT_MASS_RES_01_LB | Resolution of 0.2 lb
|
| BCS_FEAT_MASS_RES_005_LB | Resolution of 0.1 lb
|
| BCS_FEAT_MASS_RES_002_LB | Resolution of 0.05 lb
|
| BCS_FEAT_MASS_RES_001_LB | Resolution of 0.02 lb
|
| BCS_FEAT_MASS_RES_0005_LB | Resolution of 0.01 lb
|
| BCS_FEAT_HEIGHT_RES_001_M | Resolution of 0.01 meter
|
| BCS_FEAT_HEIGHT_RES_005_M | Resolution of 0.005 meter
|
| BCS_FEAT_HEIGHT_RES_0001_M | Resolution of 0.001 meter
|
| BCS_FEAT_HEIGHT_RES_1_INCH | Resolution of 1 inch
|
| BCS_FEAT_HEIGHT_RES_05_INCH | Resolution of 0.5 inch
|
| BCS_FEAT_HEIGHT_RES_01_INCH | Resolution of 0.1 inch
|
◆ bcs_unit_t
BCS unit types.
| Enumerator |
|---|
| BCS_UNIT_SI | Weight and mass in kilograms and height in meters
|
| BCS_UNIT_IMPERIAL | Weight and mass in pounds and height in inches
|
◆ bcs_indicate()
Indicate body composition measurement to client
Indicate will only be sent if given client enabled indications before.
- Parameters
-
| [in] | svc | BCS instance |
| [in] | conn_idx | connection index |
| [in] | meas | body composition measurement |
- Returns
- 0 (BLE_STATUS_OK) if indication was sent successfully, ble_error_t if error occured
◆ bcs_indicate_all()
Indicate body composition measurement to all connected clients
This is roughly equivalent for calling bcs_indicate() for each connected client.
- Parameters
-
| [in] | svc | BCS instance |
| [in] | meas | body composition measurement |
◆ bcs_init()
Register Body Composition Service instance
- Parameters
-
| [in] | config | service configuration |
| [in] | cb | application callbacks |
| [in] | feat | body composition features |
- Returns
- BCS instance
◆ bcs_is_indication_enabled()
| bool bcs_is_indication_enabled |
( |
ble_service_t * |
svc, |
|
|
uint16_t |
conn_idx |
|
) |
| |
Check if indication is enabled.
- Parameters
-
| [in] | svc | service instance |
| [in] | conn_idx | connection index to sent indication to |
- Returns
- true if indication is enabled, false otherwise