|
Z-Wave Protocol Controller Reference
|
#include "zwave_command_class_basic.h"#include "zwave_command_classes_utils.h"#include <stdlib.h>#include <assert.h>#include "zwave_command_class_indices.h"#include "zwave_controller_utils.h"#include "zwave_command_handler.h"#include "zpc_attribute_store_network_helper.h"#include "attribute_store_defined_attribute_types.h"#include "ZW_classcmd.h"#include "zwave_tx.h"#include "zwave_tx_scheme_selector.h"#include "attribute_store_helper.h"#include "attribute_resolver.h"#include "attribute_timeouts.h"#include "dotdot_mqtt_generated_commands.h"#include "sl_log.h"Macros | |
| #define | LOG_TAG "zwave_command_class_basic" |
| #define | ATTRIBUTE(type) ATTRIBUTE_COMMAND_CLASS_BASIC_##type |
| #define | REPORT_VALUE_INDEX 2 |
| #define | REPORT_TARGET_VALUE_INDEX 3 |
| #define | REPORT_DURATION_INDEX 4 |
| #define | SET_VALUE_INDEX 2 |
| #define | ON 0xFF |
| #define | OFF 0x00 |
Enumerations | |
| enum | basic_probe_status_t { NOT_REQUESTED = 0 , REQUESTED = 1 , ANSWERED = 2 } |
Functions | |
| static basic_probe_status_t | get_basic_probe_status (attribute_store_node_t endpoint_id_node) |
| get the Basic probe status for an endpoint node More... | |
| static sl_status_t | set_basic_probe_status (attribute_store_node_t endpoint_id_node, basic_probe_status_t probe_status) |
| Sets the Basic probe status for an endpoint node. More... | |
| static bool | do_not_try_basic (attribute_store_node_t nif_node) |
| Checks if we can use Basic to control a node. More... | |
| static void | send_basic_probe (attribute_store_node_t endpoint_node) |
| Sends a Basic Probe to an endpoint. More... | |
| static sl_status_t | zwave_command_class_basic_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| static sl_status_t | zwave_command_class_basic_set (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| static sl_status_t | zwave_command_class_basic_handle_set (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| Handles incoming Basic Set Commands. More... | |
| static sl_status_t | zwave_command_class_basic_handle_report (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length) |
| static void | on_endpoint_interview_completed (attribute_store_node_t endpoint_node) |
| static void | on_nif_created (attribute_store_node_t node, attribute_store_change_t change) |
| sl_status_t | zwave_command_class_basic_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_basic_init () |
| Initialize the basic command class handler. More... | |
Variables | |
| static const attribute_store_type_t | v1_attributes [] = {ATTRIBUTE(VALUE), ATTRIBUTE(VERSION)} |
| #define ATTRIBUTE | ( | type | ) | ATTRIBUTE_COMMAND_CLASS_BASIC_##type |
| #define LOG_TAG "zwave_command_class_basic" |
| #define OFF 0x00 |
| #define ON 0xFF |
| #define REPORT_DURATION_INDEX 4 |
| #define REPORT_TARGET_VALUE_INDEX 3 |
| #define REPORT_VALUE_INDEX 2 |
| #define SET_VALUE_INDEX 2 |
| enum basic_probe_status_t |
|
static |
Checks if we can use Basic to control a node.
| nif_node | Attribute Store node for the NIF. It can be Secure or Non-secure NIF. |
|
static |
get the Basic probe status for an endpoint node
| endpoint_id_node | Attribute Store node for the Endpoint ID |
|
static |
|
static |
|
static |
Sends a Basic Probe to an endpoint.
| endpoint_node | Attribute Store node for the Endpoint |
|
static |
Sets the Basic probe status for an endpoint node.
| endpoint_id_node | Attribute Store node for the Endpoint ID |
| probe_status | Value of the probe status to set |
| sl_status_t zwave_command_class_basic_control_handler | ( | const zwave_controller_connection_info_t * | connection_info, |
| const uint8_t * | frame_data, | ||
| uint16_t | frame_length | ||
| ) |
|
static |
|
static |
|
static |
Handles incoming Basic Set Commands.
It will convert it into a Generated OnOff command (either On or Off)
| connection_info | Connection information with the sender |
| frame_data | Pointer to a frame data |
| frame_length | Length of the data that can be read in the frame_data pointer. |
|
static |