Z-Wave Protocol Controller Reference
zwave_command_class_humidity_control_setpoint.c File 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"
Include dependency graph for zwave_command_class_humidity_control_setpoint.c:

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 ()
 

Macro Definition Documentation

◆ ATTRIBUTE

#define ATTRIBUTE (   type)    ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_SETPOINT_##type

◆ LOG_TAG

#define LOG_TAG   "zwave_command_class_humidity_control_setpoint"

◆ MASK_PRECISION

#define MASK_PRECISION    HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_PRECISION1_MASK

◆ MASK_SCALE

#define MASK_SCALE    HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SCALE1_MASK

◆ MASK_SIZE

#define MASK_SIZE    HUMIDITY_CONTROL_SETPOINT_CAPABILITIES_REPORT_PROPERTIES2_SIZE1_MASK

◆ MAX_SUPPORTED_SETPOINT_MODES

#define MAX_SUPPORTED_SETPOINT_MODES   4

Enumeration Type Documentation

◆ humidity_control_setpoint_value_type

Enumerator
SETPOINT_CURRENT_VALUE 
SETPOINT_MIN_VALUE 
SETPOINT_MAX_VALUE 

Function Documentation

◆ check_setpoint_value_bounds()

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

Parameters
setpoint_nodeCurrent setpoint node
value_rawValue to check (precision will be applied to it)
precisionPrecision of value
Returns
true Value in bounds
false Value not in bounds or bounds cannot be found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_all_supported_humidity_setpoint_type()

void create_all_supported_humidity_setpoint_type ( attribute_store_node_t  endpoint_node,
humidity_control_setpoint_supported_types_t  supported_types 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_humidity_setpoint_type_node()

void create_humidity_setpoint_type_node ( attribute_store_node_t  endpoint_node,
humidity_control_setpoint_type_t  setpoint_type 
)
Here is the caller graph for this function:

◆ get_associated_setpoint_type()

humidity_control_setpoint_type_t get_associated_setpoint_type ( attribute_store_node_t  current_node)
Here is the caller graph for this function:

◆ get_setpoint_node()

attribute_store_node_t get_setpoint_node ( attribute_store_node_t  endpoint_node,
humidity_control_setpoint_type_t  setpoint_type 
)
Here is the caller graph for this function:

◆ get_setpoint_value()

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

Parameters
valueRaw value
precisionPrecision of value
Returns
double Real value
Here is the caller graph for this function:

◆ interpret_value_from_report()

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.

Warning
This function doesn't check any bounds in frame_data
Parameters
setpoint_nodeCurrent setpoint node
value_typeDetermines the attribute field of value report (min_value, max_value or value)
frame_dataFrame raw data
start_indexStarting index in the frame raw data
Returns
uint8_t Byte read count
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_all_humidity_setpoint_type_attributes()

void remove_all_humidity_setpoint_type_attributes ( attribute_store_node_t  endpoint_node)
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_capabilities_get()

static sl_status_t zwave_command_class_humidity_control_setpoint_capabilities_get ( attribute_store_node_t  node,
uint8_t *  frame,
uint16_t *  frame_length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_capabilities_handle_report()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_control_handler()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_get()

static sl_status_t zwave_command_class_humidity_control_setpoint_get ( attribute_store_node_t  node,
uint8_t *  frame,
uint16_t *  frame_length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_handle_report()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_on_scale_attribute_update()

static void zwave_command_class_humidity_control_setpoint_on_scale_attribute_update ( attribute_store_node_t  updated_node,
attribute_store_change_t  change 
)
static
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_on_version_attribute_update()

static void zwave_command_class_humidity_control_setpoint_on_version_attribute_update ( attribute_store_node_t  updated_node,
attribute_store_change_t  change 
)
static
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_set()

static sl_status_t zwave_command_class_humidity_control_setpoint_set ( attribute_store_node_t  node,
uint8_t *  frame,
uint16_t *  frame_length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_supported_handle_report()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_humidity_control_setpoint_supported_types_get()

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 
)
static
Here is the caller graph for this function: