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

ZCL On/off cluster server implementation. More...

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

Go to the source code of this file.

Macros

#define tr_on_off_server_printf(...)
#define tr_on_off_server_println(...)

Enumerations

enum  tr_on_off_server_states_t {
  TR_ON_OFF_SERVER_STATE_OFF ,
  TR_ON_OFF_SERVER_STATE_ON ,
  TR_ON_OFF_SERVER_STATE_TIMED_ON ,
  TR_ON_OFF_SERVER_STATE_DELAYED_OFF
}

Functions

void tr_on_off_server_init_cb (zb_uint8_t endpoint)
 Callback fires when the On/off server cluster plugin is initialized.
zb_bool_t tr_on_off_server_command_received_cb (zb_zcl_parsed_hdr_t *cmd_info)
 Callback that user can declare to handle any On/off server commands.
void tr_on_off_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 On/off server attribute is about to be written.
zb_bool_t tr_on_off_server_off_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle on/off cluster off command.
zb_bool_t tr_on_off_server_on_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle on/off cluster on command.
zb_bool_t tr_on_off_server_toggle_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t current_on_off_state)
 Callback that user can declare to handle on/off cluster toggle command.
zb_bool_t tr_on_off_server_off_with_effect_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t effect_id, zb_uint8_t effect_variant)
 Callback that user can declare to handle on/off cluster off with effect command.
zb_bool_t tr_on_off_server_on_with_recall_global_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle on/off cluster on with recall global scene command.
zb_bool_t tr_on_off_server_on_with_timed_off_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t on_off_control, zb_uint16_t on_time, zb_uint16_t off_wait_time)
 Callback that user can declare to handle on/off cluster on with timed off command.
void tr_on_off_server_turn_off (zb_uint8_t endpoint)
 API to handle local turn off. It will call the user tr_on_off_server_off_cb() callback and update attributes.
void tr_on_off_server_turn_on (zb_uint8_t endpoint)
 API to handle local turn on. It will call the user tr_on_off_server_off_cb() callback and update attributes.
void tr_on_off_server_init_endpoint (zb_uint8_t endpoint)
 API to handle endpoint initialization. It will take care of the startup attribute if it is implemented.
void tr_on_off_server_init (void)
void tr_on_off_server_attributes_ready (void)

Detailed Description

ZCL On/off cluster server implementation.


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


Macro Definition Documentation

◆ tr_on_off_server_printf

#define tr_on_off_server_printf ( ...)

debug prints


◆ tr_on_off_server_println

#define tr_on_off_server_println ( ...)

Enumeration Type Documentation

◆ tr_on_off_server_states_t

Enumerator
TR_ON_OFF_SERVER_STATE_OFF 
TR_ON_OFF_SERVER_STATE_ON 
TR_ON_OFF_SERVER_STATE_TIMED_ON 
TR_ON_OFF_SERVER_STATE_DELAYED_OFF 

Function Documentation

◆ tr_on_off_server_attributes_ready()

void tr_on_off_server_attributes_ready ( void )

◆ tr_on_off_server_init()

void tr_on_off_server_init ( void )

function prototypes consumed by framework