TuyaOS
tkl_reporting.h
浏览该文件的文档.
1
11#ifndef __TKL_REPORTING_H__
12#define __TKL_REPORTING_H__
13
14
15#ifdef __cplusplus
16 extern "C" {
17#endif
18
19#include "tuya_cloud_types.h"
20#include "tuya_zigbee_stack.h"
21
22
26typedef enum {
30
31
35typedef struct {
37 UINT8_T ep_id;
38 UINT16_T cluster_id;
39 UINT16_T attr_id;
41 UINT16_T manuf_code;
42 union {
43 struct {
44 UINT16_T min_interval;
45 UINT16_T max_interval;
46 UINT32_T report_change;
47 } reported;
48 struct {
49 UINT16_T source_addr;
50 UINT8_T endpoint;
51 UINT16_T timeout;
52 } received;
53 } data;
55
56
64OPERATE_RET tkl_zg_reporting_init(TKL_REPORT_TABLE_T *entery, UINT8_T sums);
65
73
81
89
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif
96
Definition: tkl_reporting.h:35
UINT16_T max_interval
max reporting interval, measured in seconds
Definition: tkl_reporting.h:45
TKL_REPORT_DIREC_E direction
reporting direction
Definition: tkl_reporting.h:36
UINT32_T report_change
mini change to the attribute that will result in a report being sent
Definition: tkl_reporting.h:46
UINT8_T endpoint
remote endpoint from which the attribute is reported
Definition: tkl_reporting.h:50
UINT16_T manuf_code
manufacture code default 0
Definition: tkl_reporting.h:41
ZG_CLUSTER_MASK_E mask
reporting cluster mask
Definition: tkl_reporting.h:40
UINT8_T ep_id
endpoint id
Definition: tkl_reporting.h:37
UINT16_T min_interval
mini reporting interval, measured in seconds
Definition: tkl_reporting.h:44
UINT16_T source_addr
node id of the source of the received reports
Definition: tkl_reporting.h:49
UINT16_T cluster_id
cluster id, see ZG_CLUSTER_ID_E
Definition: tkl_reporting.h:38
UINT16_T timeout
max expected time between reports, measured in seconds
Definition: tkl_reporting.h:51
UINT16_T attr_id
attribute id
Definition: tkl_reporting.h:39
BOOL_T tkl_zg_add_reporting_entry(TKL_REPORT_TABLE_T *entery)
add reporting entry to report table
TKL_REPORT_DIREC_E
Definition: tkl_reporting.h:26
@ TKL_REPORT_DIRECTION_REPORTED
The direction of active reporting
Definition: tkl_reporting.h:27
@ TKL_REPORT_DIRECTION_RECEIVED
The direction of receiving data
Definition: tkl_reporting.h:28
OPERATE_RET tkl_zg_reporting_init(TKL_REPORT_TABLE_T *entery, UINT8_T sums)
zigbee reporting init and register reporting table
VOID_T tkl_zg_clear_reporting_table(VOID_T)
clear reporting table
VOID_T tkl_zg_load_default_reporting_table(VOID_T)
load the default binding table registered during initialization
Common process - zigbee stack
ZG_CLUSTER_MASK_E
Definition: tuya_zigbee_stack.h:85