Go to the documentation of this file.
65 #include "custom_config.h"
74 #define HTS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
75 10 : CFG_MAX_CONNECTIONS)
76 #define HTS_TEM_MEAS_MAX_LEN 20
77 #define HTS_TEM_TYPE_MAX_LEN 1
78 #define HTS_INTM_TEM_MAX_LEN 20
79 #define HTS_MEAS_INTERVAL_MAX_LEN 2
80 #define HTS_MEAS_INTV_DFLT_MIN 2
81 #define HTS_MEAS_INTV_DFLT_MAX 10
88 #define HTS_CHAR_MANDATORY 0x000f
89 #define HTS_CHAR_TEM_TYPE_SUP 0x003f
90 #define HTS_CHAR_INTM_TEM_SUP 0x01c0
91 #define HTS_CHAR_MEAS_INTERVAL_SUP 0x1e00
92 #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
Definition: hts.h:118
Health Thermometer Service event.
Definition: hts.h:164
@ HTS_EVT_READ_CHARACTERISTIC
Definition: hts.h:111
@ HTS_EVT_TEM_MEAS_INDICATION_ENABLE
Definition: hts.h:104
@ HTS_EVT_INTM_TEM_NOTIFICATION_DISABLE
Definition: hts.h:107
const uint8_t * p_data
Definition: hts.h:167
@ HTS_MEAS_FLAG_TEM_UINTS_BIT
Definition: hts.h:131
hts_evt_type_t evt_type
Definition: hts.h:165
uint16_t length
Definition: hts.h:168
hts_temp_unit_t
Health Thermometer temperature unit,.
Definition: hts.h:116
int8_t exponent
Definition: hts.h:190
uint16_t temp_original_value
Definition: hts.h:198
@ HTS_TEMP_TYPE_MOUTH
Definition: hts.h:144
@ HTS_TEMP_TYPE_BODY
Definition: hts.h:140
@ HTS_READ_CHAR_TEMP_TYPE
Definition: hts.h:153
@ HTS_MEAS_FLAG_TEM_TYPE_BIT
Definition: hts.h:133
uint16_t char_mask
Definition: hts.h:208
@ HTS_READ_CHAR_MEAS_INTL
Definition: hts.h:154
@ HTS_MEAS_FLAG_TIME_STAMP_BIT
Definition: hts.h:132
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
Definition: hts.h:142
@ HTS_EVT_INVALID
Definition: hts.h:103
hts_temp_meas_loc_t temp_type
Definition: hts.h:211
prf_date_time_t hts_date_time_t
Health Thermometer Service date time type.
Definition: hts.h:180
uint16_t meas_interval
Definition: hts.h:212
uint16_t min_meas_interval_sup
Definition: hts.h:213
@ HTS_TEMP_TYPE_RECTUM
Definition: hts.h:145
@ HTS_EVT_TEM_MEAS_INDICATION_DISABLE
Definition: hts.h:105
@ HTS_TEMPERATURE_CELCIUS
Definition: hts.h:117
ieee_float32_t temp_convert_value
Definition: hts.h:199
hts_read_characteristic_t
The parameters for HTS_EVT_READ_CHARACTERISTIC.
Definition: hts.h:152
hts_date_time_t time_stamp
Definition: hts.h:200
@ HTS_EVT_MEAS_INTREVAL_INDICATION_ENABLE
Definition: hts.h:108
Health Thermometer Service init stucture. This contains all option and data needed for initialization...
Definition: hts.h:206
void(* hts_evt_handler_t)(hts_evt_t *p_evt)
Health Thermometer Service event handler type.
Definition: hts.h:177
uint8_t conn_idx
Definition: hts.h:166
@ HTS_EVT_INTM_TEM_NOTIFICATION_ENABLE
Definition: hts.h:106
@ HTS_EVT_MEAS_INTERVAL_INDICATION_DISABLE
Definition: hts.h:109
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
SFLOAT format (IEEE-11073 32-bit FLOAT, defined as a 32-bit vlue with 24-bit mantissa and 8-bit expon...
Definition: hts.h:189
bool time_stamp_present
Definition: hts.h:210
hts_evt_handler_t evt_handler
Definition: hts.h:207
The date and time structure. The packed size is 7 bytes.
Definition: ble_prf_types.h:101
@ HTS_TEMPERATURE_INTERMEDIATE
Definition: hts.h:125
@ HTS_TEMP_TYPE_ARMPIT
Definition: hts.h:139
@ HTS_TEMP_TYPE_EAR
Definition: hts.h:141
@ HTS_EVT_MEAS_INTERVAL_UPDATE
Definition: hts.h:110
hts_evt_type_t
Health Thermometer Service event type.
Definition: hts.h:102
hts_flag_bit_t
Health Thermometer Measurement flag bits.
Definition: hts.h:130
uint16_t max_meas_interval_sup
Definition: hts.h:214
hts_temp_meas_loc_t temp_type
Definition: hts.h:201
@ HTS_TEMP_TYPE_TOE
Definition: hts.h:146
Health Theromometer Measurement Character value structure.
Definition: hts.h:196
Profile/Service Utilities API.
hts_temp_unit_t temperature_units
Definition: hts.h:209
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
Definition: hts.h:143
@ HTS_TEMP_TYPE_EAR_DRUM
Definition: hts.h:147
int32_t mantissa
Definition: hts.h:191
hts_temp_meas_type_t
Health Thermometer temperature measurement type.
Definition: hts.h:123
@ HTS_TEMPERATURE_STABLE
Definition: hts.h:124
hts_temp_meas_type_t temp_meas_type
Definition: hts.h:197
hts_temp_meas_loc_t
Temperature Type measurement locations.
Definition: hts.h:138