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

ZCL SCENES cluster server scene table implementation. More...

#include "tr_scenes_server.h"
Include dependency graph for tr_scenes_server_table.h:

Go to the source code of this file.

Functions

void tr_scenes_server_table_init (void)
 init the scenes table
void tr_scenes_server_table_clear (zb_uint8_t endpoint)
 clear the scenes table for a specific endpoint
void tr_scenes_server_table_print (void)
 print the scenes table
zb_uint8_t tr_scene_server_table_get_num_used_slots (zb_uint8_t endpoint)
 get the number of used slots in a scene table
zb_uint8_t tr_scenes_server_table_add (zb_uint8_t endpoint, tr_scenes_add_scene_cmd_t *cmd_payload, zb_uint8_t *scene_name, zb_uint8_t *extensions, zb_uint8_t ext_len)
 add an entry to the scenes table
zb_uint8_t tr_scenes_server_table_view (zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, tr_scenes_view_scene_response_cmd_t *resp_payload, zb_uint8_t *scene_name, zb_uint8_t *extensions, zb_uint8_t *ext_len)
 view (get) an entry from the scenes table
zb_uint8_t tr_scenes_server_table_remove (zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, zb_bool_t remove_all)
 remove an entry from the scenes table
zb_uint8_t tr_scenes_server_table_store (zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id)
 store current cluster state in a new entry in the scenes table
zb_uint8_t tr_scenes_server_table_recall (zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t scene_id, zb_uint16_t transition_time)
 recall a scene from the scenes table
zb_uint8_t tr_scenes_server_table_get_membership (zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t *remaining_capacity, zb_uint8_t *scene_count, zb_uint8_t *scene_list)
 read the membership (all scenes with a group ID) and return results

Detailed Description

ZCL SCENES cluster server scene table implementation.


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


Function Documentation

◆ tr_scene_server_table_get_num_used_slots()

zb_uint8_t tr_scene_server_table_get_num_used_slots ( zb_uint8_t endpoint)

get the number of used slots in a scene table

Parameters
endpointendpoint to use
Returns
number of used slots

◆ tr_scenes_server_table_add()

zb_uint8_t tr_scenes_server_table_add ( zb_uint8_t endpoint,
tr_scenes_add_scene_cmd_t * cmd_payload,
zb_uint8_t * scene_name,
zb_uint8_t * extensions,
zb_uint8_t ext_len )

add an entry to the scenes table

Parameters
endpointendpoint for the new scene
cmd_payloadthe payload of the new scene
scene_nameptr to the new scene name
extensionsptr to the new extensions buffer
ext_lenlength of the scene extensions
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_scenes_server_table_clear()

void tr_scenes_server_table_clear ( zb_uint8_t endpoint)

clear the scenes table for a specific endpoint

Parameters
endpointthe endpoint to use for clearing entries

◆ tr_scenes_server_table_get_membership()

zb_uint8_t tr_scenes_server_table_get_membership ( zb_uint8_t endpoint,
zb_uint16_t group_id,
zb_uint8_t * remaining_capacity,
zb_uint8_t * scene_count,
zb_uint8_t * scene_list )

read the membership (all scenes with a group ID) and return results

Parameters
endpointendpoint to check membership
group_idgroup ID to use to check membership
remaining_capacitythis is set to the remaining number of entries left in the scene table
scene_countthis is set to the number of scene IDs returned in scene_list
scene_lista buffer is passed in and this is set to the scene IDs that match the group ID
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_scenes_server_table_init()

void tr_scenes_server_table_init ( void )

init the scenes table

◆ tr_scenes_server_table_print()

void tr_scenes_server_table_print ( void )

print the scenes table

◆ tr_scenes_server_table_recall()

zb_uint8_t tr_scenes_server_table_recall ( zb_uint8_t endpoint,
zb_uint16_t group_id,
zb_uint8_t scene_id,
zb_uint16_t transition_time )

recall a scene from the scenes table

Parameters
endpointendpoint of the scene to recall
group_idgroup ID of the scene to recall
scene_idscene ID of the scene to recall
transition_timetransition time to use when recalling the scene
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_scenes_server_table_remove()

zb_uint8_t tr_scenes_server_table_remove ( zb_uint8_t endpoint,
zb_uint16_t group_id,
zb_uint8_t scene_id,
zb_bool_t remove_all )

remove an entry from the scenes table

Parameters
endpointendpoint of the scene to remove
group_idgroup ID of the scene to remove
scene_idscene ID of the scene to remove
remove_allif ZB_TRUE we remove ALL scenes for the group ID
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_scenes_server_table_store()

zb_uint8_t tr_scenes_server_table_store ( zb_uint8_t endpoint,
zb_uint16_t group_id,
zb_uint8_t scene_id )

store current cluster state in a new entry in the scenes table

Parameters
endpointendpoint of the scene to store
group_idgroup ID of the scene to store
scene_idscene ID of the scene to store
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_scenes_server_table_view()

zb_uint8_t tr_scenes_server_table_view ( zb_uint8_t endpoint,
zb_uint16_t group_id,
zb_uint8_t scene_id,
tr_scenes_view_scene_response_cmd_t * resp_payload,
zb_uint8_t * scene_name,
zb_uint8_t * extensions,
zb_uint8_t * ext_len )

view (get) an entry from the scenes table

Parameters
endpointendpoint of the scene to get
group_idgroup ID of the scene to get
scene_idscene ID of the scene to get
resp_payloadptr to the response payload to be filled in
scene_nameptr to the scene name to be filled in
extensionsptr to the extensions buffer to be filled in
ext_lenptr to the extensions length to be filled in
Returns
ZB_FALSE to allow framework to continue processing the command