|
Z-Wave Protocol Controller Reference
|
#include <stdlib.h>#include "zwave_command_class_humidity_control_setpoint.h"#include "zwave_command_class_humidity_control_types.h"#include "zwave_command_classes_utils.h"#include "ZW_classcmd.h"#include "zwave_command_class_indices.h"#include "zwave_command_handler.h"#include "zwave_command_class_version_types.h"#include "zpc_attribute_store_network_helper.h"#include "attribute_store_defined_attribute_types.h"#include "attribute_resolver.h"#include "attribute_store.h"#include "attribute_store_helper.h"#include "sl_log.h"Macros | |
| #define | LOG_TAG "zwave_command_class_humidity_control_setpoint" |
| #define | ATTRIBUTE(type) ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_##type |
| #define | MASK_PRECISION HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_PRECISION1_MASK |
| #define | MASK_SCALE HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SCALE1_MASK |
| #define | MASK_SIZE HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SIZE1_MASK |
| #define | MAX_SUPPORTED_SETPOINT_MODES 4 |
Enumerations | |
| enum | humidity_control_setpoint_value_type { SETPOINT_CURRENT_VALUE , SETPOINT_MIN_VALUE , SETPOINT_MAX_VALUE } |
Functions | |
| double | get_setpoint_value (humidity_control_setpoint_value_t value, humidity_control_setpoint_precision_t precision) |
| Get setpoint real value from raw value and precision. More... | |
| bool | check_setpoint_value_bounds (attribute_store_node_t setpoint_node, humidity_control_setpoint_value_t value_raw, humidity_control_setpoint_precision_t precision) |
| Check if current value can be set (in bounds of value_min and value_max) More... | |
| uint8_t | interpret_value_from_report (attribute_store_node_t setpoint_node, enum humidity_control_setpoint_value_type value_type, const uint8_t *frame_data, uint8_t start_index) |
| Interpret value from a report frame and store it in the attribute store. More... | |
| void | remove_all_humidity_setpoint_type_attributes (attribute_store_node_t endpoint_node) |
| void | create_humidity_setpoint_type_node (attribute_store_node_t endpoint_node, humidity_control_setpoint_type_t setpoint_type) |
| void | create_all_supported_humidity_setpoint_type (attribute_store_node_t endpoint_node, humidity_control_setpoint_supported_types_t supported_types) |
| humidity_control_setpoint_type_t | get_associated_setpoint_type (attribute_store_node_t current_node) |
| attribute_store_node_t | get_setpoint_node (attribute_store_node_t endpoint_node, humidity_control_setpoint_type_t setpoint_type) |
| static void | zwave_command_class_humidity_control_setpoint_on_version_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change) |
| static void | zwave_command_class_humidity_control_setpoint_on_scale_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change) |
| static sl_status_t | zwave_command_class_humidity_control_setpoint_supported_types_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| sl_status_t | zwave_command_class_humidity_control_setpoint_supported_handle_report (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| static sl_status_t | zwave_command_class_humidity_control_setpoint_capabilities_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| sl_status_t | zwave_command_class_humidity_control_setpoint_capabilities_handle_report (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| static sl_status_t | zwave_command_class_humidity_control_setpoint_set (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| static sl_status_t | zwave_command_class_humidity_control_setpoint_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| sl_status_t | zwave_command_class_humidity_control_setpoint_handle_report (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| sl_status_t | zwave_command_class_humidity_control_setpoint_control_handler (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| sl_status_t | zwave_command_class_humidity_control_setpoint_init () |
| #define ATTRIBUTE | ( | type | ) | ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_##type |
| #define LOG_TAG "zwave_command_class_humidity_control_setpoint" |
| #define MASK_PRECISION HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_PRECISION1_MASK |
| #define MASK_SCALE HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SCALE1_MASK |
| #define MASK_SIZE HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SIZE1_MASK |
| #define MAX_SUPPORTED_SETPOINT_MODES 4 |
| bool check_setpoint_value_bounds | ( | attribute_store_node_t | setpoint_node, |
| humidity_control_setpoint_value_t | value_raw, | ||
| humidity_control_setpoint_precision_t | precision | ||
| ) |
Check if current value can be set (in bounds of value_min and value_max)
If value_min and value_max field doesn't exists, it will return false
| setpoint_node | Current setpoint node |
| value_raw | Value to check (precision will be applied to it) |
| precision | Precision of value |
| void create_all_supported_humidity_setpoint_type | ( | attribute_store_node_t | endpoint_node, |
| humidity_control_setpoint_supported_types_t | supported_types | ||
| ) |
| void create_humidity_setpoint_type_node | ( | attribute_store_node_t | endpoint_node, |
| humidity_control_setpoint_type_t | setpoint_type | ||
| ) |
| humidity_control_setpoint_type_t get_associated_setpoint_type | ( | attribute_store_node_t | current_node | ) |
| attribute_store_node_t get_setpoint_node | ( | attribute_store_node_t | endpoint_node, |
| humidity_control_setpoint_type_t | setpoint_type | ||
| ) |
| double get_setpoint_value | ( | humidity_control_setpoint_value_t | value, |
| humidity_control_setpoint_precision_t | precision | ||
| ) |
Get setpoint real value from raw value and precision.
get_setpoint_value(10, 0) => 10.0 get_setpoint_value(10, 1) => 1.0 get_setpoint_value(10, 2) => 0.1
| value | Raw value |
| precision | Precision of value |
| uint8_t interpret_value_from_report | ( | attribute_store_node_t | setpoint_node, |
| enum humidity_control_setpoint_value_type | value_type, | ||
| const uint8_t * | frame_data, | ||
| uint8_t | start_index | ||
| ) |
Interpret value from a report frame and store it in the attribute store.
| setpoint_node | Current setpoint node |
| value_type | Determines the attribute field of value report (min_value, max_value or value) |
| frame_data | Frame raw data |
| start_index | Starting index in the frame raw data |
| void remove_all_humidity_setpoint_type_attributes | ( | attribute_store_node_t | endpoint_node | ) |
|
static |
| sl_status_t zwave_command_class_humidity_control_setpoint_capabilities_handle_report | ( | const zwave_controller_connection_info_t * | connection_info, |
| const uint8_t * | frame_data, | ||
| uint16_t | frame_length | ||
| ) |
| sl_status_t zwave_command_class_humidity_control_setpoint_control_handler | ( | const zwave_controller_connection_info_t * | connection_info, |
| const uint8_t * | frame_data, | ||
| uint16_t | frame_length | ||
| ) |
|
static |
| sl_status_t zwave_command_class_humidity_control_setpoint_handle_report | ( | const zwave_controller_connection_info_t * | connection_info, |
| const uint8_t * | frame_data, | ||
| uint16_t | frame_length | ||
| ) |
|
static |
|
static |
|
static |
| sl_status_t zwave_command_class_humidity_control_setpoint_supported_handle_report | ( | const zwave_controller_connection_info_t * | connection_info, |
| const uint8_t * | frame_data, | ||
| uint16_t | frame_length | ||
| ) |
|
static |