|
Z-Wave Protocol Controller Reference
|
The following structure holds all the callbacks this module will emit. More...
#include <zwave_controller_callbacks.h>
The following structure holds all the callbacks this module will emit.
| 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.
| connection_info | Information about the source and destination node if the frame, as well as information about how the frame was encapsulated |
| rx_options | Receive specific information |
| frame_data | Pointer to de-encapsulated data |
| frame_length | Length of data |
| 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
| input_length | Number of leading bytes in the dsk which has been blanked out. |
| dsk | The dsk reported by the device, which input_length bytes set to zero. |
| keys | This field is used to advertise the requested keys by the joining node. |
| 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
| 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.
| transmission_successful | Indicates if the transmission succeeded or failed. |
| tx_report | Pointer to Tx Report data. |
| node_id | NodeID for which frame transmission was done |
| 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
| csa | This field is used to indicate if the joining node is requesting CSA |
| keys | This field is used to advertise the requested keys by the joining node. |
| void(* zwave_controller_callbacks_t::on_multicast_group_deleted) (zwave_multicast_group_id_t group_id) |
Z-Wave TX Group was deleted.
| group_id | Group ID that was deleted. |
| 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.
| home_id | New HomeID. (may be identical to previous) |
| node_id | New NodeID (may be identical to previous) |
| 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.
| home_id | Home ID of the new network. |
| node_id | Node ID in the new network. |
| granted_keys | is used to indicate which network keys were granted during bootstrapping. |
| kex_fail_type | This field is used to indicate which error occurred in case S2 bootstrapping was not successful |
| void(* zwave_controller_callbacks_t::on_new_suc) (zwave_node_id_t suc_node_id) |
The SIS node Id was updated
| suc_node_id | Node id of the new SUC |
| 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.
| status | Status of the provisioning |
| nif_length | length of the node information structure |
| nif | points to a node information structure |
| node_id | Node ID of the new node. |
| dsk | DSK of the new node. |
| granted_keys | is used to indicate which network keys were granted during bootstrapping. |
| kex_fail_type | This field is used to indicate which error occurred in case S2 |
| inclusion_protocol | Set to Z-wave protocol of the inclusion bootstrapping was not successful |
| void(* zwave_controller_callbacks_t::on_node_deleted) (zwave_node_id_t node_id) |
A node has been deleted from the network
| node_id | NodeID 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. |
| 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
| node_id | NodeID of the newly included node. |
| included_by_us | Set to true if we included the node, false if another controller included it. |
| inclusion_protocol | Set to Z-wave protocol of the inclusion from zwave_protocol_t |
| void(* zwave_controller_callbacks_t::on_node_info_req_failed) (zwave_node_id_t node_id) |
Node Info Request has failed
| node_id | NodeID for which the node info request failed |
| 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
| node_id | The source of the node information frame. |
| node_info | Node information frame of the sending node. |
| 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.
| destination_node_id | ID of the destination node. |
| payload_length | Length of the payload to be encrypted. |
| payload | Pointer to the payload data to be encrypted. |
| protocol_metadata_length | Length of the protocol metadata. |
| protocol_metadata | Pointer to the protocol metadata. |
| use_supervision | Whether the frame needs supervision. |
| session_id | Session ID associated with the request. |
| 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.
| connection_info | Information about the source and destination node if the frame, as well as information about how the frame was encapsulated |
| rx_options | Receive specific information |
| frame_data | Pointer to de-encapsulated data |
| frame_length | Length of data |
| 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.
| status | represents Neighbor Discovery Status |
| 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).
| node_id | Z-Wave NodeID that sent us a frame. |
| 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.
| home_id | SmartStart DSK derived HomeId of the Smart Start node wanting to be included |
| already_included | Node is already included into another network. |
| node_info | Node information frame of the sending node. |
| inclusion_protocol | Used to indicate which protocol is intended for inclusion |
| void(* zwave_controller_callbacks_t::on_state_updated) (zwave_network_management_state_t state) |
This function is called when the network management state changes