Z-Wave Protocol Controller Reference
zwave_controller_utils.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
22#ifndef ZWAVE_CONTROLLER_UTILS_H
23#define ZWAVE_CONTROLLER_UTILS_H
24
25// includes from this component
27
28// Includes from other components
30#include "zwave_tx.h"
31
32// Interfaces
34
35// Generic includes
36#include <stddef.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#define ZWAVE_CMD_CLASS_PROTOCOL 0x01 /* Z-Wave protocol class command */
43#define ZWAVE_CMD_CLASS_PROTOCOL_LR 0x04 /* Z-Wave Long Range protocol class command */
44
58 uint32_t qos_priority,
59 uint32_t discard_timeout_ms,
60 const on_zwave_tx_send_data_complete_t on_send_complete,
61 void *user);
62
75 const zwave_controller_connection_info_t *connection_info,
76 const zwave_rx_receive_options_t *rx_options,
77 const uint8_t *frame_data,
78 uint16_t frame_length);
79
90 const zwave_node_info_t *node_info);
91
98void zwave_sl_log_dsk(const char *tag, const zwave_dsk_t dsk);
99
109 const uint8_t *nif,
110 uint8_t nif_length);
111
122 uint8_t *nif,
123 uint8_t *nif_length);
124
134 const uint8_t *nif,
135 uint8_t nif_length);
136
164sl_status_t zwave_parse_nif(const uint8_t *nif,
165 size_t nif_length,
166 zwave_command_class_t *supported_command_classes,
167 size_t *supported_command_classes_length,
168 zwave_command_class_t *controlled_command_classes,
169 size_t *controlled_command_classes_length);
170
177const char *
179
185
186#ifdef __cplusplus
187}
188#endif
189
190#endif // ZWAVE_CONTROLLER_UTILS_H
191
uint32_t sl_status_t
Definition: sl_status.h:139
zwave_controller_encapsulation_scheme_t
Definition: zwave_controller_connection_info.h:33
uint8_t zwave_dsk_t[ZWAVE_DSK_LENGTH]
Definition: zwave_controller_types.h:41
zwave_controller_encapsulation_scheme_t zpc_highest_security_class()
Get the highest Security Class of the ZPC for the current network.
Definition: zwave_controller_utils.c:473
void zwave_sl_log_dsk(const char *tag, const zwave_dsk_t dsk)
Prints a DSK to the log, using the log.
Definition: zwave_controller_utils.c:264
void zwave_sl_log_frame_data(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)
Log the Z-Wave received frame data using the sl_log system.
Definition: zwave_controller_utils.c:70
bool is_command_class_in_supported_list(zwave_command_class_t command_class, const uint8_t *nif, uint8_t nif_length)
Verifies if a CC is in a raw array of Command Classes.
Definition: zwave_controller_utils.c:329
void zwave_sl_log_nif_data(zwave_node_id_t node_id, const zwave_node_info_t *node_info)
Log the Z-Wave received NIF using the sl_log system.
Definition: zwave_controller_utils.c:151
const char * zwave_network_scheme_str(zwave_controller_encapsulation_scheme_t scheme)
Return a string representation of the Network Scheme.
Definition: zwave_controller_utils.c:444
void zwave_command_class_list_unpack(zwave_node_info_t *node_info, const uint8_t *nif, uint8_t nif_length)
Unpack the given NIF and parse it into command class list in zwave_node_info and fill the length of r...
Definition: zwave_controller_utils.c:280
void zwave_command_class_list_pack(const zwave_node_info_t *node_info, uint8_t *nif, uint8_t *nif_length)
Pack the given NIF into a uint8_t array.
Definition: zwave_controller_utils.c:308
sl_status_t zwave_send_nop_to_node(zwave_node_id_t node_id, uint32_t qos_priority, uint32_t discard_timeout_ms, const on_zwave_tx_send_data_complete_t on_send_complete, void *user)
Send a Z-Wave NOP frame to Z-Wave NodeID.
Definition: zwave_controller_utils.c:39
sl_status_t zwave_parse_nif(const uint8_t *nif, size_t nif_length, zwave_command_class_t *supported_command_classes, size_t *supported_command_classes_length, zwave_command_class_t *controlled_command_classes, size_t *controlled_command_classes_length)
Parses a NIF byte array and converts it into a lists of supported/controlled Command Classes.
Definition: zwave_controller_utils.c:415
uint16_t zwave_command_class_t
Definition: zwave_generic_types.h:29
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
void(* on_zwave_tx_send_data_complete_t)(uint8_t status, const zwapi_tx_report_t *tx_info, void *user)
Function signature for callbacks invoked when send data has completed.
Definition: zwave_tx.h:168
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_node_id_t node_id