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_t * | zb_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... | |
typedef void(* zb_aps_user_payload_callback_t) (zb_uint8_t param) |
Callback to notify an application of sending an APS user payload status.
param | - index of buffer with an APS user payload |
APS user payload transmission status.
Stored in the buf->u.hdr.status field
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.
cb | - callback. The buffer passed to the callback has zb_apsde_data_confirm_t in parameters section. |
zb_uint8_t* zb_aps_get_aps_payload | ( | zb_uint8_t | param, |
zb_uint8_t * | aps_payload_size | ||
) |
Get pointer to an APS payload.
param | - reference to a buffer |
aps_payload_size | - [out] pointer to a variable to store an APS payload size |
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.
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 |
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.
cb | - pointer to a callback |