Z-Wave Protocol Controller Reference
zwave_controller_utils.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "sl_log.h"
#include "zpc_converters.h"
#include "zwave_unid.h"
#include "zwave_tx_scheme_selector.h"
#include "zwave_controller_utils.h"
#include "zwave_controller_types.h"
#include "zwave_controller_keyset.h"
#include "zwave_command_class_indices.h"
Include dependency graph for zwave_controller_utils.c:

Macros

#define LOG_TAG   "zwave_controller_utils"
 
#define DEBUG_MESSAGE_BUFFER_LENGTH   512
 

Functions

sl_status_t zwave_send_nop_to_node (zwave_node_id_t node, 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. More...
 
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. More...
 
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. More...
 
void zwave_sl_log_dsk (const char *tag, const zwave_dsk_t dsk)
 Prints a DSK to the log, using the log. More...
 
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 resulted command class list. More...
 
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. More...
 
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. More...
 
static sl_status_t zwave_parse_nif_list_until_marker_or_end (const uint8_t *nif, size_t nif_length, size_t *final_nif_index, zwave_command_class_t *user_list, size_t *user_list_length)
 Parses a byte array for Command Classes until the end or a COMMAND_CLASS_CONTROL_MARK. More...
 
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. More...
 
const char * zwave_network_scheme_str (zwave_controller_encapsulation_scheme_t scheme)
 Return a string representation of the Network Scheme. More...
 
zwave_controller_encapsulation_scheme_t zpc_highest_security_class ()
 Get the highest Security Class of the ZPC for the current network. More...
 

Variables

static const uint8_t nop_frame [1] = {0}
 

Macro Definition Documentation

◆ DEBUG_MESSAGE_BUFFER_LENGTH

#define DEBUG_MESSAGE_BUFFER_LENGTH   512

◆ LOG_TAG

#define LOG_TAG   "zwave_controller_utils"

Function Documentation

◆ zwave_parse_nif_list_until_marker_or_end()

static sl_status_t zwave_parse_nif_list_until_marker_or_end ( const uint8_t *  nif,
size_t  nif_length,
size_t *  final_nif_index,
zwave_command_class_t user_list,
size_t *  user_list_length 
)
static

Parses a byte array for Command Classes until the end or a COMMAND_CLASS_CONTROL_MARK.

Parameters
nifThe byte array to parse for Command Class identifiers to look for.
nif_lengthThe number of elements contained in the nif byte array
final_nif_indexThe index at which we stopped parsing the nif byte array, due to end of array or a COMMAND_CLASS_CONTROL_MARK
user_listA pointer to an array for copying the list of parsed Command Class identifiers.
user_list_lengthA pointer to write the number of elements that have been copied to the user_list array.
Returns
SL_STATUS_OK if parsing went well.
Here is the caller graph for this function:

Variable Documentation

◆ nop_frame

const uint8_t nop_frame[1] = {0}
static