11#ifndef TR_ZCL_ENDPOINT_CONFIG_H
12#define TR_ZCL_ENDPOINT_CONFIG_H
14#include "zb_zcl_common.h"
15#include "zboss_api_internal.h"
20#define TR_DEVICE_MANUFACTURER_ID 0x1570U
21#define TR_GLOBAL_RESPONSE_POLICY ZB_ZCL_DISABLE_DEFAULT_RESPONSE
23#define TR_ZCL_NULL_EP_ID 0xFFU
24#define TR_ZCL_NULL_ID 0xFFFFU
25#define TR_ZCL_NON_MANUFACTURER_SPECIFIC 0xFFFFU
29#define TR_DEVICE_EP1 1
32#define TR_DEVICE_NUM_IN_CLUSTERS_EP1 (0+1+1+1+1+1+1)
33#define TR_DEVICE_NUM_OUT_CLUSTERS_EP1 (0+1+1)
35#if defined ZB_APS_ENCRYPTION_PER_CLUSTER
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;
83 zb_uint16_t cluster_revision_client;
88 zb_uint16_t identify_time;
89 zb_uint16_t cluster_revision_server;
106 zb_uint32_t check_in_interval;
107 zb_uint32_t long_poll_interval;
108 zb_uint16_t short_poll_interval;
109 zb_uint16_t fast_poll_timeout;
110 zb_uint32_t check_in_interval_min;
111 zb_uint32_t long_poll_interval_min;
112 zb_uint16_t fast_poll_timeout_max;
113 zb_uint16_t cluster_revision_server;
118 zb_uint16_t cluster_revision_server;
123 zb_uint8_t cli_status;
124 zb_uint16_t cluster_revision_server;
142#define BASIC_SERVER_VERSION_DEFAULT_EP1 8
143#define BASIC_SERVER_HW_VERSION_DEFAULT_EP1 1
144#define BASIC_SERVER_MANUFACTURER_NAME_DEFAULT_EP1 "Trident IoT"
145#define BASIC_SERVER_MODEL_IDENTIFIER_DEFAULT_EP1 "Light Switch"
146#define BASIC_SERVER_POWER_SOURCE_DEFAULT_EP1 4
147#define BASIC_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
150#define IDENTIFY_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP1 2
153#define IDENTIFY_SERVER_IDENTIFY_TIME_DEFAULT_EP1 0
154#define IDENTIFY_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 2
157#define ON_OFF_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP1 2
160#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_TYPE_DEFAULT_EP1 1
161#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_ACTIONS_DEFAULT_EP1 2
162#define ON_OFF_SWITCH_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 1
165#define POLL_CONTROL_SERVER_CHECK_IN_INTERVAL_DEFAULT_EP1 0x000004b0
166#define POLL_CONTROL_SERVER_LONG_POLL_INTERVAL_DEFAULT_EP1 0x00000018
167#define POLL_CONTROL_SERVER_SHORT_POLL_INTERVAL_DEFAULT_EP1 0x0002
168#define POLL_CONTROL_SERVER_FAST_POLL_TIMEOUT_DEFAULT_EP1 0x0028
169#define POLL_CONTROL_SERVER_CHECK_IN_INTERVAL_MIN_DEFAULT_EP1 0x000000F0
170#define POLL_CONTROL_SERVER_LONG_POLL_INTERVAL_MIN_DEFAULT_EP1 0x00000008
171#define POLL_CONTROL_SERVER_FAST_POLL_TIMEOUT_MAX_DEFAULT_EP1 0x0028
172#define POLL_CONTROL_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
175#define DIAGNOSTICS_SERVER_NUMBER_OF_RESETS_DEFAULT_EP1 0x0000
176#define DIAGNOSTICS_SERVER_MAC_RX_BCAST_DEFAULT_EP1 0x0000
177#define DIAGNOSTICS_SERVER_MAC_TX_BCAST_DEFAULT_EP1 0x0000
178#define DIAGNOSTICS_SERVER_MAC_RX_UCAST_DEFAULT_EP1 0x0000
179#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_DEFAULT_EP1 0x0000
180#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_RETRY_DEFAULT_EP1 0x0000
181#define DIAGNOSTICS_SERVER_MAC_TX_UCAST_FAIL_DEFAULT_EP1 0x0000
182#define DIAGNOSTICS_SERVER_APS_RX_BCAST_DEFAULT_EP1 0x0000
183#define DIAGNOSTICS_SERVER_APS_TX_BCAST_DEFAULT_EP1 0x0000
184#define DIAGNOSTICS_SERVER_APS_UCAST_SUCCESS_DEFAULT_EP1 0x0000
185#define DIAGNOSTICS_SERVER_APS_TX_UCAST_RETRY_DEFAULT_EP1 0x0000
186#define DIAGNOSTICS_SERVER_APS_TX_UCAST_FAIL_DEFAULT_EP1 0x0000
187#define DIAGNOSTICS_SERVER_ROUTE_DISC_INITIATED_DEFAULT_EP1 0x0000
188#define DIAGNOSTICS_SERVER_NEIGHBOR_ADDED_DEFAULT_EP1 0x0000
189#define DIAGNOSTICS_SERVER_NEIGHBOR_REMOVED_DEFAULT_EP1 0x0000
190#define DIAGNOSTICS_SERVER_NEIGHBOR_STALE_DEFAULT_EP1 0x0000
191#define DIAGNOSTICS_SERVER_JOIN_INDICATION_DEFAULT_EP1 0x0000
192#define DIAGNOSTICS_SERVER_CHILD_MOVED_DEFAULT_EP1 0x0000
193#define DIAGNOSTICS_SERVER_NWK_FC_FAILURE_DEFAULT_EP1 0x0000
194#define DIAGNOSTICS_SERVER_APS_FC_FAILURE_DEFAULT_EP1 0x0000
195#define DIAGNOSTICS_SERVER_APS_UNAUTHORIZED_KEY_DEFAULT_EP1 0x0000
196#define DIAGNOSTICS_SERVER_NWK_DECRYPT_FAILURE_DEFAULT_EP1 0x0000
197#define DIAGNOSTICS_SERVER_APS_DECRYPT_FAILURE_DEFAULT_EP1 0x0000
198#define DIAGNOSTICS_SERVER_PACKET_BUFFER_ALLOC_FAILURES_DEFAULT_EP1 0x0000
199#define DIAGNOSTICS_SERVER_PHY_TO_MAC_QUEUE_LIMIT_REACHED_DEFAULT_EP1 0x0000
200#define DIAGNOSTICS_SERVER_PACKET_VALIDATE_DROP_COUNT_DEFAULT_EP1 0x0000
201#define DIAGNOSTICS_SERVER_AVERAGE_MAC_RETRY_PER_APS_MSG_SENT_DEFAULT_EP1 0x0000
202#define DIAGNOSTICS_SERVER_LAST_MESSAGE_LQI_DEFAULT_EP1 0x0000
203#define DIAGNOSTICS_SERVER_LAST_MESSAGE_RSSI_DEFAULT_EP1 0x0000
204#define DIAGNOSTICS_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 3
207#define REMOTE_CLI_SERVER_CLI_STATUS_DEFAULT_EP1 0x0000
208#define REMOTE_CLI_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP1 0x0001
212#define TR_DEVICE_EP2 2
215#define TR_DEVICE_NUM_IN_CLUSTERS_EP2 (0+1+1+1)
216#define TR_DEVICE_NUM_OUT_CLUSTERS_EP2 (0+1+1)
218#if defined ZB_APS_ENCRYPTION_PER_CLUSTER
297#define BASIC_SERVER_VERSION_DEFAULT_EP2 8
298#define BASIC_SERVER_HW_VERSION_DEFAULT_EP2 1
299#define BASIC_SERVER_POWER_SOURCE_DEFAULT_EP2 4
300#define BASIC_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 3
303#define IDENTIFY_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP2 2
306#define IDENTIFY_SERVER_IDENTIFY_TIME_DEFAULT_EP2 0
307#define IDENTIFY_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 2
310#define ON_OFF_CLIENT_CLUSTER_REVISION_CLIENT_DEFAULT_EP2 2
313#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_TYPE_DEFAULT_EP2 1
314#define ON_OFF_SWITCH_CONFIGURATION_SERVER_SWITCH_ACTIONS_DEFAULT_EP2 2
315#define ON_OFF_SWITCH_CONFIGURATION_SERVER_CLUSTER_REVISION_SERVER_DEFAULT_EP2 1
321#define BASIC_SERVER_SUPPORTED_COMMANDS_RECEIVE \
322 TR_ZCL_CMD_RESET_TO_FACTORY_DEFAULTS_ID
325#define IDENTIFY_CLIENT_SUPPORTED_COMMANDS_RECEIVE \
326 TR_ZCL_CMD_IDENTIFY_QUERY_RESPONSE_ID
329#define IDENTIFY_SERVER_SUPPORTED_COMMANDS_RECEIVE \
330 TR_ZCL_CMD_IDENTIFY_ID, \
331 TR_ZCL_CMD_IDENTIFY_QUERY_ID, \
332 TR_ZCL_CMD_TRIGGER_EFFECT_ID
335#define POLL_CONTROL_SERVER_SUPPORTED_COMMANDS_RECEIVE \
336 TR_ZCL_CMD_CHECK_IN_RESPONSE_ID, \
337 TR_ZCL_CMD_FAST_POLL_STOP_ID, \
338 TR_ZCL_CMD_SET_LONG_POLL_INTERVAL_ID, \
339 TR_ZCL_CMD_SET_SHORT_POLL_INTERVAL_ID
342#define REMOTE_CLI_SERVER_SUPPORTED_COMMANDS_RECEIVE \
343 TR_ZCL_CMD_CLI_COMMAND_ID, \
344 TR_ZCL_CMD_ENABLE_REMOTE_CLI_ID
347#define IDENTIFY_CLIENT_SUPPORTED_COMMANDS_SEND \
348 TR_ZCL_CMD_IDENTIFY_ID, \
349 TR_ZCL_CMD_IDENTIFY_QUERY_ID, \
350 TR_ZCL_CMD_TRIGGER_EFFECT_ID
353#define IDENTIFY_SERVER_SUPPORTED_COMMANDS_SEND \
354 TR_ZCL_CMD_IDENTIFY_QUERY_RESPONSE_ID
357#define ON_OFF_CLIENT_SUPPORTED_COMMANDS_SEND \
363#define POLL_CONTROL_SERVER_SUPPORTED_COMMANDS_SEND \
364 TR_ZCL_CMD_CHECK_IN_ID
367#define REMOTE_CLI_SERVER_SUPPORTED_COMMANDS_SEND \
368 TR_ZCL_CMD_CLI_COMMAND_RESPONSE_ID
373#define TR_NUM_NVRAM_ATTR (0+1+1+1+1)
375#define TR_NVRAM_ATTR_STORAGE_CONFIG \
377 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_CHECK_IN_INTERVAL_ID, \
378 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT32U_ATTR_TYPE }, \
379 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID, \
380 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT32U_ATTR_TYPE }, \
381 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID, \
382 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT16U_ATTR_TYPE }, \
383 { TR_DEVICE_EP1,TR_ZCL_CLUSTER_POLL_CONTROL_ID,TR_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID, \
384 TR_ZCL_CLUSTER_SERVER_ROLE,TR_ZCL_NON_MANUFACTURER_SPECIFIC,TR_ZCL_INT16U_ATTR_TYPE }, \
391 zb_uint8_t direction;
396 zb_uint16_t profile_id;
398 zb_uint16_t min_interval;
399 zb_uint16_t max_interval;
401 zb_uint32_t reportable_change;
404#ifdef TR_PLUGIN_ATTR_REPORT_TABLE_SIZE
405#define TR_ATTR_REPORT_TABLE_SIZE TR_PLUGIN_ATTR_REPORT_TABLE_SIZE
407#define TR_ATTR_REPORT_TABLE_SIZE 16
410#define TR_DEVICE_NUM_DEFAULT_REPORTABLE_ATTRS 2
413#define TR_DEVICE_REPORTING_CONFIG_DEFAULTS \
415 { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT,0x01,0x0003,TR_ZCL_CLUSTER_SERVER_ROLE,0x0000, \
416 0x0104,TR_ZCL_NON_MANUFACTURER_SPECIFIC,1,900,TR_ZCL_INT16U_ATTR_TYPE,5 }, \
417 { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT,0x02,0x0003,TR_ZCL_CLUSTER_SERVER_ROLE,0x0000, \
418 0x0104,TR_ZCL_NON_MANUFACTURER_SPECIFIC,1,65534,TR_ZCL_INT16U_ATTR_TYPE,0 }, \
421#define TR_TOTAL_ATTR_REPORT_TABLE_SIZE (TR_ATTR_REPORT_TABLE_SIZE + TR_DEVICE_NUM_DEFAULT_REPORTABLE_ATTRS)
427 zb_char_t *cluster_name;
zb_af_endpoint_desc_t tr_endpoint_desc_ep1
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_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:216
#define TR_DEVICE_NUM_IN_CLUSTERS_EP2
Definition tr_zcl_endpoint_config.h:215
#define TR_DEVICE_NUM_OUT_CLUSTERS_EP1
Definition tr_zcl_endpoint_config.h:33
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:255
zb_uint8_t hw_version
Definition tr_zcl_endpoint_config.h:257
zb_uint8_t version
Definition tr_zcl_endpoint_config.h:256
zb_uint8_t power_source
Definition tr_zcl_endpoint_config.h:258
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:259
Definition tr_zcl_endpoint_config.h:158
on_off_client_attr_ep1_t on_off_client
Definition tr_zcl_endpoint_config.h:132
on_off_switch_configuration_server_attr_ep1_t on_off_switch_configuration_server
Definition tr_zcl_endpoint_config.h:133
Definition tr_zcl_endpoint_config.h:286
identify_client_attr_ep2_t identify_client
Definition tr_zcl_endpoint_config.h:288
identify_server_attr_ep2_t identify_server
Definition tr_zcl_endpoint_config.h:289
on_off_switch_configuration_server_attr_ep2_t on_off_switch_configuration_server
Definition tr_zcl_endpoint_config.h:291
on_off_client_attr_ep2_t on_off_client
Definition tr_zcl_endpoint_config.h:290
basic_server_attr_ep2_t basic_server
Definition tr_zcl_endpoint_config.h:287
Definition tr_zcl_endpoint_config.h:147
Definition tr_zcl_endpoint_config.h:82
Definition tr_zcl_endpoint_config.h:263
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:264
Definition tr_zcl_endpoint_config.h:87
Definition tr_zcl_endpoint_config.h:268
zb_uint16_t identify_time
Definition tr_zcl_endpoint_config.h:269
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:270
Definition tr_zcl_endpoint_config.h:93
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:94
Definition tr_zcl_endpoint_config.h:274
zb_uint16_t cluster_revision_client
Definition tr_zcl_endpoint_config.h:275
Definition tr_zcl_endpoint_config.h:98
zb_uint8_t switch_type
Definition tr_zcl_endpoint_config.h:99
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:101
zb_uint8_t switch_actions
Definition tr_zcl_endpoint_config.h:100
Definition tr_zcl_endpoint_config.h:279
zb_uint8_t switch_actions
Definition tr_zcl_endpoint_config.h:281
zb_uint8_t switch_type
Definition tr_zcl_endpoint_config.h:280
zb_uint16_t cluster_revision_server
Definition tr_zcl_endpoint_config.h:282
Definition tr_zcl_endpoint_config.h:119
Definition tr_zcl_endpoint_config.h:152
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:237
zb_uint8_t app_output_cluster_count
Definition tr_zcl_endpoint_config.h:244
zb_uint16_t app_profile_id
Definition tr_zcl_endpoint_config.h:239
zb_uint8_t endpoint
Definition tr_zcl_endpoint_config.h:238
zb_uint16_t app_device_id
Definition tr_zcl_endpoint_config.h:240
zb_uint16_t reserved
Definition tr_zcl_endpoint_config.h:242
zb_uint8_t app_input_cluster_count
Definition tr_zcl_endpoint_config.h:243
zb_uint16_t app_cluster_list[(TR_DEVICE_NUM_IN_CLUSTERS_EP2)+(TR_DEVICE_NUM_OUT_CLUSTERS_EP2)]
Definition tr_zcl_endpoint_config.h:246
zb_uint16_t app_device_version
Definition tr_zcl_endpoint_config.h:241
Definition tr_zcl_endpoint_config.h:413
Definition tr_zcl_endpoint_config.h:456
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