Trident IoT Zigbee SDK
 
Loading...
Searching...
No Matches
tr_zcl_endpoint_config.h
Go to the documentation of this file.
1
11#ifndef TR_ZCL_ENDPOINT_CONFIG_H
12#define TR_ZCL_ENDPOINT_CONFIG_H
13
14#include "zb_zcl_common.h"
15#include "zboss_api_internal.h"
16#include "tr_zcl_id.h"
17#include "tr_zcl_type.h"
19
20#define TR_DEVICE_MANUFACTURER_ID 0x1570U
21#define TR_GLOBAL_RESPONSE_POLICY ZB_ZCL_DISABLE_DEFAULT_RESPONSE
22
23#define TR_ZCL_NULL_EP_ID 0xFFU
24#define TR_ZCL_NULL_ID 0xFFFFU
25#define TR_ZCL_NON_MANUFACTURER_SPECIFIC 0xFFFFU
26
27/***************************************/
28/* Endpoint 1 */
29#define TR_DEVICE_EP1 1
30
31// Generated number of input and output clusters
32#define TR_DEVICE_NUM_IN_CLUSTERS_EP1 (0+1+1+1+1+1+1+1)
33#define TR_DEVICE_NUM_OUT_CLUSTERS_EP1 (0+1+1)
34
35#if defined ZB_APS_ENCRYPTION_PER_CLUSTER
36
37typedef ZB_PACKED_PRE struct tr_af_simple_desc_ep1_s
38{
39 zb_uint8_t endpoint; /* Endpoint */
40 zb_uint16_t app_profile_id; /* Application profile identifier */
41 zb_uint16_t app_device_id; /* Application device identifier */
42 zb_uint16_t app_device_version:4; /* Application device version */
43 zb_uint16_t reserved:4; /* Reserved */
44 zb_uint8_t app_input_cluster_count; /* Application input cluster count */
45 zb_uint8_t app_output_cluster_count; /* Application output cluster count */
46 /* Application input and output cluster list */
48 zb_uint8_t cluster_encryption[((TR_DEVICE_NUM_IN_CLUSTERS_EP1) + (TR_DEVICE_NUM_OUT_CLUSTERS_EP1) + 7) / 8];
49} ZB_PACKED_STRUCT tr_af_simple_desc_ep1_t;
50
51#else /* ZB_APS_ENCRYPTION_PER_CLUSTER */
52
53typedef ZB_PACKED_PRE struct tr_af_simple_desc_ep1_s
54{
55 zb_uint8_t endpoint; /* Endpoint */
56 zb_uint16_t app_profile_id; /* Application profile identifier */
57 zb_uint16_t app_device_id; /* Application device identifier */
58 zb_uint16_t app_device_version:4; /* Application device version */
59 zb_uint16_t reserved:4; /* Reserved */
60 zb_uint8_t app_input_cluster_count; /* Application input cluster count */
61 zb_uint8_t app_output_cluster_count; /* Application output cluster count */
62 /* Application input and output cluster list */
64} ZB_PACKED_STRUCT tr_af_simple_desc_ep1_t;
65
66#endif /* ZB_APS_ENCRYPTION_PER_CLUSTER */
67
68/********************************/
69/* Endpoint 1 Attribute Storage */
70// Generated cluster structs
71typedef struct
72{
73 zb_uint8_t version;
74 zb_uint8_t hw_version;
75 zb_uint8_t manufacturer_name[33];
76 zb_uint8_t model_identifier[33];
77 zb_uint8_t power_source;
78 zb_uint16_t cluster_revision_server;
80
81typedef struct
82{
83 zb_uint8_t battery_voltage;
84 zb_uint8_t battery_size;
85 zb_uint8_t battery_quantity;
86 zb_uint8_t battery_alarm_mask;
87 zb_uint8_t battery_voltage_min_threshold;
88 zb_uint32_t battery_alarm_state;
89 zb_uint16_t cluster_revision_server;
91
92typedef struct
93{
94 zb_uint16_t cluster_revision_client;
96
97typedef struct
98{
99 zb_uint16_t identify_time;
100 zb_uint16_t cluster_revision_server;
102
103typedef struct
104{
107
114
115typedef struct
116{
117 zb_uint32_t check_in_interval;
118 zb_uint32_t long_poll_interval;
119 zb_uint16_t short_poll_interval;
120 zb_uint16_t fast_poll_timeout;
121 zb_uint32_t check_in_interval_min;
122 zb_uint32_t long_poll_interval_min;
123 zb_uint16_t fast_poll_timeout_max;
124 zb_uint16_t cluster_revision_server;
126
127typedef struct
128{
129 zb_uint16_t cluster_revision_server;
131
132typedef struct
133{
134 zb_uint8_t cli_status;
135 zb_uint16_t cluster_revision_server;
137
138typedef struct
139{
140 basic_server_attr_ep1_t basic_server;
141 power_configuration_server_attr_ep1_t power_configuration_server;
142 identify_client_attr_ep1_t identify_client;
143 identify_server_attr_ep1_t identify_server;
146 poll_control_server_attr_ep1_t poll_control_server;
147 diagnostics_server_attr_ep1_t diagnostics_server;
148 remote_cli_server_attr_ep1_t remote_cli_server;
150
151/***************************************/
152/* Endpoint 1 Default Attribute Values */
153// Generated default attribute values for basic server cluster
154#define BASIC_SERVER_VERSION_DEFAULT_EP1 8
155#define BASIC_SERVER_HW_VERSION_DEFAULT_EP1 1
156#define BASIC_SERVER_MANUFACTURER_NAME_DEFAULT_EP1 "Trident IoT"
157#define BASIC_SERVER_MODEL_IDENTIFIER_DEFAULT_EP1 "Light Switch"
158#define BASIC_SERVER_POWER_SOURCE_DEFAULT_EP1 4
159#define BASIC_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
160
161// Generated default attribute values for power configuration server cluster
162#define POWER_CONFIGURATION_SERVER_BATTERY_VOLTAGE_DEFAULT_EP1 30
163#define POWER_CONFIGURATION_SERVER_BATTERY_SIZE_DEFAULT_EP1 2
164#define POWER_CONFIGURATION_SERVER_BATTERY_QUANTITY_DEFAULT_EP1 1
165#define POWER_CONFIGURATION_SERVER_BATTERY_ALARM_MASK_DEFAULT_EP1 1
166#define POWER_CONFIGURATION_SERVER_BATTERY_VOLTAGE_MIN_THRESHOLD_DEFAULT_EP1 23
167#define POWER_CONFIGURATION_SERVER_BATTERY_ALARM_STATE_DEFAULT_EP1 0
168#define POWER_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 2
169
170// Generated default attribute values for identify client cluster
171#define IDENTIFY_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP1 2
172
173// Generated default attribute values for identify server cluster
174#define IDENTIFY_SERVER_IDENTIFY_TIME_DEFAULT_EP1 0
175#define IDENTIFY_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 2
176
177// Generated default attribute values for on/off client cluster
178#define ON_OFF_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP1 2
179
180// Generated default attribute values for on/off switch configuration server cluster
181#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_TYPE_DEFAULT_EP1 1
182#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_ACTIONS_DEFAULT_EP1 2
183#define ON_OFF_SWITCH_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 1
184
185// Generated default attribute values for poll control server cluster
186#define POLL_CONTROL_SERVER_CHECK_IN_INTERVAL_DEFAULT_EP1 0x000004b0
187#define POLL_CONTROL_SERVER_LONG_POLL_INTERVAL_DEFAULT_EP1 0x00000018
188#define POLL_CONTROL_SERVER_SHORT_POLL_INTERVAL_DEFAULT_EP1 0x0002
189#define POLL_CONTROL_SERVER_FAST_POLL_TIMEOUT_DEFAULT_EP1 0x0028
190#define POLL_CONTROL_SERVER_CHECK_IN_INTERVAL_MIN_DEFAULT_EP1 0x000000F0
191#define POLL_CONTROL_SERVER_LONG_POLL_INTERVAL_MIN_DEFAULT_EP1 0x00000008
192#define POLL_CONTROL_SERVER_FAST_POLL_TIMEOUT_MAX_DEFAULT_EP1 0x0028
193#define POLL_CONTROL_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
194
195// Generated default attribute values for diagnostics server cluster
196#define DIAGNOSTICS_SERVER_NUMBER_OF_RESETS_DEFAULT_EP1 0x0000
197#define DIAGNOSTICS_SERVER_MAC_RX_BCAST_DEFAULT_EP1 0x0000
198#define DIAGNOSTICS_SERVER_MAC_TX_BCAST_DEFAULT_EP1 0x0000
199#define DIAGNOSTICS_SERVER_MAC_RX_UCAST_DEFAULT_EP1 0x0000
200#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_DEFAULT_EP1 0x0000
201#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_RETRY_DEFAULT_EP1 0x0000
202#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_FAIL_DEFAULT_EP1 0x0000
203#define DIAGNOSTICS_SERVER_APS_RX_BCAST_DEFAULT_EP1 0x0000
204#define DIAGNOSTICS_SERVER_APS_TX_BCAST_DEFAULT_EP1 0x0000
205#define DIAGNOSTICS_SERVER_APS_UCAST_SUCCESS_DEFAULT_EP1 0x0000
206#define DIAGNOSTICS_SERVER_APS_TX_UCAST_RETRY_DEFAULT_EP1 0x0000
207#define DIAGNOSTICS_SERVER_APS_TX_UCAST_FAIL_DEFAULT_EP1 0x0000
208#define DIAGNOSTICS_SERVER_ROUTE_DISC_INITIATED_DEFAULT_EP1 0x0000
209#define DIAGNOSTICS_SERVER_NEIGHBOR_ADDED_DEFAULT_EP1 0x0000
210#define DIAGNOSTICS_SERVER_NEIGHBOR_REMOVED_DEFAULT_EP1 0x0000
211#define DIAGNOSTICS_SERVER_NEIGHBOR_STALE_DEFAULT_EP1 0x0000
212#define DIAGNOSTICS_SERVER_JOIN_INDICATION_DEFAULT_EP1 0x0000
213#define DIAGNOSTICS_SERVER_CHILD_MOVED_DEFAULT_EP1 0x0000
214#define DIAGNOSTICS_SERVER_NWK_FC_FAILURE_DEFAULT_EP1 0x0000
215#define DIAGNOSTICS_SERVER_APS_FC_FAILURE_DEFAULT_EP1 0x0000
216#define DIAGNOSTICS_SERVER_APS_UNAUTHORIZED_KEY_DEFAULT_EP1 0x0000
217#define DIAGNOSTICS_SERVER_NWK_DECRYPT_FAILURE_DEFAULT_EP1 0x0000
218#define DIAGNOSTICS_SERVER_APS_DECRYPT_FAILURE_DEFAULT_EP1 0x0000
219#define DIAGNOSTICS_SERVER_PACKET_BUFFER_ALLOC_FAILURES_DEFAULT_EP1 0x0000
220#define DIAGNOSTICS_SERVER_PHY_TO_MAC_QUEUE_LIMIT_REACHED_DEFAULT_EP1 0x0000
221#define DIAGNOSTICS_SERVER_PACKET_VALIDATE_DROP_COUNT_DEFAULT_EP1 0x0000
222#define DIAGNOSTICS_SERVER_AVERAGE_MAC_RETRY_PER_APS_MSG_SENT_DEFAULT_EP1 0x0000
223#define DIAGNOSTICS_SERVER_LAST_MESSAGE_LQI_DEFAULT_EP1 0x0000
224#define DIAGNOSTICS_SERVER_LAST_MESSAGE_RSSI_DEFAULT_EP1 0x0000
225#define DIAGNOSTICS_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
226
227// Generated default attribute values for remote cli server cluster
228#define REMOTE_CLI_SERVER_CLI_STATUS_DEFAULT_EP1 0x0000
229#define REMOTE_CLI_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 0x0001
230
231/***************************************/
232/* Endpoint 2 */
233#define TR_DEVICE_EP2 2
234
235// Generated number of input and output clusters
236#define TR_DEVICE_NUM_IN_CLUSTERS_EP2 (0+1+1+1+1)
237#define TR_DEVICE_NUM_OUT_CLUSTERS_EP2 (0+1+1)
238
239#if defined ZB_APS_ENCRYPTION_PER_CLUSTER
240
241typedef ZB_PACKED_PRE struct tr_af_simple_desc_ep2_s
242{
243 zb_uint8_t endpoint; /* Endpoint */
244 zb_uint16_t app_profile_id; /* Application profile identifier */
245 zb_uint16_t app_device_id; /* Application device identifier */
246 zb_uint16_t app_device_version:4; /* Application device version */
247 zb_uint16_t reserved:4; /* Reserved */
248 zb_uint8_t app_input_cluster_count; /* Application input cluster count */
249 zb_uint8_t app_output_cluster_count; /* Application output cluster count */
250 /* Application input and output cluster list */
252 zb_uint8_t cluster_encryption[((TR_DEVICE_NUM_IN_CLUSTERS_EP2) + (TR_DEVICE_NUM_OUT_CLUSTERS_EP2) + 7) / 8];
253} ZB_PACKED_STRUCT tr_af_simple_desc_ep2_t;
254
255#else /* ZB_APS_ENCRYPTION_PER_CLUSTER */
256
257typedef ZB_PACKED_PRE struct tr_af_simple_desc_ep2_s
258{
259 zb_uint8_t endpoint; /* Endpoint */
260 zb_uint16_t app_profile_id; /* Application profile identifier */
261 zb_uint16_t app_device_id; /* Application device identifier */
262 zb_uint16_t app_device_version:4; /* Application device version */
263 zb_uint16_t reserved:4; /* Reserved */
264 zb_uint8_t app_input_cluster_count; /* Application input cluster count */
265 zb_uint8_t app_output_cluster_count; /* Application output cluster count */
266 /* Application input and output cluster list */
268} ZB_PACKED_STRUCT tr_af_simple_desc_ep2_t;
269
270#endif /* ZB_APS_ENCRYPTION_PER_CLUSTER */
271
272/********************************/
273/* Endpoint 2 Attribute Storage */
274// Generated cluster structs
275typedef struct
276{
277 zb_uint8_t version;
278 zb_uint8_t hw_version;
279 zb_uint8_t manufacturer_name[33];
280 zb_uint8_t model_identifier[33];
281 zb_uint8_t power_source;
284
295
296typedef struct
297{
300
301typedef struct
302{
303 zb_uint16_t identify_time;
306
307typedef struct
308{
311
318
328
329/***************************************/
330/* Endpoint 2 Default Attribute Values */
331// Generated default attribute values for basic server cluster
332#define BASIC_SERVER_VERSION_DEFAULT_EP2 8
333#define BASIC_SERVER_HW_VERSION_DEFAULT_EP2 1
334#define BASIC_SERVER_MANUFACTURER_NAME_DEFAULT_EP2 ""
335#define BASIC_SERVER_MODEL_IDENTIFIER_DEFAULT_EP2 ""
336#define BASIC_SERVER_POWER_SOURCE_DEFAULT_EP2 4
337#define BASIC_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 3
338
339// Generated default attribute values for power configuration server cluster
340#define POWER_CONFIGURATION_SERVER_BATTERY_VOLTAGE_DEFAULT_EP2 30
341#define POWER_CONFIGURATION_SERVER_BATTERY_SIZE_DEFAULT_EP2 2
342#define POWER_CONFIGURATION_SERVER_BATTERY_QUANTITY_DEFAULT_EP2 1
343#define POWER_CONFIGURATION_SERVER_BATTERY_ALARM_MASK_DEFAULT_EP2 1
344#define POWER_CONFIGURATION_SERVER_BATTERY_VOLTAGE_MIN_THRESHOLD_DEFAULT_EP2 23
345#define POWER_CONFIGURATION_SERVER_BATTERY_ALARM_STATE_DEFAULT_EP2 0
346#define POWER_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 2
347
348// Generated default attribute values for identify client cluster
349#define IDENTIFY_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP2 2
350
351// Generated default attribute values for identify server cluster
352#define IDENTIFY_SERVER_IDENTIFY_TIME_DEFAULT_EP2 0
353#define IDENTIFY_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 2
354
355// Generated default attribute values for on/off client cluster
356#define ON_OFF_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP2 2
357
358// Generated default attribute values for on/off switch configuration server cluster
359#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_TYPE_DEFAULT_EP2 1
360#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_ACTIONS_DEFAULT_EP2 2
361#define ON_OFF_SWITCH_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 1
362
363
364/**************************************/
365/* All Endpoint(s) Supported Commands */
366// Generated supported command(s) for basic server cluster
367#define BASIC_SERVER_SUPPORTED_COMMANDS_RECEIVE \
368 TR_ZCL_CMD_RESET_TO_FACTORY_DEFAULTS_ID
369
370// Generated supported command(s) for identify client cluster
371#define IDENTIFY_CLIENT_SUPPORTED_COMMANDS_RECEIVE \
372 TR_ZCL_CMD_IDENTIFY_QUERY_RESPONSE_ID
373
374// Generated supported command(s) for identify server cluster
375#define IDENTIFY_SERVER_SUPPORTED_COMMANDS_RECEIVE \
376 TR_ZCL_CMD_IDENTIFY_ID, \
377 TR_ZCL_CMD_IDENTIFY_QUERY_ID, \
378 TR_ZCL_CMD_TRIGGER_EFFECT_ID
379
380// Generated supported command(s) for poll control server cluster
381#define POLL_CONTROL_SERVER_SUPPORTED_COMMANDS_RECEIVE \
382 TR_ZCL_CMD_CHECK_IN_RESPONSE_ID, \
383 TR_ZCL_CMD_FAST_POLL_STOP_ID, \
384 TR_ZCL_CMD_SET_LONG_POLL_INTERVAL_ID, \
385 TR_ZCL_CMD_SET_SHORT_POLL_INTERVAL_ID
386
387// Generated supported command(s) for remote cli server cluster
388#define REMOTE_CLI_SERVER_SUPPORTED_COMMANDS_RECEIVE \
389 TR_ZCL_CMD_CLI_COMMAND_ID, \
390 TR_ZCL_CMD_ENABLE_REMOTE_CLI_ID
391
392// Generated supported command(s) for identify client cluster
393#define IDENTIFY_CLIENT_SUPPORTED_COMMANDS_SEND \
394 TR_ZCL_CMD_IDENTIFY_ID, \
395 TR_ZCL_CMD_IDENTIFY_QUERY_ID, \
396 TR_ZCL_CMD_TRIGGER_EFFECT_ID
397
398// Generated supported command(s) for identify server cluster
399#define IDENTIFY_SERVER_SUPPORTED_COMMANDS_SEND \
400 TR_ZCL_CMD_IDENTIFY_QUERY_RESPONSE_ID
401
402// Generated supported command(s) for on/off client cluster
403#define ON_OFF_CLIENT_SUPPORTED_COMMANDS_SEND \
404 TR_ZCL_CMD_OFF_ID, \
405 TR_ZCL_CMD_ON_ID, \
406 TR_ZCL_CMD_TOGGLE_ID
407
408// Generated supported command(s) for poll control server cluster
409#define POLL_CONTROL_SERVER_SUPPORTED_COMMANDS_SEND \
410 TR_ZCL_CMD_CHECK_IN_ID
411
412// Generated supported command(s) for remote cli server cluster
413#define REMOTE_CLI_SERVER_SUPPORTED_COMMANDS_SEND \
414 TR_ZCL_CMD_CLI_COMMAND_RESPONSE_ID
415
416/*******************************************/
417/* All Endpoint(s) nvram attribute storage */
418// Generated number of attributes stored in nvram
419#define TR_NUM_NVRAM_ATTR (0+1+1+1+1+1+1+1+1+1+1)
420
421#define TR_NVRAM_ATTR_STORAGE_CONFIG \
422 { \
423 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_ALARM_MASK_ID, \
424 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_BITMAP8_ATTR_TYPE }, \
425 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_VOLTAGE_MIN_THRESHOLD_ID, \
426 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT8U_ATTR_TYPE }, \
427 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_ALARM_STATE_ID, \
428 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_BITMAP32_ATTR_TYPE }, \
429 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_CHECK_IN_INTERVAL_ID, \
430 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT32U_ATTR_TYPE }, \
431 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID, \
432 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT32U_ATTR_TYPE }, \
433 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID, \
434 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT16U_ATTR_TYPE }, \
435 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID, \
436 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT16U_ATTR_TYPE }, \
437 { TR_DEVICE_EP2,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_ALARM_MASK_ID, \
438 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_BITMAP8_ATTR_TYPE }, \
439 { TR_DEVICE_EP2,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_VOLTAGE_MIN_THRESHOLD_ID, \
440 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT8U_ATTR_TYPE }, \
441 { TR_DEVICE_EP2,TR_ZCL_CLUSTER_POWER_CONFIGURATION_ID,TR_ZCL_ATTR_POWER_CONFIGURATION_BATTERY_ALARM_STATE_ID, \
442 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_BITMAP32_ATTR_TYPE }, \
443 }
444
445/****************************************/
446/* All Endpoint(s) Default Reporting Configs */
447typedef struct
448{
449 zb_uint8_t direction;
450 zb_uint8_t endpoint;
451 zb_uint16_t cluster_id;
452 zb_uint8_t cluster_role;
453 zb_uint16_t attr_id;
454 zb_uint16_t profile_id;
455 zb_uint16_t manuf_code;
456 zb_uint16_t min_interval;
457 zb_uint16_t max_interval;
458 zb_uint8_t data_type;
459 zb_uint32_t reportable_change;
461
462#ifdef TR_PLUGIN_ATTR_REPORT_TABLE_SIZE
463#define TR_ATTR_REPORT_TABLE_SIZE TR_PLUGIN_ATTR_REPORT_TABLE_SIZE
464#else
465#define TR_ATTR_REPORT_TABLE_SIZE 16
466#endif
467
468#define TR_DEVICE_NUM_DEFAULT_REPORTABLE_ATTRS 3
469
470/* {direction, endpoint, cluster_id, role, attribute_id, profile_id, manuf_code, min_interval, max_interval, data_type, reportable_change} */
471#define TR_DEVICE_REPORTING_CONFIG_DEFAULTS \
472 { \
473 { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT,0x01,0x0001,TR_ZCL_CLUSTER_SERVER_ROLE,0x003E, \
474 0x0104,TR_ZCL_NON_MANUFACTURER_SPECIFIC,1,65534,TR_ZCL_BITMAP32_ATTR_TYPE,0 }, \
475 { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT,0x01,0x0003,TR_ZCL_CLUSTER_SERVER_ROLE,0x0000, \
476 0x0104,TR_ZCL_NON_MANUFACTURER_SPECIFIC,1,900,TR_ZCL_INT16U_ATTR_TYPE,5 }, \
477 { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT,0x02,0x0003,TR_ZCL_CLUSTER_SERVER_ROLE,0x0000, \
478 0x0104,TR_ZCL_NON_MANUFACTURER_SPECIFIC,1,65534,TR_ZCL_INT16U_ATTR_TYPE,0 }, \
479 }
480
481#define TR_TOTAL_ATTR_REPORT_TABLE_SIZE (TR_ATTR_REPORT_TABLE_SIZE + TR_DEVICE_NUM_DEFAULT_REPORTABLE_ATTRS)
482
483// Structure for cluster id/names
484typedef struct
485{
486 zb_uint16_t cluster_id;
487 zb_char_t *cluster_name;
489
491extern zb_af_endpoint_desc_t tr_endpoint_desc_ep1;
492extern zb_af_endpoint_desc_t tr_endpoint_desc_ep2;
493extern zb_af_device_ctx_t tr_device_ctx;
494extern zb_zcl_reporting_info_t tr_device_reporting_info[TR_TOTAL_ATTR_REPORT_TABLE_SIZE];
495
496extern zb_zcl_diagnostics_ctx_t diagnostics_ctx_zcl;
497
501
502#endif /* TR_ZCL_ENDPOINT_CONFIG_H */
ZB_PACKED_PRE struct tr_af_simple_desc_ep1_s tr_af_simple_desc_ep1_t
#define TR_TOTAL_ATTR_REPORT_TABLE_SIZE
Definition tr_zcl_endpoint_config.h:69
zb_af_device_ctx_t tr_device_ctx
tr_cluster_names_t tr_cluster_names[]
void tr_zcl_endpoint_config_reporting_init(void)
zb_zcl_diagnostics_ctx_t diagnostics_ctx_zcl
void tr_zcl_endpoint_config_attr_init(uint8_t endpoint)
void tr_zcl_endpoint_config_init(void)
zb_zcl_reporting_info_t tr_device_reporting_info[TR_TOTAL_ATTR_REPORT_TABLE_SIZE]
zb_af_endpoint_desc_t tr_endpoint_desc_ep1
zb_af_endpoint_desc_t tr_endpoint_desc_ep2
#define TR_DEVICE_NUM_IN_CLUSTERS_EP1
Definition tr_zcl_endpoint_config.h:32
ZB_PACKED_PRE struct tr_af_simple_desc_ep2_s tr_af_simple_desc_ep2_t
#define TR_DEVICE_NUM_OUT_CLUSTERS_EP2
Definition tr_zcl_endpoint_config.h:237
#define TR_DEVICE_NUM_IN_CLUSTERS_EP2
Definition tr_zcl_endpoint_config.h:236
#define TR_DEVICE_NUM_OUT_CLUSTERS_EP1
Definition tr_zcl_endpoint_config.h:33
ZCL ID definitions.
includes Trident ZCL plugin header files or creates stubs that can be consumed by the end user.
ZCL definitions for types, enums, and data structures.
Definition tr_zcl_endpoint_config.h:72
Definition tr_zcl_endpoint_config.h:276
zb_uint8_t hw_version
Definition tr_zcl_endpoint_config.h:278
zb_uint8_t version
Definition tr_zcl_endpoint_config.h:277
zb_uint8_t power_source
Definition tr_zcl_endpoint_config.h:281
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:282
Definition tr_zcl_endpoint_config.h:201
on_off_client_attr_ep1_t on_off_client
Definition tr_zcl_endpoint_config.h:144
on_off_switch_configuration_server_attr_ep1_t on_off_switch_configuration_server
Definition tr_zcl_endpoint_config.h:145
Definition tr_zcl_endpoint_config.h:320
power_configuration_server_attr_ep2_t power_configuration_server
Definition tr_zcl_endpoint_config.h:322
identify_client_attr_ep2_t identify_client
Definition tr_zcl_endpoint_config.h:323
identify_server_attr_ep2_t identify_server
Definition tr_zcl_endpoint_config.h:324
on_off_switch_configuration_server_attr_ep2_t on_off_switch_configuration_server
Definition tr_zcl_endpoint_config.h:326
on_off_client_attr_ep2_t on_off_client
Definition tr_zcl_endpoint_config.h:325
basic_server_attr_ep2_t basic_server
Definition tr_zcl_endpoint_config.h:321
Definition tr_zcl_endpoint_config.h:190
Definition tr_zcl_endpoint_config.h:97
Definition tr_zcl_endpoint_config.h:297
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:298
Definition tr_zcl_endpoint_config.h:102
Definition tr_zcl_endpoint_config.h:302
zb_uint16_t identify_time
Definition tr_zcl_endpoint_config.h:303
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:304
Definition tr_zcl_endpoint_config.h:104
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:105
Definition tr_zcl_endpoint_config.h:308
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:309
Definition tr_zcl_endpoint_config.h:109
zb_uint8_t switch_type
Definition tr_zcl_endpoint_config.h:110
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:112
zb_uint8_t switch_actions
Definition tr_zcl_endpoint_config.h:111
Definition tr_zcl_endpoint_config.h:313
zb_uint8_t switch_actions
Definition tr_zcl_endpoint_config.h:315
zb_uint8_t switch_type
Definition tr_zcl_endpoint_config.h:314
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:316
Definition tr_zcl_endpoint_config.h:148
Definition tr_zcl_endpoint_config.h:82
Definition tr_zcl_endpoint_config.h:286
zb_uint8_t battery_quantity
Definition tr_zcl_endpoint_config.h:289
zb_uint8_t battery_voltage_min_threshold
Definition tr_zcl_endpoint_config.h:291
zb_uint8_t battery_size
Definition tr_zcl_endpoint_config.h:288
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:293
zb_uint8_t battery_voltage
Definition tr_zcl_endpoint_config.h:287
zb_uint32_t battery_alarm_state
Definition tr_zcl_endpoint_config.h:292
zb_uint8_t battery_alarm_mask
Definition tr_zcl_endpoint_config.h:290
Definition tr_zcl_endpoint_config.h:195
Definition tr_zcl_endpoint_config.h:54
zb_uint16_t app_profile_id
Definition tr_zcl_endpoint_config.h:56
zb_uint8_t app_output_cluster_count
Definition tr_zcl_endpoint_config.h:61
zb_uint16_t app_cluster_list[(TR_DEVICE_NUM_IN_CLUSTERS_EP1)+(TR_DEVICE_NUM_OUT_CLUSTERS_EP1)]
Definition tr_zcl_endpoint_config.h:63
zb_uint8_t app_input_cluster_count
Definition tr_zcl_endpoint_config.h:60
zb_uint16_t reserved
Definition tr_zcl_endpoint_config.h:59
zb_uint8_t endpoint
Definition tr_zcl_endpoint_config.h:55
zb_uint16_t app_device_version
Definition tr_zcl_endpoint_config.h:58
zb_uint16_t app_device_id
Definition tr_zcl_endpoint_config.h:57
Definition tr_zcl_endpoint_config.h:258
zb_uint8_t app_output_cluster_count
Definition tr_zcl_endpoint_config.h:265
zb_uint16_t app_profile_id
Definition tr_zcl_endpoint_config.h:260
zb_uint8_t endpoint
Definition tr_zcl_endpoint_config.h:259
zb_uint16_t app_device_id
Definition tr_zcl_endpoint_config.h:261
zb_uint16_t reserved
Definition tr_zcl_endpoint_config.h:263
zb_uint8_t app_input_cluster_count
Definition tr_zcl_endpoint_config.h:264
zb_uint16_t app_cluster_list[(TR_DEVICE_NUM_IN_CLUSTERS_EP2)+(TR_DEVICE_NUM_OUT_CLUSTERS_EP2)]
Definition tr_zcl_endpoint_config.h:267
zb_uint16_t app_device_version
Definition tr_zcl_endpoint_config.h:262
Definition tr_zcl_endpoint_config.h:531
Definition tr_zcl_endpoint_config.h:590
zb_uint8_t endpoint
Definition tr_nvram_attr.h:23
zb_uint16_t cluster_id
Definition tr_nvram_attr.h:24
zb_uint8_t cluster_role
Definition tr_nvram_attr.h:26
zb_uint16_t manuf_code
Definition tr_nvram_attr.h:27
zb_uint16_t attr_id
Definition tr_nvram_attr.h:25
zb_uint8_t data_type
Definition tr_nvram_attr.h:28