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 "tr_debug_print.h"
14#include "tr_zcl_common.h"
15#include "tr_mfg_tokens.h"
16
17typedef enum
18{
19 /* Zigbee framework running and device is not part of a network */
21 /* BDB NWK Steering attempt completed successfully --> NWK Join successful */
23 /* BDB NWK Steering attempt completed unsuccessfully --> NWK Join fail */
25 /* Fires when devices joins previously known network */
27 /* Fires when devices recognizes that the network parent is gone */
29 /* Unknown state */
32
33#include "tr_zcl_endpoint_config.h"
34#ifdef TR_IS_SLEEPY_ZED
35#include "tr_sleep.h"
36#endif
37
38#ifdef TR_NETWORK_REJOIN_PLUGIN_ENABLE
39#include "tr_network_rejoin.h"
40#endif
41
42#ifndef TR_PRIMARY_CHANNEL_MASK
43#define TR_PRIMARY_CHANNEL_MASK 0x02108800
44#endif
45#ifndef TR_SECONDARY_CHANNEL_MASK
46#define TR_SECONDARY_CHANNEL_MASK 0x05EF7000
47#endif
48
49#ifdef ZB_ED_FUNC
50#ifndef TR_ED_AGING_TIMEOUT
51#define TR_ED_AGING_TIMEOUT ED_AGING_TIMEOUT_64MIN
52#endif
53#ifndef TR_KEEPALIVE_INTERVAL_MS
54#define TR_KEEPALIVE_INTERVAL_MS 300000
55#endif
56#ifndef TR_KEEPALIVE_METHOD
57#define TR_KEEPALIVE_METHOD ED_KEEPALIVE_DISABLED
58#endif
59#endif
60
61
67
76 zb_uint16_t cluster_id,
77 zb_uint8_t cluster_role,
78 zb_uint16_t attr_id,
79 zb_uint16_t manuf_code);
80
83void tr_app_init_cb(void);
84
88
92zb_bool_t tr_eui64_user_override_cb(zb_uint8_t *eui64);
93
95
101
103void tr_af_init(void);
104
109
113void tr_network_rejoin(zb_uint32_t channel_mask,
114 zb_bool_t secure);
115
117
118#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.
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:18
@ TR_CONN_STATE_NO_NETWORK
Definition tr_af.h:20
@ TR_CONN_STATE_NWK_STEERING_ATTEMPT_FAILURE
Definition tr_af.h:24
@ TR_CONN_STATE_NWK_STEERING_ATTEMPT_SUCCESS
Definition tr_af.h:22
@ TR_CONN_STATE_UNKNOWN
Definition tr_af.h:30
@ TR_CONN_STATE_JOINED_NETWORK_NO_PARENT
Definition tr_af.h:28
@ TR_CONN_STATE_JOINED_NETWORK
Definition tr_af.h:26
debug print groups, colors, and control functions
This plugin handles network rejoins for end devices, including backoffs.
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
plugin for allowing sleep and getting alerted about pre/post sleep
entry point for all incoming ZCL messages