TuyaOS
tkl_endpoint_register.h
浏览该文件的文档.
1
11#ifndef __TKL_ENDPOINT_REGISTER_H__
12#define __TKL_ENDPOINT_REGISTER_H__
13
14
15#ifdef __cplusplus
16 extern "C" {
17#endif
18
19#include "tuya_zigbee_stack.h"
20#include "tuya_cloud_types.h"
21
22/*
23 * attribute instantiation structure
24*/
25typedef struct {
26 UINT16_T attr_id;
28 UINT8_T size;
29 UINT8_T mask;
30 UINT8_T flag;
31 VOID_T *value;
33
34/*
35 * cluster instantiation structure
36*/
37typedef struct {
38 UINT16_T cluster_id;
40 UINT8_T attr_sums;
42
43/*
44 * Zigbee cluster triplet structure
45*/
46typedef struct {
47 UINT8_T ep_id;
48 UINT8_T is_server;
49 UINT16_T cluster_id;
51
52/*
53 * endpoint instantiation structure
54*/
55typedef struct {
56 UINT8_T ep_id;
58 ZG_DEV_ID_E dev_id;
64
72
81OPERATE_RET tkl_zg_endpoint_register(CONST TKL_ENDPOINT_T *ep_desc, UINT8_T sums);
82
90
99BOOL_T tkl_zg_attr_get(TKL_CLUSTER_TRIPLET_T *triplet, UINT16_T attr_id, TKL_ATTR_T *out_attr);
100
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif
Definition: tkl_endpoint_register.h:25
UINT8_T mask
attributes mask
Definition: tkl_endpoint_register.h:29
UINT16_T attr_id
attributes id
Definition: tkl_endpoint_register.h:26
VOID_T * value
the default value of attribute
Definition: tkl_endpoint_register.h:31
UINT8_T size
length of attributes value
Definition: tkl_endpoint_register.h:28
ZG_ATTR_TYPE_E type
attributes data type
Definition: tkl_endpoint_register.h:27
UINT8_T flag
indicates whether ATT supports the scene
Definition: tkl_endpoint_register.h:30
Definition: tkl_endpoint_register.h:46
UINT8_T ep_id
endpoint id
Definition: tkl_endpoint_register.h:47
UINT8_T is_server
cluster is server or client
Definition: tkl_endpoint_register.h:48
UINT16_T cluster_id
cluster id,see ZG_CLUSTER_ID_E
Definition: tkl_endpoint_register.h:49
Definition: tkl_endpoint_register.h:37
UINT8_T attr_sums
how many attributes does a cluster have
Definition: tkl_endpoint_register.h:40
TKL_ATTR_T * attr_list
a list of attributes definitions
Definition: tkl_endpoint_register.h:39
UINT16_T cluster_id
cluster id, see ZG_CLUSTER_ID_E
Definition: tkl_endpoint_register.h:38
Definition: tkl_endpoint_register.h:55
TKL_CLUSTER_T * client_cluster_list
client cluster
Definition: tkl_endpoint_register.h:62
ZG_PROFILE_ID_E profile
profile of endpoint
Definition: tkl_endpoint_register.h:57
UINT8_T client_cluster_sums
the number of clusters on the client side
Definition: tkl_endpoint_register.h:61
ZG_DEV_ID_E dev_id
device id of endpoint
Definition: tkl_endpoint_register.h:58
UINT8_T ep_id
endpoint id
Definition: tkl_endpoint_register.h:56
UINT8_T server_cluster_sums
the number of clusters on the server side
Definition: tkl_endpoint_register.h:59
TKL_CLUSTER_T * server_cluster_list
server cluster
Definition: tkl_endpoint_register.h:60
BOOL_T tkl_zg_match_cluster(TKL_CLUSTER_TRIPLET_T *triplet)
match cluster on endpoint
UINT8_T tkl_zg_endpoint_count_get(VOID_T)
get the total number of endpoints
BOOL_T tkl_zg_attr_get(TKL_CLUSTER_TRIPLET_T *triplet, UINT16_T attr_id, TKL_ATTR_T *out_attr)
get attribute details
OPERATE_RET tkl_zg_endpoint_register(CONST TKL_ENDPOINT_T *ep_desc, UINT8_T sums)
endpoint used by dynamically registered uplayer, only be called once in the initialization process.
ZG_ATTR_TYPE_E
Definition: tuya_zigbee_attribute.h:36
Common process - zigbee stack
ZG_PROFILE_ID_E
Definition: tuya_zigbee_stack.h:106