This group includes all HTPT APIs; Database Creation, Send Temperature, ...
Functions | |
at_ble_status_t | at_ble_htpt_create_db (at_ble_htpt_db_config_flag features, at_ble_htpt_temp_type temp_type, uint16_t valid_range_min, uint16_t valid_range_max, uint16_t meas_intv, at_ble_htpt_sec_level sec_lvl, at_ble_handle_t *start_handle) |
This API message shall be used to add an instance of the Health Thermometer service into the database. More... | |
at_ble_status_t | at_ble_htpt_enable (at_ble_handle_t conn_handle, at_ble_htpt_ntf_ind_cfg ntf_ind_cfg) |
This API message can be used after the connection with a peer device has been established in order to restore known device bond data, in response a AT_BLE_HTPT_ENABLE_RSP event should be received. More... | |
at_ble_status_t | at_ble_htpt_meas_intv_update (uint16_t meas_intv) |
This message is used by the application to order the HTPT profile to generate an indication (if enabled) of the Measurement Interval Char. More... | |
at_ble_status_t | at_ble_htpt_temp_send (uint32_t temp, at_ble_prf_date_time_t *time_stamp, at_ble_htpt_temp_flags flags, at_ble_htpt_temp_type type, bool flag_stable_meas) |
This message is used by the application (which handles the temperature device driver and measurements) to send a temperature measurement through the Thermometer role. More... | |
at_ble_status_t at_ble_htpt_create_db | ( | at_ble_htpt_db_config_flag | features, |
at_ble_htpt_temp_type | temp_type, | ||
uint16_t | valid_range_min, | ||
uint16_t | valid_range_max, | ||
uint16_t | meas_intv, | ||
at_ble_htpt_sec_level | sec_lvl, | ||
at_ble_handle_t * | start_handle | ||
) |
This API message shall be used to add an instance of the Health Thermometer service into the database.
This should be done during the initialization phase of the device , this is a blocking call and no events will be returned
Note : allocated profile will be freed if device is reset or configuration changed Device Configuration APIs
[in] | features | Indicate if optional features are supported or not, see at_ble_htpt_db_config_flag |
[in] | temp_type | type of temperature as defined in org.bluetooth.characteristic.temperature_type |
[in] | valid_range_min | Minimal measurement interval value |
[in] | valid_range_max | Maximal measurement interval value |
[in] | meas_intv | Latest known value for measurement interval |
[in] | sec_lvl | can be : Disable(0) , Enable(1), Unauth(2), Auth(3) see at_ble_htpt_sec_level |
[out] | start_handle | : handle of health thermometer service if creation succeeded |
Referenced by htp_init().
at_ble_status_t at_ble_htpt_enable | ( | at_ble_handle_t | conn_handle, |
at_ble_htpt_ntf_ind_cfg | ntf_ind_cfg | ||
) |
This API message can be used after the connection with a peer device has been established in order to restore known device bond data, in response a AT_BLE_HTPT_ENABLE_RSP event should be received.
[in] | conn_handle | handle of the connection |
[in] | ntf_ind_cfg | Enable notifications or indications for profile characteristics see at_ble_htpt_ntf_ind_cfg |
Referenced by app_connected_event_handler(), app_encryption_status_changed_handler(), and app_pair_done_event_handler().
at_ble_status_t at_ble_htpt_meas_intv_update | ( | uint16_t | meas_intv | ) |
This message is used by the application to order the HTPT profile to generate an indication (if enabled) of the Measurement Interval Char.
This can be done as the application desires, at each connection, or if the measurement interval value has been modified locally (interface for this is not provided since a normal thermometer would have very few configurable UI elements and configuration should be done through Collector) In response a AT_BLE_HTPT_MEAS_INTV_UPD_RSP event should be received
[in] | meas_intv | Measurement Interval value |
at_ble_status_t at_ble_htpt_temp_send | ( | uint32_t | temp, |
at_ble_prf_date_time_t * | time_stamp, | ||
at_ble_htpt_temp_flags | flags, | ||
at_ble_htpt_temp_type | type, | ||
bool | flag_stable_meas | ||
) |
This message is used by the application (which handles the temperature device driver and measurements) to send a temperature measurement through the Thermometer role.
In response a AT_BLE_HTPT_TEMP_SEND_CFM event should be received
[in] | temp | temperature value |
[in] | time_stamp | The time of reading according to the format defined in at_ble_prf_date_time_t |
[in] | flags | temp flag see at_ble_htpt_temp_flags |
[in] | type | temp type see at_ble_htpt_temp_type |
[in] | flag_stable_meas | stable or intermediate type of temperature (True stable meas, else false), intermediate type is used for display purposes while the measurement is in progress |
Referenced by htp_temperature_send().