Health Thermometer Profile

3 posts / 0 new
Last post
prasanth.velliy...
Offline
Last seen:1 year 11 months ago
Joined:2016-02-18 12:18
Health Thermometer Profile

/*************************************************************************************
DOCUMENT : AN-B-029_V1.0
FILE : sample128_After section 7.3.6
PROFILE : Health Thermometer Profile
*************************************************************************************/

Q1 : what is the purpose of these two functions in htpt / htpc profile ?

void htpc_unpack_temp(struct htpc_env_tag *htpc_env, uint8_t *packed_temp,
uint8_t length, uint8_t flag_stable_meas)

uint8_t htpt_pack_temp_value(uint8_t *packed_temp, struct htp_temp_meas temp_meas)

Q2 : Incase if i am using my own Temperature sensor in this profile to read temperature data (using the function Read_sensor(); ) where i have to put this function, Please provide detailed information ..
// Function to Read data from temperature sensor
Read_sensor()
{
uint8_t sensor_data[16] ;

return sensor_data; // sensor_data holds 16 bit temperature data
}

Thank you......

Device:
MT_dialog
Offline
Last seen:3 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi psaranth.velliyangriri,

Hi psaranth.velliyangriri,

The data you get when operating the health thermometer profile from the Temperature measurement characteristic or the intermediate are packed with different information (flags, indicating the time stamp and the temperature type), those functions perform the packing and the unpacking of those data, for more information regarding this please check the HTP profile specification.

随机生成的数据存储的变量is the temp_value of the app_ht_env structure variable, in the app_ht_timer_handler() this value is updated with a random generated offset.

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 11 months ago
Joined:2016-02-18 12:18
thankyou ...

thankyou ...

Topic locked