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

ZCL Scenes cluster server implementation. More...

#include "tr_af.h"
Include dependency graph for tr_scenes_server.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tr_scenes_table_entry_t

Macros

#define tr_scenes_server_printf(...)
#define tr_scenes_server_println(...)
#define TR_SCENES_SERVER_SCENE_NAME_MAX_LEN   16
#define TR_SCENES_SERVER_MAX_GROUP_ID   0xFFF7
#define TR_SCENES_SERVER_MIN_GROUP_ID   1
#define TR_SCENES_SERVER_EXT_LEVEL_CONTROL_LEN   4
#define TR_SCENES_SERVER_EXT_ON_OFF_LEN   4
#define TR_SCENES_SERVER_EXT_DOOR_LOCK_LEN   4
#define TR_SCENES_SERVER_EXT_EXPECTED_LEN
#define TR_SCENES_SERVER_EXT_MAX_LEN   26

Functions

void tr_scenes_server_init_cb (zb_uint8_t endpoint)
 Callback fires when the Scenes server cluster plugin is initialized.
zb_bool_t tr_scenes_server_command_received_cb (zb_zcl_parsed_hdr_t *cmd_info)
 Callback that user can declare to handle any Scenes server commands.
void tr_scenes_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 Scenes server attribute is about to be written.
zb_bool_t tr_scenes_server_add_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, zb_uint16_t transition_time, zb_uint8_t *scene_name, zb_uint8_t *extension_field_sets, zb_uint8_t extensions_len)
 Callback that user can declare to handle scenes cluster add scene command.
zb_bool_t tr_scenes_server_view_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id)
 Callback that user can declare to handle scenes cluster view scene command.
zb_bool_t tr_scenes_server_remove_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id)
 Callback that user can declare to handle scenes cluster remove scene command.
zb_bool_t tr_scenes_server_remove_all_scenes_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id)
 Callback that user can declare to handle scenes cluster remove all scenes command.
zb_bool_t tr_scenes_server_store_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id)
 Callback that user can declare to handle scenes cluster store scene command.
zb_bool_t tr_scenes_server_recall_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, zb_uint16_t transition_time)
 Callback that user can declare to handle scenes cluster recall scene command.
zb_bool_t tr_scenes_server_get_scene_membership_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id)
 Callback that user can declare to handle scenes cluster get scene membership command.
zb_bool_t tr_scenes_server_enhanced_add_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, zb_uint16_t transition_time, zb_uint8_t *scene_name, zb_uint8_t *extension_field_sets, zb_uint8_t extensions_len)
 Callback that user can declare to handle scenes cluster enhanced add scene command.
zb_bool_t tr_scenes_server_enhanced_view_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id)
 Callback that user can declare to handle scenes cluster enhanced view scene command.
zb_bool_t tr_scenes_server_copy_scene_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t mode, zb_uint16_t group_id_from, zb_uint8_t scene_id_from, zb_uint16_t group_id_to, zb_uint8_t scene_id_to)
 Callback that user can declare to handle scenes cluster copy scene command.
zb_bool_t tr_scenes_server_scene_is_activated_cb (zb_uint8_t endpoint, tr_scenes_table_entry_t *scene_entry)
 Callback that fires when a scene is activated.
void tr_scenes_server_message_sent_cb (zb_bufid_t param)
 Callback fires when scenes plugin response has a message sent status. This status is based on the APS ack. The status can be pulled from the param buffer using: "zb_zcl_command_send_status_t *cmd_send_status = ZB_BUF_GET_PARAM(param, zb_zcl_command_send_status_t);", and then checking: "cmd_send_status->status", if this equals 0 then the APS ack was received, if non-zero then the APS Ack was not received.
void tr_scenes_server_init (void)
void tr_scenes_server_register_nv (void)

Detailed Description

ZCL Scenes cluster server implementation.


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


Macro Definition Documentation

◆ TR_SCENES_SERVER_EXT_DOOR_LOCK_LEN

#define TR_SCENES_SERVER_EXT_DOOR_LOCK_LEN   4

◆ TR_SCENES_SERVER_EXT_EXPECTED_LEN

#define TR_SCENES_SERVER_EXT_EXPECTED_LEN
Value:
#define TR_SCENES_SERVER_EXT_DOOR_LOCK_LEN
Definition tr_scenes_server.h:38
#define TR_SCENES_SERVER_EXT_LEVEL_CONTROL_LEN
Definition tr_scenes_server.h:36
#define TR_SCENES_SERVER_EXT_ON_OFF_LEN
Definition tr_scenes_server.h:37

◆ TR_SCENES_SERVER_EXT_LEVEL_CONTROL_LEN

#define TR_SCENES_SERVER_EXT_LEVEL_CONTROL_LEN   4

◆ TR_SCENES_SERVER_EXT_MAX_LEN

#define TR_SCENES_SERVER_EXT_MAX_LEN   26

◆ TR_SCENES_SERVER_EXT_ON_OFF_LEN

#define TR_SCENES_SERVER_EXT_ON_OFF_LEN   4

◆ TR_SCENES_SERVER_MAX_GROUP_ID

#define TR_SCENES_SERVER_MAX_GROUP_ID   0xFFF7

◆ TR_SCENES_SERVER_MIN_GROUP_ID

#define TR_SCENES_SERVER_MIN_GROUP_ID   1

◆ tr_scenes_server_printf

#define tr_scenes_server_printf ( ...)

debug prints


◆ tr_scenes_server_println

#define tr_scenes_server_println ( ...)

◆ TR_SCENES_SERVER_SCENE_NAME_MAX_LEN

#define TR_SCENES_SERVER_SCENE_NAME_MAX_LEN   16

Function Documentation

◆ tr_scenes_server_init()

void tr_scenes_server_init ( void )

function prototypes consumed by framework


◆ tr_scenes_server_register_nv()

void tr_scenes_server_register_nv ( void )