Cordio Stack and Cordio Profiles  r2p3-02rel0
Pulse Oximeter Profile

Data Structures

struct  plxpsCfg_t
 Configurable parameters. More...
 
struct  plxpsRec_t
 Pulse Oximeter measurement record. More...
 

Macros

#define PLXPS_RACP_MIN_WRITE_LEN   2
 Minimum RACP write length.
 
#define PLXPS_RACP_RSP_LEN   4
 RACP response length.
 
#define PLXPS_RACP_NUM_REC_RSP_LEN   4
 Pulse Oximeter RACP number of stored records response length.
 
#define PLXPS_OPERAND_MAX   ((CH_RACP_GLS_FILTER_TIME_LEN * 2) + 1)
 RACP operand maximum length.
 

Typedefs

typedef appPlxCm_t plxpCm_t
 Pulse Oximeter continuous measurement structure.
 
typedef appPlxScm_t plxpScm_t
 Pulse Oximeter spot check measurement structure.
 

Enumerations

enum  {
  PLXPC_PLXS_PLXSC_HDL_IDX,
  PLXPC_PLXS_PLXSC_CCC_HDL_IDX,
  PLXPC_PLXS_PLXC_HDL_IDX,
  PLXPC_PLXS_PLXC_CCC_HDL_IDX,
  PLXPC_PLXS_PLXF_HDL_IDX,
  PLXPC_PLXS_RACP_HDL_IDX,
  PLXPC_PLXS_RACP_CCC_HDL_IDX,
  PLXPC_PLXS_HDL_LIST_LEN
}
 Pulse Oximeter service enumeration of handle indexes of characteristics to be discovered. More...
 

Functions

void PlxpcPlxsDiscover (dmConnId_t connId, uint16_t *pHdlList)
 Perform service and characteristic discovery for Pulse Oximeter service. Parameter pHdlList must point to an array of length PLXPC_PLXS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More...
 
uint8_t PlxpcPlxsValueUpdate (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 PLXPC_PLXS_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 PlxpcPlxsRacpSend (dmConnId_t connId, uint16_t handle, uint8_t opcode, uint8_t oper)
 Send a command to the pulse oximeter service record access control point. More...
 
void PlxpsInit (wsfHandlerId_t handlerId, plxpsCfg_t *pCfg)
 Initialize the Pulse Oximeter profile sensor. More...
 
void PlxpsProcMsg (wsfMsgHdr_t *pMsg)
 This function is called by the application when a message that requires processing by the pulse oximeter profile sensor is received. More...
 
void PlxpsBtn (dmConnId_t connId, uint8_t btn)
 Handle a button press. More...
 
uint8_t PlxpsWriteCback (dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr)
 ATTS write callback for pulse oximeter service. More...
 
void PlxpsSetFeature (uint16_t feature, uint16_t measStatus, uint32_t sensorStatus)
 Set the supported features of the pulse oximeter sensor. More...
 
void PlxpsSetCccIdx (uint8_t plxscCccIdx, uint8_t plxcCccIdx, uint8_t racpCccIdx)
 Set the CCCD index used by the application for pulse oximeter service characteristics. More...
 
void PlxpsMeasStart (dmConnId_t connId, uint8_t timerEvt, uint8_t plxmCccIdx)
 Start periodic pulse oximeter measurement. This function starts a timer to perform periodic measurements. More...
 
void PlxpsMeasStop (void)
 Stop periodic pulse oximeter measurement. More...
 
void plxpsSendSpotCheckMeas (dmConnId_t connId, plxpScm_t *pMeas)
 Send a spot check measurement indication. More...
 
void plxpsSendContinuousMeas (dmConnId_t connId, plxpCm_t *pMeas)
 Send a Continuous measurement notification. More...
 
void plxpsDbInit (void)
 Initialize the pulse oximeter record database. More...
 
uint8_t plxpsDbGetNextRecord (uint8_t oper, plxpsRec_t *pCurrRec, plxpsRec_t **pRec)
 Get the next record that matches the given filter parameters that follows the given current record. More...
 
uint8_t plxpsDbDeleteRecords (uint8_t oper)
 Delete records that match the given filter parameters. More...
 
uint8_t plxpsDbGetNumRecords (uint8_t oper, uint8_t *pNumRec)
 Get the number of records matching the filter parameters. More...
 
void plxpsDbGenerateRecord (void)
 Generate a new record. More...
 

Description

Enumeration Type Documentation

anonymous enum

Pulse Oximeter service enumeration of handle indexes of characteristics to be discovered.

Enumerator
PLXPC_PLXS_PLXSC_HDL_IDX 

Pulse Oximeter Spot Check measurement.

PLXPC_PLXS_PLXSC_CCC_HDL_IDX 

Pulse Oximeter Spot Check measurement CCC descriptor.

PLXPC_PLXS_PLXC_HDL_IDX 

Pulse Oximeter Continuous measurement.

PLXPC_PLXS_PLXC_CCC_HDL_IDX 

Pulse Oximeter Continuous measurement CCC descriptor.

PLXPC_PLXS_PLXF_HDL_IDX 

Pulse Oximeter features.

PLXPC_PLXS_RACP_HDL_IDX 

Record access control point.

PLXPC_PLXS_RACP_CCC_HDL_IDX 

Record access control point CCC descriptor.

PLXPC_PLXS_HDL_LIST_LEN 

Handle list length.

Definition at line 36 of file plxpc_api.h.

37 {
38  PLXPC_PLXS_PLXSC_HDL_IDX, /*!< \brief Pulse Oximeter Spot Check measurement */
39  PLXPC_PLXS_PLXSC_CCC_HDL_IDX, /*!< \brief Pulse Oximeter Spot Check measurement CCC descriptor */
40  PLXPC_PLXS_PLXC_HDL_IDX, /*!< \brief Pulse Oximeter Continuous measurement */
41  PLXPC_PLXS_PLXC_CCC_HDL_IDX, /*!< \brief Pulse Oximeter Continuous measurement CCC descriptor */
42  PLXPC_PLXS_PLXF_HDL_IDX, /*!< \brief Pulse Oximeter features */
43  PLXPC_PLXS_RACP_HDL_IDX, /*!< \brief Record access control point */
44  PLXPC_PLXS_RACP_CCC_HDL_IDX, /*!< \brief Record access control point CCC descriptor */
45  PLXPC_PLXS_HDL_LIST_LEN /*!< \brief Handle list length */
46 };
Pulse Oximeter Continuous measurement.
Definition: plxpc_api.h:40
Record access control point.
Definition: plxpc_api.h:43
Record access control point CCC descriptor.
Definition: plxpc_api.h:44
Handle list length.
Definition: plxpc_api.h:45
Pulse Oximeter Spot Check measurement.
Definition: plxpc_api.h:38
Pulse Oximeter Spot Check measurement CCC descriptor.
Definition: plxpc_api.h:39
Pulse Oximeter Continuous measurement CCC descriptor.
Definition: plxpc_api.h:41
Pulse Oximeter features.
Definition: plxpc_api.h:42

Function Documentation

void PlxpcPlxsDiscover ( dmConnId_t  connId,
uint16_t pHdlList 
)

Perform service and characteristic discovery for Pulse Oximeter service. Parameter pHdlList must point to an array of length PLXPC_PLXS_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 PlxpcPlxsValueUpdate ( 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 PLXPC_PLXS_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
pHdlListCharacteristic handle list.
pMsgATT callback message.
Returns
ATT_SUCCESS if handle is found, ATT_ERR_NOT_FOUND otherwise.
void PlxpcPlxsRacpSend ( dmConnId_t  connId,
uint16_t  handle,
uint8_t  opcode,
uint8_t  oper 
)

Send a command to the pulse oximeter service record access control point.

Parameters
connIdConnection identifier.
handleAttribute handle.
opcodeCommand opcode.
operCommand operator or 0 if no operator required.
Returns
None.
void PlxpsInit ( wsfHandlerId_t  handlerId,
plxpsCfg_t pCfg 
)

Initialize the Pulse Oximeter profile sensor.

Parameters
handlerIdDM connection identifier.
pCfgConfiguration parameters.
Returns
None.
void PlxpsProcMsg ( wsfMsgHdr_t pMsg)

This function is called by the application when a message that requires processing by the pulse oximeter profile sensor is received.

Parameters
pMsgEvent message.
Returns
None.
void PlxpsBtn ( dmConnId_t  connId,
uint8_t  btn 
)

Handle a button press.

Parameters
connIdConnection identifier.
btnButton press.
Returns
None.
uint8_t PlxpsWriteCback ( dmConnId_t  connId,
uint16_t  handle,
uint8_t  operation,
uint16_t  offset,
uint16_t  len,
uint8_t pValue,
attsAttr_t pAttr 
)

ATTS write callback for pulse oximeter service.

Parameters
connIdDM connection identifier.
handleATT handle.
operationATT operation.
offsetWrite offset.
lenWrite length.
pValueValue to write.
pAttrAttribute to write.
Returns
ATT status.
void PlxpsSetFeature ( uint16_t  feature,
uint16_t  measStatus,
uint32_t  sensorStatus 
)

Set the supported features of the pulse oximeter sensor.

Parameters
featureFeature bitmask.
measStatusMeasurement status.
sensorStatusSensor status.
Returns
None.
void PlxpsSetCccIdx ( uint8_t  plxscCccIdx,
uint8_t  plxcCccIdx,
uint8_t  racpCccIdx 
)

Set the CCCD index used by the application for pulse oximeter service characteristics.

Parameters
plxscCccIdxPulse Oximeter spot check CCCD index.
plxcCccIdxPulse Oximeter continuous CCCD index.
racpCccIdxRecord access control point CCCD index.
Returns
None.
void PlxpsMeasStart ( dmConnId_t  connId,
uint8_t  timerEvt,
uint8_t  plxmCccIdx 
)

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

Parameters
connIdDM connection identifier.
timerEvtWSF event designated by the application for the timer.
plxmCccIdxIndex of pulse oximeter CCC descriptor in CCC descriptor handle table.
Returns
None.
void PlxpsMeasStop ( void  )

Stop periodic pulse oximeter measurement.

Returns
None.
void plxpsSendSpotCheckMeas ( dmConnId_t  connId,
plxpScm_t pMeas 
)

Send a spot check measurement indication.

Parameters
connIdConnection ID.
pMeasPointer to pulse oximeter spot check measurement.
Returns
None.
void plxpsSendContinuousMeas ( dmConnId_t  connId,
plxpCm_t pMeas 
)

Send a Continuous measurement notification.

Parameters
connIdConnection ID.
pMeasPointer to Pulse Oximiter continuous measurement.
Returns
None.
void plxpsDbInit ( void  )

Initialize the pulse oximeter record database.

Returns
None.
uint8_t plxpsDbGetNextRecord ( uint8_t  oper,
plxpsRec_t pCurrRec,
plxpsRec_t **  pRec 
)

Get the next record that matches the given filter parameters that follows the given current record.

Parameters
operOperator.
pCurrRecPointer to current record.
pRecReturn pointer to next record, if found.
Returns
CH_RACP_RSP_SUCCESS if a record is found, otherwise an error status is returned.
uint8_t plxpsDbDeleteRecords ( uint8_t  oper)

Delete records that match the given filter parameters.

Parameters
operOperator.
Returns
CH_RACP_RSP_SUCCESS if records deleted, otherwise an error status is returned.
uint8_t plxpsDbGetNumRecords ( uint8_t  oper,
uint8_t pNumRec 
)

Get the number of records matching the filter parameters.

Parameters
operOperator.
pNumRecReturns number of records which match filter parameters.
Returns
RACP status.
void plxpsDbGenerateRecord ( void  )

Generate a new record.

Returns
None.