Go to the documentation of this file.
65 #include "custom_config.h"
74 #define HTS_CONNECTION_MAX 10
75 #define HTS_TEM_MEAS_MAX_LEN 20
76 #define HTS_TEM_TYPE_MAX_LEN 1
77 #define HTS_INTM_TEM_MAX_LEN 20
78 #define HTS_MEAS_INTERVAL_MAX_LEN 2
79 #define HTS_MEAS_INTV_DFLT_MIN 2
80 #define HTS_MEAS_INTV_DFLT_MAX 10
87 #define HTS_CHAR_MANDATORY 0x000f
88 #define HTS_CHAR_TEM_TYPE_SUP 0x003f
89 #define HTS_CHAR_INTM_TEM_SUP 0x01c0
90 #define HTS_CHAR_MEAS_INTERVAL_SUP 0x1e00
91 #define HTS_CHAR_FULL 0x1fff
sdk_err_t hts_service_init(hts_init_t *p_hts_init)
Initialize a Health Thermometer Service instance and add in the DB.
@ HTS_TEMPERATURE_FAHRENHEIT
Indicate that temperature measurement Value Unit is fahrenheit.
Health Thermometer Service event.
@ HTS_EVT_READ_CHARACTERISTIC
The peer reads the characteristic.
@ HTS_EVT_TEM_MEAS_INDICATION_ENABLE
Indicate that temperature measurement indication has been enabled.
@ HTS_EVT_INTM_TEM_NOTIFICATION_DISABLE
Indicate that intermediate temperature notification has been disbled.
const uint8_t * p_data
Pointer to the event data.
@ HTS_MEAS_FLAG_TEM_UINTS_BIT
Bit for temperature uints.
hts_evt_type_t evt_type
The HTS event type.
uint16_t length
Length of the event data.
hts_temp_unit_t
Health Thermometer temperature unit,.
int8_t exponent
Base 10 exponent, only 8 bits.
uint16_t temp_original_value
Temperature measurement original value.
@ HTS_TEMP_TYPE_MOUTH
Temperature measurement location: mouth.
@ HTS_TEMP_TYPE_BODY
Temperature measurement location: body.
@ HTS_READ_CHAR_TEMP_TYPE
The peer reads the Temperature Type characteristic.
@ HTS_MEAS_FLAG_TEM_TYPE_BIT
Bit for temperature type.
uint16_t char_mask
Initial mask of Supported characteristics, and configured with Characteristics Mask.
@ HTS_READ_CHAR_MEAS_INTL
The peer reads the Measurement Interval characteristic.
@ HTS_MEAS_FLAG_TIME_STAMP_BIT
Bit for time stamp.
sdk_err_t hts_measurement_send(uint8_t conn_idx, hts_meas_val_t *p_meas)
Send temperature measurement if indication or notification has been enabled.
@ HTS_TEMP_TYPE_FINGER
Temperature measurement location: finger.
@ HTS_EVT_INVALID
Indicate that invalid event.
hts_temp_meas_loc_t temp_type
Initial temperature type measurement location.
prf_date_time_t hts_date_time_t
Health Thermometer Service date time type.
uint16_t meas_interval
Initial temperature measurement interval.
uint16_t min_meas_interval_sup
Initial minimum temperature measurement interval support.
@ HTS_TEMP_TYPE_RECTUM
Temperature measurement location: rectum.
@ HTS_EVT_TEM_MEAS_INDICATION_DISABLE
Indicate that temperature measurement indication has been disabled.
@ HTS_TEMPERATURE_CELCIUS
Indicate that temperature measurement Value Unit is celcius.
ieee_float32_t temp_convert_value
Temperature measurement convert value.
hts_read_characteristic_t
The parameters for HTS_EVT_READ_CHARACTERISTIC.
hts_date_time_t time_stamp
Time Stamp.
@ HTS_EVT_MEAS_INTREVAL_INDICATION_ENABLE
Indicate that measurement interval indication has been enabled.
Health Thermometer Service init stucture.
void(* hts_evt_handler_t)(hts_evt_t *p_evt)
Health Thermometer Service event handler type.
uint8_t conn_idx
The index of the connection.
@ HTS_EVT_INTM_TEM_NOTIFICATION_ENABLE
Indicate that intermediate temperature notification has been enabled.
@ HTS_EVT_MEAS_INTERVAL_INDICATION_DISABLE
Indicate that measurement interval indication has been disabled.
uint16_t sdk_err_t
SDK API result type.
SFLOAT format (IEEE-11073 32-bit FLOAT, defined as a 32-bit vlue with 24-bit mantissa and 8-bit expon...
bool time_stamp_present
Initial if Time Stamp is present.
hts_evt_handler_t evt_handler
Health Thermometer Service event handler.
The date and time structure.
@ HTS_TEMPERATURE_INTERMEDIATE
Intermediary type of temperature.
@ HTS_TEMP_TYPE_ARMPIT
Temperature measurement location: armpit.
@ HTS_TEMP_TYPE_EAR
Temperature measurement location: ear.
@ HTS_EVT_MEAS_INTERVAL_UPDATE
Indicate that measurement interval has been updated.
hts_evt_type_t
Health Thermometer Service event type.
hts_flag_bit_t
Health Thermometer Measurement flag bits.
uint16_t max_meas_interval_sup
Initial maximum temperature measurement interval support.
hts_temp_meas_loc_t temp_type
Temperature Type measurement location.
@ HTS_TEMP_TYPE_TOE
Temperature measurement location: toe.
Health Theromometer Measurement Character value structure.
Profile/Service Utilities API.
hts_temp_unit_t temperature_units
Initial if Temperature is in Fahrenheit unit, Celcius otherwise.
sdk_err_t hts_measurement_interval_send(uint8_t conn_idx)
Send temperature measurement interval if indication has been enabled.
@ HTS_TEMP_TYPE_GI_TRACT
Temperature measurement location: Gi tract.
@ HTS_TEMP_TYPE_EAR_DRUM
Temperature measurement location: ear drum.
int32_t mantissa
Mantissa, only 24 bits.
hts_temp_meas_type_t
Health Thermometer temperature measurement type.
@ HTS_TEMPERATURE_STABLE
Stable type of temperature.
hts_temp_meas_type_t temp_meas_type
Stable or intermediary type of temperature.
hts_temp_meas_loc_t
Temperature Type measurement locations.