Z-Wave Protocol Controller Reference
zwave_command_classes_utils.c File Reference
#include "zwave_command_classes_utils.h"
#include "zwave_command_class_version.h"
#include "ZW_classcmd.h"
#include "zwave_unid.h"
#include "zwave_tx.h"
#include "zwave_tx_scheme_selector.h"
#include "zwave_controller_utils.h"
#include "zpc_attribute_store.h"
#include "zpc_attribute_store_network_helper.h"
#include "attribute_store_defined_attribute_types.h"
#include "attribute_store.h"
#include "attribute_store_helper.h"
#include "sl_log.h"
#include <assert.h>
#include <math.h>
Include dependency graph for zwave_command_classes_utils.c:

Macros

#define LOG_TAG   "zwave_command_class_utils"
 

Functions

attribute_store_node_t zwave_command_class_get_endpoint_node (const zwave_controller_connection_info_t *connection_info)
 Find the Z-Wave Endpoint ID Node attribute based on a const zwave_controller_connection_info_t object. More...
 
attribute_store_node_t zwave_command_class_get_node_id_node (const zwave_controller_connection_info_t *connection_info)
 Find the Z-Wave NodeID Node attribute based on a const zwave_controller_connection_info_t object. More...
 
zwave_cc_version_t zwave_command_class_get_version_from_node (attribute_store_node_t node, zwave_command_class_t command_class)
 Find the version of the command class by navigating up to the endpoint from a given attribute store node. More...
 
bool has_reports_to_follow (attribute_store_node_t node)
 Verifies if a node has some Reports to Follow. More...
 
reports_to_follow_t get_reports_to_follow (attribute_store_node_t node)
 Gets the number of Reports to Follow for a node. More...
 
sl_status_t set_reports_to_follow (attribute_store_node_t node, reports_to_follow_t reports_to_follow)
 Places a ATTRIBUTE_REPORTS_TO_FOLLOW attribute under an attribute if it does not exist and set it to the requested reports_to_follow value. More...
 
void set_command_status_value (attribute_store_node_t command_status_node, command_status_values_t reported, command_status_values_t desired)
 Set the desired and reported value of a command_status_t type of node. More...
 
sl_status_t zwave_command_class_send_report (const zwave_controller_connection_info_t *connection_info, const uint16_t report_size, const uint8_t *const report_data)
 function to send report frames with default tx options. More...
 
bool is_zwave_command_class_filtered_for_root_device (zwave_command_class_t command_class, attribute_store_node_t updated_node)
 function helper function to help Command Classes decide if they should create the supporting node attributes on Command Class version attribute update. More...
 
bool is_using_zpc_highest_security_class (const zwave_controller_connection_info_t *connection)
 function helper function that determines if a transmission was done using the ZPC's highest security class More...
 
bool is_actuator_command_class (zwave_command_class_t command_class)
 Verifies if a Command Class is an actuator Command Class. More...
 
zwave_role_type_t get_zwave_node_role_type (zwave_node_id_t node_id)
 Provides the Role Type of a node. More...
 
bool is_portable_end_node (attribute_store_node_t node)
 Verifies if a Node is a Portable End Node. (PS / PEN Role type) More...
 
int32_t command_class_get_int32_value (uint8_t size, uint8_t precision, const uint8_t *value)
 Parse a value and pack it into a uint32. More...
 
int32_t get_signed_value_from_frame_and_size (const uint8_t *frame, uint8_t size)
 Extracts a 1,2 or 4 bytes signed value from a frame. More...
 
uint32_t get_unsigned_value_from_frame_and_size (const uint8_t *frame, uint8_t size)
 Extracts a 1,2 or 4 bytes unsigned value from a frame. More...
 
int16_t zwave_temperature_to_ucl_temperature (int32_t value, uint8_t precision, uint8_t scale)
 Convert a value from the Z-Wave world (precision = [0..7] and C° + F) into a UCL (Zigbee) world (precision = 2 and C°) More...
 
int32_t ucl_temperature_to_zwave_temperature (int16_t value, uint8_t precision, uint8_t scale)
 Convert a value from the UCL world (Zigbee) (precision = 2 and C°) to the ZWave world (precision = [0..7] and C° + F) More...
 
uint8_t time_to_zwave_duration (clock_time_t time)
 Converts a clock_time_t duration to a Z-Wave Command Class duration byte. More...
 
clock_time_t zwave_duration_to_time (uint8_t zwave_duration)
 Converts a duration byte encoded for a Z-Wave command class and returns its corresponding value in clock_time_t. More...
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "zwave_command_class_utils"