Change signal / method name
[platform/core/connectivity/zigbee-manager.git] / common / include / zigbee_zdo_dev_control_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_ZDO_DEV_CONTROL_TYPE_H__
20 #define __ZIGBEE_ZDO_DEV_CONTROL_TYPE_H__
21
22 #include <zigbee_types.h>
23
24 /* -----------------------------------------------------------------------------
25  * For Requests
26  * ---------------------------------------------------------------------------*/
27
28 /**
29  * @brief Definition for ZDO Dev control network address request structure.
30  * @since_tizen 3.0
31  */
32 typedef struct {
33         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
34         unsigned char request_type; /**< Request type */
35         unsigned char start_index; /**< Start index */
36 } ZigbeeZdoDevControlNwkAddrReq_t;
37
38 /**
39  * @brief Definition for ZDO Dev control matched descriptor request structure.
40  * @since_tizen 3.0
41  */
42 typedef struct {
43         unsigned short node_id; /**< Node ID */
44         unsigned short profile_id; /**< Profile ID */
45         unsigned char num_in_cl; /**< Number of int CL */
46         unsigned short *in_cl; /**< In CL */
47         unsigned char num_out_cl; /**< Number of out CL */
48         unsigned short *out_cl; /**< Out CL */
49 } ZigbeeZdoDevControlMatchedDescriptorReq_t;
50
51 /**
52  * @brief Definition for ZDO Dev control IEEE address request structure.
53  * @since_tizen 3.0
54  */
55 typedef struct {
56         unsigned short node_id; /**< Node ID */
57 } ZigbeeZdoDevControlIeeeAddrReq_t;
58
59 /**
60  * @brief Definition for ZDO Dev control active endpoint structure.
61  * @since_tizen 3.0
62  */
63 typedef struct {
64         unsigned short node_id; /**< Node ID */
65 } ZigbeeZdoDevControlActiveEpReq_t;
66
67 /**
68  * @brief Definition for ZDO Dev control node descriptor request structure.
69  * @since_tizen 3.0
70  */
71 typedef struct {
72         unsigned short node_id; /**< Node ID */
73 } ZigbeeZdoDevControlNodeDescriptorReq_t;
74
75 /**
76  * @brief Definition for ZDO Dev control power descriptor request structure.
77  * @since_tizen 3.0
78  */
79 typedef struct {
80         unsigned short node_id; /**< Node ID */
81 } ZigbeeZdoDevControlPowerDescriptorReq_t;
82
83 /**
84  * @brief Definition for ZDO Dev control complex descriptor request structure.
85  * @since_tizen 3.0
86  */
87 typedef struct {
88         unsigned short node_id; /**< Node ID */
89 } ZigbeeZdoDevControlComplexDescriptorReq_t;
90
91 /**
92  * @brief Definition for ZDO Dev control user descriptor request structure.
93  * @since_tizen 3.0
94  */
95 typedef struct {
96         unsigned short node_id; /**< Node ID */
97 } ZigbeeZdoDevControlUserDescriptorReq_t;
98
99 /**
100  * @brief Definition for ZDO Dev control user descriptor set request structure.
101  * @since_tizen 3.0
102  */
103 typedef struct {
104         unsigned short node_id; /**< Node ID */
105         unsigned char user_descriptor_len; /**< User descriptor length */
106         unsigned char user_descriptor[ZIGBEE_ZDODEV_CONTROL_USER_DECRIPTOR_MAX_LEN];
107                 /**< User descriptor */
108 } ZigbeeZdoDevControlUserDescriptorSetReq_t;
109
110 /**
111  * @brief Definition for ZDO Dev control device announce structure.
112  * @since_tizen 3.0
113  */
114 typedef struct {
115         unsigned short node_id; /**< Node ID */
116         unsigned char mac_addr[ZIGBEE_EUI64_SIZE]; /**< MAC address */
117         unsigned char capability; /**< Capability */
118 } ZigbeeZdoDevControlDeviceAnnounce_t;
119
120 /**
121  * @brief Definition for ZDO Dev control simple descriptor request structure.
122  * @since_tizen 3.0
123  */
124 typedef struct {
125         unsigned short node_id; /**< Node ID */
126         unsigned char endpoint; /**< Endpoint */
127 } ZigbeeZdoDevControlSimpleDescriptorReq_t;
128
129 /**
130  * @brief Definition for ZDO Dev control management LQI request structure.
131  * @since_tizen 3.0
132  */
133 typedef struct {
134         unsigned short node_id; /**< Node ID */
135         unsigned char start_index; /**< Start index */
136 } ZigbeeZdoDevControlMgmtLqiReq_t;
137
138 /**
139  * @brief Definition for ZDO Dev control management RTG request structure.
140  * @since_tizen 3.0
141  */
142 typedef struct {
143         unsigned short node_id; /**< Node ID */
144         unsigned char start_index; /**< Start index */
145 } ZigbeeZdoDevControlMgmtRtgReq_t;
146
147 /**
148  * @brief Definition for ZDO Dev control management bind request structure.
149  * @since_tizen 3.0
150  */
151 typedef struct {
152         unsigned short node_id; /**< Node ID */
153         unsigned char start_index; /**< Start index */
154 } ZigbeeZdoDevControlMgmtBindReq_t;
155
156 /**
157  * @brief Definition for ZDO Dev control management permit join request structure.
158  * @since_tizen 3.0
159  */
160 typedef struct {
161         unsigned short node_id; /**< Node ID */
162         unsigned char duration; /**< Duration */
163         unsigned char tc_significance; /**< TC significance */
164 } ZigbeeZdoDevControlMgmtPermitJoinReq_t;
165
166 /**
167  * @brief Definition for ZDO Dev control network update request structure.
168  * @since_tizen 3.0
169  */
170 typedef struct {
171         unsigned short node_id; /**< Node ID */
172         unsigned int scan_channel; /**< Scan channel */
173         unsigned char scan_duration; /**< Scan duration */
174         unsigned char scan_count; /**< Scan count */
175         unsigned char network_update_id; /**< Network update ID */
176 } ZigbeeZdoDevControlMgmtNwkUpdateReq_t;
177
178 /**
179  * @brief Definition for ZDO Dev control network discovery request structure.
180  * @since_tizen 3.0
181  */
182 typedef struct {
183         unsigned short node_id; /**< Node ID */
184         unsigned int scan_channel; /**< Scan channel */
185         unsigned char scan_duration; /**< Scan duration */
186         unsigned short scan_count; /**< Scan count */
187         unsigned char start_index; /**< Start index */
188 } ZigbeeZdoDevControlMgmtNwkDiscoveryReq_t;
189
190 /* -----------------------------------------------------------------------------
191  * For Notifications
192  * ---------------------------------------------------------------------------*/
193
194 /**
195  * @brief Definition for ZDO Dev control network address response structure.
196  * @since_tizen 3.0
197  */
198 typedef struct {
199         unsigned char status; /**< Status */
200         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
201         unsigned short node_id; /**< Node ID */
202         unsigned char associated_count; /**< The number of assoc */
203         unsigned char start_index; /**< Start index */
204 } ZigbeeZdoDevControlNwkAddrResp_t;
205
206 /**
207  * @brief Definition for ZDO Dev control extended network address response structure.
208  * @since_tizen 3.0
209  */
210 typedef struct {
211         unsigned char status; /**< Status */
212         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
213         unsigned short node_id; /**< Node ID */
214         unsigned char associated_count; /**< The number of assoc */
215         unsigned char start_index; /**< Start index */
216         unsigned short *associated_addr_list; /**< Associated network addresses */
217 } ZigbeeZdoDevControlNwkAddrExtResp_t;
218
219 /**
220  * @brief Definition for ZDO Dev control matched descriptor response structure.
221  * @since_tizen 3.0
222  */
223 typedef struct {
224         unsigned char status; /**< Status */
225         unsigned short node_id; /**< Node ID */
226         unsigned char list_count; /**< The number of matched descriptors */
227         unsigned char *match_list; /**< List of matched descriptors */
228 } ZigbeeZdoDevControlMatchedDescriptorResp_t;
229
230 /**
231  * @brief Definition for ZDO Dev control active endpoint response structure.
232  * @since_tizen 3.0
233  */
234 typedef struct {
235         unsigned char status; /**< Status */
236         unsigned short node_id; /**< Node ID */
237         unsigned char endpoint_count; /**< The number of endpoints */
238         unsigned char *endpoint_list; /**< List of endpoints */
239 } ZigbeeZdoDevControlActiveEpResp_t;
240
241 /**
242  * @brief Definition for ZDO Dev control simple descriptor response structure.
243  * @since_tizen 3.0
244  */
245 typedef struct {
246         unsigned short node_id; /**< Node ID */
247         int length; /**< Length of message */
248         unsigned char device_version; /**< Device version */
249         unsigned char endpoint; /**< Endpoint */
250         unsigned short profile_id; /**< Profile ID */
251         unsigned short device_id; /**< Device ID */
252         unsigned char in_cluster_count; /**< The number of in cluster */
253         unsigned char out_cluster_count; /**< The number of out cluster */
254         unsigned short in_cluster[ZIGBEE_MAX_ENDPOINT_CLUSTER]; /**< In cluster */
255         unsigned short out_cluster[ZIGBEE_MAX_ENDPOINT_CLUSTER]; /**< Out cluster */
256 } ZigbeeZdoDevControlSimpleDescriptorResp_t;
257
258 /**
259  * @brief Definition for ZDO Dev control Management bind entry structure.
260  * @since_tizen 3.0
261  */
262 typedef struct {
263         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
264         unsigned char source_endpoint; /**< Source endpoint */
265         unsigned short cluster_id; /**< Cluster ID */
266         unsigned char dest_addr_mode; /**< Destination address mode */
267         unsigned short dest_addr; /**< Destination network address */
268         unsigned char dest_eui64[ZIGBEE_EUI64_SIZE]; /**< Destination EUI64 (an IEEE address) */
269         unsigned char dest_endpoint; /**< Destination endpoint */
270 } ZigbeeZdoDevControlMgmtBindEntry_t;
271
272 /**
273  * @brief Definition for ZDO Dev control Management bind response structure.
274  * @since_tizen 3.0
275  */
276 typedef struct {
277         unsigned char status; /**< Status */
278         unsigned char table_entries; /**< Total number of Binding Table entries */
279         unsigned char start_index; /**< Start index */
280         unsigned char table_list_count; /**< The number of binding table list */
281         ZigbeeZdoDevControlMgmtBindEntry_t *table_list; /**< Binding table list */
282 } ZigbeeZdoDevControlMgmtBindResp_t;
283
284 /**
285  * @brief Definition for ZDO Dev control Management LQI entry structure.
286  * @since_tizen 3.0
287  */
288 typedef struct {
289         unsigned char extended_pan_id[ZIGBEE_EUI64_SIZE]; /**< Extended PAN ID */
290         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
291         unsigned short node_id;
292         unsigned char device_type; /**< Device Type */
293         unsigned char rx_on_when_idle; /**< Can Receive on Idle State */
294         unsigned char relationship; /**< Relationship (i.e. parent, children or sibling) */
295         unsigned char permit_joining; /**< Can handle join request */
296         unsigned char depth; /**< Depth from parent */
297         unsigned char lqi; /**< Link Quality Indicator */
298 } ZigbeeZdoDevControlMgmtLqiEntry_t;
299
300 /**
301  * @brief Definition for ZDO Dev control Management LQI response structure.
302  * @since_tizen 3.0
303  */
304 typedef struct {
305         unsigned char status; /**< Status */
306         unsigned char table_entries; /**< Total number of LQI Table entries */
307         unsigned char start_index; /**< Start index */
308         unsigned char table_list_count; /**< The number of LQI table list */
309         ZigbeeZdoDevControlMgmtLqiEntry_t *table_list; /**< LQI table list */
310 } ZigbeeZdoDevControlMgmtLqiResp_t;
311
312 /**
313  * @brief Definition for ZDO Dev control Network discovery entry structure.
314  * @since_tizen 3.0
315  */
316 typedef struct {
317         char extended_pan_id[ZIGBEE_EUI64_SIZE]; /**< Extended PAN ID */
318         unsigned char logical_channel; /**< Logical channel number */
319         unsigned char stack_profile; /**< Stack profile version */
320         unsigned char zigbee_version; /**< Supported ZigBee protocol version */
321         unsigned char beacon_order; /**< Beacon order */
322         unsigned char superframe_order; /**< Superframe order */
323         unsigned char permit_joining; /**< Permit joining flag */
324 } ZigbeeZdoDevControlMgmtNwkDiscoveryEntry_t;
325
326 /**
327  * @brief Definition for ZDO Dev control Network discovery response structure.
328  * @since_tizen 3.0
329  */
330 typedef struct {
331         unsigned char status; /**< Status */
332         unsigned char network_count; /**< Total number of network */
333         unsigned char start_index; /**< Start index */
334         unsigned char table_list_count; /**< The number of network table entry */
335         ZigbeeZdoDevControlMgmtNwkDiscoveryEntry_t *table_list; /**< Network table list */
336 } ZigbeeZdoDevControlMgmtNwkDiscoveryResp_t;
337
338 /**
339  * @brief Definition for ZDO Dev control Management routing entry structure.
340  * @since_tizen 3.0
341  */
342 typedef struct {
343         unsigned short dest_addr; /**< Network Address */
344         unsigned char status; /**< Status */
345         unsigned char memory_constrained; /* Is memory constrained device */
346         unsigned char many_to_one; /* Can support many-to-one endpoint routing */
347         unsigned char route_record_required;  /* Route record required */
348         unsigned short next_hop_addr; /* Next hop address */
349 } ZigbeeZdoDevControlMgmtRtgEntry_t;
350
351 /**
352  * @brief Definition for ZDO Dev control Management routing response structure.
353  * @since_tizen 3.0
354  */
355 typedef struct {
356         unsigned char status; /**< Status */
357         unsigned char table_entries; /**< Total number of Routing Table entries */
358         unsigned char start_index; /**< Start index */
359         unsigned char table_list_count; /**< The number of Routing table list */
360         ZigbeeZdoDevControlMgmtRtgEntry_t *table_list; /**< Routing table list */
361 } ZigbeeZdoDevControlMgmtRtgResp_t;
362
363 /**
364  * @brief Definition for ZDO Dev control Management permit join response structure.
365  * @since_tizen 3.0
366  */
367 typedef struct {
368         unsigned char status; /**< Status */
369 } ZigbeeZdoDevControlMgmtPermitJoinResp_t;
370
371 /**
372  * @brief Definition for ZDO Dev control Management left response structure.
373  * @since_tizen 3.0
374  */
375 typedef struct {
376         unsigned char status; /**< Status */
377 } ZigbeeZdoDevControlMgmtLeftResp_t;
378
379 /**
380  * @brief Definition for ZDO Dev control Node descriptor response structure.
381  * @since_tizen 3.0
382  */
383 typedef struct {
384         unsigned char status; /**< Status */
385         unsigned short node_id; /**< Node ID */
386         unsigned char logical_type; /**< Logical Role */
387         unsigned char complex_desciptor_available; /**< Complex Descriptor Available */
388         unsigned char user_descriptor_available; /**< User Descriptor Available */
389         unsigned char aps_flags; /**< APS Flags */
390         unsigned char frequency_band; /**< Frequency Band */
391         unsigned char mac_capability_flags; /**< MAC Capability Flags */
392         unsigned short manufacturer_code; /**< Manufacturer Code */
393         unsigned char max_buffer_size; /**< Maximum Buffer Size */
394         unsigned short max_incoming_transfer_size; /**< Maximum Incoming Transfer Size */
395         unsigned short server_mask; /**< Server Mask */
396         unsigned short max_outgoing_transfer_size; /**< Maximum Outgoing Transfer Size */
397         unsigned char descriptor_capability_field; /**< Descriptor Capability Field */
398 } ZigbeeZdoDevControlNodeDescriptorResp_t;
399
400 /**
401  * @brief Definition for ZDO Dev control Power descriptor response structure.
402  * @since_tizen 3.0
403  */
404 typedef struct {
405         unsigned char status; /**< Status */
406         unsigned short node_id; /**< Node ID */
407         unsigned char current_power_mode; /**< Current power mode */
408         unsigned char available_power_sources; /**< Available power sources */
409         unsigned char current_power_source; /**< Current power source */
410         unsigned char current_power_source_level; /**< Current power source level */
411 } ZigbeeZdoDevControlPowerDescriptorResp_t;
412
413 /**
414  * @brief Definition for ZDO Dev control Complex descriptor response structure.
415  * @since_tizen 3.0
416  */
417 typedef struct {
418         unsigned char status; /**< Status */
419         unsigned short node_id; /**< Node ID */
420         unsigned char list_count; /**< The count of descriptor list */
421         unsigned char *complex_descriptor_list; /**< Complex descriptor list */
422 } ZigbeeZdoDevControlComplexDescriptorResp_t;
423
424 /**
425  * @brief Definition for ZDO Dev control User descriptor response structure.
426  * @since_tizen 3.0
427  */
428 typedef struct {
429         unsigned char status; /**< Status */
430         unsigned short node_id; /**< Node ID */
431         unsigned char list_count; /**< The count of descriptor list */
432         unsigned char *user_descriptor_list; /**< User descriptor list */
433 } ZigbeeZdoDevControlUserDescriptorResp_t;
434
435 /**
436  * @brief Definition for ZDO Dev control User descriptor confirm structure.
437  * @since_tizen 3.0
438  */
439 typedef struct {
440         unsigned char status; /**< Status */
441 } ZigbeeZdoDevControlUserDescriptorConfirm_t;
442
443 #endif /* __ZIGBEE_ZDO_DEV_CONTROL_TYPE_H__ */