Cordio Stack and Cordio Profiles  r2p3-02rel0
Alert Notification Profile

Enumerations

enum  {
  ANPC_ANS_SNAC_HDL_IDX,
  ANPC_ANS_NA_HDL_IDX,
  ANPC_ANS_NA_CCC_HDL_IDX,
  ANPC_ANS_SUAC_HDL_IDX,
  ANPC_ANS_UAS_HDL_IDX,
  ANPC_ANS_UAS_CCC_HDL_IDX,
  ANPC_ANS_ANCP_HDL_IDX,
  ANPC_ANS_HDL_LIST_LEN
}
 Enumeration of handle indexes of characteristics to be discovered. More...
 

Functions

void AnpcAnsDiscover (dmConnId_t connId, uint16_t *pHdlList)
 Perform service and characteristic discovery for Alert Notification service. Parameter pHdlList must point to an array of length ANPC_ANS_HDL_LIST_LEN. If discovery is successful the handles of discovered characteristics and descriptors will be set in pHdlList. More...
 
void AnpcAnsControl (dmConnId_t connId, uint16_t handle, uint8_t command, uint8_t catId)
 Send a command to the alert notification control point. More...
 
uint8_t AnpcAnsValueUpdate (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 ANPC_ANS_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...
 

Description

Enumeration Type Documentation

anonymous enum

Enumeration of handle indexes of characteristics to be discovered.

Enumerator
ANPC_ANS_SNAC_HDL_IDX 

Supported new alert category.

ANPC_ANS_NA_HDL_IDX 

New alert.

ANPC_ANS_NA_CCC_HDL_IDX 

New alert CCC descriptor.

ANPC_ANS_SUAC_HDL_IDX 

Supported unread alert category.

ANPC_ANS_UAS_HDL_IDX 

Unread alert status.

ANPC_ANS_UAS_CCC_HDL_IDX 

Unread alert status CCC descriptor.

ANPC_ANS_ANCP_HDL_IDX 

Alert notification control point.

ANPC_ANS_HDL_LIST_LEN 

Handle list length.

Definition at line 36 of file anpc_api.h.

37 {
38  ANPC_ANS_SNAC_HDL_IDX, /*!< \brief Supported new alert category */
39  ANPC_ANS_NA_HDL_IDX, /*!< \brief New alert */
40  ANPC_ANS_NA_CCC_HDL_IDX, /*!< \brief New alert CCC descriptor */
41  ANPC_ANS_SUAC_HDL_IDX, /*!< \brief Supported unread alert category */
42  ANPC_ANS_UAS_HDL_IDX, /*!< \brief Unread alert status */
43  ANPC_ANS_UAS_CCC_HDL_IDX, /*!< \brief Unread alert status CCC descriptor */
44  ANPC_ANS_ANCP_HDL_IDX, /*!< \brief Alert notification control point */
45  ANPC_ANS_HDL_LIST_LEN /*!< \brief Handle list length */
46 };
Supported unread alert category.
Definition: anpc_api.h:41
Handle list length.
Definition: anpc_api.h:45
Unread alert status CCC descriptor.
Definition: anpc_api.h:43
Alert notification control point.
Definition: anpc_api.h:44
Supported new alert category.
Definition: anpc_api.h:38
New alert.
Definition: anpc_api.h:39
Unread alert status.
Definition: anpc_api.h:42
New alert CCC descriptor.
Definition: anpc_api.h:40

Function Documentation

void AnpcAnsDiscover ( dmConnId_t  connId,
uint16_t pHdlList 
)

Perform service and characteristic discovery for Alert Notification service. Parameter pHdlList must point to an array of length ANPC_ANS_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.
void AnpcAnsControl ( dmConnId_t  connId,
uint16_t  handle,
uint8_t  command,
uint8_t  catId 
)

Send a command to the alert notification control point.

Parameters
connIdConnection identifier.
handleAttribute handle.
commandControl point command.
catIdAlert category ID.
Returns
None.
uint8_t AnpcAnsValueUpdate ( 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 ANPC_ANS_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.