Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
tr_level_control_server.h File Reference

ZCL Level Control cluster server implementation. More...

#include "tr_af.h"
Include dependency graph for tr_level_control_server.h:

Go to the source code of this file.

Data Structures

struct  tr_lvl_ctrl_timer_t

Macros

#define tr_level_control_server_printf(...)
#define tr_level_control_server_println(...)
#define TR_LEVEL_CONTROL_SERVER_MAX_LC_TIMERS_AT_ONCE   TR_DEVICE_EP_COUNT
#define TR_LEVEL_CONTROL_SERVER_TIMER_INDEX_NOT_FOUND   0xFF

Functions

void level_control_server_timer_tick (zb_uint8_t endpoint)
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.
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_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.
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.
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_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.
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.
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_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_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.
void tr_level_control_server_level_changed_cb (zb_uint8_t endpoint, zb_uint8_t new_level)
 Callback fires when current level changes.
void tr_level_control_server_init (void)
void write_new_current_level (zb_uint8_t new_level, zb_uint8_t endpoint, zb_bool_t with_on_off)
void level_control_server_check_timers (void)
void tr_level_control_server_attributes_ready (void)

Detailed Description

ZCL Level Control cluster server implementation.


SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com


Macro Definition Documentation

◆ TR_LEVEL_CONTROL_SERVER_MAX_LC_TIMERS_AT_ONCE

#define TR_LEVEL_CONTROL_SERVER_MAX_LC_TIMERS_AT_ONCE   TR_DEVICE_EP_COUNT

◆ tr_level_control_server_printf

#define tr_level_control_server_printf ( ...)

debug prints


◆ tr_level_control_server_println

#define tr_level_control_server_println ( ...)

◆ TR_LEVEL_CONTROL_SERVER_TIMER_INDEX_NOT_FOUND

#define TR_LEVEL_CONTROL_SERVER_TIMER_INDEX_NOT_FOUND   0xFF

Function Documentation

◆ level_control_server_check_timers()

void level_control_server_check_timers ( void )

◆ level_control_server_timer_tick()

void level_control_server_timer_tick ( zb_uint8_t endpoint)

◆ tr_level_control_server_attributes_ready()

void tr_level_control_server_attributes_ready ( void )

◆ tr_level_control_server_init()

void tr_level_control_server_init ( void )

function prototypes consumed by framework


◆ write_new_current_level()

void write_new_current_level ( zb_uint8_t new_level,
zb_uint8_t endpoint,
zb_bool_t with_on_off )