Cordio Stack and Cordio Profiles  r2p3-02rel0
Health Thermometer Profile

Data Structures

struct  htpsCfg_t
 Configurable parameters. More...
 

Enumerations

enum  {
  HTPC_HTS_TM_HDL_IDX,
  HTPC_HTS_TM_CCC_HDL_IDX,
  HTPC_HTS_IT_HDL_IDX,
  HTPC_HTS_IT_CCC_HDL_IDX,
  HTPC_HTS_TT_HDL_IDX,
  HTPC_HTS_HDL_LIST_LEN
}
 Health Thermometer service enumeration of handle indexes of characteristics to be discovered. More...
 

Functions

void HtpcHtsDiscover (dmConnId_t connId, uint16_t *pHdlList)
 Perform service and characteristic discovery for Health Thermometer service. Parameter pHdlList must point to an array of length HTPC_HTS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More...
 
uint8_t HtpcHtsValueUpdate (uint16_t *pHdlList, attEvt_t *pMsg)
 Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length HTPC_HTS_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored. More...
 
void HtpsInit (wsfHandlerId_t handlerId, htpsCfg_t *pCfg)
 Initialize the Health Thermometer profile sensor. More...
 
void HtpsMeasStart (dmConnId_t connId, uint8_t timerEvt, uint8_t itCccIdx)
 Start periodic temperature measurement. This function starts a timer to perform periodic measurements. More...
 
void HtpsMeasStop (void)
 Stop periodic temperature measurement. More...
 
void HtpsMeasComplete (dmConnId_t connId, uint8_t tmCccIdx)
 Temperature measurement complete. More...
 
void HtpsProcMsg (wsfMsgHdr_t *pMsg)
 This function is called by the application when the periodic measurement timer expires. More...
 
void HtpsSetTmFlags (uint8_t flags)
 Set the temperature measurement flags. More...
 
void HtpsSetItFlags (uint8_t flags)
 Set the intermediate temperature flags. More...
 

Description

Enumeration Type Documentation

anonymous enum

Health Thermometer service enumeration of handle indexes of characteristics to be discovered.

Enumerator
HTPC_HTS_TM_HDL_IDX 

Temperature measurement.

HTPC_HTS_TM_CCC_HDL_IDX 

Temperature measurement CCC descriptor.

HTPC_HTS_IT_HDL_IDX 

Intermediate temperature.

HTPC_HTS_IT_CCC_HDL_IDX 

Intermediate temperature CCC descriptor.

HTPC_HTS_TT_HDL_IDX 

Temperature type.

HTPC_HTS_HDL_LIST_LEN 

Handle list length.

Definition at line 36 of file htpc_api.h.

37 {
38  HTPC_HTS_TM_HDL_IDX, /*!< \brief Temperature measurement */
39  HTPC_HTS_TM_CCC_HDL_IDX, /*!< \brief Temperature measurement CCC descriptor */
40  HTPC_HTS_IT_HDL_IDX, /*!< \brief Intermediate temperature */
41  HTPC_HTS_IT_CCC_HDL_IDX, /*!< \brief Intermediate temperature CCC descriptor */
42  HTPC_HTS_TT_HDL_IDX, /*!< \brief Temperature type */
43  HTPC_HTS_HDL_LIST_LEN /*!< \brief Handle list length */
44 };
Handle list length.
Definition: htpc_api.h:43
Temperature measurement.
Definition: htpc_api.h:38
Temperature type.
Definition: htpc_api.h:42
Intermediate temperature CCC descriptor.
Definition: htpc_api.h:41
Temperature measurement CCC descriptor.
Definition: htpc_api.h:39
Intermediate temperature.
Definition: htpc_api.h:40

Function Documentation

void HtpcHtsDiscover ( dmConnId_t  connId,
uint16_t pHdlList 
)

Perform service and characteristic discovery for Health Thermometer service. Parameter pHdlList must point to an array of length HTPC_HTS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList.

Parameters
connIdConnection identifier.
pHdlListCharacteristic handle list.
Returns
None.
uint8_t HtpcHtsValueUpdate ( uint16_t pHdlList,
attEvt_t pMsg 
)

Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length HTPC_HTS_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored.

Parameters
pHdlListCharacteristc handle list.
pMsgATT callback message.
Returns
ATT_SUCCESS if handle is found, ATT_ERR_NOT_FOUND otherwise.
void HtpsInit ( wsfHandlerId_t  handlerId,
htpsCfg_t pCfg 
)

Initialize the Health Thermometer profile sensor.

Parameters
handlerIdWSF handler ID of the application using this service.
pCfgConfigurable parameters.
Returns
None.
void HtpsMeasStart ( dmConnId_t  connId,
uint8_t  timerEvt,
uint8_t  itCccIdx 
)

Start periodic temperature measurement. This function starts a timer to perform periodic measurements.

Parameters
connIdDM connection identifier.
timerEvtWSF event designated by the application for the timer.
itCccIdxIndex of intermediate temperature CCC descriptor in CCC descriptor handle table.
Returns
None.
void HtpsMeasStop ( void  )

Stop periodic temperature measurement.

Returns
None.
void HtpsMeasComplete ( dmConnId_t  connId,
uint8_t  tmCccIdx 
)

Temperature measurement complete.

Parameters
connIdDM connection identifier.
tmCccIdxIndex of temperature measurement CCC descriptor in CCC descriptor handle table.
Returns
None.
void HtpsProcMsg ( wsfMsgHdr_t pMsg)

This function is called by the application when the periodic measurement timer expires.

Parameters
pMsgEvent message.
Returns
None.
void HtpsSetTmFlags ( uint8_t  flags)

Set the temperature measurement flags.

Parameters
flagsTemperature measurement flags.
Returns
None.
void HtpsSetItFlags ( uint8_t  flags)

Set the intermediate temperature flags.

Parameters
flagsIntermediate temperature flags.
Returns
None.