Impelement Custom cluster
[platform/core/connectivity/zigbee-manager.git] / common / include / zigbee_custom_type.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact: Suresh Kumar N (suresh.n@samsung.com)
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __ZIGBEE_CUSTOM_TYPE_H__
20 #define __ZIGBEE_CUSTOM_TYPE_H__
21
22 #include <zigbee_types.h>
23
24 /* --------------------------------------------------------------------------------------
25  * For Request
26  * -------------------------------------------------------------------------------------*/
27
28 /**
29  * @brief Definition for APS send structure.
30  * @since_tizen 3.0
31  */
32 typedef struct {
33         short node_id;
34         char aps_frame_ctrl;
35         char src_ep;
36         char dest_ep;
37         short cluster_id;
38         short profile_id;
39         char zcl_frame_ctrl;
40         short mfg_code;
41         char cmd_id;
42         short payload_len;
43         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
44 } ZigbeeCustomApsSend_t;
45
46 /**
47  * @brief Definition for ZCL send structure.
48  * @since_tizen 3.0
49  */
50 typedef struct {
51         short node_id;
52         char src_ep;
53         char dest_ep;
54         short cluster_id;
55         char zcl_frame_ctrl;
56         char cmd_id;
57         short payload_len;
58         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
59 } ZigbeeCustomZclSend_t;
60
61 /**
62  * @brief Definition for send to local structure.
63  * @since_tizen 3.0
64  */
65 typedef struct {
66         short length;
67         char data[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
68 } ZigbeeCustomSendToLocal_t;
69
70 /* --------------------------------------------------------------------------------------
71  * For Notifications
72  * -------------------------------------------------------------------------------------*/
73
74 /**
75  * @brief Definition for send to APS send response structure.
76  * @since_tizen 3.0
77  */
78 typedef struct {
79         short node_id;
80         char src_ep;
81         char dest_ep;
82         short cluster_id;
83         short profile_id;
84         char cmd_id;
85         short payload_len;
86         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
87 } ZigbeeCustomApsSendNoti_t;
88
89 /**
90  * @brief Definition for send to ZCL send response structure.
91  * @since_tizen 3.0
92  */
93 typedef struct {
94         short node_id;
95         char src_ep;
96         char dest_ep;
97         short cluster_id;
98         short profile_id;
99         char cmd_id;
100         short payload_len;
101         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
102 } ZigbeeCustomZclSendNoti_t;
103
104 /**
105  * @brief Definition for send to local response structure.
106  * @since_tizen 3.0
107  */
108 typedef struct {
109         short length;
110         char data[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
111 } ZigbeeCustomSendToLocalNoti_t;
112
113 #endif /* __ZIGBEE_CUSTOM_TYPE_H__ */