Developing with ZBOSS for Zigbee

Typedefs

typedef void(* zb_aps_user_payload_callback_t) (zb_uint8_t param)
 Callback to notify an application of sending an APS user payload status. More...
 
typedef enum zb_aps_user_payload_cb_status_e zb_aps_user_payload_cb_status_t
 APS user payload transmission status. More...
 

Enumerations

enum  zb_aps_user_payload_cb_status_e { ZB_APS_USER_PAYLOAD_CB_STATUS_SUCCESS = (zb_uint8_t)0x00, ZB_APS_USER_PAYLOAD_CB_STATUS_NO_APS_ACK = (zb_uint8_t)0xbe }
 APS user payload transmission status. More...
 

Functions

zb_ret_t zb_aps_send_user_payload (zb_uint8_t param, zb_addr_u dst_addr, zb_uint16_t profile_id, zb_uint16_t cluster_id, zb_uint8_t dst_endpoint, zb_uint8_t src_endpoint, zb_uint8_t addr_mode, zb_bool_t aps_ack_is_enabled, zb_uint8_t *payload_ptr, zb_uint8_t payload_size)
 Send user payload using APS. More...
 
zb_uint8_tzb_aps_get_aps_payload (zb_uint8_t param, zb_uint8_t *aps_payload_size)
 Get pointer to an APS payload. More...
 
void zb_aps_set_user_data_tx_cb (zb_aps_user_payload_callback_t cb)
 Set callback to notify results of transmitting an APS frame with user payload. More...
 
void zb_af_set_zdo_data_conf_cb (zb_callback_t cb)
 Set callback to be called when ZDO command packet is sent. More...
 

Detailed Description

Typedef Documentation

◆ zb_aps_user_payload_callback_t

typedef void(* zb_aps_user_payload_callback_t) (zb_uint8_t param)

Callback to notify an application of sending an APS user payload status.

Parameters
param- index of buffer with an APS user payload

◆ zb_aps_user_payload_cb_status_t

APS user payload transmission status.

Stored in the buf->u.hdr.status field

Enumeration Type Documentation

◆ zb_aps_user_payload_cb_status_e

APS user payload transmission status.

Stored in the buf->u.hdr.status field

Enumerator
ZB_APS_USER_PAYLOAD_CB_STATUS_SUCCESS 

APS user payload transmission is successful

Function Documentation

◆ zb_af_set_zdo_data_conf_cb()

void zb_af_set_zdo_data_conf_cb ( zb_callback_t  cb)

Set callback to be called when ZDO command packet is sent.

That callback is to be used when application wants to know the fact that ZDO command send is completed.

Callback provided to ZBOSS ZDO request function (second parameter of zb_zdo_node_desc_req and similar function) not always can be used for that purpose. ZBOSS calls ZDO callback immediately when a) unicast transmit of APS message failed (no ACK) and b) this is ZDO message that does not suppose to have an answer, like broadcast NWK Update req. In other cases if callback is set using zb_af_set_zdo_data_conf_cb, it is called when outgoing ZDO command is sent; callback passed to zb_zdo_node_desc_req and friends is called when ZBOSS got response/responses to ZDO command, or ZDO command is timed out.

Parameters
cb- callback. The buffer passed to the callback has zb_apsde_data_confirm_t in parameters section.

◆ zb_aps_get_aps_payload()

zb_uint8_t* zb_aps_get_aps_payload ( zb_uint8_t  param,
zb_uint8_t aps_payload_size 
)

Get pointer to an APS payload.

Parameters
param- reference to a buffer
aps_payload_size- [out] pointer to a variable to store an APS payload size
Returns
Pointer to an APS payload;
NULL if a buffer is invalid or an aps_payload_size pointer is invalid.

◆ zb_aps_send_user_payload()

zb_ret_t zb_aps_send_user_payload ( zb_uint8_t  param,
zb_addr_u  dst_addr,
zb_uint16_t  profile_id,
zb_uint16_t  cluster_id,
zb_uint8_t  dst_endpoint,
zb_uint8_t  src_endpoint,
zb_uint8_t  addr_mode,
zb_bool_t  aps_ack_is_enabled,
zb_uint8_t payload_ptr,
zb_uint8_t  payload_size 
)

Send user payload using APS.

Parameters
param- reference to a buffer
dst_addr- destination address
profile_id- profile ID for which this frame is intended for
cluster_id- object ID for which this frame is intended for
dst_endpoint- either the endpoint ID of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff)
src_endpoint- the individual endpoint of the entity from which the ASDU is being transferred
addr_mode- the type of destination address supplied by the dst_addr parameter - see aps_addr_mode
aps_ack_is_enabled- enable (ZB_TRUE) or disable (ZB_FALSE) APS acknowledging
*payload_ptr- pointer to user data
payload_size- size of user data; not more than 82 bytes
Returns
RET_OK - if transmission was successful scheduled;
RET_INVALID_PARAMETER_1 - if the buffer is invalid
RET_INVALID_PARAMETER_2 - if the payload_ptr parameter is invalid
RET_INVALID_PARAMETER_3 - if the payload_size parameter is too large

◆ zb_aps_set_user_data_tx_cb()

void zb_aps_set_user_data_tx_cb ( zb_aps_user_payload_callback_t  cb)

Set callback to notify results of transmitting an APS frame with user payload.

Parameters
cb- pointer to a callback