9f5c395ec2f61d365078f2602377237cac0eb4b1
[platform/core/connectivity/zigbee-manager.git] / common / include / zigbee_service_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_SERVICE_TYPE_H__
20 #define __ZIGBEE_SERVICE_TYPE_H__
21
22 #include <zigbee_types.h>
23
24 /* --------------------------------------------------------------------------------------
25  * For Requests
26  * -------------------------------------------------------------------------------------*/
27 /**
28  * @brief Definition for service coex start structure.
29  * @since_tizen 3.0
30  */
31 typedef struct {
32         char channel; /**< Channel */
33 } ZigbeeServiceCoexStart_t;
34
35 /**
36  * @brief Definition for service permit join structure.
37  * @since_tizen 3.0
38  */
39 typedef struct {
40         char permit_join; /* 1 - Allow, 0 - Disallow */
41         int duration; /**< Duration */
42 } ZigbeeServicePermitJoin_t;
43
44 /**
45  * @brief Definition for service leave request structure.
46  * @since_tizen 3.0
47  */
48 typedef struct {
49         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
50         char remove_child; /* Remove child */
51         char rejoin; /**< Re-join */
52 } ZigbeeServiceLeaveRequest_t;
53
54 /**
55  * @brief Definition for service get endpoint list structure.
56  * @since_tizen 3.0
57  */
58 typedef struct {
59         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
60 } ZigbeeServiceGetEndpointList_t;
61
62 /**
63  * @brief Definition for service get cluster list structure.
64  * @since_tizen 3.0
65  */
66 typedef struct {
67         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
68         char endpoint; /**< Endpoint */
69 } ZigbeeServiceGetClusterList_t;
70
71 /**
72  * @brief Definition for service get node type structure.
73  * @since_tizen 3.0
74  */
75 typedef struct {
76         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
77 } ZigbeeServiceGetNodeType_t;
78
79 /* --------------------------------------------------------------------------------------
80  * For Responses
81  * -------------------------------------------------------------------------------------*/
82 /**
83  * @brief Definition for get network info structure.
84  * @since_tizen 3.0
85  */
86 typedef struct {
87         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
88         short node_id; /**< Node ID (an Network address) */
89         short pan_id; /**< PAN ID (an Network address) */
90         char channel; /**< Channel number */
91         char radio_tx_power;  /**< Power (dBm) */
92 } ZigbeeServiceGetNetworkInfo_t;
93
94 /* --------------------------------------------------------------------------------------
95  * For Notifications
96  * -------------------------------------------------------------------------------------*/
97
98 /**
99  * @brief Definition for service 'enabled' response.
100  * @since_tizen 4.0
101  */
102 typedef struct {
103         char enabled; /**< Enabled / Disabled result */
104 } ZigbeeServiceServiceState_t;
105
106 /**
107  * @brief Definition for service 'form_network_done' response.
108  * @since_tizen 4.0
109  */
110 typedef struct {
111         short pan_id; /**< PAN ID */
112 } ZigbeeServiceServiceFormNetworkDone_t;
113
114 /**
115  * @brief Definition for service 'child_rejoind' response.
116  * @since_tizen 4.0
117  */
118 typedef struct {
119         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
120 } ZigbeeServiceServiceChildRejoined_t;
121
122 /**
123  * @brief Definition for service 'child_reft' response.
124  * @since_tizen 4.0
125  */
126 typedef struct {
127         char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
128         char status; /**< status */
129 } ZigbeeServiceServiceChildLeft_t;
130
131 /**
132  * @brief Definition for service 'leave_network_done' response.
133  * @since_tizen 4.0
134  */
135 typedef struct {
136         short pan_id; /**< PAN ID */
137 } ZigbeeServiceServiceLeaveNetworkDone_t;
138
139 /**
140  * @brief Definition for service 'get_node_type' response.
141  * @since_tizen 4.0
142  */
143 typedef struct {
144         char node_type; /**< Node Type */
145 } ZigbeeServiceServiceNodeType_t;
146
147
148
149 #endif /* __ZIGBEE_SERVICE_TYPE_H__ */