Stack Callbacks#

Functions#

void
sl_zigbee_af_incoming_message_cb(sl_zigbee_incoming_message_type_t type, sl_zigbee_aps_frame_t *apsFrame, sl_zigbee_rx_packet_info_t *packetInfo, uint8_t messageLength, uint8_t *message)

A callback invoked when receiving a message.

void

A callback that allows marking application buffers.

void
sl_zigbee_af_incoming_mfg_test_message_cb(uint8_t messageType, uint8_t dataLength, uint8_t *data)

incomingMfgTestMessageHandler

uint8_t
sl_zigbee_af_override_append_source_route_cb(sl_802154_short_addr_t destination, sli_buffer_manager_buffer_t *header, bool *consumed)

Allow the application to decide if it wants to append a source route to packet header itself.

void
sl_zigbee_af_stack_status_cb(sl_status_t status)

A callback invoked when the status of the stack changes. If the status parameter equals SL_STATUS_NETWORK_UP, then the getNetworkParameters command can be called to obtain the new network parameters. If any of the parameters are being stored in nonvolatile memory by the Host, the stored values should be updated.

void
sl_zigbee_af_redirect_outgoing_message_cb(uint8_t mac_index, uint8_t packet_length, uint8_t *packet_contents, uint8_t priority)

A callback that allows the app to redirect the packet.

void
sl_zigbee_af_energy_scan_result_cb(uint8_t channel, int8_t maxRssiValue)

Reports the result of an energy scan for a single channel. The scan is not complete until the scanCompleteHandler callback is called.

void
sl_zigbee_af_network_found_cb(sl_zigbee_zigbee_network_t *networkFound, uint8_t lqi, int8_t rssi)

Reports that a network was found as a result of a prior call to startScan. Gives the network parameters useful for deciding which network to join.

void
sl_zigbee_af_scan_complete_cb(uint8_t channel, sl_status_t status)

Returns the status of the current scan of type SL_ZIGBEE_ENERGY_SCAN or SL_ZIGBEE_ACTIVE_SCAN. SL_STATUS_OK signals that the scan has completed. Other error conditions signify a failure to scan on the channel specified.

void
sl_zigbee_af_unused_pan_id_found_cb(sl_802154_pan_id_t panId, uint8_t channel)

This function returns an unused panID and channel pair found via the find unused panId scan procedure.

void
sl_zigbee_af_child_join_cb(uint8_t index, bool joining, sl_802154_short_addr_t childId, sl_802154_long_addr_t childEui64, sl_zigbee_node_type_t childType)

Indicates that a child has joined or left.

void
sl_zigbee_af_duty_cycle_cb(uint8_t channelPage, uint8_t channel, sl_zigbee_duty_cycle_state_t state, uint8_t totalDevices, sl_zigbee_per_device_duty_cycle_t *arrayOfDeviceDutyCycles)

Callback fires when the duty cycle state has changed.

void
sl_zigbee_af_remote_set_binding_cb(sl_zigbee_binding_table_entry_t *entry, sl_zigbee_zdo_status_t status)

The NCP used the external binding modification policy to decide how to handle a remote set binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

void
sl_zigbee_af_remote_delete_binding_cb(uint8_t index, sl_zigbee_zdo_status_t status)

The NCP used the external binding modification policy to decide how to handle a remote delete binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

void
sl_zigbee_af_poll_complete_cb(sl_status_t status)

Indicates the result of a data poll to the parent of the local node.

void
sl_zigbee_af_poll_cb(sl_802154_short_addr_t childId, bool transmitExpected)

Indicates that the local node received a data poll from a child.

void
sl_zigbee_af_debug_cb(uint8_t messageLength, uint8_t *messageContents)

debugHandler

void
sl_zigbee_af_incoming_many_to_one_route_request_cb(sl_802154_short_addr_t source, sl_802154_long_addr_t longId, uint8_t cost)

A callback indicating that a many-to-one route to the concentrator with the given short and long ID is available for use.

void
sl_zigbee_af_incoming_route_error_cb(sl_status_t status, sl_802154_short_addr_t target)

A callback invoked when a route error message is received. The error indicates that a problem routing to or from the target node was encountered.

void
sl_zigbee_af_incoming_network_status_cb(uint8_t errorCode, sl_802154_short_addr_t target)

A callback invoked when a network status/route error message is received. The error indicates that there was a problem sending/receiving messages from the target node.

void
sl_zigbee_af_incoming_route_record_cb(sl_zigbee_rx_packet_info_t *packetInfo, uint8_t relayCount, uint8_t *relayList)

Reports the arrival of a route record command frame.

void
sl_zigbee_af_id_conflict_cb(sl_802154_short_addr_t conflictingId)

A callback invoked by the EmberZNet stack when an id conflict is discovered, that is, two different nodes in the network were found to be using the same short id. The stack automatically removes the conflicting short id from its internal tables (address, binding, route, neighbor, and child tables). The application should discontinue any other use of the id.

void
sl_zigbee_af_mac_passthrough_message_cb(sl_zigbee_mac_passthrough_type_t messageType, sl_zigbee_rx_packet_info_t *packetInfo, uint8_t messageLength, uint8_t *messageContents)

A callback invoked by the EmberZNet stack when a MAC passthrough message is received.

void

A callback invoked to inform the application that a stack token has changed.

void
sl_zigbee_af_timer_cb(uint8_t timerId)

A callback from the timer.

void
sl_zigbee_af_counter_rollover_cb(sl_zigbee_counter_type_t type)

This call is fired when a counter exceeds its threshold.

void
sl_zigbee_af_raw_transmit_complete_cb(uint8_t messageLength, uint8_t *messageContents, sl_status_t status)

A callback invoked by the EmberZNet stack when the MAC has finished transmitting a raw message.

void
sl_zigbee_af_switch_network_key_cb(uint8_t sequenceNumber)

A callback to inform the application that the Network Key has been updated and the node has been switched over to use the new key. The actual key being used is not passed up, but the sequence number is.

void
sl_zigbee_af_zigbee_key_establishment_cb(sl_802154_long_addr_t partner, sl_zigbee_key_status_t status)

This is a callback that indicates the success or failure of an attempt to establish a key with a partner device.

void
sl_zigbee_af_generate_cbke_keys_cb(sl_status_t status, sl_zigbee_public_key_data_t *ephemeralPublicKey)

A callback by the Crypto Engine indicating that a new ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

void
sl_zigbee_af_calculate_smacs_cb(sl_status_t status, sl_zigbee_smac_data_t *initiatorSmac, sl_zigbee_smac_data_t *responderSmac)

A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via sl_zigbee_clear_temporary_data_maybe_store_link_key().

void
sl_zigbee_af_dsa_sign_cb(sl_status_t status, uint8_t messageLength, uint8_t *messageContents)

The handler that returns the results of the signing operation. On success, the signature will be appended to the original message (including the signature type indicator that replaced the startIndex field for the signing) and both are returned via this callback.

void
sl_zigbee_af_dsa_verify_cb(sl_status_t status)

This callback is executed by the stack when the DSA verification has completed and has a result. If the result is SL_STATUS_OK, the signature is valid. If the result is SL_STATUS_ZIGBEE_SIGNATURE_VERIFY_FAILURE then the signature is invalid. If the result is anything else then the signature verify operation failed and the validity is unknown.

void
sl_zigbee_af_incoming_bootload_message_cb(sl_802154_long_addr_t longId, sl_zigbee_rx_packet_info_t *packetInfo, uint8_t messageLength, uint8_t *messageContents)

A callback invoked by the EmberZNet stack when a bootload message is received.

void
sl_zigbee_af_bootload_transmit_complete_cb(sl_status_t status, uint8_t messageLength, uint8_t *messageContents)

A callback invoked by the EmberZNet stack when the MAC has finished transmitting a bootload message.

void
sl_zigbee_af_zll_network_found_cb(bool isDeviceInfoNull, sl_zigbee_rx_packet_info_t *packetInfo, const sl_zigbee_zll_network_t *networkInfo, const sl_zigbee_zll_device_info_record_t *deviceInfo)

This callback is invoked when a ZLL network scan finds a ZLL network.

void

This callback is invoked when a ZLL network scan is complete.

void
sl_zigbee_af_zll_address_assignment_cb(const sl_zigbee_zll_address_assignment_t *addressInfo, sl_zigbee_rx_packet_info_t *packetInfo)

This callback is invoked when network and group addresses are assigned to a remote mode in a network start or network join request.

void
sl_zigbee_af_zll_touch_link_target_cb(const sl_zigbee_zll_network_t *networkInfo)

This callback is invoked when the device is a target of a touch link.

void
sl_zigbee_af_mac_filter_match_message_cb(uint8_t filterIndexMatch, sl_zigbee_mac_passthrough_type_t messageType, sl_zigbee_rx_packet_info_t *packetInfo, uint8_t messageLength, uint8_t *messageContents)

A callback invoked by the EmberZNet stack when a raw MAC message that has matched one of the application's configured MAC filters.

void
sl_zigbee_af_d_gp_sent_cb(sl_status_t status, uint8_t gpepHandle)

A callback to the GP endpoint to indicate the result of the GPDF transmission.

sl_zigbee_af_pan_id_conflict_cb(int8_t conflictCount)

This handler is called by the stack to report the number of conflict reports exceeds SL_ZIGBEE_PAN_ID_CONFLICT_REPORT_THRESHOLD within a period of 1 minute )

void
sl_zigbee_af_orphan_notification_cb(sl_802154_long_addr_t longId)

Inform the application that an orphan notification has been received. This is generally not useful for applications. It could be useful in testing and is included for this purpose.

void
sl_zigbee_af_counters_cb(sl_zigbee_counter_type_t type, sl_zigbee_counter_info_t Info)

This handler is called when the value of a counter has changed.

bool

This handler is called for messages that need to be matched against mac passthrough filter.

void
sl_zigbee_af_generate_cbke_keys_283k1_handler_cb(sl_status_t status, sl_zigbee_public_key_283k1_data_t *ephemeralPublicKey)

A callback by the Crypto Engine indicating that a new ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

void
sl_zigbee_af_calculate_smacs_283k1_handler_cb(sl_status_t status, sl_zigbee_smac_data_t *initiatorSmac, sl_zigbee_smac_data_t *responderSmac)

A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via sl_zigbee_clear_temporary_data_maybe_store_link_key().

void
sl_zigbee_af_gpep_incoming_message_cb(sl_zigbee_gp_status_t status, uint8_t gpdLink, uint8_t sequenceNumber, sl_zigbee_gp_address_t *addr, sl_zigbee_gp_security_level_t gpdfSecurityLevel, sl_zigbee_gp_key_type_t gpdfSecurityKeyType, bool autoCommissioning, uint8_t bidirectionalInfo, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint32_t mic, uint8_t proxyTableIndex, uint8_t gpdCommandPayloadLength, uint8_t *gpdCommandPayload, sl_zigbee_rx_packet_info_t *packetInfo)

A callback invoked by the ZigBee GP stack when a GPDF is received.

void

Rtos Stack Wakeup Isr Handler.

void

RadioNeedsCalibratingHandler.

void
sl_zigbee_af_scan_error_cb(sl_status_t status)

scanErrorHandler

bool
sl_zigbee_af_support_incoming_message_cb(sl_zigbee_aps_frame_t *apsFrame)

A callback invoked when receiving a message. Used when AF Support component is enabled on NCP. User can use apsFrame to filter for which ZCL messages they want to process on NCP. If this function returns true then the message is being processed on NCP, otherwise it will be forwarded to the Host.

Function Documentation#

sl_zigbee_af_incoming_message_cb#

void sl_zigbee_af_incoming_message_cb (sl_zigbee_incoming_message_type_t type, sl_zigbee_aps_frame_t * apsFrame, sl_zigbee_rx_packet_info_t * packetInfo, uint8_t messageLength, uint8_t * message)

A callback invoked when receiving a message.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_incoming_message_type_tN/Atype

Incoming message type

sl_zigbee_aps_frame_t *N/AapsFrame

The aps Frame

sl_zigbee_rx_packet_info_t *N/ApacketInfo

Packet info

uint8_tN/AmessageLength

Message length

uint8_t *N/Amessage

message


sl_zigbee_af_mark_buffers_cb#

void sl_zigbee_af_mark_buffers_cb (void )

A callback that allows marking application buffers.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_zigbee_af_incoming_mfg_test_message_cb#

void sl_zigbee_af_incoming_mfg_test_message_cb (uint8_t messageType, uint8_t dataLength, uint8_t * data)

incomingMfgTestMessageHandler

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AmessageType
uint8_tN/AdataLength
uint8_t *N/Adata

sl_zigbee_af_override_append_source_route_cb#

uint8_t sl_zigbee_af_override_append_source_route_cb (sl_802154_short_addr_t destination, sli_buffer_manager_buffer_t * header, bool * consumed)

Allow the application to decide if it wants to append a source route to packet header itself.

Parameters
TypeDirectionArgument NameDescription
sl_802154_short_addr_tN/Adestination
sli_buffer_manager_buffer_t *N/Aheader
bool *N/Aconsumed

Returns

  • Added bytes


sl_zigbee_af_stack_status_cb#

void sl_zigbee_af_stack_status_cb (sl_status_t status)

A callback invoked when the status of the stack changes. If the status parameter equals SL_STATUS_NETWORK_UP, then the getNetworkParameters command can be called to obtain the new network parameters. If any of the parameters are being stored in nonvolatile memory by the Host, the stored values should be updated.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

Stack status


sl_zigbee_af_redirect_outgoing_message_cb#

void sl_zigbee_af_redirect_outgoing_message_cb (uint8_t mac_index, uint8_t packet_length, uint8_t * packet_contents, uint8_t priority)

A callback that allows the app to redirect the packet.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Amac_index

The mac index used to redirect messages

uint8_tN/Apacket_length

Length of the packet

uint8_t *N/Apacket_contents

Contents of the packet

uint8_tN/Apriority

Transmit priority


sl_zigbee_af_energy_scan_result_cb#

void sl_zigbee_af_energy_scan_result_cb (uint8_t channel, int8_t maxRssiValue)

Reports the result of an energy scan for a single channel. The scan is not complete until the scanCompleteHandler callback is called.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Achannel

The 802.15.4 channel number that was scanned.

int8_tN/AmaxRssiValue

The maximum RSSI value found on the channel.


sl_zigbee_af_network_found_cb#

void sl_zigbee_af_network_found_cb (sl_zigbee_zigbee_network_t * networkFound, uint8_t lqi, int8_t rssi)

Reports that a network was found as a result of a prior call to startScan. Gives the network parameters useful for deciding which network to join.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_zigbee_network_t *N/AnetworkFound

The parameters associated with the network found.

uint8_tN/Alqi

The link quality indication of the network found.

int8_tN/Arssi

The received signal strength indication of the network found.


sl_zigbee_af_scan_complete_cb#

void sl_zigbee_af_scan_complete_cb (uint8_t channel, sl_status_t status)

Returns the status of the current scan of type SL_ZIGBEE_ENERGY_SCAN or SL_ZIGBEE_ACTIVE_SCAN. SL_STATUS_OK signals that the scan has completed. Other error conditions signify a failure to scan on the channel specified.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Achannel

The channel on which the current error occurred. Undefined for the case of SL_STATUS_OK.

sl_status_tN/Astatus

The error condition that occurred on the current channel. Value will be SL_STATUS_OK when the scan has completed.


sl_zigbee_af_unused_pan_id_found_cb#

void sl_zigbee_af_unused_pan_id_found_cb (sl_802154_pan_id_t panId, uint8_t channel)

This function returns an unused panID and channel pair found via the find unused panId scan procedure.

Parameters
TypeDirectionArgument NameDescription
sl_802154_pan_id_tN/ApanId

The unused panID which has been found.

uint8_tN/Achannel

The channel that the unused panID was found on.


sl_zigbee_af_child_join_cb#

void sl_zigbee_af_child_join_cb (uint8_t index, bool joining, sl_802154_short_addr_t childId, sl_802154_long_addr_t childEui64, sl_zigbee_node_type_t childType)

Indicates that a child has joined or left.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aindex

The index of the child of interest.

boolN/Ajoining

True if the child is joining. False the child is leaving.

sl_802154_short_addr_tN/AchildId
sl_802154_long_addr_tN/AchildEui64
sl_zigbee_node_type_tN/AchildType

sl_zigbee_af_duty_cycle_cb#

void sl_zigbee_af_duty_cycle_cb (uint8_t channelPage, uint8_t channel, sl_zigbee_duty_cycle_state_t state, uint8_t totalDevices, sl_zigbee_per_device_duty_cycle_t * arrayOfDeviceDutyCycles)

Callback fires when the duty cycle state has changed.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AchannelPage

The channel page whose duty cycle state has changed.

uint8_tN/Achannel

The channel number whose duty cycle state has changed.

sl_zigbee_duty_cycle_state_tN/Astate

The current duty cycle state.

uint8_tN/AtotalDevices
sl_zigbee_per_device_duty_cycle_t *N/AarrayOfDeviceDutyCycles

sl_zigbee_af_remote_set_binding_cb#

void sl_zigbee_af_remote_set_binding_cb (sl_zigbee_binding_table_entry_t * entry, sl_zigbee_zdo_status_t status)

The NCP used the external binding modification policy to decide how to handle a remote set binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_binding_table_entry_t *N/Aentry

The contents of the binding entry.

sl_zigbee_zdo_status_tN/Astatus

ZDO status.


sl_zigbee_af_remote_delete_binding_cb#

void sl_zigbee_af_remote_delete_binding_cb (uint8_t index, sl_zigbee_zdo_status_t status)

The NCP used the external binding modification policy to decide how to handle a remote delete binding request. The Host cannot change the current decision, but it can change the policy for future decisions using the setPolicy command.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aindex

The index of the binding whose deletion was requested.

sl_zigbee_zdo_status_tN/Astatus

ZDO status


sl_zigbee_af_poll_complete_cb#

void sl_zigbee_af_poll_complete_cb (sl_status_t status)

Indicates the result of a data poll to the parent of the local node.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

An sl_status_t value: SL_STATUS_OK - Data was received in response to the poll. SL_STATUS_MAC_NO_DATA - No data was pending. SL_STATUS_ZIGBEE_DELIVERY_FAILED - The poll message could not be sent. SL_STATUS_MAC_NO_ACK_RECEIVED - The poll message was sent but not acknowledged by the parent.


sl_zigbee_af_poll_cb#

void sl_zigbee_af_poll_cb (sl_802154_short_addr_t childId, bool transmitExpected)

Indicates that the local node received a data poll from a child.

Parameters
TypeDirectionArgument NameDescription
sl_802154_short_addr_tN/AchildId

The node ID of the child that is requesting data.

boolN/AtransmitExpected

True if transmit expected, false otherwise.


sl_zigbee_af_debug_cb#

void sl_zigbee_af_debug_cb (uint8_t messageLength, uint8_t * messageContents)

debugHandler

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AmessageLength

debug message length

uint8_t *N/AmessageContents

debug message


sl_zigbee_af_incoming_many_to_one_route_request_cb#

void sl_zigbee_af_incoming_many_to_one_route_request_cb (sl_802154_short_addr_t source, sl_802154_long_addr_t longId, uint8_t cost)

A callback indicating that a many-to-one route to the concentrator with the given short and long ID is available for use.

Parameters
TypeDirectionArgument NameDescription
sl_802154_short_addr_tN/Asource

The short id of the concentrator.

sl_802154_long_addr_tN/AlongId

The EUI64 of the concentrator.

uint8_tN/Acost

The path cost to the concentrator. The cost may decrease as additional route request packets for this discovery arrive, but the callback is made only once.


sl_zigbee_af_incoming_route_error_cb#

void sl_zigbee_af_incoming_route_error_cb (sl_status_t status, sl_802154_short_addr_t target)

A callback invoked when a route error message is received. The error indicates that a problem routing to or from the target node was encountered.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

SL_STATUS_ZIGBEE_SOURCE_ROUTE_FAILURE or SL_STATUS_ZIGBEE_MANY_TO_ONE_ROUTE_FAILURE.

sl_802154_short_addr_tN/Atarget

The short id of the remote node.


sl_zigbee_af_incoming_network_status_cb#

void sl_zigbee_af_incoming_network_status_cb (uint8_t errorCode, sl_802154_short_addr_t target)

A callback invoked when a network status/route error message is received. The error indicates that there was a problem sending/receiving messages from the target node.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AerrorCode

One byte over-the-air error code from network status message

sl_802154_short_addr_tN/Atarget

The short ID of the remote node


sl_zigbee_af_incoming_route_record_cb#

void sl_zigbee_af_incoming_route_record_cb (sl_zigbee_rx_packet_info_t * packetInfo, uint8_t relayCount, uint8_t * relayList, relayListIndex)

Reports the arrival of a route record command frame.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_rx_packet_info_t *N/ApacketInfo

The received message information.

uint8_tN/ArelayCount

The number of relays in relayList.

uint8_t *N/ArelayList

Header.

N/ArelayListIndex

The relay List Index.


sl_zigbee_af_id_conflict_cb#

void sl_zigbee_af_id_conflict_cb (sl_802154_short_addr_t conflictingId)

A callback invoked by the EmberZNet stack when an id conflict is discovered, that is, two different nodes in the network were found to be using the same short id. The stack automatically removes the conflicting short id from its internal tables (address, binding, route, neighbor, and child tables). The application should discontinue any other use of the id.

Parameters
TypeDirectionArgument NameDescription
sl_802154_short_addr_tN/AconflictingId

The short id for which a conflict was detected


sl_zigbee_af_mac_passthrough_message_cb#

void sl_zigbee_af_mac_passthrough_message_cb (sl_zigbee_mac_passthrough_type_t messageType, sl_zigbee_rx_packet_info_t * packetInfo, uint8_t messageLength, uint8_t * messageContents)

A callback invoked by the EmberZNet stack when a MAC passthrough message is received.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_mac_passthrough_type_tN/AmessageType

The type of MAC passthrough message received.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

Info about incoming packet.

uint8_tN/AmessageLength

message length.

uint8_t *N/AmessageContents

The raw message that was received.


sl_zigbee_af_stack_token_changed_cb#

void sl_zigbee_af_stack_token_changed_cb (uint16_t tokenAddress)

A callback invoked to inform the application that a stack token has changed.

Parameters
TypeDirectionArgument NameDescription
uint16_tN/AtokenAddress

The address of the stack token that has changed.


sl_zigbee_af_timer_cb#

void sl_zigbee_af_timer_cb (uint8_t timerId)

A callback from the timer.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AtimerId

Which timer generated the callback (0 or 1).


sl_zigbee_af_counter_rollover_cb#

void sl_zigbee_af_counter_rollover_cb (sl_zigbee_counter_type_t type)

This call is fired when a counter exceeds its threshold.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_counter_type_tN/Atype

Type of Counter


sl_zigbee_af_raw_transmit_complete_cb#

void sl_zigbee_af_raw_transmit_complete_cb (uint8_t messageLength, uint8_t * messageContents, sl_status_t status)

A callback invoked by the EmberZNet stack when the MAC has finished transmitting a raw message.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AmessageLength

message, message always returns SL_ZIGBEE_NULL_MESSAGE_BUFFER on host

uint8_t *N/AmessageContents

SL_STATUS_OK if the transmission was successful, or SL_STATUS_ZIGBEE_DELIVERY_FAILED if not

sl_status_tN/Astatus

sl_zigbee_af_switch_network_key_cb#

void sl_zigbee_af_switch_network_key_cb (uint8_t sequenceNumber)

A callback to inform the application that the Network Key has been updated and the node has been switched over to use the new key. The actual key being used is not passed up, but the sequence number is.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AsequenceNumber

The sequence number of the new network key.


sl_zigbee_af_zigbee_key_establishment_cb#

void sl_zigbee_af_zigbee_key_establishment_cb (sl_802154_long_addr_t partner, sl_zigbee_key_status_t status)

This is a callback that indicates the success or failure of an attempt to establish a key with a partner device.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_tN/Apartner

This is the IEEE address of the partner that the device successfully established a key with. This value is all zeros on a failure.

sl_zigbee_key_status_tN/Astatus

This is the status indicating what was established or why the key establishment failed.


sl_zigbee_af_generate_cbke_keys_cb#

void sl_zigbee_af_generate_cbke_keys_cb (sl_status_t status, sl_zigbee_public_key_data_t * ephemeralPublicKey)

A callback by the Crypto Engine indicating that a new ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The result of the CBKE operation.

sl_zigbee_public_key_data_t *N/AephemeralPublicKey

Returns

  • ephemeralPublicKey The generated ephemeral public key.


sl_zigbee_af_calculate_smacs_cb#

void sl_zigbee_af_calculate_smacs_cb (sl_status_t status, sl_zigbee_smac_data_t * initiatorSmac, sl_zigbee_smac_data_t * responderSmac)

A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via sl_zigbee_clear_temporary_data_maybe_store_link_key().

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The Result of the CBKE operation.

sl_zigbee_smac_data_t *N/AinitiatorSmac
sl_zigbee_smac_data_t *N/AresponderSmac

Returns

  • initiatorSmac The calculated value of the initiator's SMAC

  • responderSmac The calculated value of the responder's SMAC


sl_zigbee_af_dsa_sign_cb#

void sl_zigbee_af_dsa_sign_cb (sl_status_t status, uint8_t messageLength, uint8_t * messageContents)

The handler that returns the results of the signing operation. On success, the signature will be appended to the original message (including the signature type indicator that replaced the startIndex field for the signing) and both are returned via this callback.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The result of the DSA signing operation.

uint8_tN/AmessageLength

The length of message.

uint8_t *N/AmessageContents

The message and attached which includes the original message and the appended signature.


sl_zigbee_af_dsa_verify_cb#

void sl_zigbee_af_dsa_verify_cb (sl_status_t status)

This callback is executed by the stack when the DSA verification has completed and has a result. If the result is SL_STATUS_OK, the signature is valid. If the result is SL_STATUS_ZIGBEE_SIGNATURE_VERIFY_FAILURE then the signature is invalid. If the result is anything else then the signature verify operation failed and the validity is unknown.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The result of the DSA verification operation.


sl_zigbee_af_incoming_bootload_message_cb#

void sl_zigbee_af_incoming_bootload_message_cb (sl_802154_long_addr_t longId, sl_zigbee_rx_packet_info_t * packetInfo, uint8_t messageLength, uint8_t * messageContents)

A callback invoked by the EmberZNet stack when a bootload message is received.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_tN/AlongId

The EUI64 of the sending node.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

Info about incoming packet.

uint8_tN/AmessageLength

message length.

uint8_t *N/AmessageContents

The bootload message that was sent.


sl_zigbee_af_bootload_transmit_complete_cb#

void sl_zigbee_af_bootload_transmit_complete_cb (sl_status_t status, uint8_t messageLength, uint8_t * messageContents)

A callback invoked by the EmberZNet stack when the MAC has finished transmitting a bootload message.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

An sl_status_t value of SL_STATUS_OK if an ACK was received from the destination or SL_STATUS_ZIGBEE_DELIVERY_FAILED if no ACK was received.

uint8_tN/AmessageLength

message length.

uint8_t *N/AmessageContents

The bootload message that was sent.


sl_zigbee_af_zll_network_found_cb#

void sl_zigbee_af_zll_network_found_cb (bool isDeviceInfoNull, sl_zigbee_rx_packet_info_t * packetInfo, const sl_zigbee_zll_network_t * networkInfo, const sl_zigbee_zll_device_info_record_t * deviceInfo)

This callback is invoked when a ZLL network scan finds a ZLL network.

Parameters
TypeDirectionArgument NameDescription
boolN/AisDeviceInfoNull

Used to interpret deviceInfo field.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

Information about the packet received from the network.

const sl_zigbee_zll_network_t *N/AnetworkInfo
const sl_zigbee_zll_device_info_record_t *N/AdeviceInfo

Returns

  • networkInfo Information about the network.

  • deviceInfo Device specific information.


sl_zigbee_af_zll_scan_complete_cb#

void sl_zigbee_af_zll_scan_complete_cb (sl_status_t status)

This callback is invoked when a ZLL network scan is complete.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

Status of the operation.


sl_zigbee_af_zll_address_assignment_cb#

void sl_zigbee_af_zll_address_assignment_cb (const sl_zigbee_zll_address_assignment_t * addressInfo, sl_zigbee_rx_packet_info_t * packetInfo)

This callback is invoked when network and group addresses are assigned to a remote mode in a network start or network join request.

Parameters
TypeDirectionArgument NameDescription
const sl_zigbee_zll_address_assignment_t *N/AaddressInfo

Information about the received packet.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

Returns

  • addressInfo Address assignment information.


sl_zigbee_af_zll_touch_link_target_cb#

void sl_zigbee_af_zll_touch_link_target_cb (const sl_zigbee_zll_network_t * networkInfo)

This callback is invoked when the device is a target of a touch link.

Parameters
TypeDirectionArgument NameDescription
const sl_zigbee_zll_network_t *N/AnetworkInfo

Returns

  • networkInfo Information about the network.


sl_zigbee_af_mac_filter_match_message_cb#

void sl_zigbee_af_mac_filter_match_message_cb (uint8_t filterIndexMatch, sl_zigbee_mac_passthrough_type_t messageType, sl_zigbee_rx_packet_info_t * packetInfo, uint8_t messageLength, uint8_t * messageContents)

A callback invoked by the EmberZNet stack when a raw MAC message that has matched one of the application's configured MAC filters.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AfilterIndexMatch

filter index match.

sl_zigbee_mac_passthrough_type_tN/AmessageType

message type.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

RX packet info.

uint8_tN/AmessageLength

message length.

uint8_t *N/AmessageContents

message contents.


sl_zigbee_af_d_gp_sent_cb#

void sl_zigbee_af_d_gp_sent_cb (sl_status_t status, uint8_t gpepHandle)

A callback to the GP endpoint to indicate the result of the GPDF transmission.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

An sl_status_t value indicating success or the reason for failure.

uint8_tN/AgpepHandle

The handle of the GPDF.


sl_zigbee_af_pan_id_conflict_cb#

sl_status_t sl_zigbee_af_pan_id_conflict_cb (int8_t conflictCount)

This handler is called by the stack to report the number of conflict reports exceeds SL_ZIGBEE_PAN_ID_CONFLICT_REPORT_THRESHOLD within a period of 1 minute )

Parameters
TypeDirectionArgument NameDescription
int8_tN/AconflictCount

Returns

  • An sl_status_t value indicating success or the reason for failure.


sl_zigbee_af_orphan_notification_cb#

void sl_zigbee_af_orphan_notification_cb (sl_802154_long_addr_t longId)

Inform the application that an orphan notification has been received. This is generally not useful for applications. It could be useful in testing and is included for this purpose.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_tN/AlongId

The 8 byte EUI64 of the sender.


sl_zigbee_af_counters_cb#

void sl_zigbee_af_counters_cb (sl_zigbee_counter_type_t type, sl_zigbee_counter_info_t Info)

This handler is called when the value of a counter has changed.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_counter_type_tN/Atype

Type of Counter

sl_zigbee_counter_info_tN/AInfo

Counter Info and value


sl_zigbee_af_mac_passthrough_filter_cb#

bool sl_zigbee_af_mac_passthrough_filter_cb (uint8_t * macHeader)

This handler is called for messages that need to be matched against mac passthrough filter.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/AmacHeader

Returns

  • True if mac passthrough filter was matched. False otherwise.


sl_zigbee_af_generate_cbke_keys_283k1_handler_cb#

void sl_zigbee_af_generate_cbke_keys_283k1_handler_cb (sl_status_t status, sl_zigbee_public_key_283k1_data_t * ephemeralPublicKey)

A callback by the Crypto Engine indicating that a new ephemeral public/private key pair has been generated. The public/private key pair is stored on the NCP, but only the associated public key is returned to the host. The node's associated certificate is also returned.

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The result of the CBKE operation.

sl_zigbee_public_key_283k1_data_t *N/AephemeralPublicKey

Returns

  • ephemeralPublicKey The generated ephemeral public key.


sl_zigbee_af_calculate_smacs_283k1_handler_cb#

void sl_zigbee_af_calculate_smacs_283k1_handler_cb (sl_status_t status, sl_zigbee_smac_data_t * initiatorSmac, sl_zigbee_smac_data_t * responderSmac)

A callback to indicate that the NCP has finished calculating the Secure Message Authentication Codes (SMAC) for both the initiator and responder. The associated link key is kept in temporary storage until the host tells the NCP to store or discard the key via sl_zigbee_clear_temporary_data_maybe_store_link_key().

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The Result of the CBKE operation.

sl_zigbee_smac_data_t *N/AinitiatorSmac
sl_zigbee_smac_data_t *N/AresponderSmac

Returns

  • initiatorSmac The calculated value of the initiator's SMAC

  • responderSmac The calculated value of the responder's SMAC


sl_zigbee_af_gpep_incoming_message_cb#

void sl_zigbee_af_gpep_incoming_message_cb (sl_zigbee_gp_status_t status, uint8_t gpdLink, uint8_t sequenceNumber, sl_zigbee_gp_address_t * addr, sl_zigbee_gp_security_level_t gpdfSecurityLevel, sl_zigbee_gp_key_type_t gpdfSecurityKeyType, bool autoCommissioning, uint8_t bidirectionalInfo, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint32_t mic, uint8_t proxyTableIndex, uint8_t gpdCommandPayloadLength, uint8_t * gpdCommandPayload, sl_zigbee_rx_packet_info_t * packetInfo)

A callback invoked by the ZigBee GP stack when a GPDF is received.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_gp_status_tN/Astatus

The status of the GPDF receive.

uint8_tN/AgpdLink

The gpdLink value of the received GPDF.

uint8_tN/AsequenceNumber

The GPDF sequence number.

sl_zigbee_gp_address_t *N/Aaddr

The address of the source GPD.

sl_zigbee_gp_security_level_tN/AgpdfSecurityLevel

The security level of the received GPDF.

sl_zigbee_gp_key_type_tN/AgpdfSecurityKeyType

The securityKeyType used to decrypt/authenticate the incoming GPDF.

boolN/AautoCommissioning

Whether the incoming GPDF had the auto-commissioning bit set.

uint8_tN/AbidirectionalInfo

Bidirectional information represented in bitfields, where bit0 holds the rxAfterTx of incoming gpdf and bit1 holds if tx queue is available for outgoing gpdf.

uint32_tN/AgpdSecurityFrameCounter

The security frame counter of the incoming GDPF.

uint8_tN/AgpdCommandId

The gpdCommandId of the incoming GPDF.

uint32_tN/Amic

The received MIC of the GPDF.

uint8_tN/AproxyTableIndex

The proxy table index of the corresponding proxy table entry to the incoming GPDF.

uint8_tN/AgpdCommandPayloadLength

The length of the GPD command payload.

uint8_t *N/AgpdCommandPayload

The GPD command payload.

sl_zigbee_rx_packet_info_t *N/ApacketInfo

sl_zigbee_af_rtos_stack_wakeup_isr_cb#

void sl_zigbee_af_rtos_stack_wakeup_isr_cb (void )

Rtos Stack Wakeup Isr Handler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_zigbee_af_radio_needs_calibrating_cb#

void sl_zigbee_af_radio_needs_calibrating_cb (void )

RadioNeedsCalibratingHandler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sl_zigbee_af_scan_error_cb#

void sl_zigbee_af_scan_error_cb (sl_status_t status)

scanErrorHandler

Parameters
TypeDirectionArgument NameDescription
sl_status_tN/Astatus

The error status of a scan


sl_zigbee_af_support_incoming_message_cb#

bool sl_zigbee_af_support_incoming_message_cb (sl_zigbee_aps_frame_t * apsFrame)

A callback invoked when receiving a message. Used when AF Support component is enabled on NCP. User can use apsFrame to filter for which ZCL messages they want to process on NCP. If this function returns true then the message is being processed on NCP, otherwise it will be forwarded to the Host.

Parameters
TypeDirectionArgument NameDescription
sl_zigbee_aps_frame_t *N/AapsFrame

The aps Frame