Tunneling Server#

Callbacks for Tunneling Server Component.

Callbacks#

bool
emberAfPluginTunnelingServerIsProtocolSupportedCallback(uint8_t protocolId, uint16_t manufacturerCode)

Notify whether a protocol is supported.

void
emberAfPluginTunnelingServerTunnelOpenedCallback(uint16_t tunnelIndex, uint8_t protocolId, uint16_t manufacturerCode, bool flowControlSupport, uint16_t maximumIncomingTransferSize)

Tunnel opened.

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

Data received.

void
emberAfPluginTunnelingServerDataErrorCallback(uint16_t tunnelIndex, EmberAfTunnelingTransferDataStatus transferDataStatus)

Data error.

void
emberAfPluginTunnelingServerTunnelClosedCallback(uint16_t tunnelIndex, bool clientInitiated)

Tunnel closed.

Callbacks Documentation#

emberAfPluginTunnelingServerIsProtocolSupportedCallback#

bool emberAfPluginTunnelingServerIsProtocolSupportedCallback (uint8_t protocolId, uint16_t manufacturerCode)

Notify whether a protocol is supported.

Parameters
N/AprotocolId

The identifier of the metering communication protocol for which the tunnel is requested. Ver.: always

N/AmanufacturerCode

The manufacturer code for manufacturer-defined protocols or 0xFFFF in unused. Ver.: always

This function is called by the Tunneling server plugin whenever a Request Tunnel command is received. The application should return true if the protocol is supported and false otherwise.


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

emberAfPluginTunnelingServerTunnelOpenedCallback#

void emberAfPluginTunnelingServerTunnelOpenedCallback (uint16_t tunnelIndex, uint8_t protocolId, uint16_t manufacturerCode, bool flowControlSupport, uint16_t maximumIncomingTransferSize)

Tunnel opened.

Parameters
N/AtunnelIndex

The index to the tunnel table entry that has been opened. Ver.: always

N/AprotocolId

The identifier of the metering communication protocol for the tunnel. Ver.: always

N/AmanufacturerCode

The manufacturer code for manufacturer-defined protocols or 0xFFFF in unused. Ver.: always

N/AflowControlSupport

true is flow control support is requested or false if it is not. Ver.: always

N/AmaximumIncomingTransferSize

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

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


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

emberAfPluginTunnelingServerDataReceivedCallback#

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

Data received.

Parameters
N/AtunnelIndex

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

N/Adata

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

N/AdataLen

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

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


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

emberAfPluginTunnelingServerDataErrorCallback#

void emberAfPluginTunnelingServerDataErrorCallback (uint16_t tunnelIndex, EmberAfTunnelingTransferDataStatus transferDataStatus)

Data error.

Parameters
N/AtunnelIndex

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

N/AtransferDataStatus

The error that occurred. Ver.: always

This function is called by the Tunneling server 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.


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

emberAfPluginTunnelingServerTunnelClosedCallback#

void emberAfPluginTunnelingServerTunnelClosedCallback (uint16_t tunnelIndex, bool clientInitiated)

Tunnel closed.

Parameters
N/AtunnelIndex

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

N/AclientInitiated

true if the client initiated the closing of the tunnel or false if the server closed the tunnel due to inactivity. Ver.: always

This function is called by the Tunneling server plugin whenever a tunnel is closed. Clients may close tunnels by sending a Close Tunnel command. The server can preemptively close inactive tunnels after a timeout.


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