+ Collaboration diagram for Functions:

Functions

sdk_err_t ancs_c_client_init (ancs_c_evt_handler_t evt_handler)
 Initialize ANCS structure of handle. More...
 
sdk_err_t ancs_c_discovery_service (uint8_t conn_idx)
 To access phone's all services about ANCS. More...
 
sdk_err_t ancs_c_ntf_source_notify_set (uint8_t conn_idx, bool is_enable)
 enable ancs notification source CCCD. More...
 
sdk_err_t ancs_c_data_source_notify_set (uint8_t conn_idx, bool is_enable)
 enable ancs data source CCCD. More...
 
sdk_err_t ancs_c_write_control_point (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
 This function implements writing commands to control points. More...
 
void ancs_notify_attr_get (int uid, char noti_attr)
 Get notification attribute. More...
 
void ancs_action_perform (int uid, int action)
 ancs perform action
More...
 
int ancs_get_uid (void)
 get ancs phone call UID More...
 
void ancs_decode_notification_source (uint8_t *p_data, uint16_t length)
 Decode notification source message. More...
 
void ancs_decode_data_source (uint8_t *p_data, uint16_t length)
 Decode data source message. More...
 

Detailed Description

Function Documentation

◆ ancs_action_perform()

void ancs_action_perform ( int  uid,
int  action 
)

ancs perform action

Parameters
[in]uidThe UID of notify message
[in]actionThe action status defined by specification

◆ ancs_c_client_init()

sdk_err_t ancs_c_client_init ( ancs_c_evt_handler_t  evt_handler)

Initialize ANCS structure of handle.

◆ ancs_c_data_source_notify_set()

sdk_err_t ancs_c_data_source_notify_set ( uint8_t  conn_idx,
bool  is_enable 
)

enable ancs data source CCCD.

Parameters
[in]conn_idxConnection index.
[in]is_enableStart or stop the notification.
Returns
success or not.

◆ ancs_c_discovery_service()

sdk_err_t ancs_c_discovery_service ( uint8_t  conn_idx)

To access phone's all services about ANCS.

Parameters
[in]conn_idxConnection index.

◆ ancs_c_ntf_source_notify_set()

sdk_err_t ancs_c_ntf_source_notify_set ( uint8_t  conn_idx,
bool  is_enable 
)

enable ancs notification source CCCD.

Parameters
[in]conn_idxConnection index.
[in]is_enableStart or stop the notification.
Returns
success or not.

◆ ancs_c_write_control_point()

sdk_err_t ancs_c_write_control_point ( uint8_t  conn_idx,
uint8_t *  p_data,
uint16_t  length 
)

This function implements writing commands to control points.

Parameters
[in]conn_idxConnection index.
[in]p_dataPointer to send out data.
[in]lengthLength of data sent out.

◆ ancs_decode_data_source()

void ancs_decode_data_source ( uint8_t *  p_data,
uint16_t  length 
)

Decode data source message.

Parameters
[in]p_dataPointer to the parameters of the read request.
[in]lengthLength of read data

◆ ancs_decode_notification_source()

void ancs_decode_notification_source ( uint8_t *  p_data,
uint16_t  length 
)

Decode notification source message.

Parameters
[in]p_dataPointer to the parameters of the read request.
[in]lengthThe Length of read value

◆ ancs_get_uid()

int ancs_get_uid ( void  )

get ancs phone call UID

Returns
phone call notify message UID

◆ ancs_notify_attr_get()

void ancs_notify_attr_get ( int  uid,
char  noti_attr 
)

Get notification attribute.

Parameters
[in]uidThe UID of notify message
[in]noti_attrThe notification attribute