Tunneling Client#

Callbacks for Tunneling Client Component.

#

Callbacks

void
sl_zigbee_af_tunneling_client_tunnel_opened_cb(uint8_t tunnelIndex, sl_zigbee_af_plugin_tunneling_client_status_t tunnelStatus, uint16_t maximumIncomingTransferSize)

Tunnel opened.

void
sl_zigbee_af_tunneling_client_data_received_cb(uint8_t tunnelIndex, uint8_t *data, uint16_t dataLen)

Data received.

void
sl_zigbee_af_tunneling_client_data_error_cb(uint8_t tunnelIndex, sl_zigbee_af_tunneling_transfer_data_status_t transferDataStatus)

Data error.

void

Tunnel closed.

void
sl_zigbee_af_tunneling_client_transfer_data_failure_cb(uint16_t indexOfDestination, sl_zigbee_aps_frame_t *apsFrame, uint16_t msgLen, uint8_t *message, sl_status_t status)

Transfer data failure.

sl_zigbee_af_tunneling_client_tunnel_opened_cb#

void sl_zigbee_af_tunneling_client_tunnel_opened_cb (uint8_t tunnelIndex, sl_zigbee_af_plugin_tunneling_client_status_t tunnelStatus, uint16_t maximumIncomingTransferSize)

Tunnel opened.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtunnelIndex

The index of the tunnel that has been opened. Ver.: always

sl_zigbee_af_plugin_tunneling_client_status_tN/AtunnelStatus

The status of the request. Ver.: always

uint16_tN/AmaximumIncomingTransferSize

The maximum incoming transfer size of the server. Ver.: always

This function is called by the Tunneling client plugin whenever a tunnel is opened. Clients may open tunnels by sending a Request Tunnel command.


sl_zigbee_af_tunneling_client_data_received_cb#

void sl_zigbee_af_tunneling_client_data_received_cb (uint8_t tunnelIndex, uint8_t * data, uint16_t dataLen)

Data received.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtunnelIndex

The index of the tunnel through which the data was received. Ver.: always

uint8_t *N/Adata

Buffer containing the raw octets of the data. Ver.: always

uint16_tN/AdataLen

The length in octets of the data. Ver.: always

This function is called by the Tunneling client plugin whenever data is received from a server through a tunnel.


sl_zigbee_af_tunneling_client_data_error_cb#

void sl_zigbee_af_tunneling_client_data_error_cb (uint8_t tunnelIndex, sl_zigbee_af_tunneling_transfer_data_status_t transferDataStatus)

Data error.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtunnelIndex

The index of the tunnel on which this data error occurred. Ver.: always

sl_zigbee_af_tunneling_transfer_data_status_tN/AtransferDataStatus

The error that occurred. Ver.: always

This function is called by the Tunneling client plugin whenever a data error occurs on a tunnel. Errors occur if a device attempts to send data on tunnel that is no longer active or if the tunneling does not belong to the device.


sl_zigbee_af_tunneling_client_tunnel_closed_cb#

void sl_zigbee_af_tunneling_client_tunnel_closed_cb (uint8_t tunnelIndex)

Tunnel closed.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtunnelIndex

The index of the tunnel that has been closed. Ver.: always

This function is called by the Tunneling client plugin whenever a server sends a notification that it preemptively closed an inactive tunnel. Servers are not required to notify clients of tunnel closures, so applications cannot rely on this callback being called for all tunnels.


sl_zigbee_af_tunneling_client_transfer_data_failure_cb#

void sl_zigbee_af_tunneling_client_transfer_data_failure_cb (uint16_t indexOfDestination, sl_zigbee_aps_frame_t * apsFrame, uint16_t msgLen, uint8_t * message, sl_status_t status)

Transfer data failure.

Parameters
TypeDirectionArgument NameDescription
uint16_tN/AindexOfDestination

The index or destination address of the TransferData command. Ver.: always

sl_zigbee_aps_frame_t *N/AapsFrame

The ::sl_zigbee_aps_frame_t of the command. Ver.: always

uint16_tN/AmsgLen

The length of the payload sent in the command. Ver.: always

uint8_t *N/Amessage

The payload that was sent in the command. Ver.: always

sl_status_tN/Astatus

The non-success status code from the transmission of the command. Ver.: always

This function is called when a TransferData command fails to be sent to the intended destination.