Z-Wave Protocol Controller Reference
zwave_controller_callbacks_t Struct Reference

The following structure holds all the callbacks this module will emit. More...

#include <zwave_controller_callbacks.h>

Collaboration diagram for zwave_controller_callbacks_t:

Public Attributes

void(* on_state_updated )(zwave_network_management_state_t state)
 
void(* on_error )(zwave_network_management_error_t error)
 
void(* on_node_id_assigned )(zwave_node_id_t node_id, bool included_by_us, zwave_protocol_t inclusion_protocol)
 
void(* on_node_deleted )(zwave_node_id_t node_id)
 
void(* on_node_added )(sl_status_t status, const zwave_node_info_t *nif, zwave_node_id_t node_id, const zwave_dsk_t dsk, zwave_keyset_t granted_keys, zwave_kex_fail_type_t kex_fail_type, zwave_protocol_t inclusion_protocol)
 
void(* on_network_address_update )(zwave_home_id_t home_id, zwave_node_id_t node_id)
 
void(* on_new_network_entered )(zwave_home_id_t home_id, zwave_node_id_t node_id, zwave_keyset_t granted_keys, zwave_kex_fail_type_t kex_fail_type)
 
void(* on_keys_report )(bool csa, zwave_keyset_t keys)
 
void(* on_dsk_report )(uint8_t input_length, zwave_dsk_t dsk, zwave_keyset_t keys)
 
void(* on_application_frame_received )(const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)
 
void(* on_protocol_frame_received )(const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)
 
void(* on_protocol_cc_encryption_request )(const zwave_node_id_t destination_node_id, const uint8_t payload_length, const uint8_t *const payload, const uint8_t protocol_metadata_length, const uint8_t *const protocol_metadata, const uint8_t use_supervision, const uint8_t session_id)
 
void(* on_smart_start_inclusion_request )(uint32_t home_id, bool already_included, const zwave_node_info_t *node_info, zwave_protocol_t inclusion_protocol)
 
void(* on_node_information )(zwave_node_id_t node_id, const zwave_node_info_t *node_info)
 
void(* on_new_suc )(zwave_node_id_t suc_node_id)
 
void(* on_node_info_req_failed )(zwave_node_id_t node_id)
 
void(* on_multicast_group_deleted )(zwave_multicast_group_id_t group_id)
 
void(* on_request_neighbor_update )(uint8_t status)
 
void(* on_frame_transmission )(bool transmission_successful, const zwapi_tx_report_t *tx_report, zwave_node_id_t node_id)
 
void(* on_rx_frame_received )(zwave_node_id_t node_id)
 

Detailed Description

The following structure holds all the callbacks this module will emit.

Member Data Documentation

◆ on_application_frame_received

void(* zwave_controller_callbacks_t::on_application_frame_received) (const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)

This callback is fired when an application frame has been received and fully de-encapsulated/decrypted. The application can use this frame.

Parameters
connection_infoInformation about the source and destination node if the frame, as well as information about how the frame was encapsulated
rx_optionsReceive specific information
frame_dataPointer to de-encapsulated data
frame_lengthLength of data

◆ on_dsk_report

void(* zwave_controller_callbacks_t::on_dsk_report) (uint8_t input_length, zwave_dsk_t dsk, zwave_keyset_t keys)

This function is called durring a S2 inclusion, the receiver must call zwave_network_management_dsk_set with the full dsk of the node

Parameters
input_lengthNumber of leading bytes in the dsk which has been blanked out.
dskThe dsk reported by the device, which input_length bytes set to zero.
keysThis field is used to advertise the requested keys by the joining node.

◆ on_error

void(* zwave_controller_callbacks_t::on_error) (zwave_network_management_error_t error)

This function is called when an error occurs in a network management operation

◆ on_frame_transmission

void(* zwave_controller_callbacks_t::on_frame_transmission) (bool transmission_successful, const zwapi_tx_report_t *tx_report, zwave_node_id_t node_id)

Notify that a singlecast frame transmission has been completed.

Parameters
transmission_successfulIndicates if the transmission succeeded or failed.
tx_reportPointer to Tx Report data.
node_idNodeID for which frame transmission was done

◆ on_keys_report

void(* zwave_controller_callbacks_t::on_keys_report) (bool csa, zwave_keyset_t keys)

This function is used to inform which S2 keys have been requested during S2 bootstrapping, the receiver must call zwave_network_management_keys_set with the granted keys

Parameters
csaThis field is used to indicate if the joining node is requesting CSA
keysThis field is used to advertise the requested keys by the joining node.

◆ on_multicast_group_deleted

void(* zwave_controller_callbacks_t::on_multicast_group_deleted) (zwave_multicast_group_id_t group_id)

Z-Wave TX Group was deleted.

Parameters
group_idGroup ID that was deleted.

◆ on_network_address_update

void(* zwave_controller_callbacks_t::on_network_address_update) (zwave_home_id_t home_id, zwave_node_id_t node_id)

This function is called then the controller network address (either NodeID and/or HomeID) has changed. This happens after a Network inclusion, network exclusion or set default operation.

Parameters
home_idNew HomeID. (may be identical to previous)
node_idNew NodeID (may be identical to previous)

◆ on_new_network_entered

void(* zwave_controller_callbacks_t::on_new_network_entered) (zwave_home_id_t home_id, zwave_node_id_t node_id, zwave_keyset_t granted_keys, zwave_kex_fail_type_t kex_fail_type)

This function is called then the controller has entered a new network and all bootstrapping/initial setup procedures are completed. The network is ready to be operated. This can happen either after a controller set_default or after a learn mode operation.

Parameters
home_idHome ID of the new network.
node_idNode ID in the new network.
granted_keysis used to indicate which network keys were granted during bootstrapping.
kex_fail_typeThis field is used to indicate which error occurred in case S2 bootstrapping was not successful

◆ on_new_suc

void(* zwave_controller_callbacks_t::on_new_suc) (zwave_node_id_t suc_node_id)

The SIS node Id was updated

Parameters
suc_node_idNode id of the new SUC

◆ on_node_added

void(* zwave_controller_callbacks_t::on_node_added) (sl_status_t status, const zwave_node_info_t *nif, zwave_node_id_t node_id, const zwave_dsk_t dsk, zwave_keyset_t granted_keys, zwave_kex_fail_type_t kex_fail_type, zwave_protocol_t inclusion_protocol)

This function is called when a node has been assigned its security keys. This is the end of the protocol part of the inclusion process. This function is trigged both on initiated with the and_node, add_node_with_dsk add_node_proxy_inclusion.

Parameters
statusStatus of the provisioning
nif_lengthlength of the node information structure
nifpoints to a node information structure
node_idNode ID of the new node.
dskDSK of the new node.
granted_keysis used to indicate which network keys were granted during bootstrapping.
kex_fail_typeThis field is used to indicate which error occurred in case S2
inclusion_protocolSet to Z-wave protocol of the inclusion bootstrapping was not successful

◆ on_node_deleted

void(* zwave_controller_callbacks_t::on_node_deleted) (zwave_node_id_t node_id)

A node has been deleted from the network

Parameters
node_idNodeID of the node that was removed from our network. The value 0 can be used and indicates that a node has been excluded from a foreign network.

◆ on_node_id_assigned

void(* zwave_controller_callbacks_t::on_node_id_assigned) (zwave_node_id_t node_id, bool included_by_us, zwave_protocol_t inclusion_protocol)

This function is called when a node has been added to the network and has been assigned a node ID. Secure provisioning had not yet completed when this function is called

Parameters
node_idNodeID of the newly included node.
included_by_usSet to true if we included the node, false if another controller included it.
inclusion_protocolSet to Z-wave protocol of the inclusion from zwave_protocol_t

◆ on_node_info_req_failed

void(* zwave_controller_callbacks_t::on_node_info_req_failed) (zwave_node_id_t node_id)

Node Info Request has failed

Parameters
node_idNodeID for which the node info request failed

◆ on_node_information

void(* zwave_controller_callbacks_t::on_node_information) (zwave_node_id_t node_id, const zwave_node_info_t *node_info)

node has sent its node info either unsolicited or as a response to a ZW_RequestNodeInfo call

Parameters
node_idThe source of the node information frame.
node_infoNode information frame of the sending node.

◆ on_protocol_cc_encryption_request

void(* zwave_controller_callbacks_t::on_protocol_cc_encryption_request) (const zwave_node_id_t destination_node_id, const uint8_t payload_length, const uint8_t *const payload, const uint8_t protocol_metadata_length, const uint8_t *const protocol_metadata, const uint8_t use_supervision, const uint8_t session_id)

This callback is fired when a protocol cc encryption request is received.

Parameters
destination_node_idID of the destination node.
payload_lengthLength of the payload to be encrypted.
payloadPointer to the payload data to be encrypted.
protocol_metadata_lengthLength of the protocol metadata.
protocol_metadataPointer to the protocol metadata.
use_supervisionWhether the frame needs supervision.
session_idSession ID associated with the request.

◆ on_protocol_frame_received

void(* zwave_controller_callbacks_t::on_protocol_frame_received) (const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length)

This callback is fired when an protocol frame has been received and fully de-encapsulated/decrypted.

Parameters
connection_infoInformation about the source and destination node if the frame, as well as information about how the frame was encapsulated
rx_optionsReceive specific information
frame_dataPointer to de-encapsulated data
frame_lengthLength of data

◆ on_request_neighbor_update

void(* zwave_controller_callbacks_t::on_request_neighbor_update) (uint8_t status)

Request Node Neighbor Discovery status information This callback is invoked when a new event in a Neighbor discovery happened.

Parameters
statusrepresents Neighbor Discovery Status

◆ on_rx_frame_received

void(* zwave_controller_callbacks_t::on_rx_frame_received) (zwave_node_id_t node_id)

Notify that we received a frame from a NodeID. It can be both Singlecast, Multicast, or special frames (e.g. NIF).

Parameters
node_idZ-Wave NodeID that sent us a frame.

◆ on_smart_start_inclusion_request

void(* zwave_controller_callbacks_t::on_smart_start_inclusion_request) (uint32_t home_id, bool already_included, const zwave_node_info_t *node_info, zwave_protocol_t inclusion_protocol)

A SmartStart inclusion request was received.

Parameters
home_idSmartStart DSK derived HomeId of the Smart Start node wanting to be included
already_includedNode is already included into another network.
node_infoNode information frame of the sending node.
inclusion_protocolUsed to indicate which protocol is intended for inclusion

◆ on_state_updated

void(* zwave_controller_callbacks_t::on_state_updated) (zwave_network_management_state_t state)

This function is called when the network management state changes


The documentation for this struct was generated from the following file: