2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef __ZB_ZDO_TYPE_H__
17 #define __ZB_ZDO_TYPE_H__
26 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
27 * @brief Table 2.138 ZDP Enumerations Description
32 ZB_ZDP_SUCCESS = 0, /**< Success */
33 ZB_ZDP_INV_REQUESTTYPE = 0x80, /**< Invalid Request Type */
34 ZB_ZDP_DEVICE_NOT_FOUND = 0x81, /**< Device Not Found */
35 ZB_ZDP_INVALID_EP = 0x82, /**< Invalid Endpoint */
36 ZB_ZDP_NOT_ACTIVE = 0x83, /**< Not Active */
37 ZB_ZDP_NOT_SUPPORTED = 0x84, /**< Not Supported */
38 ZB_ZDP_TIMEOUT = 0x85, /**< Timeout */
39 ZB_ZDP_NO_MATCH = 0x86, /**< No Match */
40 ZB_ZDP_NO_ENTRY = 0x88, /**< No Entry */
41 ZB_ZDP_NO_DESCRIPTOR = 0x89, /**< No Descriptor */
42 ZB_ZDP_INSUFFICIENT_SPACE = 0x8A, /**< Insufficient Space */
43 ZB_ZDP_NOT_PERMITED = 0x8B, /**< Not Permitted */
44 ZB_ZDP_TABLE_FULL = 0x8C, /**< Table Full */
45 ZB_ZDP_NOT_AUTHORIZED = 0x8D, /**< Not Authorized */
46 ZB_ZDP_DEVICE_BINDING_TABLE_FULL = 0x8E, /**< Binding Table Full */
50 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
51 * @brief RequestType Enumeration
56 ZB_ZDP_SINGLE_DEVICE_RESPONSE = 0, /**< 0 : Single Device Response */
57 ZB_ZDP_EXTENDED_RESPONSE = 1, /**< 1 : Extended Response */
58 } zb_zdo_request_type_e;
61 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
62 * @brief Table 2.30 Values of the Logical Type Field
67 ZB_ZDP_COORDINATOR = 0, /**< Coordinator */
68 ZB_ZDP_ROUTER = 1, /**< Router */
69 ZB_ZDP_END_DEVIEC = 2, /**< End Device */
70 } zb_zdo_logical_type_e;
73 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
74 * @brief Table 2.31 Values of the Frequency Band Field
79 ZB_ZDP_868_868_6_MHZ = 0, /**< 868~888.6MHz */
80 ZB_ZDP_902_928_MHA = 2, /**< 902~928MHz */
81 ZB_ZDP_2400_2483_5_MHZ = 3, /**< 2400~2483.5MHz */
82 } zb_zdo_frequency_band_e;
85 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
86 * @brief Alternative PAN coordinator bit in MAC capability Flags
91 ZB_ZDP_DO_NOT_SUPPORT_PAN_COORDINATOR = 0, /**< Otherwise..*/
92 ZB_ZDP_SUPPORT_PAN_COORDINATOR = 1, /**< This node is capable of becoming a PAN
94 } zb_zdo_alternative_pan_coordinator_e;
97 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
98 * @brief Device type bit in MAC capability Flags
103 ZB_ZDP_RFD = 0, /**< This node is a reduced function device (RFD) */
104 ZB_ZDP_FFD = 1, /**< This node is a full function device (FFD) */
105 } zb_zdo_device_type_e;
108 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
109 * @brief Power Source bit in MAC capability Flags
114 ZB_ZDP_NO_NODE_POWER_DESCRIPTION = 0, /**< Otherwise.. */
115 ZB_ZDP_MAIN_POWER = 1, /**< Current power source is main power. This information is
116 derived from the node current power source field of the node power descriptor */
117 } zb_zdo_power_source_e;
120 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
121 * @brief Receiver on when idle bit in MAC capability Flags
126 ZB_ZDP_KEEP_POWER_SAVE_MODE = 0, /**< Otherwise.. */
127 ZB_ZDP_DO_NOT_POWER_SAVE_MODE = 1, /**< The device does not disable its receiver to
128 conserve power during idle periods. */
129 } zb_zdo_receiver_on_when_idle_e;
132 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
133 * @brief Security capability bit in MAC capability Flags
138 ZB_ZDP_DO_NOT_SUPPORT_SECURITY_MODE = 0,
139 ZB_ZDP_SUPPORT_SECURITY_MODE = 1,
140 } zb_zdo_security_capability_e;
143 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
144 * @brief Figure 2.17 Format of the MAC Capability Flags Field
149 ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR = (1 << 0), /**< Alternative Pan Coordinator see
150 #zb_zdo_alternative_pan_coordinator_e */
151 ZB_ZDP_DEVICE_TYPE = (1 << 1), /**< Device Type see #zb_zdo_device_type_e */
152 ZB_ZDP_POWER_SOURCE = (1 << 2), /**< Power Source see #zb_zdo_power_source_e */
153 ZB_ZDP_RECEIVER_ON_WHEN_IDLE = (1 << 3), /**< Register on When Idle
154 see #zb_zdo_receiver_on_when_idle_e */
155 ZB_ZDP_SECURITY_CAPABILITY = (1 << 6), /**< Security Capability
156 see #zb_zdo_security_capability_e */
157 ZB_ZDP_ALLOCATE_ADDRESS = (1 << 7), /**< Allocated Address.\n
158 This mean device receive network address from coordinator\n
159 This field will always have a value of 1 in implementations of IEEE 802.15.4 spec,
160 indicating that the joining device must be issued a 16-bit short address */
161 } zb_zdo_mac_capability_field_e;
164 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
165 * @brief Table 2.32 Server Mask Bit Assignments
170 ZB_ZDP_PRIMARY_TRUST_CENTER = (1 << 0), /**< Primary Trust Center */
171 ZB_ZDP_BACKUP_TRUST_CENTER = (1 << 1), /**< Backup Trust Center */
172 ZB_ZDP_PRIMARY_BINDING_TABLE_CACHE = (1 << 2), /**< Primary Binding Table Cache */
173 ZB_ZDP_BACKUP_BINDING_TABLE_CACHE = (1 << 3), /**< Backup Binding Table Cache */
174 ZB_ZDP_PRIMARY_DISCOVERY_CACHE = (1 << 4), /**< Primary Discovery Cache */
175 ZB_ZDP_BACKUP_DISCOVERY_CACHE = (1 << 5), /**< Backup Discovery Cache */
176 ZB_ZDP_NETWORK_MANAGER = (1 << 6), /**< Network Manager */
177 } zb_zdo_server_mask_e;
180 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
181 * @brief Table 2.29 Fields of the Node Descriptor
182 * @details Type and capabilities of the node.
186 typedef struct zb_zdo_node_descriptor_s* zb_zdo_node_descriptor_h;
189 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
190 * @brief Table 2.35 Values of the Current Power Mode Field
195 ZB_ZDP_RECEVIER_SYNCHRONIZED_WITH_RECEVIER_ON = 0, /**< Register Synchronized with Receiver On */
196 ZB_ZDP_RECEIVER_COMES_ON_PERIODICALLY = (1 << 0), /**< Register Comes on Periodically */
197 ZB_ZDP_RECEIVER_COMES_ON_WHEN_STIMULATED = (1 << 1), /**< Register Comes on When Stimulated */
198 } zb_zdo_current_power_mode_e;
201 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
202 * @brief Table 2.34 Fields of the Node Power Descriptor
207 ZB_ZDP_CONSTANT_POWER = 0, /**< Constant Power */
208 ZB_ZDP_RECHARGEABLE_BATTERY = 1, /**< Rechargeable Battery */
209 ZB_ZDP_DISPOSABLE_BATTERY = 2, /**< Disposable Battery */
210 } zb_zdo_available_power_source_e;
213 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
214 * @brief Table 2.36 Values of the Available Power Sources Field
219 ZB_ZDP_CHARGE_LEVEL_CRITICAL = 0, /**< Charge Level Critical */
220 ZB_ZDP_CHARGE_LEVEL_33 = 1, /**< Charge Level 33% */
221 ZB_ZDP_CHARGE_LEVEL_66 = 2, /**< Charge Level 66% */
222 ZB_ZDP_CHARGE_LEVEL_100 = 3, /**< Charge Level 100% */
223 } zb_zdo_current_power_source_level_e;
226 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
227 * @brief Binding type
232 ZB_UNICAST_BINDING = 0x03, /**< A unicast binding whose 64-bit identifier is the
233 destination ieee_addr. */
234 ZB_MANY_TO_ONE_BINDING = 0x83, /**< A unicast binding whose 64-bit identifier is the
235 many-to-one destination ieee_addr. A Route discovery
236 should be disabled when sending unicast via may-to-one
238 ZB_MULTICAST_BINDING = 0x01, /**< A multicast binding whose 64-bit identifier is the
239 group address. A multicast binding can be used to send
240 messages to the group and to receive message sent to
245 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
246 * @brief Table 2.34 Fields of the Node Power Descriptor .
247 * @details Node power characteristics.
251 typedef struct zb_zdo_node_power_descriptor_s* zb_zdo_node_power_descriptor_h;
254 #define MAX_ENDPOINT_CLUSTERS 32 /**< Cluster counts to handle with */
257 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
258 * @details Device descriptions contained in node.
262 typedef struct zb_zdo_simple_desc_s* zb_zdo_simple_desc_h;
265 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
266 * @brief The handle of zigbee end-device information
267 * @details a zb_end_device_info_h is an opaque data structure.\n
268 * zb_end_device_info_h is a data type of network address, IEEE address, endpoint count
269 * and endpoint information structure.
273 typedef struct zb_end_device_info_s* zb_end_device_info_h;
277 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
278 * @brief Table 2.125 NetworkList Record Format.
282 typedef struct zb_zdo_network_list_record_s* zb_zdo_network_list_record_h;
285 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
286 * @brief Table 2.127 NeighborTableList Record Format.
290 typedef struct zb_zdo_neighbor_table_desc_s* zb_zdo_neighbor_table_desc_h;
293 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
294 * @brief Table 2.129 RoutingTableList Record Format.
298 typedef struct zb_zdo_routing_table_s* zb_zdo_routing_table_h;
301 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
302 * @brief Table 2.131 BindingTableList Record Format.
306 typedef struct zb_zdo_binding_table_s* zb_zdo_binding_table_h;
309 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
310 * @brief Table 2.136 DiscoveryCacheList Record Format.
314 typedef struct zb_zdo_discovery_cache_s* zb_zdo_discovery_cache_h;
321 #endif /* __ZB_ZDO_TYPE_H__ */