10#ifndef TR_LEVEL_CONTROL_SERVER_H
11#define TR_LEVEL_CONTROL_SERVER_H
18#if defined(TR_LEVEL_CONTROL_SERVER_PLUGIN_PRINT_ENABLE) && (TR_LEVEL_CONTROL_SERVER_PLUGIN_PRINT_ENABLE == 1)
19#define tr_level_control_server_printf(...) tr_zcl_printf(__VA_ARGS__)
20#define tr_level_control_server_println(...) tr_zcl_println(__VA_ARGS__)
22#define tr_level_control_server_printf(...)
23#define tr_level_control_server_println(...)
32#define TR_LEVEL_CONTROL_SERVER_MAX_LC_TIMERS_AT_ONCE TR_DEVICE_EP_COUNT
35#define TR_LEVEL_CONTROL_SERVER_TIMER_INDEX_NOT_FOUND 0xFF
81 zb_uint8_t *new_value,
203 zb_uint8_t new_level);
214 zb_bool_t with_on_off);
zb_uint8_t step_size
Definition tr_zcl_cmd_structs.h:303
zb_uint8_t step_mode
Definition tr_zcl_cmd_structs.h:302
zb_uint8_t option_override
Definition tr_zcl_cmd_structs.h:287
zb_uint8_t rate
Definition tr_zcl_cmd_structs.h:294
zb_uint8_t move_mode
Definition tr_zcl_cmd_structs.h:293
zb_uint8_t option_mask
Definition tr_zcl_cmd_structs.h:286
zb_uint8_t level
Definition tr_zcl_cmd_structs.h:284
zb_bool_t tr_level_control_server_move_to_level_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t level, zb_uint16_t transition_time, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster move to level command.
void tr_level_control_server_write_attr_cb(zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code)
Callback fires when an Level Control server attribute is about to be written.
zb_bool_t tr_level_control_server_step_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t step_mode, zb_uint8_t step_size, zb_uint16_t transition_time, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster step command.
zb_bool_t tr_level_control_server_move_to_level_with_on_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t level, zb_uint16_t transition_time, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster move to level with on off command.
void tr_level_control_server_level_changed_cb(zb_uint8_t endpoint, zb_uint8_t new_level)
Callback fires when current level changes.
zb_bool_t tr_level_control_server_move_with_on_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t move_mode, zb_uint8_t rate, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster move with on off command.
zb_bool_t tr_level_control_server_stop_with_on_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster stop with on off command.
zb_bool_t tr_level_control_server_step_with_on_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t step_mode, zb_uint8_t step_size, zb_uint16_t transition_time, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster step with on off command.
zb_bool_t tr_level_control_server_stop_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster stop command.
void tr_level_control_server_init_cb(zb_uint8_t endpoint)
Callback fires when the Level Control server cluster plugin is initialized.
zb_bool_t tr_level_control_server_command_received_cb(zb_zcl_parsed_hdr_t *cmd_info)
Callback that user can declare to handle any Level Control server commands.
zb_bool_t tr_level_control_server_move_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t move_mode, zb_uint8_t rate, zb_uint8_t option_mask, zb_uint8_t option_override)
Callback that user can declare to handle level control cluster move command.
Definition tr_level_control_server.h:42
zb_bool_t with_on_off
Definition tr_level_control_server.h:55
zb_uint8_t move_direction
Definition tr_level_control_server.h:54
zb_uint32_t move_rate_per_tenth_32
Definition tr_level_control_server.h:52
zb_uint8_t endpoint
Definition tr_level_control_server.h:47
zb_uint16_t num_tenths_left
Definition tr_level_control_server.h:53
zb_uint32_t target_level_32
Definition tr_level_control_server.h:51
zb_uint32_t current_level_32
Definition tr_level_control_server.h:50
zb_bool_t slot_in_use
Definition tr_level_control_server.h:44
Trident application framework include.
void tr_level_control_server_init(void)
void level_control_server_timer_tick(zb_uint8_t endpoint)
void tr_level_control_server_attributes_ready(void)
void level_control_server_check_timers(void)
void write_new_current_level(zb_uint8_t new_level, zb_uint8_t endpoint, zb_bool_t with_on_off)
zb_uint8_t endpoint
Definition tr_nvram_attr.h:176
zb_uint16_t manuf_code
Definition tr_nvram_attr.h:180
zb_uint16_t attr_id
Definition tr_nvram_attr.h:178
zb_uint16_t transition_time
Definition tr_scenes_common.h:49