Tunneling Server#
Callbacks for Tunneling Server Component.
Callbacks#
Notify whether a protocol is supported.
Tunnel opened.
Data received.
Data error.
Tunnel closed.
Callbacks Documentation#
emberAfPluginTunnelingServerIsProtocolSupportedCallback#
bool emberAfPluginTunnelingServerIsProtocolSupportedCallback (uint8_t protocolId, uint16_t manufacturerCode)
Notify whether a protocol is supported.
N/A | protocolId | The identifier of the metering communication protocol for which the tunnel is requested. Ver.: always |
N/A | manufacturerCode | 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.
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.
N/A | tunnelIndex | The index to the tunnel table entry that has been opened. Ver.: always |
N/A | protocolId | The identifier of the metering communication protocol for the tunnel. Ver.: always |
N/A | manufacturerCode | The manufacturer code for manufacturer-defined protocols or 0xFFFF in unused. Ver.: always |
N/A | flowControlSupport | true is flow control support is requested or false if it is not. Ver.: always |
N/A | maximumIncomingTransferSize | 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.
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.
N/A | tunnelIndex | The identifier of the tunnel through which the data was received. Ver.: always |
N/A | data | Buffer containing the raw octets of the data. Ver.: always |
N/A | dataLen | 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.
157
of file app/framework/plugin/tunneling-server/tunneling-server.h
emberAfPluginTunnelingServerDataErrorCallback#
void emberAfPluginTunnelingServerDataErrorCallback (uint16_t tunnelIndex, EmberAfTunnelingTransferDataStatus transferDataStatus)
Data error.
N/A | tunnelIndex | The identifier of the tunnel on which this data error occurred. Ver.: always |
N/A | transferDataStatus | 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.
170
of file app/framework/plugin/tunneling-server/tunneling-server.h
emberAfPluginTunnelingServerTunnelClosedCallback#
void emberAfPluginTunnelingServerTunnelClosedCallback (uint16_t tunnelIndex, bool clientInitiated)
Tunnel closed.
N/A | tunnelIndex | The identifier of the tunnel that has been closed. Ver.: always |
N/A | clientInitiated | 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.
185
of file app/framework/plugin/tunneling-server/tunneling-server.h