Tunneling Server#

API and Callbacks for the Tunneling Cluster Server Component.

Silicon Labs implementation of Tunneling server cluster. This component requires extending to integrate the software that processes the tunneled data. Note if the maximum transfer size requires fragmentation, manually include the Fragmentation plugin and configure it to support the tunnel data size. Additionally, the component uses the address table to communicate with clients, so you must manually configure the address table size so that it accommodates active tunnels managed by this component as well as any other entries created during normal operation. The Tunneling cluster test specification suggests that implementations support the test protocol (protocol id 199, manufacturer code 0xFFFF). If you do not support it, you need some other means of proving two way communications works and is verifiable. If test protocol support is enabled, the component automatically handles requests for the test protocol and these messages will not fall through to the application.

Modules#

Tunneling Server

API#

sl_zigbee_af_tunneling_server_transfer_data(uint16_t tunnelIndex, uint8_t *data, uint16_t dataLen)

Transfer data to a client through a tunneling cluster tunnel.

void

Toggle a "server busy" status for running as a test harness.

void

Clean up a tunneling cluster tunnel.

Macros#

#define
ZCL_TUNNELING_CLUSTER_INVALID_TUNNEL_ID 0xFFFF
#define
ZCL_TUNNELING_CLUSTER_UNUSED_MANUFACTURER_CODE 0xFFFF
#define
CLOSE_INITIATED_BY_CLIENT true
#define
CLOSE_INITIATED_BY_SERVER false

API Documentation#

sl_zigbee_af_tunneling_server_transfer_data#

sl_zigbee_af_status_t sl_zigbee_af_tunneling_server_transfer_data (uint16_t tunnelIndex, uint8_t * data, uint16_t dataLen)

Transfer data to a client through a tunneling cluster tunnel.

Parameters
TypeDirectionArgument NameDescription
uint16_tN/AtunnelIndex

The identifier of the tunnel through which to send data.

uint8_t *N/Adata

The buffer containing the raw octets of data.

uint16_tN/AdataLen

The length in octets of data.

This function transfers data to a client through a tunnel. The tunneling server plugin will send data to the endpoint on the node that opened the given tunnel.

Returns


Definition at line 70 of file app/framework/plugin/tunneling-server/tunneling-server.h

sl_zigbee_af_tunneling_server_toggle_busy_command#

void sl_zigbee_af_tunneling_server_toggle_busy_command (void )

Toggle a "server busy" status for running as a test harness.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This function sets the server into a busy state, where it will respond to all request tunnel commands with a busy status. NOTE: existing tunnels will continue to operate normally.


Definition at line 81 of file app/framework/plugin/tunneling-server/tunneling-server.h

sl_zigbee_af_tunneling_server_cleanup#

void sl_zigbee_af_tunneling_server_cleanup (uint8_t tunnelId)

Clean up a tunneling cluster tunnel.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtunnelId

The identifier of the tunnel to clean up.

This function cleans up all states associated with a tunnel. The tunneling server plugin will not send the close notification command.


Definition at line 91 of file app/framework/plugin/tunneling-server/tunneling-server.h