Z-Wave Protocol Controller Reference
zwave_controller_callbacks.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
50#ifndef ZWAVE_CONTROLLER_CALLBACKS_H
51#define ZWAVE_CONTROLLER_CALLBACKS_H
55#include "zwave_generic_types.h"
57
62typedef struct {
65 void (*on_state_updated)(zwave_network_management_state_t state);
66
69 void (*on_error)(zwave_network_management_error_t error);
70
77 void (*on_node_id_assigned)(zwave_node_id_t node_id,
78 bool included_by_us,
79 zwave_protocol_t inclusion_protocol);
80
86 void (*on_node_deleted)(zwave_node_id_t node_id);
87
101 void (*on_node_added)(sl_status_t status,
102 const zwave_node_info_t *nif,
104 const zwave_dsk_t dsk,
105 zwave_keyset_t granted_keys,
106 zwave_kex_fail_type_t kex_fail_type,
107 zwave_protocol_t inclusion_protocol);
108
115 void (*on_network_address_update)(zwave_home_id_t home_id,
117
129 void (*on_new_network_entered)(zwave_home_id_t home_id,
131 zwave_keyset_t granted_keys,
132 zwave_kex_fail_type_t kex_fail_type);
133
142 void (*on_keys_report)(bool csa, zwave_keyset_t keys);
143
152 void (*on_dsk_report)(uint8_t input_length,
153 zwave_dsk_t dsk,
154 zwave_keyset_t keys);
155
169 void (*on_application_frame_received)(
170 const zwave_controller_connection_info_t *connection_info,
171 const zwave_rx_receive_options_t *rx_options,
172 const uint8_t *frame_data,
173 uint16_t frame_length);
174
188 void (*on_protocol_frame_received)(
189 const zwave_controller_connection_info_t *connection_info,
190 const zwave_rx_receive_options_t *rx_options,
191 const uint8_t *frame_data,
192 uint16_t frame_length);
193
204 void (*on_protocol_cc_encryption_request)(
205 const zwave_node_id_t destination_node_id,
206 const uint8_t payload_length,
207 const uint8_t *const payload,
208 const uint8_t protocol_metadata_length,
209 const uint8_t *const protocol_metadata,
210 const uint8_t use_supervision,
211 const uint8_t session_id);
212
223 void (*on_smart_start_inclusion_request)(uint32_t home_id,
224 bool already_included,
225 const zwave_node_info_t *node_info,
226 zwave_protocol_t inclusion_protocol);
227
234 void (*on_node_information)(zwave_node_id_t node_id,
235 const zwave_node_info_t *node_info);
236
240 void (*on_new_suc)(zwave_node_id_t suc_node_id);
241
244 void (*on_node_info_req_failed)(zwave_node_id_t node_id);
245
248 void (*on_multicast_group_deleted)(zwave_multicast_group_id_t group_id);
249
253 void (*on_request_neighbor_update)(uint8_t status);
254
259 void (*on_frame_transmission)(bool transmission_successful,
260 const zwapi_tx_report_t *tx_report,
267 void (*on_rx_frame_received)(zwave_node_id_t node_id);
269
274
278#define ZWAVE_CONTROLLER_MAXIMUM_CALLBACK_SUBSCRIBERS 20
282#define ZWAVE_CONTROLLER_RESET_STEP_MIN_PRIORITY 0
283
285#define ZWAVE_CONTROLLER_CLEAN_UP_ASSOCIATIONS_STEP_PRIORITY 1
287#define ZWAVE_CONTROLLER_DEVICE_RESET_LOCALLY_STEP_PRIORITY 2
289#define ZWAVE_CONTROLLER_SMART_START_LIST_UPDATE_STEP_PRIORITY 3
291#define ZWAVE_CONTROLLER_TX_FLUSH_RESET_STEP_PRIORITY 4
293#define ZWAVE_CONTROLLER_ZWAVE_NETWORK_MANAGEMENT_RESET_STEP_PRIORITY 5
294
295#ifdef __cplusplus
296extern "C" {
297#endif
298
337
352
370 const zwave_controller_reset_step_t step_function, int32_t priority);
371
378void zwave_controller_on_reset_step_complete(int32_t priority);
379
385
386#ifdef __cplusplus
387}
388#endif
391#endif //ZWAVE_CONTROLLER_CALLBACKS_H
uint32_t sl_status_t
Definition: sl_status.h:139
sl_status_t zwave_controller_register_reset_step(const zwave_controller_reset_step_t step_function, int32_t priority)
Let another component register a step to perform when being reset.
Definition: zwave_controller_callbacks.c:86
sl_status_t zwave_controller_register_callbacks(const zwave_controller_callbacks_t *callbacks)
Let another component register its callbacks for Z-Wave Controller events.
Definition: zwave_controller_callbacks.c:39
sl_status_t(* zwave_controller_reset_step_t)(void)
Definition: zwave_controller_callbacks.h:273
sl_status_t zwave_controller_deregister_callbacks(const zwave_controller_callbacks_t *callbacks)
Let another component deregister its callbacks for Z-Wave Controller events.
Definition: zwave_controller_callbacks.c:67
void zwave_controller_on_reset_step_complete(int32_t priority)
Informs the Z-Wave Controller that a Reset Step is completed.
Definition: zwave_controller_callbacks.c:122
void zwave_controller_callbacks_init()
Reset all callback structures.
Definition: zwave_controller_callbacks.c:141
uint8_t zwave_multicast_group_id_t
Definition: zwave_controller_types.h:43
uint8_t zwave_dsk_t[ZWAVE_DSK_LENGTH]
Definition: zwave_controller_types.h:41
enum zwave_protocol zwave_protocol_t
Z-Wave Inclusion Protocol (Z-Wave / Z-Wave Long Range).
uint8_t zwave_keyset_t
Definition: zwave_keyset_definitions.h:32
zwave_network_management_state_t
States of the Network Management module.
Definition: zwave_network_management_types.h:119
zwave_network_management_error_t
Definition: zwave_network_management_types.h:28
zwave_kex_fail_type_t
Error codes used in S2 inclusion.
Definition: zwave_network_management_types.h:59
uint32_t zwave_home_id_t
Z-Wave HomeID type.
Definition: zwave_node_id_definitions.h:87
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
Detailed report and data about Z-Wave transmissions.
Definition: zwapi_protocol_transport.h:225
The following structure holds all the callbacks this module will emit.
Definition: zwave_controller_callbacks.h:62
Structure holding information about the source and destination when transmitting and receiving Z-Wave...
Definition: zwave_controller_connection_info.h:87
Structure holding a Z-Wave node info frame.
Definition: zwave_controller_types.h:50
Describing receive parameters of a frame.
Definition: zwave_rx_definitions.h:35
const zwave_home_id_t home_id
const zwave_node_id_t node_id
Z-Wave API for transport application layer interface.
static send_data_state_t state
Definition: zwave_crc16_transport.c:52
static zwave_s2_network_callbacks_t callbacks
Definition: zwave_s2_network.c:30