Z-Wave Protocol Controller Reference
zwave_command_class_scene_activation_control.c File Reference
#include "zwave_command_class_scene_activation_control.h"
#include "zwave_command_classes_utils.h"
#include "zwave_command_class_switch_color.h"
#include "zwave_command_class_indices.h"
#include "zwave_controller_connection_info.h"
#include "zwave_command_handler.h"
#include "zpc_attribute_store_network_helper.h"
#include "zpc_attribute_resolver.h"
#include "zwave_unid.h"
#include "zwave_command_class_local_scenes_types.h"
#include "attribute_store_defined_attribute_types.h"
#include "ZW_classcmd.h"
#include "attribute_store_helper.h"
#include "attribute_resolver.h"
#include "dotdot_mqtt.h"
#include "dotdot_mqtt_generated_commands.h"
#include "sl_log.h"
Include dependency graph for zwave_command_class_scene_activation_control.c:

Macros

#define LOG_TAG   "zwave_command_class_scene_activation"
 
#define ATTRIBUTE(type)   ATTRIBUTE_COMMAND_CLASS_SCENE_##type
 

Functions

static void pause_actuator_command_class_resolution (attribute_store_node_t endpoint_node)
 Pauses the resolution of Binary Switch, Color and Multilevel Switch CC until the scene activation has been made. More...
 
static void resume_actuator_command_class_resolution (attribute_store_node_t endpoint_node)
 Resumes resolution and undefines the reported values for the Binary Switch, Color and Multilevel Switch CC. More...
 
static sl_status_t scene_activation_set (attribute_store_node_t node, uint8_t *frame, uint16_t *frame_length)
 Prepares a Scene Activation Set Command. More...
 
static void on_version_attribute_update (attribute_store_node_t updated_node, attribute_store_change_t change)
 Attribute callback function listening for Scene Activation version attribute updates. More...
 
static void on_scene_activation_set_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 Scene Activation Set Command. More...
 
static sl_status_t handle_scene_activation_set (const zwave_controller_connection_info_t *info, const uint8_t *frame, uint16_t frame_length)
 Process an incoming Scene Activation Set Command. More...
 
static sl_status_t scene_activation_control_handler (const zwave_controller_connection_info_t *connection, const uint8_t *frame_data, uint16_t frame_length)
 
static sl_status_t scenes_cluster_recall_scene (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type, SGroupId groupid, uint8_t sceneid, uint16_t transition_time)
 
sl_status_t zwave_command_class_scene_activation_control_init ()
 Initializes the Scene Activation Command Class control handler. More...
 

Macro Definition Documentation

◆ ATTRIBUTE

#define ATTRIBUTE (   type)    ATTRIBUTE_COMMAND_CLASS_SCENE_##type

◆ LOG_TAG

#define LOG_TAG   "zwave_command_class_scene_activation"

Function Documentation

◆ handle_scene_activation_set()

static sl_status_t handle_scene_activation_set ( const zwave_controller_connection_info_t info,
const uint8_t *  frame,
uint16_t  frame_length 
)
static

Process an incoming Scene Activation Set Command.

Parameters
infozwave_controller_connection_info_t object.
framePointer to frame data
frame_lengthNumber of bytes contained in the frame
Returns
sl_status_t following the frame handling return codes.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_scene_activation_set_send_data_complete()

static void on_scene_activation_set_send_data_complete ( attribute_store_node_t  node,
resolver_rule_type_t  rule_type,
zpc_resolver_event_t  event 
)
static

Decides what to do after we've sent a Scene Activation Set Command.

Parameters
nodeAttribute Store node that was resolved
rule_typeThe type of rule that was applied (Set/Get)
eventThe outcome of the resolution.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_version_attribute_update()

static void on_version_attribute_update ( attribute_store_node_t  updated_node,
attribute_store_change_t  change 
)
static

Attribute callback function listening for Scene Activation version attribute updates.

Parameters
updated_nodeAttribute Store node that was modified.
changeType of change applied to the node.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pause_actuator_command_class_resolution()

static void pause_actuator_command_class_resolution ( attribute_store_node_t  endpoint_node)
static

Pauses the resolution of Binary Switch, Color and Multilevel Switch CC until the scene activation has been made.

Parameters
endpoint_node
Here is the caller graph for this function:

◆ resume_actuator_command_class_resolution()

static void resume_actuator_command_class_resolution ( attribute_store_node_t  endpoint_node)
static

Resumes resolution and undefines the reported values for the Binary Switch, Color and Multilevel Switch CC.

Parameters
endpoint_node
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scene_activation_control_handler()

static sl_status_t scene_activation_control_handler ( const zwave_controller_connection_info_t connection,
const uint8_t *  frame_data,
uint16_t  frame_length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scene_activation_set()

static sl_status_t scene_activation_set ( attribute_store_node_t  node,
uint8_t *  frame,
uint16_t *  frame_length 
)
static

Prepares a Scene Activation Set Command.

Parameters
nodeAttribute Store node to resolve
framePointer at which frame data can be written.
frame_lengthPointer at which the frame data length can be written.
Returns
sl_status_t following the attribute_resolver_function_t return codes.
Here is the caller graph for this function:

◆ scenes_cluster_recall_scene()

static sl_status_t scenes_cluster_recall_scene ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type,
SGroupId  groupid,
uint8_t  sceneid,
uint16_t  transition_time 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: