8fe8ab68e29da82b11f34a83283a0869c0d2d22c
[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 /**
23  * @brief Definition for custom send payload/data length (128).
24  * @since_tizen 3.0
25  */
26 #define ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN 128
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_ctl;
35         char src_ep;
36         char dest_ep;
37         short cluster_id;
38         short profile_id;
39         char zcl_frame_ctl;
40         short mfg_code;
41         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
42 } ZigbeeCustomApsSend_t;
43
44 /**
45  * @brief Definition for ZCL send structure.
46  * @since_tizen 3.0
47  */
48 typedef struct {
49         short node_id;
50         char src_ep;
51         char dest_ep;
52         short cluster_id;
53         char zcl_frame_ctl;
54         char cmd_id;
55         char payload[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
56 } ZigbeeCustomZclSend_t;
57
58 /**
59  * @brief Definition for send to local structure.
60  * @since_tizen 3.0
61  */
62 typedef struct {
63         char data[ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN];
64 } ZigbeeCustomSendToLocal_t;
65
66 #endif /* __ZIGBEE_CUSTOM_TYPE_H__ */