|
Z-Wave Protocol Controller Reference
|
#include "zwave_command_class_central_scene.h"#include "zwave_command_classes_utils.h"#include "zwave_command_class_agi.h"#include <stdbool.h>#include "zwave_command_class_central_scene_types.h"#include "attribute_store_defined_attribute_types.h"#include "ZW_classcmd.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 "zwave_unid.h"#include "attribute_store.h"#include "attribute_store_helper.h"#include "attribute_resolver.h"#include "attribute_timeouts.h"#include "dotdot_mqtt_generated_commands.h"#include "sl_log.h"Classes | |
| struct | central_scene_state |
| Full state of a Central Scene supporting node. More... | |
Typedefs | |
| typedef struct central_scene_state | central_scene_state_t |
| Full state of a Central Scene supporting node. More... | |
Functions | |
| static uint8_t | get_byte_highest_bit (uint8_t byte) |
| Finds the highest bit set in a byte Bits will be denote as 8..1 with 8 the MSB and 1 the LSB. More... | |
| static central_scene_key_attribute_t | get_default_max_key_attribute (attribute_store_node_t endpoint_node) |
| Computes what default max key attribute a node can support based on its version. More... | |
| static central_scene_key_attribute_t | get_supported_attributes (attribute_store_node_t endpoint_node) |
| Reads from the attribute store the maximum Key attribute used by a node. More... | |
| static central_scene_key_attribute_t | calculate_max_supported_attributes (const uint8_t *frame, central_scene_scene_t scene_bitmasks, uint8_t number_of_bitmasks_bytes) |
| Calcuates from a received frame maximum Key attribute used by a node. More... | |
| static void | get_state (attribute_store_node_t endpoint_node, central_scene_state_t *state) |
| Reads the state (last active scene) of a supporting node. More... | |
| static void | set_state (attribute_store_node_t endpoint_node, const central_scene_state_t *state) |
| Save the state (last active scene) of a supporting node in the attribute store. More... | |
| static central_scene_scene_t | get_active_scene (attribute_store_node_t endpoint_node, central_scene_scene_t received_scene, central_scene_key_attribute_t received_key_attribute) |
| Maps the received scene notification / key attribute to a unique active scene. More... | |
| static void | return_scene_to_idle (attribute_store_node_t endpoint_node) |
| Sets back the current scene to IDLE. More... | |
| static sl_status_t | zwave_command_class_central_scene_handle_notification_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Central Scene Notification Commands. More... | |
| static sl_status_t | zwave_command_class_central_scene_handle_supported_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Central Scene Supported Report Commands. More... | |
| static sl_status_t | zwave_command_class_central_scene_handle_configuration_report_command (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Handle incoming Central Scene Configuration Report Commands. More... | |
| static sl_status_t | zwave_command_class_central_scene_control_handler (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length) |
| Dispatches incoming Central Scene Commands to individual command handlers. More... | |
| static sl_status_t | zwave_command_class_central_scene_supported_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Central Scene Supported Get Command. More... | |
| static sl_status_t | zwave_command_class_central_scene_configuration_get (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Central Scene Configuration Get Command. More... | |
| static sl_status_t | zwave_command_class_central_scene_configuration_set (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length) |
| Generates a Central Scene Configuration Set Command. More... | |
| static void | zwave_command_class_central_scene_on_version_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change) |
| Attribute callback function listening for Central Scene version attribute updates. More... | |
| sl_status_t | zwave_command_class_central_scene_init () |
| This function initialize the Central Scene Command Class handler. More... | |
Variables | |
| static const attribute_store_type_t | attribute_list [] |
| #define ATTRIBUTE | ( | type | ) | ATTRIBUTE_COMMAND_CLASS_CENTRAL_SCENE_##type |
| #define CONFIGURATION_REPORT_SLOW_REFRESH_MASK (1 << 7) |
| #define CONFIGURATION_REPORT_SLOW_REFRESH_SUPPORT_INDEX 2 |
| #define DEFAULT_SCENE_HELD_DOWN_TIMEOUT_VALUE (5 * CLOCK_SECOND) |
| #define LOG_TAG "zwave_command_class_central_scene" |
| #define NO_SCENE_ACTIVE 0 |
| #define NOTIFICATION_KEY_ATTRIBUTE_INDEX 3 |
| #define NOTIFICATION_KEY_ATTRIBUTE_MASK 0x7 |
| #define NOTIFICATION_SCENE_NUMBER_INDEX 4 |
| #define NOTIFICATION_SEQ_NUMBER_INDEX 2 |
| #define NOTIFICATION_SLOW_REFRESH_MASK (1 << 7) |
| #define SLOW_REFRESH_DEFAULT_VALUE false |
| #define SLOW_REFRESH_SCENE_TIMEOUT_VALUE (60 * CLOCK_SECOND) |
| #define SUPPORTED_REPORT_BITMASKS_INDEX 4 |
| #define SUPPORTED_REPORT_IDENTICAL_MASK 1 |
| #define SUPPORTED_REPORT_NUMBER_OF_BITMASK_MASK 3 << 1 |
| #define SUPPORTED_REPORT_SLOW_REFRESH_MASK 1 << 7 |
| #define SUPPORTED_REPORT_SLOW_REFRESH_SUPPORT_INDEX 3 |
| #define SUPPORTED_REPORT_SUPPORTED_SCENES_INDEX 2 |
| #define V1_KEY_ATTRIBUTES 3 |
| #define V2_KEY_ATTRIBUTES 7 |
| #define V3_KEY_ATTRIBUTES 7 |
| typedef struct central_scene_state central_scene_state_t |
Full state of a Central Scene supporting node.
|
static |
Calcuates from a received frame maximum Key attribute used by a node.
| frame | Pointer pointing at the frame bitmask masks of the Supported Report |
| scene_bitmasks | How many scenes bitmasks are included in the frame |
| number_of_bitmasks_bytes | How many bitmask byte are included per scene in the frame. |
|
static |
Maps the received scene notification / key attribute to a unique active scene.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene |
| received_scene | Scene value received in the Central Scene Notification |
| received_key_attribute | Key attribute value received in the Central Scene Notification |
|
static |
Finds the highest bit set in a byte Bits will be denote as 8..1 with 8 the MSB and 1 the LSB.
| byte | the byte to inspect |
|
static |
Computes what default max key attribute a node can support based on its version.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene |
|
static |
Reads the state (last active scene) of a supporting node.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene | |
| [out] | state | Pointer to a state struct that will be filled with the values retrieved from the attribute store. |
|
static |
Reads from the attribute store the maximum Key attribute used by a node.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene |
|
static |
Sets back the current scene to IDLE.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene |
|
static |
Save the state (last active scene) of a supporting node in the attribute store.
| endpoint_node | Endpoint ID node for the endpoint supporting Central Scene |
| state | Pointer to a state struct that will be used to save values in the attribute store. |
|
static |
Generates a Central Scene Configuration Get Command.
| 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 |
Generates a Central Scene Configuration Set Command.
| 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 |
Dispatches incoming Central Scene 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 |
Handle incoming Central Scene 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 |
Handle incoming Central Scene Notification 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 Central Scene Supported Report Commands.
| info | zwave_controller_connection_info_t object. |
| frame | Pointer to frame data |
| frame_length | Number of bytes contained in the frame |
|
static |
Attribute callback function listening for Central Scene version attribute updates.
| updated_node | Attribute Store node that was modified. |
| change | Type of change applied to the node. |
|
static |
Generates a Central Scene Supported Get Command.
| 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. |