Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
tr_groups_server.h
Go to the documentation of this file.
1
10#ifndef TR_GROUPS_SERVER_H
11#define TR_GROUPS_SERVER_H
12
13#include "tr_af.h"
14
15#define TR_GROUPS_SERVER_GROUP_NAME_MAX_LEN 16
16
17// Groups server response arg structs - note although zap
18// generates comparable structures, the group_name and group_list fields are
19// defined as pointers which don't align with the actual payload layout. So we
20// define our own structs here in order to use them to allocate memory for
21// the response payload.
22typedef ZB_PACKED_PRE struct
23{
24 zb_uint8_t status;
25 zb_uint16_t group_id;
28
29typedef ZB_PACKED_PRE struct
30{
31 zb_uint8_t capacity;
32 zb_uint8_t group_count;
33 zb_uint16_t group_list[ZB_APS_GROUP_TABLE_SIZE];
35
39#if defined(TR_GROUPS_SERVER_PLUGIN_PRINT_ENABLE) && (TR_GROUPS_SERVER_PLUGIN_PRINT_ENABLE == 1)
40#define tr_groups_server_printf(...) tr_zcl_printf(__VA_ARGS__)
41#define tr_groups_server_println(...) tr_zcl_println(__VA_ARGS__)
42#else
43#define tr_groups_server_printf(...)
44#define tr_groups_server_println(...)
45#endif
46
52
56
60zb_bool_t tr_groups_server_command_received_cb(zb_zcl_parsed_hdr_t *cmd_info);
61
68 zb_uint16_t attr_id,
69 zb_uint8_t *new_value,
70 zb_uint16_t manuf_code);
71
78zb_bool_t tr_groups_server_add_group_cb(zb_zcl_parsed_hdr_t *cmd_info,
79 zb_uint8_t endpoint,
80 zb_uint16_t group_id,
81 zb_uint8_t *group_name);
82
89zb_bool_t tr_groups_server_view_group_cb(zb_zcl_parsed_hdr_t *cmd_info,
90 zb_uint8_t endpoint,
91 zb_uint16_t group_id,
92 zb_uint8_t *group_name);
93
100zb_bool_t tr_groups_server_get_group_membership_cb(zb_zcl_parsed_hdr_t *cmd_info,
101 zb_uint8_t endpoint,
102 zb_uint8_t group_count,
103 zb_uint16_t *group_list);
104
110zb_bool_t tr_groups_server_remove_group_cb(zb_zcl_parsed_hdr_t *cmd_info,
111 zb_uint8_t endpoint,
112 zb_uint16_t group_id);
113
118zb_bool_t tr_groups_server_remove_all_groups_cb(zb_zcl_parsed_hdr_t *cmd_info,
119 zb_uint8_t endpoint);
120
127zb_bool_t tr_groups_server_add_group_if_identifying_cb(zb_zcl_parsed_hdr_t *cmd_info,
128 zb_uint8_t endpoint,
129 zb_uint16_t group_id,
130 zb_uint8_t *group_name);
131
149void tr_groups_server_resp_sent_cb(zb_bufid_t param);
150
152
157
159 zb_uint8_t endpoint);
160
161#endif // TR_GROUPS_SERVER_H
zb_bool_t tr_groups_server_add_group_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t *group_name)
Callback that user can declare to handle groups cluster add group command.
void tr_groups_server_init_cb(zb_uint8_t endpoint)
Callback fires when the Groups server cluster plugin is initialized.
zb_bool_t tr_groups_server_add_group_if_identifying_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t *group_name)
Callback that user can declare to handle groups cluster add group if identifying command.
zb_bool_t tr_groups_server_remove_all_groups_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
Callback that user can declare to handle groups cluster remove all groups command.
void tr_groups_server_resp_sent_cb(zb_bufid_t param)
Callback fires when groups server response completes.
void tr_groups_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 Groups server attribute is about to be written.
zb_bool_t tr_groups_server_remove_group_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id)
Callback that user can declare to handle groups cluster remove group command.
zb_bool_t tr_groups_server_view_group_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t group_id, zb_uint8_t *group_name)
Callback that user can declare to handle groups cluster view group command.
zb_bool_t tr_groups_server_command_received_cb(zb_zcl_parsed_hdr_t *cmd_info)
Callback that user can declare to handle any Groups server commands.
zb_bool_t tr_groups_server_get_group_membership_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t group_count, zb_uint16_t *group_list)
Callback that user can declare to handle groups cluster get group membership command.
Trident application framework include.
tr_door_lock_user_status_t status
Definition tr_door_lock_server.h:26
zb_uint8_t group_name[TR_GROUPS_SERVER_GROUP_NAME_MAX_LEN+1]
Definition tr_groups_server.h:26
zb_uint16_t group_id
Definition tr_groups_server.h:25
ZB_PACKED_PRE struct @122205264206322241364260220346355157206307055264 tr_groups_get_group_membership_response_arg_t
zb_uint8_t group_count
Definition tr_groups_server.h:32
#define TR_GROUPS_SERVER_GROUP_NAME_MAX_LEN
Definition tr_groups_server.h:15
void tr_groups_server_init(void)
zb_uint8_t capacity
Definition tr_groups_server.h:31
zb_bool_t tr_groups_server_is_group_id_present(zb_uint16_t group_id, zb_uint8_t endpoint)
ZB_PACKED_PRE struct @255225217031237373043220161003235370202167005345 tr_groups_view_group_response_arg_t
zb_uint16_t group_list[ZB_APS_GROUP_TABLE_SIZE]
Definition tr_groups_server.h:33
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