Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
tr_af.h
Go to the documentation of this file.
1
10#ifndef TR_AF_H
11#define TR_AF_H
12#include "zb_common.h"
13#include "zb_aps.h"
14#include "tr_zcl_common.h"
15#include "tr_mfg_tokens.h"
16
17#ifdef TR_DEBUG_PRINT_PLUGIN_ENABLE
18#include "tr_debug_print.h"
19#else
21#endif
22
23typedef enum
24{
25 /* Zigbee framework running and device is not part of a network */
27 /* BDB NWK Steering attempt completed successfully --> NWK Join successful */
29 /* BDB NWK Steering attempt completed unsuccessfully --> NWK Join fail */
31 /* Fires when devices joins previously known network */
33 /* Fires when devices recognizes that the network parent is gone */
35 /* Unknown state */
38
39#include "tr_zcl_endpoint_config.h"
40#ifdef TR_SLEEP_PLUGIN_ENABLE
41#include "tr_sleep.h"
42#endif
43
44#ifdef TR_NETWORK_REJOIN_PLUGIN_ENABLE
45#include "tr_network_rejoin.h"
46#endif
47
48#ifndef TR_PRIMARY_CHANNEL_MASK
49#define TR_PRIMARY_CHANNEL_MASK 0x02108800
50#endif
51#ifndef TR_SECONDARY_CHANNEL_MASK
52#define TR_SECONDARY_CHANNEL_MASK 0x05EF7000
53#endif
54
55#ifdef ZB_ED_FUNC
56#ifndef TR_ED_AGING_TIMEOUT
57#define TR_ED_AGING_TIMEOUT ED_AGING_TIMEOUT_64MIN
58#endif
59#ifndef TR_ED_KEEPALIVE_INTERVAL_MS
60#define TR_ED_KEEPALIVE_INTERVAL_MS 300000
61#endif
62#ifndef TR_ED_KEEPALIVE_METHOD
63#define TR_ED_KEEPALIVE_METHOD ED_KEEPALIVE_DISABLED
64#endif
65#endif
66
67#if defined ZB_COORDINATOR_ROLE
68#ifndef TR_MAX_CHILDREN
69#define TR_MAX_CHILDREN 32
70#endif
71
72#elif defined ZB_ROUTER_ROLE
73#ifndef TR_MAX_CHILDREN
74#define TR_MAX_CHILDREN 32
75#endif
76#endif
77
78#ifndef TSDK_VERSION_YEAR
79#define TSDK_VERSION_YEAR 2025
80#endif
81
82#ifndef TSDK_VERSION_MONTH
83#define TSDK_VERSION_MONTH 7
84#endif
85
86#ifndef TSDK_VERSION_PATCH
87#define TSDK_VERSION_PATCH 0
88#endif
89
95
104 zb_uint16_t cluster_id,
105 zb_uint8_t cluster_role,
106 zb_uint16_t attr_id,
107 zb_uint16_t manuf_code);
108
111void tr_app_init_cb(void);
112
116
120zb_bool_t tr_eui64_user_override_cb(zb_uint8_t *eui64);
121
125
129
131
137
139void tr_af_init(void);
140
145
149void tr_network_rejoin(zb_uint32_t channel_mask,
150 zb_bool_t secure);
151
153
154#endif /* TR_AF_H */
void tr_af_init(void)
Initialize Trident application framework.
tr_conn_state_e tr_get_connection_state(void)
Function for getting the last known connection state of the device. Optional callback tr_connection_s...
void tr_network_rejoin(zb_uint32_t channel_mask, zb_bool_t secure)
Function for initiating network rejoin attempts.
void tr_pre_stack_init_cb(void)
Callback that fires just before the protocol stack is initialized. This is the first callback that is...
void tr_post_stack_shutdown_cb(void)
Callback that fires after the stack scheduler has been stopped. This is the last callback that is hit...
zb_uint8_t * tr_zcl_external_attribute_read_cb(zb_uint8_t endpoint, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id, zb_uint16_t manuf_code)
Callback that the user can declare to handle external attribute storage.
zb_bool_t tr_eui64_user_override_cb(zb_uint8_t *eui64)
Callback that can be defined in the user application to set the EUI64.
void tr_app_init_cb(void)
Callback that fires when ZBOSS framework (scheduler, buffer pool, etc.) has started,...
void tr_connection_state_cb(tr_conn_state_e conn_state)
Callback that fires when network connection state changes.
tr_conn_state_e
Definition tr_af.h:24
@ TR_CONN_STATE_NO_NETWORK
Definition tr_af.h:26
@ TR_CONN_STATE_NWK_STEERING_ATTEMPT_FAILURE
Definition tr_af.h:30
@ TR_CONN_STATE_NWK_STEERING_ATTEMPT_SUCCESS
Definition tr_af.h:28
@ TR_CONN_STATE_UNKNOWN
Definition tr_af.h:36
@ TR_CONN_STATE_JOINED_NETWORK_NO_PARENT
Definition tr_af.h:34
@ TR_CONN_STATE_JOINED_NETWORK
Definition tr_af.h:32
debug print groups, colors, and control functions
stub file for tr_debug_print.h
This plugin handles network rejoins for end devices, including backoffs.
zb_uint8_t endpoint
Definition tr_nvram_attr.h:176
zb_uint16_t cluster_id
Definition tr_nvram_attr.h:177
zb_uint8_t cluster_role
Definition tr_nvram_attr.h:179
zb_uint16_t manuf_code
Definition tr_nvram_attr.h:180
zb_uint16_t attr_id
Definition tr_nvram_attr.h:178
plugin for allowing sleep and getting alerted about pre/post sleep
entry point for all incoming ZCL messages