|
Z-Wave Protocol Controller Reference
|
#include "zwave_command_class_meter_control.h"#include "zwave_command_classes_utils.h"#include "zwave_command_class_meter_types.h"#include "attribute_store_defined_attribute_types.h"#include "zwave_command_class_indices.h"#include "zwave_controller_connection_info.h"#include "zwave_controller_utils.h"#include "zwave_command_handler.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"Classes | |
| struct | meter_reset_v6_frame |
Macros | |
| #define | LOG_TAG "zwave_command_class_meter" |
| #define | ATTRIBUTE(type) ATTRIBUTE_COMMAND_CLASS_METER_##type |
| #define | SCALE_BITMASK_MAX_LENTGH 4 |
| #define | METER_REPORT_VALUE_INDEX 4 |
Typedefs | |
| typedef struct meter_reset_v6_frame | meter_reset_v6_frame_t |
Functions | |
| static void | undefine_meter_values (attribute_store_node_t node) |
| Checks if an attribute is a Meter value, and undefines its Reported/ Desired values if it is. More... | |
| static sl_status_t | zwave_command_class_meter_reset (attribute_store_node_t value_node, uint8_t *frame, uint16_t *frame_length) |
| Prepares a Meter Reset Command. More... | |
| static sl_status_t | zwave_command_class_meter_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Prepares a Meter Get Command. More... | |
| static sl_status_t | zwave_command_class_meter_supported_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Frame resolution function for meter capabilities. Will send a Supported Get to v2 or newer nodes, and a Meter Get to v1 nodes. More... | |
| static void | on_meter_reset_send_data_complete (attribute_store_node_t node, resolver_rule_type_t rule_type, zpc_resolver_event_t event) |
| Decides what to do after we've sent a Meter Reset Command. More... | |
| static void | zwave_command_class_meter_on_version_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change) |
| Attribute callback function listening for Meter version attribute updates. More... | |
| static void | zwave_command_class_meter_on_supported_scales_attribute_update (attribute_store_node_t supported_scales_node, attribute_store_change_t change) |
| Attribute callback function listening for Supported scales attribute updates. More... | |
| static void | zwave_command_class_meter_on_supported_rate_types_attribute_update (attribute_store_node_t supported_rate_types_node, attribute_store_change_t change) |
| Attribute callback function listening for Supported Rate types attribute updates. More... | |
| static void | zwave_command_class_meter_on_rate_types_attribute_created (attribute_store_node_t rate_type_node, attribute_store_change_t change) |
| Attribute callback function listening for Rate type attribute creations. More... | |
| static sl_status_t | zwave_command_class_meter_handle_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Process an incoming Meter Report Command. More... | |
| static sl_status_t | zwave_command_class_meter_handle_supported_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Process an incoming Meter Supported Report Command. More... | |
| static sl_status_t | zwave_command_class_meter_control_handler (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Dispatches incoming Meter Commands to individual command handlers. More... | |
| sl_status_t | zwave_command_class_meter_control_init () |
| This function initialize the Meter Command Class control handler. More... | |
Variables | |
| static const attribute_store_type_t | default_attributes [] |
| static const attribute_store_type_t | value_attributes [] = {ATTRIBUTE(VALUE), ATTRIBUTE(PRECISION)} |
| static const attribute_store_type_t | rate_type_attributes [] = {ATTRIBUTE(RATE_TYPE)} |
| #define ATTRIBUTE | ( | type | ) | ATTRIBUTE_COMMAND_CLASS_METER_##type |
| #define LOG_TAG "zwave_command_class_meter" |
| #define METER_REPORT_VALUE_INDEX 4 |
| #define SCALE_BITMASK_MAX_LENTGH 4 |
| typedef struct meter_reset_v6_frame meter_reset_v6_frame_t |
|
static |
Decides what to do after we've sent a Meter Reset Command.
| node | Attribute Store node that was resolved |
| rule_type | The type of rule that was applied (Set/Get) |
| event | The outcome of the resolution. |
|
static |
Checks if an attribute is a Meter value, and undefines its Reported/ Desired values if it is.
| node | Attribute store node to check. |
|
static |
Dispatches incoming Meter 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 |
Prepares a Meter Get Command.
| node | Attribute Store node to resolve |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Process an incoming Meter Report Command.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Process an incoming Meter Supported Report Command.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
Parse the scales before the rate type due to the tree structure
|
static |
Attribute callback function listening for Rate type attribute creations.
It will create a value/precision set of attributes under
| rate_type_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Attribute callback function listening for Supported Rate types attribute updates.
It will create the list of Rate types under each supported Meter Scale.
| supported_rate_types_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Attribute callback function listening for Supported scales attribute updates.
It will create the list of scales under the supported Meter Type.
| supported_scales_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Attribute callback function listening for Meter version attribute updates.
| updated_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Prepares a Meter Reset Command.
| value_node | Attribute Store node to resolve |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
Frame resolution function for meter capabilities. Will send a Supported Get to v2 or newer nodes, and a Meter Get to v1 nodes.
| node | Attribute Store node to resolve |
| frame | Pointer at which frame data can be written. |
| frame_length | Pointer at which the frame data length can be written. |
|
static |
|
static |