Comms Hub#

Callbacks for Comms Hub Component.

Callbacks#

bool

Accept a tunnel.

void
sli_zigbee_af_comms_hub_function_tunnel_data_received_callback(sl_802154_long_addr_t senderDeviceId, uint16_t length, uint8_t *payload)

Notify that tunnel data was received.

void
sl_zigbee_af_comms_hub_function_send_cb(uint8_t status, sl_802154_long_addr_t destinationDeviceId, uint16_t dataLen, uint8_t *data)

Send.

void
sl_zigbee_af_comms_hub_function_received_cb(sl_802154_long_addr_t senderDeviceId, uint16_t dataLen, uint8_t *data)

Receive.

void
sl_zigbee_(uint16_t alertCode, uint8_t *gbzAlert, uint16_t gbzAlertLength)

Alert WAN.

void
sl_zigbee_af_comms_hub_function_tunnel_opened_cb(sl_802154_long_addr_t remoteDeviceId)

Tunnel opened.

Callbacks Documentation#

sli_zigbee_af_comms_hub_function_tunnel_accept_callback#

bool sli_zigbee_af_comms_hub_function_tunnel_accept_callback (sl_802154_long_addr_t deviceId)

Accept a tunnel.

Parameters
N/AdeviceId

An identifier of the device from which a tunnel is requested

Called by the tunnel manager when a tunnel is requested. Check the given device identifier should be checked against the Device Log to verify whether tunnels from the device should be accepted or not.

Returns

  • True if the tunnel should be allowed, false otherwise.


Definition at line 151 of file app/framework/plugin/comms-hub-function/comms-hub-function.h

sli_zigbee_af_comms_hub_function_tunnel_data_received_callback#

void sli_zigbee_af_comms_hub_function_tunnel_data_received_callback (sl_802154_long_addr_t senderDeviceId, uint16_t length, uint8_t * payload)

Notify that tunnel data was received.

Parameters
N/AsenderDeviceId

The identifier of the device from which the data was received.

N/Alength

The length of the data received

N/Apayload

Data received.

Called by the tunnel manager when data is received over a tunnel. It is responsible for the implementation of the GET, GET_RESPONSE, PUT protocol used when communicating with a sleepy device.


Definition at line 164 of file app/framework/plugin/comms-hub-function/comms-hub-function.h

sl_zigbee_af_comms_hub_function_send_cb#

void sl_zigbee_af_comms_hub_function_send_cb (uint8_t status, sl_802154_long_addr_t destinationDeviceId, uint16_t dataLen, uint8_t * data)

Send.

Parameters
N/Astatus

The status of the message that was sent Ver.: always

N/AdestinationDeviceId

The EUI64 of the destination device to which the data was sent Ver.: always

N/AdataLen

The length in octets of the data that was sent Ver.: always

N/Adata

Buffer containing the raw octets of the data that was sent Ver.: always

This callback is called by the Comms Hub Function (CHF) plugin to report the status of a message that was previously sent.


Definition at line 180 of file app/framework/plugin/comms-hub-function/comms-hub-function.h

sl_zigbee_af_comms_hub_function_received_cb#

void sl_zigbee_af_comms_hub_function_received_cb (sl_802154_long_addr_t senderDeviceId, uint16_t dataLen, uint8_t * data)

Receive.

Parameters
N/AsenderDeviceId

The EUI64 of the sending device Ver.: always

N/AdataLen

The length in octets of the data Ver.: always

N/Adata

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

This callback is called by the Comms Hub Function (CHF) plugin whenever a message is received.


Definition at line 194 of file app/framework/plugin/comms-hub-function/comms-hub-function.h

sl_zigbee_#

void sl_zigbee_ (uint16_t alertCode, uint8_t * gbzAlert, uint16_t gbzAlertLength)

Alert WAN.

Parameters
N/AalertCode

The 16 bit allert code as defined by GBCS Ver.: always

N/AgbzAlert

Buffer continaing the GBZ formatted Alert Ver.: always

N/AgbzAlertLength

The length in octets of the GBZ formatted Alert Ver.: always

Notify the application of an Alert that should be sent to the WAN. The second argument is a pointer to the GBZ alert buffer. The application is responsible for freeing this buffer.


Definition at line 209 of file app/framework/plugin/comms-hub-function/comms-hub-function.h

sl_zigbee_af_comms_hub_function_tunnel_opened_cb#

void sl_zigbee_af_comms_hub_function_tunnel_opened_cb (sl_802154_long_addr_t remoteDeviceId)

Tunnel opened.

Parameters
N/AremoteDeviceId

The EUI64 of the remote device for which a tunnel is opened Ver.: always

This function is called by the Comms Hub Function (CHF) plugin when a tunnel is opened.


Definition at line 221 of file app/framework/plugin/comms-hub-function/comms-hub-function.h