Z-Wave Protocol Controller Reference
zwave_command_class_powerlevel.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
14#ifndef ZWAVE_COMMAND_CLASS_POWERLEVEL_H
15#define ZWAVE_COMMAND_CLASS_POWERLEVEL_H
16
17#include "sl_status.h"
18#include "zwave_rx.h"
20
21#include "ctimer.h"
22#include "ZW_classcmd.h"
23
27typedef enum {
29 TEST_FAILED = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_FAILED,
31 TEST_SUCCESSFUL = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_SUCCES,
33 TEST_IN_PROGRESS = POWERLEVEL_TEST_NODE_REPORT_ZW_TEST_INPROGRESS,
35
39typedef struct power_level_test {
47 uint16_t frame_count;
53
57typedef struct power_level_setting {
61 struct ctimer timer;
64 clock_time_t expiration_time;
66
77
92 const zwave_controller_connection_info_t *connection_info,
93 const uint8_t *frame_data,
94 uint16_t frame_length);
95
96#endif //ZWAVE_COMMAND_CLASS_POWERLEVEL_H
rf_power_level_t
Definition: zwapi_protocol_basis.h:100
uint32_t sl_status_t
Definition: sl_status.h:139
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
SL Status Codes.
Definition: zwave_command_class_powerlevel.h:57
rf_power_level_t power_level
Current power level setting.
Definition: zwave_command_class_powerlevel.h:59
clock_time_t expiration_time
Definition: zwave_command_class_powerlevel.h:64
struct ctimer timer
ctimer used to rollback the power to normal.
Definition: zwave_command_class_powerlevel.h:61
Definition: zwave_command_class_powerlevel.h:39
rf_power_level_t power_level
Number of frames to left transmit for the test.
Definition: zwave_command_class_powerlevel.h:45
zwave_controller_connection_info_t connection
< NodeID that asked us to perform a powerlevel test
Definition: zwave_command_class_powerlevel.h:41
zwave_node_id_t destination_node
Powerlevel to use for the test.
Definition: zwave_command_class_powerlevel.h:43
uint16_t frame_count
Number of frames that have been acknowledged.
Definition: zwave_command_class_powerlevel.h:47
uint16_t acknowledged_frames_count
Status of the power level test.
Definition: zwave_command_class_powerlevel.h:49
power_level_test_status_t status
Definition: zwave_command_class_powerlevel.h:51
Structure holding information about the source and destination when transmitting and receiving Z-Wave...
Definition: zwave_controller_connection_info.h:87
Z-Wave API for basis controller/end node application interface.
power_level_test_status_t
Definition: zwave_command_class_powerlevel.h:27
@ TEST_FAILED
None of the frames were acknowdledged by the destination.
Definition: zwave_command_class_powerlevel.h:29
@ TEST_SUCCESSFUL
Test is ongoing.
Definition: zwave_command_class_powerlevel.h:31
@ TEST_IN_PROGRESS
Definition: zwave_command_class_powerlevel.h:33
sl_status_t zwave_command_class_powerlevel_init(void)
setup for powerelvel command class
Definition: zwave_command_class_powerlevel.c:287
struct power_level_setting powerlevel_setting_t
struct power_level_test power_level_test_t
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.
Definition: zwave_command_class_powerlevel.c:250