2 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
4 * Contact: Suresh Kumar N (suresh.n@samsung.com)
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __ZIGBEE_ZDO_DEV_CONTROL_TYPE_H__
20 #define __ZIGBEE_ZDO_DEV_CONTROL_TYPE_H__
22 #include <zigbee_types.h>
24 /* -----------------------------------------------------------------------------
26 * ---------------------------------------------------------------------------*/
29 * @brief Definition for ZDO Dev control network address request structure.
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;
39 * @brief Definition for ZDO Dev control matched descriptor request structure.
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;
52 * @brief Definition for ZDO Dev control IEEE address request structure.
56 unsigned short node_id; /**< Node ID */
57 } ZigbeeZdoDevControlIeeeAddrReq_t;
60 * @brief Definition for ZDO Dev control active endpoint structure.
64 unsigned short node_id; /**< Node ID */
65 } ZigbeeZdoDevControlActiveEpReq_t;
68 * @brief Definition for ZDO Dev control node descriptor request structure.
72 unsigned short node_id; /**< Node ID */
73 } ZigbeeZdoDevControlNodeDescriptorReq_t;
76 * @brief Definition for ZDO Dev control power descriptor request structure.
80 unsigned short node_id; /**< Node ID */
81 } ZigbeeZdoDevControlPowerDescriptorReq_t;
84 * @brief Definition for ZDO Dev control complex descriptor request structure.
88 unsigned short node_id; /**< Node ID */
89 } ZigbeeZdoDevControlComplexDescriptorReq_t;
92 * @brief Definition for ZDO Dev control user descriptor request structure.
96 unsigned short node_id; /**< Node ID */
97 } ZigbeeZdoDevControlUserDescriptorReq_t;
100 * @brief Definition for ZDO Dev control user descriptor set request structure.
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;
111 * @brief Definition for ZDO Dev control device announce structure.
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;
121 * @brief Definition for ZDO Dev control simple descriptor request structure.
125 unsigned short node_id; /**< Node ID */
126 unsigned char endpoint; /**< Endpoint */
127 } ZigbeeZdoDevControlSimpleDescriptorReq_t;
130 * @brief Definition for ZDO Dev control management LQI request structure.
134 unsigned short node_id; /**< Node ID */
135 unsigned char start_index; /**< Start index */
136 } ZigbeeZdoDevControlMgmtLqiReq_t;
139 * @brief Definition for ZDO Dev control management RTG request structure.
143 unsigned short node_id; /**< Node ID */
144 unsigned char start_index; /**< Start index */
145 } ZigbeeZdoDevControlMgmtRtgReq_t;
148 * @brief Definition for ZDO Dev control management bind request structure.
152 unsigned short node_id; /**< Node ID */
153 unsigned char start_index; /**< Start index */
154 } ZigbeeZdoDevControlMgmtBindReq_t;
157 * @brief Definition for ZDO Dev control management permit join request structure.
161 unsigned short node_id; /**< Node ID */
162 unsigned char duration; /**< Duration */
163 unsigned char tc_significance; /**< TC significance */
164 } ZigbeeZdoDevControlMgmtPermitJoinReq_t;
167 * @brief Definition for ZDO Dev control network update request structure.
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;
179 * @brief Definition for ZDO Dev control network discovery request structure.
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;
190 /* -----------------------------------------------------------------------------
192 * ---------------------------------------------------------------------------*/
195 * @brief Definition for ZDO Dev control network address response structure.
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;
207 * @brief Definition for ZDO Dev control extended network address response structure.
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;
220 * @brief Definition for ZDO Dev control matched descriptor response structure.
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;
231 * @brief Definition for ZDO Dev control active endpoint response structure.
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;
242 * @brief Definition for ZDO Dev control simple descriptor response structure.
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;
259 * @brief Definition for ZDO Dev control Management bind entry structure.
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;
273 * @brief Definition for ZDO Dev control Management bind response structure.
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;
285 * @brief Definition for ZDO Dev control Management LQI entry structure.
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;
301 * @brief Definition for ZDO Dev control Management LQI response structure.
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;
313 * @brief Definition for ZDO Dev control Network discovery entry structure.
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;
327 * @brief Definition for ZDO Dev control Network discovery response structure.
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;
339 * @brief Definition for ZDO Dev control Management routing entry structure.
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;
352 * @brief Definition for ZDO Dev control Management routing response structure.
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;
364 * @brief Definition for ZDO Dev control Management permit join response structure.
368 unsigned char status; /**< Status */
369 } ZigbeeZdoDevControlMgmtPermitJoinResp_t;
372 * @brief Definition for ZDO Dev control Management left response structure.
376 unsigned char status; /**< Status */
377 } ZigbeeZdoDevControlMgmtLeftResp_t;
380 * @brief Definition for ZDO Dev control Node descriptor response structure.
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;
401 * @brief Definition for ZDO Dev control Power descriptor response structure.
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;
414 * @brief Definition for ZDO Dev control Complex descriptor response structure.
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;
425 * @brief Definition for ZDO Dev control User descriptor response structure.
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;
436 * @brief Definition for ZDO Dev control User descriptor confirm structure.
440 unsigned char status; /**< Status */
441 } ZigbeeZdoDevControlUserDescriptorConfirm_t;
443 #endif /* __ZIGBEE_ZDO_DEV_CONTROL_TYPE_H__ */