人体组织成分服务
人体成分服务提供了用于健康以及健身领域的相关数据。
示例
API 参考
Header File
Functions
-
esp_err_t esp_ble_bcs_set_measurement(esp_bcs_val_t *in_val, bool need_send)
Set the Body Componsition value.
- 参数
in_val – [in] The pointer to store the Body Componsition Information.
need_send – [in] If set to true, the Body Componsition Info will send to remote client.
- 返回
ESP_OK on successful
ESP_ERR_INVALID_ARG on wrong initialization
ESP_FAIL on error
-
esp_err_t esp_ble_bcs_init(void)
Initialization Body Componsion Service.
- 返回
ESP_OK on successful
ESP_ERR_INVALID_ARG on wrong initialization
ESP_FAIL on error
Structures
-
struct esp_bcs_val_t
Body Composition Measurement Characteristic.
Public Members
-
uint32_t bcs_flag
Body Composition flag field
-
uint16_t year
Year as defined by the Gregorian calendar, Valid range 1582 to 9999
-
uint8_t month
Month of the year as defined by the Gregorian calendar, Valid range 1 (January) to 12 (December)
-
uint8_t day
Day of the month as defined by the Gregorian calendar, Valid range 1 to 31
-
uint8_t hours
Number of hours past midnight, Valid range 0 to 23
-
uint8_t minutes
Number of minutes since the start of the hour. Valid range 0 to 59
-
uint8_t seconds
Number of seconds since the start of the minute. Valid range 0 to 59
-
struct esp_bcs_val_t::[anonymous] timestamp
The date and time
-
uint8_t user_id
User ID field
-
uint16_t basal_metabolism
Basal Metabolism field
-
uint16_t muscle_percentage
Muscle Percentage field
-
uint16_t muscle_mass
Muscle Mass field
-
uint16_t fat_free_mass
Fat Free Mass field
-
uint16_t soft_lean_mass
Soft Lean Mass field
-
uint16_t body_water_mass
Body Water Mass field
-
uint8_t impedance
Impedance field
-
uint16_t weight
Weight field
-
uint16_t height
Height field
-
uint32_t bcs_flag
Macros
-
BLE_BCS_MAX_VAL_LEN
-
BLE_BCS_UUID16
-
BLE_BCS_CHR_UUID16_FEATURE
-
BLE_BCS_CHR_UUID16_MEASUREMENT
-
BLE_BCS_FEAT_TIME_STAMP
-
BLE_BCS_FEAT_MULTI_USER
-
BLE_BCS_FEAT_BASAL_METABOLISM
-
BLE_BCS_FEAT_MUSCLE_PERCENTAGE
-
BLE_BCS_FEAT_MUSCLE_MASS
-
BLE_BCS_FEAT_FAT_FREE_MASS
-
BLE_BCS_FEAT_SOFT_LEAN_MASS
-
BLE_BCS_FEAT_BODY_WATER_MASS
-
BLE_BCS_FEAT_IMPEDENCE
-
BLE_BCS_FEAT_WEIGHT
-
BLE_BCS_FEAT_HEIGHT
-
BLE_BCS_FEAT_MASS_MEASUREMENT_RESOLUTION
-
BLE_BCS_FEAT_HEIGHT_RESOLUTION
-
BLE_BCS_FLAG_MEASUREMENT_UNITS
-
BLE_BCS_FLAG_TIME_STAMP
-
BLE_BCS_FLAG_MULTI_USER
-
BLE_BCS_FLAG_BASAL_METABOLISM
-
BLE_BCS_FLAG_MUSCLE_PERCENTAGE
-
BLE_BCS_FLAG_MUSCLE_MASS
-
BLE_BCS_FLAG_FAT_FREE_MASS
-
BLE_BCS_FLAG_SOFT_LEAN_MASS
-
BLE_BCS_FLAG_BODY_WATER_MASS
-
BLE_BCS_FLAG_IMPEDENCE
-
BLE_BCS_FLAG_WEIGHT
-
BLE_BCS_FLAG_HEIGHT
-
BLE_BCS_FLAG_MULTIPLE_PACKET