|
Z-Wave Protocol Controller Reference
|
Utils for Command Classes handlers. More...
Classes | |
| struct | zwave_minimum_frame |
More... | |
Macros | |
| #define | FAHRENHEIT_TO_DEGREES(value) ((value - 32.0) * 5 / 9); |
| #define | DEGREES_TO_FAHRENHEIT(value) (value * 9 / 5.0) + 32; |
| #define | PROBE_BACK_OFF 500 |
Typedefs | |
| typedef struct zwave_minimum_frame | zwave_minimum_frame_t |
More... | |
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... | |
| 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 zwave_value, uint8_t zwave_precision, uint8_t zwave_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 ucl_value, uint8_t zwave_precision, uint8_t zwave_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... | |
| 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... | |
Utils for Command Classes handlers.
This module provides some utilities helping with functionalities relating to command classes
| #define DEGREES_TO_FAHRENHEIT | ( | value | ) | (value * 9 / 5.0) + 32; |
| #define FAHRENHEIT_TO_DEGREES | ( | value | ) | ((value - 32.0) * 5 / 9); |
| #define PROBE_BACK_OFF 500 |
Additional delay in ms to wait before issuing a Get Command after a node has finished a transition.
| typedef struct zwave_minimum_frame zwave_minimum_frame_t |
Minimal Z-Wave Frame that can be sent (Command Class / Command).
| 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.
| size | |
| precision | |
| value |
| reports_to_follow_t get_reports_to_follow | ( | attribute_store_node_t | node | ) |
Gets the number of Reports to Follow for a node.
| node | Attribute Store node under which we want to check if there are some reports to follow. |
| 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.
| [in] | frame | Pointer to the frame data where the value is stored |
| [in] | size | Size of the value (1, 2 or 4 bytes) |
| 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.
| [in] | frame | Pointer to the frame data where the value is stored |
| [in] | size | Size of the value (1, 2 or 4 bytes) |
| zwave_role_type_t get_zwave_node_role_type | ( | zwave_node_id_t | node_id | ) |
Provides the Role Type of a node.
| node_id | The node ID which Role Type is requested for |
| bool has_reports_to_follow | ( | attribute_store_node_t | node | ) |
Verifies if a node has some Reports to Follow.
| node | Attribute Store node under which we want to check if there are some reports to follow. |
| bool is_actuator_command_class | ( | zwave_command_class_t | command_class | ) |
Verifies if a Command Class is an actuator Command Class.
| command_class | The Command Class to verify |
| bool is_portable_end_node | ( | attribute_store_node_t | node | ) |
Verifies if a Node is a Portable End Node. (PS / PEN Role type)
| node | Any attribute store node under the NodeID node |
| 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
| connection | Pointer to Controller connection info to check against. |
| 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.
| command_class | The Command Class that is to be verified |
| updated_node | Attribute Store node that was updated. (it can be anything under an endpoint.) |
| 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.
| command_status_node | Attribute Store node to set |
| reported | Reported value to set. |
| desired | Desired value to set. |
| 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.
| node | Attribute Store node under which to set a reports to follow value. |
| reports_to_follow | The value to set in the ATTRIBUTE_REPORTS_TO_FOLLOW attribute |
| uint8_t time_to_zwave_duration | ( | clock_time_t | time | ) |
Converts a clock_time_t duration to a Z-Wave Command Class duration byte.
Refer to "Duration encoding" in the Application Command Class specifications note that value 0xFE is interpreted as unknown here.
| time | The system time duration |
| int32_t ucl_temperature_to_zwave_temperature | ( | int16_t | ucl_value, |
| uint8_t | zwave_precision, | ||
| uint8_t | zwave_scale | ||
| ) |
Convert a value from the UCL world (Zigbee) (precision = 2 and C°) to the ZWave world (precision = [0..7] and C° + F)
| ucl_value | Current UCL value |
| zwave_precision | Expected Z-Wave precision |
| zwave_scale | Expected Z-Wave scale (0 : C°, 1 : F) |
| 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.
| connection_info |
| 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.
| connection_info |
| 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.
| node | Attribute Store node under the endpoint |
| command_class | Command class for which we want the version |
| 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.
| connection_info | Info about the connection properties of this frame. |
| report_size | The length of this frame. |
| report_data | The data payload of the report frame. |
| 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.
Refer to "Duration encoding" in the Application Command Class specifications note that value 0xFE is interpreted as unknown here.
| zwave_duration | The value used in the Set / Report. |
| int16_t zwave_temperature_to_ucl_temperature | ( | int32_t | zwave_value, |
| uint8_t | zwave_precision, | ||
| uint8_t | zwave_scale | ||
| ) |
Convert a value from the Z-Wave world (precision = [0..7] and C° + F) into a UCL (Zigbee) world (precision = 2 and C°)
| zwave_value | Current Z-Wave value |
| zwave_precision | Reported Z-Wave precision |
| zwave_scale | Reported Z-Wave scale (0 : C°, 1 : F) |