|
Z-Wave Protocol Controller Reference
|
#include "zwave_command_class_configuration.h"#include "zwave_command_classes_utils.h"#include "zwave_command_class_configuration_types.h"#include "attribute_store_defined_attribute_types.h"#include "zwave_command_class_indices.h"#include "zwave_command_handler.h"#include "zwave_controller_connection_info.h"#include "zwave_controller_utils.h"#include "zpc_attribute_store_network_helper.h"#include "zpc_attribute_resolver.h"#include "attribute_store.h"#include "attribute_store_helper.h"#include "attribute_resolver.h"#include <string.h>#include "sl_log.h"Macros | |
| #define | LOG_TAG "zwave_command_class_configuration" |
| #define | ATTRIBUTE(type) ATTRIBUTE_COMMAND_CLASS_CONFIGURATION_##type |
| #define | CONFIGURATION_SIZE_MASK 0x7 |
| #define | CONFIGURATION_FORMAT_MASK 0x38 |
| #define | CONFIGURATION_READ_ONLY_MASK 0x40 |
| #define | CONFIGURATION_ALTERING_CAPABILITIES_MASK 0x80 |
| #define | CONFIGURATION_ADVANCED_MASK 0x01 |
| #define | CONFIGURATION_NO_BULK_SUPPORT_MASK 0x02 |
| #define | CONFIGURATION_SET_VALUE_INDEX 4 |
| #define | CONFIGURATION_REPORT_VALUE_INDEX 4 |
| #define | CONFIGURATION_BULK_SET_VALUE_INDEX 6 |
| #define | CONFIGURATION_BULK_REPORT_FIRST_VALUE_INDEX 7 |
| #define | CONFIGURATION_PROPERTIES_REPORT_FIRST_VALUE_INDEX 5 |
Functions | |
| static bool | is_bulk_supported (attribute_store_node_t configuration_attribute_node) |
| Checks if the node we are talking to supports Bulk Commands. More... | |
| static bool | is_parameter_read_only (attribute_store_node_t configuration_attribute_node) |
| Verifies if a configuration parameter is read-only. More... | |
| static attribute_store_node_t | create_configuration_parameter (attribute_store_node_t endpoint_node, configuration_parameter_id_t parameter_id) |
| Fetch or create a configuration parameter with all its sub-attributes in the attribute store. More... | |
| static configuration_parameter_size_t | get_configuration_parameter_size (attribute_store_node_t parameter_id_node) |
| Get the configuration parameter size for a given parameter id. More... | |
| static configuration_parameter_value_t | get_configuration_parameter_value (attribute_store_node_t parameter_id_node) |
| Get the configuration parameter value for a given parameter id. More... | |
| static configuration_parameter_format_t | get_configuration_parameter_format (attribute_store_node_t parameter_id_node) |
| Get the configuration parameter format for a given parameter id. More... | |
| static void | set_parameter_value_in_buffer (uint8_t *frame, configuration_parameter_value_t value, configuration_parameter_size_t size, configuration_parameter_format_t format) |
| Set the parameter value value in the frame buffer based on the parameter size, MSB first. More... | |
| static void | save_parameter_value (const uint8_t *frame, attribute_store_node_t parameter_id_node, attribute_store_type_t value_type) |
| static sl_status_t | set_default_parameter_properties (attribute_store_node_t parameter_id_node) |
| Sets the default parameters properties for a parameter in case a node does not support Properties Get Commands. More... | |
| static void | set_all_parameters_to_their_default_value (attribute_store_node_t node) |
| Set the all Configuration parameters to their default value. More... | |
| static void | undefine_all_parameter_values (attribute_store_node_t node) |
| Undefine the all Configuration parameters values, so they get resolved again. More... | |
| static attribute_store_node_t | get_parameter_id_node (zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id, configuration_parameter_id_t parameter_id) |
| static sl_status_t | zwave_command_class_configuration_handle_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Configuration Report Commands. More... | |
| static sl_status_t | zwave_command_class_configuration_handle_bulk_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Configuration Bulk Report Commands. More... | |
| static sl_status_t | zwave_command_class_configuration_handle_properties_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Configuration Properties Report Commands. More... | |
| static sl_status_t | zwave_command_class_configuration_handle_info_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Configuration Info Report Commands. More... | |
| static sl_status_t | zwave_command_class_configuration_handle_name_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Configuration Name Report Commands. More... | |
| static sl_status_t | zwave_command_class_configuration_control_handler (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Dispatches incoming Configuration Commands to individual command handlers. More... | |
| static sl_status_t | zwave_command_class_configuration_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Get or Bulk Get Command to find out the value of a parameter. More... | |
| static sl_status_t | zwave_command_class_configuration_set (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Set or Bulk Set Command to set the value of a parameter. More... | |
| static sl_status_t | zwave_command_class_configuration_get_next_parameter (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Properties Get or Configuration Get Command to find out if a parameter ID is supported. More... | |
| static sl_status_t | zwave_command_class_configuration_name_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Name Get or fills up data automatically if the command is not supported. More... | |
| static sl_status_t | zwave_command_class_configuration_info_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Info Get or fills up data automatically if the command is not supported. More... | |
| static sl_status_t | zwave_command_class_configuration_properties_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Properties Get or fills up data automatically if the command is not supported. More... | |
| static sl_status_t | zwave_command_class_configuration_default_reset (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Configuration Default Reset. More... | |
| static void | on_default_reset_send_data_complete (attribute_store_node_t node, resolver_rule_type_t rule_type, zpc_resolver_event_t event) |
| static void | on_next_supported_parameter_id_not_found (attribute_store_node_t node) |
| Callback function for when a Get did not succeed in finding the next parameter id. We may have more to search for, so we mark it as defined in this case to trigger a new get resolution with a new parameter id. More... | |
| static void | on_configuration_get_failure (attribute_store_node_t parameter_value_node) |
| Deletes the Configuration Parameter ID if we could not get its value for v1-v2 nodes. More... | |
| static void | zwave_command_class_configuration_on_configuration_parameter_created (attribute_store_node_t parameter_id_node, attribute_store_change_t change) |
| Attribute callback function listening for Configuration Paramter ID creations and creating all the sub-attributes. More... | |
| static void | zwave_command_class_configuration_on_version_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change) |
| Attribute callback function listening for Configuration version attribute updates. More... | |
| sl_status_t | zwave_command_class_configuration_init () |
| This function initialize the Configuration Command Class handler. More... | |
Variables | |
| static const attribute_store_type_t | default_attributes [] = {ATTRIBUTE(NEXT_SUPPORTED_PARAMETER_ID), ATTRIBUTE(BULK_SUPPORT)} |
| static const attribute_store_type_t | configuration_parameter_attributes [] |
| #define ATTRIBUTE | ( | type | ) | ATTRIBUTE_COMMAND_CLASS_CONFIGURATION_##type |
| #define CONFIGURATION_ADVANCED_MASK 0x01 |
| #define CONFIGURATION_ALTERING_CAPABILITIES_MASK 0x80 |
| #define CONFIGURATION_BULK_REPORT_FIRST_VALUE_INDEX 7 |
| #define CONFIGURATION_BULK_SET_VALUE_INDEX 6 |
| #define CONFIGURATION_FORMAT_MASK 0x38 |
| #define CONFIGURATION_NO_BULK_SUPPORT_MASK 0x02 |
| #define CONFIGURATION_PROPERTIES_REPORT_FIRST_VALUE_INDEX 5 |
| #define CONFIGURATION_READ_ONLY_MASK 0x40 |
| #define CONFIGURATION_REPORT_VALUE_INDEX 4 |
| #define CONFIGURATION_SET_VALUE_INDEX 4 |
| #define CONFIGURATION_SIZE_MASK 0x7 |
| #define LOG_TAG "zwave_command_class_configuration" |
|
static |
Fetch or create a configuration parameter with all its sub-attributes in the attribute store.
| endpoint_node | Attribute store node for the Endpoint ID |
| parameter_id | Configuration Parameter ID to create in the Attribute Store |
|
static |
Get the configuration parameter format for a given parameter id.
| parameter_id_node | Attribute Store Node for the Parameter ID. |
|
static |
Get the configuration parameter size for a given parameter id.
| parameter_id_node | Attribute Store Node for the Parameter ID. |
|
static |
Get the configuration parameter value for a given parameter id.
| parameter_id_node | Attribute Store Node for the Parameter ID. |
|
static |
|
static |
Checks if the node we are talking to supports Bulk Commands.
| configuration_attribute_node | Attribute store node attribute under the Endpoint ID |
|
static |
Verifies if a configuration parameter is read-only.
| configuration_attribute_node | Configuration Parameter node, located under ATTRIBUTE(PARAMETER_ID) |
|
static |
Deletes the Configuration Parameter ID if we could not get its value for v1-v2 nodes.
| parameter_value_node | Attribute store node for the Parameter Value |
|
static |
|
static |
Callback function for when a Get did not succeed in finding the next parameter id. We may have more to search for, so we mark it as defined in this case to trigger a new get resolution with a new parameter id.
| node | Attribute store node for the NEXT_SUPPORTED_PARAMETER_ID |
|
static |
|
static |
Set the all Configuration parameters to their default value.
| node | Attribute store node under the Endpoint for which all parameters have to be set to default. |
|
static |
Sets the default parameters properties for a parameter in case a node does not support Properties Get Commands.
| parameter_id_node | Attribute Store Node for the Parameter ID. |
|
static |
Set the parameter value value in the frame buffer based on the parameter size, MSB first.
| frame | "Slice" of the received frame starting where the value is to be written |
| value | Configuration parameter value to write in the frame |
| size | Configuration parameter size |
| format | Configuration parameter format |
|
static |
Undefine the all Configuration parameters values, so they get resolved again.
| node | Attribute store node under the Endpoint for which all parameters have to be undefined. |
|
static |
Dispatches incoming Configuration Commands to individual command handlers.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Generates a Configuration Default Reset.
| node | Attribute Store node that the resolver tries to resolve. Expects a ATTRIBUTE(DEFAULT_RESET_REQUESTED) type |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Generates a Configuration Get or Bulk Get Command to find out the value of a parameter.
| node | Attribute Store node that the resolver tries to resolve. Expects a PARAMETER_VALUE under PARAMETER_ID |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Generates a Configuration Properties Get or Configuration Get Command to find out if a parameter ID is supported.
| node | Attribute Store node that the resolver tries to resolve. |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Handle incoming Configuration Bulk Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Handle incoming Configuration Info Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Handle incoming Configuration Name Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Handle incoming Configuration Properties Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Handle incoming Configuration Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Generates a Configuration Info Get or fills up data automatically if the command is not supported.
| node | Attribute Store node that the resolver tries to resolve. Expects a ATTRIBUTE(PARAMETER_INFO) type |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Generates a Configuration Name Get or fills up data automatically if the command is not supported.
| node | Attribute Store node that the resolver tries to resolve. Expects a ATTRIBUTE(PARAMETER_NAME) type |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Attribute callback function listening for Configuration Paramter ID creations and creating all the sub-attributes.
| parameter_id_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Attribute callback function listening for Configuration version attribute updates.
| updated_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Generates a Configuration Properties Get or fills up data automatically if the command is not supported.
| node | Attribute Store node that the resolver tries to resolve. Expects a ATTRIBUTE(PARAMETER_MIN_VALUE) type |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Generates a Configuration Set or Bulk Set Command to set the value of a parameter.
| node | Attribute Store node that the resolver tries to resolve. Expects a PARAMETER_VALUE under PARAMETER_ID |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |