Z-Wave Protocol Controller Reference
zwave_command_class_powerlevel.c File Reference
#include "zwave_command_class_powerlevel.h"
#include "zwave_command_classes_utils.h"
#include <string.h>
#include <stdio.h>
#include "ZW_classcmd.h"
#include "zwave_command_handler.h"
#include "zwave_command_class_indices.h"
#include "zwave_controller_connection_info.h"
#include "zwave_tx.h"
#include "zwapi_protocol_basis.h"
#include "zwapi_init.h"
#include "ctimer.h"
#include "clock.h"
#include "sl_log.h"
Include dependency graph for zwave_command_class_powerlevel.c:

Macros

#define LOG_TAG   "zwave_command_class_powerlevel"
 

Functions

static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_test_node_get (const zwave_controller_connection_info_t *connection_info)
 
static void reset_power_level ()
 
static void set_power_level (rf_power_level_t new_power_level, uint8_t timeout)
 
static void power_level_test_send_data_callback (uint8_t status, const zwapi_tx_report_t *tx_status, void *user)
 
static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_get (const zwave_controller_connection_info_t *connection_info)
 
static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_set (const uint8_t *frame, uint16_t frame_length)
 
static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_test_node_set (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length)
 
sl_status_t zwave_command_class_powerlevel_support_handler (const zwave_controller_connection_info_t *connection_info, const uint8_t *frame_data, uint16_t frame_length)
 Handles incoming powerlevel commands. More...
 
sl_status_t zwave_command_class_powerlevel_init ()
 setup for powerelvel command class More...
 

Variables

static power_level_test_t power_level_test = {}
 
static powerlevel_setting_t power_level_setting = {}
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "zwave_command_class_powerlevel"

Function Documentation

◆ power_level_test_send_data_callback()

static void power_level_test_send_data_callback ( uint8_t  status,
const zwapi_tx_report_t tx_status,
void *  user 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_power_level()

static void reset_power_level ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_power_level()

static void set_power_level ( rf_power_level_t  new_power_level,
uint8_t  timeout 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_powerlevel_handle_powerlevel_get()

static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_get ( const zwave_controller_connection_info_t connection_info)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_powerlevel_handle_powerlevel_set()

static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_set ( const 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_powerlevel_handle_powerlevel_test_node_get()

static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_test_node_get ( const zwave_controller_connection_info_t connection_info)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_powerlevel_handle_powerlevel_test_node_set()

static sl_status_t zwave_command_class_powerlevel_handle_powerlevel_test_node_set ( const zwave_controller_connection_info_t connection_info,
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:

◆ zwave_command_class_powerlevel_init()

sl_status_t zwave_command_class_powerlevel_init ( void  )

setup for powerelvel command class

This setup will register the time command handler to the Z-Wave CC framework,

Returns
SL_STATUS_OK if successful
SL_STATUS_FAIL if an error occurred
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_command_class_powerlevel_support_handler()

sl_status_t zwave_command_class_powerlevel_support_handler ( const zwave_controller_connection_info_t connection_info,
const uint8_t *  frame_data,
uint16_t  frame_length 
)

Handles incoming powerlevel commands.

Parameters
connection_infoInfo about the connection properties of this frame.
frame_dataThe data payload of this frame.
frame_lengthThe length of this frame.
Returns
sl_status_t representing the outcome of receiving the frame In case where the command is controlled, it should be set to SL_STATUS_OK, even when encountering some parsing errors In case where the command is supported, it should be set to the sl_status_t corresponding to the correct time Status code. Refer to zwave_command_handler_t
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ power_level_setting

◆ power_level_test