健康温度计配置文件
健康温度计配置文件用于使数据收集设备能够从公开健康温度计服务的温度计传感器获取数据。
示例
API 参考
Header File
Functions
- 
esp_err_t esp_ble_htp_get_temp_type(uint8_t *temp_type)
- Get the current temperature type value of the device. - 参数
- temp_type – [in] The pointer to store the current temperature type value 
- 返回
- ESP_OK on successful 
- ESP_ERR_INVALID_ARG on wrong battery level 
 
 
- 
esp_err_t esp_ble_htp_get_measurement_interval(uint16_t *interval_val)
- Get the measurement interval value of the device. - 参数
- interval_val – [in] The pointer to store the measurement interval value 
- 返回
- ESP_OK on successful 
- ESP_ERR_INVALID_ARG on wrong battery level 
 
 
- 
esp_err_t esp_ble_htp_set_measurement_interval(uint16_t interval_val)
- Set the measurement interval value of the device. - 参数
- interval_val – [in] The measurement interval value 
- 返回
- ESP_OK on successful 
- ESP_ERR_INVALID_ARG on wrong battery level 
 
 
- 
esp_err_t esp_ble_htp_init(void)
- Initialization Health Thermometer Profile. - 返回
- ESP_OK on successful 
- ESP_ERR_INVALID_ARG on wrong initialization 
- ESP_FAIL on error 
 
 
- 
esp_err_t esp_ble_htp_deinit(void)
- Deinitialization Health Thermometer Profile. - 返回
- ESP_OK on successful 
- ESP_ERR_INVALID_ARG on wrong initialization 
- ESP_FAIL on error 
 
 
Structures
- 
struct esp_ble_htp_data_t
- Temperature Measurement and Intermediate Temperature Characteristic. - Public Members - 
uint8_t temperature_unit
- Temperature units flag 
 - 
uint8_t time_stamp
- Time stamp flag 
 - 
uint8_t temperature_type
- Temperature type flag 
 - 
uint8_t reserved
- Reserved for future use 
 - 
struct esp_ble_htp_data_t::[anonymous] flags
- Flags of temperature 
 - 
uint32_t celsius
- Celsius unit 
 - 
uint32_t fahrenheit
- Fahrenheit unit 
 - 
union esp_ble_htp_data_t::[anonymous] temperature
- Temperature value 
 - 
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_ble_htp_data_t::[anonymous] timestamp
- The date and time 
 - 
uint8_t location
- The location of a temperature measurement 
 
- 
uint8_t temperature_unit
Macros
- 
BLE_HTP_UUID16
- 
BLE_HTP_CHR_UUID16_TEMPERATURE_MEASUREMENT
- 
BLE_HTP_CHR_UUID16_TEMPERATURE_TYPE
- 
BLE_HTP_CHR_UUID16_INTERMEDIATE_TEMPERATURE
- 
BLE_HTP_CHR_UUID16_MEASUREMENT_INTERVAL
- 
BLE_HTP_FLAGS_BM_NONE
- 
BLE_HTP_FLAGS_BM_TEMPERATURE_UNITS
- 
BLE_HTP_FLAGS_BM_TIME_STAMP
- 
BLE_HTP_FLAGS_BM_TEMPERATURE_TYPE
- 
BLE_HTP_FLAGS_BM_RFU
- 
BLE_HTP_CHR_TEMPERATURE_UNITS_CELSIUS
- 
BLE_HTP_CHR_TEMPERATURE_UNITS_FAHRENHEIT
- 
BLE_HTP_CHR_TEMPERATURE_FLAGS_NOT
- 
BLE_HTP_CHR_TEMPERATURE_FLAGS_SET
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_RFU
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_ARMPIT
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_BODY
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_EAR
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_FINGER
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_GAST_TRACT
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_MOUTH
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_RECTUM
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_TOE
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_TYMPANUM
- 
BLE_HTP_CHR_TEMPERATURE_TYPE_MAX