![]() |
Cordio Stack and Cordio Profiles
r2p3-02rel0
|
Data Structures | |
| struct | glpcFilter_t |
| Glucose service RACP filter type. More... | |
| struct | glpsGlm_t |
| Glucose measurement structure. More... | |
| struct | glpsGlmc_t |
| Glucose measurement context structure. More... | |
| struct | glpsRec_t |
| Glucose measurement record. More... | |
Macros | |
| #define | GLP_ALL_SUPPORTED_FEATURES 0x000F |
| All supported features of the glucose profile. | |
| #define | GLPS_RACP_MIN_WRITE_LEN 2 |
| Minimum RACP write length. | |
| #define | GLPS_RACP_RSP_LEN 4 |
| RACP response length. | |
| #define | GLPS_RACP_NUM_REC_RSP_LEN 4 |
| Glucose RACP number of stored records response length. | |
| #define | GLPS_OPERAND_MAX ((CH_RACP_GLS_FILTER_TIME_LEN * 2) + 1) |
| RACP operand maximum length. | |
Enumerations | |
| enum | { GLPC_GLS_GLM_HDL_IDX, GLPC_GLS_GLM_CCC_HDL_IDX, GLPC_GLS_GLMC_HDL_IDX, GLPC_GLS_GLMC_CCC_HDL_IDX, GLPC_GLS_GLF_HDL_IDX, GLPC_GLS_RACP_HDL_IDX, GLPC_GLS_RACP_CCC_HDL_IDX, GLPC_GLS_HDL_LIST_LEN } |
| Glucose service enumeration of handle indexes of characteristics to be discovered. More... | |
Functions | |
| void | GlpcGlsDiscover (dmConnId_t connId, uint16_t *pHdlList) |
| Perform service and characteristic discovery for Glucose service. Parameter pHdlList must point to an array of length GLPC_GLS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More... | |
| uint8_t | GlpcGlsValueUpdate (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 GLPC_GLS_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 | GlpcGlsRacpSend (dmConnId_t connId, uint16_t handle, uint8_t opcode, uint8_t oper, glpcFilter_t *pFilter) |
| Send a command to the glucose service record access control point. More... | |
| void | GlpcGlsSetLastSeqNum (uint16_t seqNum) |
| Set the last received glucose measurement sequence number. More... | |
| uint16_t | GlpcGlsGetLastSeqNum (void) |
| Get the last received glucose measurement sequence number. More... | |
| void | GlpsInit (void) |
| Initialize the Glucose profile sensor. More... | |
| void | GlpsProcMsg (wsfMsgHdr_t *pMsg) |
| This function is called by the application when a message that requires processing by the glucose profile sensor is received. More... | |
| void | GlpsBtn (dmConnId_t connId, uint8_t btn) |
| Handle a button press. More... | |
| uint8_t | GlpsRacpWriteCback (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 glucose service record access control point. Use this function as a parameter to SvcGlsCbackRegister(). More... | |
| void | GlpsSetFeature (uint16_t feature) |
| Set the supported features of the glucose sensor. More... | |
| void | GlpsSetCccIdx (uint8_t glmCccIdx, uint8_t glmcCccIdx, uint8_t racpCccIdx) |
| Set the CCCD index used by the application for glucose service characteristics. More... | |
| void | glpsDbInit (void) |
| Initialize the glucose record database. More... | |
| uint8_t | glpsDbGetNextRecord (uint8_t oper, uint8_t *pFilter, glpsRec_t *pCurrRec, glpsRec_t **pRec) |
| Get the next record that matches the given filter parameters that follows the given current record. More... | |
| uint8_t | glpsDbDeleteRecords (uint8_t oper, uint8_t *pFilter) |
| Delete records that match the given filter parameters. More... | |
| uint8_t | glpsDbGetNumRecords (uint8_t oper, uint8_t *pFilter, uint8_t *pNumRec) |
| Get the number of records matching the filter parameters. More... | |
| void | glpsDbGenerateRecord (void) |
| Generate a new record. More... | |
| void | glpsDbToggleMedicationUnits (void) |
| For conformance testing only. Toggle the sample data record number 2's medication quantity unit flag between Kilograms and Liters. Also modifies quantity. More... | |
| anonymous enum |
Glucose service enumeration of handle indexes of characteristics to be discovered.
Definition at line 36 of file glpc_api.h.
| void GlpcGlsDiscover | ( | dmConnId_t | connId, |
| uint16_t * | pHdlList | ||
| ) |
Perform service and characteristic discovery for Glucose service. Parameter pHdlList must point to an array of length GLPC_GLS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList.
| connId | Connection identifier. |
| pHdlList | Characteristic handle list. |
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length GLPC_GLS_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.
| pHdlList | Characteristic handle list. |
| pMsg | ATT callback message. |
| void GlpcGlsRacpSend | ( | dmConnId_t | connId, |
| uint16_t | handle, | ||
| uint8_t | opcode, | ||
| uint8_t | oper, | ||
| glpcFilter_t * | pFilter | ||
| ) |
Send a command to the glucose service record access control point.
| connId | Connection identifier. |
| handle | Attribute handle. |
| opcode | Command opcode. |
| oper | Command operator or 0 if no operator required. |
| pFilter | Command filter parameters or NULL of no parameters required. |
| void GlpcGlsSetLastSeqNum | ( | uint16_t | seqNum | ) |
Set the last received glucose measurement sequence number.
| seqNum | Glucose measurement sequence number. |
| uint16_t GlpcGlsGetLastSeqNum | ( | void | ) |
Get the last received glucose measurement sequence number.
| void GlpsInit | ( | void | ) |
Initialize the Glucose profile sensor.
| void GlpsProcMsg | ( | wsfMsgHdr_t * | pMsg | ) |
This function is called by the application when a message that requires processing by the glucose profile sensor is received.
| pMsg | Event message. |
| void GlpsBtn | ( | dmConnId_t | connId, |
| uint8_t | btn | ||
| ) |
Handle a button press.
| connId | Connection identifier. |
| btn | Button press. |
| uint8_t GlpsRacpWriteCback | ( | 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 glucose service record access control point. Use this function as a parameter to SvcGlsCbackRegister().
| connId | DM connection identifier. |
| handle | ATT handle. |
| operation | ATT operation. |
| offset | Write offset. |
| len | Write length. |
| pValue | Value to write. |
| pAttr | Attribute to write. |
| void GlpsSetFeature | ( | uint16_t | feature | ) |
Set the supported features of the glucose sensor.
| feature | Feature bitmask. |
Set the CCCD index used by the application for glucose service characteristics.
| glmCccIdx | Glucose measurement CCCD index. |
| glmcCccIdx | Glucose measurement context CCCD index. |
| racpCccIdx | Record access control point CCCD index. |
| void glpsDbInit | ( | void | ) |
Initialize the glucose record database.
| uint8_t glpsDbGetNextRecord | ( | uint8_t | oper, |
| uint8_t * | pFilter, | ||
| glpsRec_t * | pCurrRec, | ||
| glpsRec_t ** | pRec | ||
| ) |
Get the next record that matches the given filter parameters that follows the given current record.
| oper | Operator. |
| pFilter | Glucose service RACP filter parameters. |
| pCurrRec | Pointer to current record. |
| pRec | Return pointer to next record, if found. |
Delete records that match the given filter parameters.
| oper | Operator. |
| pFilter | Glucose service RACP filter parameters. |
Get the number of records matching the filter parameters.
| oper | Operator. |
| pFilter | Glucose service RACP filter parameters. |
| pNumRec | Returns number of records which match filter parameters. |
| void glpsDbGenerateRecord | ( | void | ) |
Generate a new record.
| void glpsDbToggleMedicationUnits | ( | void | ) |
For conformance testing only. Toggle the sample data record number 2's medication quantity unit flag between Kilograms and Liters. Also modifies quantity.