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 __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
17 #define __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
19 #include <zigbee-zdo-type.h>
22 //////////////////////////////////////////////////////////////////////////////////////////
26 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
27 * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE Binding Manager
29 * @brief Zigbee provides API for Binding.
31 * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_HEADER Required Header
32 * \#include <zigbee.h>
34 * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_OVERVIEW Overview
35 * Binding provides a mechanism for attaching an endpoint on one node to one or more
36 * endpoints on another node. Binding can even be destined for groups of nodes. Then,
37 * when using APSDE-DATA.request, simply use the "indirect" addressing mode, and the
38 * request will be sent to each endpoint or group listed in the local binding table.
40 * The binding table is smart, and keeps track of both the short (16-bit NwkAddr) and long
41 * (IEEE) address of a node. If a destination device has changed its short address (either
42 * due to a ZigBee End-Device moving from one parent to another in ZigBee stack profile
43 * 0x01, or due to a address conflict in ZigBee Pro), the binding table entry is updated
44 * automatically to point to that new address.
50 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
51 * @brief NetworkList Record Format in Zigbee Specification.
54 typedef void* zb_zdo_network_list_record_h;
58 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
59 * @brief NeighborTableList Record Format in Zigbee Specification.
62 typedef void* zb_zdo_neighbor_table_desc_h;
66 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
67 * @brief RoutingTableList Record Format in Zigbee Specification.
70 typedef void* zb_zdo_routing_table_h;
74 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
75 * @brief BindingTableList Record Format in Zigbee Specification.
78 typedef void* zb_zdo_binding_table_h;
82 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
83 * @brief DiscoveryCacheList Record Format in Zigbee Specification.
86 typedef void* zb_zdo_discovery_cache_h;
90 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE
96 * @brief Called after 'bind' command.
97 * @details The Bind_cb is generated in response to a Bind_req. If the Bind_req is
98 * processed and the Binding Table entry committed on the Remote Device, a Status of
99 * #ZB_ZDP_STATUS_SUCCESS is returned.
101 * If the Remote Device is not a Primary binding table cache or the SrcAddress,
102 * a Status of #ZB_ZDP_STATUS_SUCCESS is returned.
104 * The supplied endpoint shall be checked to determine whether it falls within the
106 * If it does not, a Status of #ZB_ZDP_STATUS_INVALID_EP shall be returned.
108 * If the Remote Device is the Primary binding table cache or SrcAddress but does not
109 * have Binding Table resources for the request, a Status of #ZB_ZDP_STATUS_TABLE_FULL is
114 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
115 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
116 * #ZB_ZDP_STATUS_INVALID_EP \n
117 * #ZB_ZDP_STATUS_TABLE_FULL \n
118 * #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
119 * @param[out] user_data user data
121 * @see zb_zdo_bind_req()
124 typedef void (*zb_zdo_bind_cb)(
125 zb_zdp_status_e status,
130 * @brief Sends 'bind' command.
131 * @details Binding request when destination address present but not endpoint present.
132 * The Bind_req is generated from a Local Device wishing to create a Binding
133 * Table entry for the source and destination addresses contained as parameters.
135 * The destination addressing on this command shall be unicast only, and the destination
136 * address shall be that of a Primary binding table cache or to the SrcAddress itself.
137 * The Binding Manager is optionally supported on the source device (unless that
138 * device is also the ZigBee Coordinator) so that device shall issue a
139 * #ZB_ZDP_STATUS_NOT_SUPPORTED status to the Bind_req if not supported.
143 * @privilege %http://tizen.org/privilege/zigbee
145 * @param[in] handle The handle of zigbee
146 * @param[in] dst_addr16 The Network address of destination
147 * @param[in] src_addr64 The IEEE address of source
148 * @param[in] src_ep The source endpoint for the binding entry
149 * @param[in] clusterid The identifier of the cluster on the source device that is bound
150 * to the destination.
151 * @param[in] dst_addr64 The IEEE address of destination
152 * @param[in] type #ZB_ZDP_BINDING_TYPE_UNICAST : A unicast binding whose 64-bit identifier is the
153 * destination zb_ieee_addr. \n
154 * #ZB_ZDP_BINDING_TYPE_MANY_TO_ONE : A unicast binding whose 64-bit identifier is
155 * the many-to-one destination zb_ieee_addr. A Route discovery should be disabled when
156 * sending unicast via may-to-one binding \n
157 * #ZB_ZDP_BINDING_TYPE_MULTICAST : A multicast binding whose 64-bit identifier is the group
158 * address. A multicast binding can be used to send messages to the group and to
159 * receive message sent to the group
160 * @param[in] group_addr The destination address for the binding entry
161 * @param[in] dst_ep The destination endpoint for the binding entry.
162 * @param[in] cb Response callback
163 * @param[in] user_data user data
165 * @return 0 on success, otherwise a negative error value.
166 * @retval #ZIGBEE_ERROR_NONE Successful
167 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
168 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
169 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
170 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
171 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
172 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
174 * @see zb_zdo_bind_cb()
178 zb_nwk_addr dst_addr16,
179 zb_ieee_addr src_addr64,
181 zb_cluster_id clusterid,
182 zb_ieee_addr dst_addr64,
184 zb_nwk_addr group_addr,
185 unsigned char dst_ep,
191 * @brief Called after 'unbind' command.
192 * @details The Unbind_cb is generated in response to an Unbind_req. If the Unbind_req is
193 * processed and the corresponding Binding Table entry is removed from the Remote
194 * Device, a Status of #ZB_ZDP_STATUS_NOT_SUPPORTED is returned. If the Remote Device is not
195 * the ZigBee Coordinator or the SrcAddress, a Status of #ZB_ZDP_STATUS_NOT_SUPPORTED is
198 * The supplied endpoint shall be checked to determine whether it falls within the
199 * specified range. If it does not, a Status of #ZB_ZDP_STATUS_INVALID_EP shall be returned.
200 * If the Remote Device is the ZigBee Coordinator or SrcAddress but does not have a
201 * Binding Table entry corresponding to the parameters received in the request, a
202 * Status of #ZB_ZDP_STATUS_NO_ENTRY is returned.
206 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
207 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
208 * #ZB_ZDP_STATUS_INVALID_EP \n
209 * #ZB_ZDP_STATUS_NO_ENTRY \n
210 * #ZB_ZDP_STATUS_NOT_AUTHORIZED
211 * @param[out] user_data user data
213 * @see zb_zdo_unbind_req_addr()
216 typedef void (*zb_zdo_unbind_cb)(
217 zb_zdp_status_e status,
222 * @brief Sends 'Unbind' command.
223 * @details Binding request when destination address present but not endpoint present
224 * The Unbind_req is generated from a Local Device wishing to remove a Binding
225 * Table entry for the source and destination addresses contained as parameters.
227 * The destination addressing on this command shall be unicast only and the destination
228 * address must be that of the a Primary binding table cache or the SrcAddress.
232 * @privilege %http://tizen.org/privilege/zigbee
234 * @param[in] handle The handle of zigbee
235 * @param[in] dst_addr16 The Network address of destination
236 * @param[in] src_addr64 The IEEE address of source
237 * @param[in] src_ep The source endpoint for the binding entry
238 * @param[in] clusterid The identifier of the cluster on the source device that is bound
239 * to the destination.
240 * @param[in] dst_addr64 The IEEE address of destination
241 * @param[in] type #ZB_ZDP_BINDING_TYPE_UNICAST : A unicast binding whose 64-bit identifier is
242 * the destination zb_ieee_addr. \n
243 * #ZB_ZDP_BINDING_TYPE_MANY_TO_ONE : A unicast binding whose 64-bit identifier
244 * is the many-to-one destination zb_ieee_addr. A Route discovery should be
245 * disabled when sending unicast via may-to-one binding \n
246 * #ZB_ZDP_BINDING_TYPE_MULTICAST : A multicast binding whose 64-bit identifier is
247 * the group address. A multicast binding can be used to send messages
248 * to the group and to receive message sent to the group \n
249 * @param[in] group_addr The destination address for the binding entry
250 * @param[in] dst_ep The destination endpoint for the binding entry.
251 * @param[in] cb Response callback
252 * @param[in] user_data user data
254 * @return 0 on success, otherwise a negative error value.
255 * @retval #ZIGBEE_ERROR_NONE Successful
256 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
257 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
258 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
259 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
260 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
261 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
263 * @see zb_zdo_unbind_cb()
266 int zb_zdo_unbind_req(
268 zb_nwk_addr dst_addr16,
269 zb_ieee_addr src_addr64,
271 zb_cluster_id clusterid,
272 zb_ieee_addr dst_addr64,
274 zb_nwk_addr group_addr,
275 unsigned char dst_ep,
283 //////////////////////////////////////////////////////////////////////////////////////////
287 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
293 * @brief Called after 'extended simple descriptor request' command.
294 * @details The Extended_Simple_Desc_cb is generated by a remote device in response to an
295 * Extended_Simple_Desc_req directed to the remote device. This command shall
296 * be unicast to the originator of the Extended_Simple_Desc_req command.
297 * The remote device shall generate the Extended_Simple_Desc_cb command using
298 * the format illustrated in param list. The NWKAddrOfInterest field shall match
299 * that specified in the original Extended_Simple_Desc_req command. If the
300 * endpoint field specified in the original Extended_Simple_Desc_req command
301 * does not fall within the correct range specified in Table 2.49, the remote device
302 * shall set the Status field to #ZB_ZDP_STATUS_INVALID_EP, set the Endpoint and
303 * StartIndex fields to their respective values supplied in the request, and not include
304 * the AppClusterList field.
306 * If the NWKAddrOfInterest field matches the network address of the remote
307 * device, it shall determine whether the endpoint field specifies the identifier of an
308 * active endpoint on the device.
310 * If the endpoint field corresponds to an active
311 * endpoint, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS,
312 * set the AppClusterList field to the sequence of octets from the concatenated AppInput
313 * ClusterList and AppOutputClusterList from the Simple Descriptor (Tables 2.39),
314 * and supply that field as AppClusterList in the response. Note that dependent on
315 * the value of StartIndex in the request, the results in AppClusterList may be empty
316 * (for example, the StartIndex begins after the sequence of octets given by the
317 * concatenation of AppInputClusterList and AppOutputClusterList).
320 * field does not correspond to an active endpoint, the remote device shall set the
321 * Status field to NOT_ACTIVE, set the StartIndex field to the value supplied in the
322 * request, and not include the AppClusterList field.
326 * @remarks The @a app_cluster_list can be used only in the callback. To use outside,
329 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
330 * #ZB_ZDP_STATUS_INVALID_EP \n
331 * #ZB_ZDP_STATUS_NOT_ACTIVE \n
332 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
333 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
334 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
335 * @param[out] addr16 Network address for the request
336 * @param[out] ep The endpoint on the destination
337 * @param[out] app_input_cluster_count The total count of application input cluster in
338 * the simple descriptor for this endpoint
339 * @param[out] app_output_cluster_count The total count of application output cluster in
340 * the simple descriptor for this endpoint
341 * @param[out] start_idx Starting index within the AppClusterList of the response
342 * represented by an ordered list of the Application Input
343 * Cluster List and Application Output Cluster List from the
344 * Simple Descriptor for this endpoint.
345 * @param[out] app_cluster_list A concatenated, ordered list of the AppInputClusterList
346 * and AppOutputClusterList, beginning with StartIndex,
347 * from the Simple Descriptor.
348 * This field shall only be included in the frame if the
349 * status field is equal to ZB_ZDP_STATUS_SUCCESS.
350 * @param[out] user_data user data
352 * @see zb_zdo_extended_simple_desc_req()
354 typedef void (*zb_zdo_extended_simple_desc_cb)(
355 unsigned char status,
358 unsigned char app_input_cluster_count,
359 unsigned char app_output_cluster_count,
360 unsigned char start_idx,
361 const unsigned char *app_cluster_list,
366 * @brief Sends 'extended simple descriptor request' command.
367 * @details The Extended_Active_EP_req command is generated from a local device wishing
368 * to acquire the list of endpoints on a remote device with simple descriptors. This
369 * command shall be unicast either to the remote device itself or to an alternative
370 * device that contains the discovery information of the remote device.
372 * The Extended_Active_EP_req is used for devices which support more active
373 * endpoints than can be returned by a single Active_EP_req.
374 * The local device shall generate the Extended_Active_EP_req command using the
375 * format illustrated in Table 2.66. in Zigbee Specification.
377 * The NWKAddrOfInterest field shall contain thenetwork address of the remote device
378 * for which the active endpoint list is required.
380 * The StartIndex field shall be set in the request to enable retrieval of
381 * lists of active endpoints from devices whose list exceeds the size of a single ASDU and
382 * where fragmentation is not supported.
385 * @privilege %http://tizen.org/privilege/zigbee
387 * @param[in] handle The handle of zigbee
388 * @param[in] addr16 Network address for device of interest
389 * @param[in] start_idx Starting index within the active endpoint list in the response
390 * @param[in] cb Response callback
391 * @param[in] user_data user data
393 * @return 0 on success, otherwise a negative error value.
394 * @retval #ZIGBEE_ERROR_NONE Successful
395 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
396 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
397 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
398 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
400 * @see zb_zdo_extended_simple_desc_cb()
402 int zb_zdo_extended_simple_desc_req(
405 unsigned char start_idx,
406 zb_zdo_extended_simple_desc_cb cb,
411 * @brief Called after 'matching descriptor request' command.
412 * @details The Match_Desc_cb is generated by a remote device in response to a
413 * Match_Desc_req either broadcast or directed to the remote device. This command
414 * shall be unicast to the originator of the Match_Desc_req command.
416 * The remote device shall generate the Match_Desc_cb command using the format
417 * illustrated in Table 2.96 in Zigbee Specification.
419 * If the NWKAddrOfInterest field of the original
420 * Match_Desc_req was equal to the broadcast network address for all devices for
421 * which macRxOnWhenIdle = TRUE (0xfffd), the remote device shall apply the
422 * match criterion, as described below, that was specified in the original
423 * Match_Desc_req command to each of its simple descriptors. If the remote device
424 * is the coordinator or a router, it shall also apply the match criterion, as described
425 * below, to each simple descriptor that it may have obtained from each of its
429 * If the NWKAddrOfInterest field of the original Match_Desc_req was not equal to
430 * the broadcast network address for all devices for which macRxOnWhenIdle =
431 * TRUE (0xfffd), the remote device shall set the NWKAddrOfInterest field to the
432 * same network address that was specified in the original Match_Desc_req
436 * If the NWKAddrOfInterest field matches the network address of the remote
437 * device, it shall apply the match criterion, as described below, that was specified in
438 * the original Match_Desc_req command to each of its simple descriptors.
439 * If the NWKAddrOfInterest field does not match the network address of the
440 * remote device and it is an end device, it shall set the Status field to
441 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the MatchLength field to 0, and not include the
442 * MatchList field. If the NWKAddrOfInterest field does not match the network
443 * address of the remote device and it is the coordinator or a router, it shall determine
444 * whether the NWKAddrOfInterest field matches the network address of one of its
445 * children. If the NWKAddrOfInterest field does not match the network address of
446 * one of the children of the remote device, it shall set the Status field to
447 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the MatchLength field to 0, and not include the
451 * If the NWKAddrOfInterest matches the network address of one of the children of
452 * the remote device, it shall determine whether any simple descriptors for that
453 * device are available. If no simple descriptors are available for the child indicated
454 * by the NWKAddrOfInterest field, the remote device shall set the Status field to
455 * #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the MatchLength field to 0, and not include the
456 * MatchList field. If any simple descriptors are available for the child indicated by
457 * the NWKAddrOfInterest field, the remote device shall apply the match criterion,
458 * as described below, that was specified in the original Match_Desc_req command
459 * to each of these simple descriptors.
462 * The remote device shall apply the match criteria to each simple descriptor as follows.
463 * The remote device shall first check if the ProfileID
464 * field matches exactly the application profile identifier field of the simple
465 * descriptor. If the profileID field does not match exactly the remote device shall
466 * check if the Profile ID of the Match_desc_req matches the wildcard profile
467 * (0xFFFF) and the Profile ID of the Simple Descriptor is within the Standard range
468 * (a public profile) as dictated by document [B25]. 14 If the profile identifiers do not
469 * match, the remote device shall assume the match to be unsuccessful and perform
470 * no further matching.
473 * If the profile identifiers match, the remote device shall determine whether the
474 * match criteria contains a list of input clusters (the NumInClusters field is not equal
475 * to 0). If the match criteria contains a list of input clusters, the remote device shall
476 * check that at least one of the cluster identifiers listed in the InClusterList field
477 * matches one of the cluster identifiers in the application input cluster list field of
478 * the simple descriptor. If at least one matching input cluster is found, the remote
479 * device shall assume the match to be successful, note the identifier of the endpoint
480 * to which this simple descriptor refers and perform no further matching.
481 * If the remote device is unable to find any matching input clusters, it shall
482 * determine whether the match criterion contains a list of output clusters (the
483 * NumOutClusters field is not equal to 0). If the match criterion contains a list of
484 * output clusters, the remote device shall check that at least one of the cluster
485 * identifiers listed in the OutClusterList field matches one of the cluster identifiers
486 * in the application output cluster list field of the simple descriptor. If at least one
487 * matching output cluster is found, the remote device shall assume the match to be
488 * successful and note the identifier of the endpoint to which this simple descriptor
489 * refers. If the remote device is unable to find any output matching clusters, it shall
490 * assume the match to be unsuccessful.
493 * If the above procedure produces one or more matches, the remote device shall
494 * construct a separate Match_Desc_cb command for each matching device
495 * (including itself). For each response, the Status field shall be set to
496 * #ZB_ZDO_STATUS_SUCCESS, the NWKAddrOfInterest field shall be set to the address of
497 * the appropriate matching
498 * device, the MatchLength field shall be set to the number of simple descriptors that
499 * matched the criteria for the appropriate matching device, and the MatchList field
500 * shall contain an ascending list of the endpoints on which a simple descriptor
501 * matched the criteria for the appropriate matching device.
505 * @remarks The @a match_list should not be released.
506 * @remarks The @a match_list can be used only in the callback. To use outside, make a copy.
508 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
509 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
510 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
511 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
512 * @param[out] addr16 Network address for the request
513 * @param[out] match_length The count of endpoint on the remote device that match
514 * the request criteria
515 * @param[out] match_list List of bytes each of which represents an 8-bit endpoint
516 * @param[out] user_data user data
518 * @see zb_zdo_match_desc_req()
520 typedef void (*zb_zdo_match_desc_cb)(
521 zb_zdp_status_e status,
523 unsigned char match_length,
524 unsigned char *match_list,
529 * @brief Sends 'matching descriptor request' command.
530 * @details The Match_Desc_req command is generated from a local device wishing to find
531 * remote devices supporting a specific simple descriptor match criterion. This
532 * command shall either be broadcast to all devices for which macRxOnWhenIdle =
533 * TRUE, or unicast. If the command is unicast, it shall be directed either to the
534 * remote device itself or to an alternative device that contains the discovery
535 * information of the remote device.
537 * The local device shall generate the Match_Desc_req command using the format
538 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
539 * address indicating a broadcast to all devices for which macRxOnWhenIdle =
540 * TRUE (0xfffd) if the command is to be broadcast, or the network address of the
541 * remote device for which the match is required.
542 * The remaining fields shall contain the required criterion for which the simple
543 * descriptor match is requested. The ProfileID field shall contain the identifier of
544 * the profile for which the match is being sought or the wildcard profile ID of
547 * The NumInClusters field shall contain the number of elements in the InClusterList
548 * field. If the value of this field is 0, the InClusterList field shall not be included. If
549 * the value of the NumInClusters field is not equal to 0, the InClusterList field shall
550 * contain the list of input cluster identifiers for which the match is being sought.
551 * The NumOutClusters field shall contain the number of elements in the
552 * OutClusterList field. If the value of this field is 0, the OutClusterList field shall
553 * not be included. If the value of the NumOutClusters field is not equal to 0, the
554 * OutClusterList field shall contain the list of output cluster identifiers for which the
555 * match is being sought.
559 * @privilege %http://tizen.org/privilege/zigbee
561 * @param[in] handle The handle of zigbee
562 * @param[in] addr16 Network address for device of interest
563 * @param[in] profileid Profile ID to be matched at the destination
564 * @param[in] num_in_clusters The number of items in input clusters provided for matching
565 * within the in_cluster_list
566 * @param[in] in_cluster_list List of input cluster ids to b used for matching
567 * @param[in] num_out_clusters The number of output clusters provided for matching within
568 * the out_cluster_list
569 * @param[in] out_cluster_list List of output cluster ids to b used for matching
570 * @param[in] cb Response callback
571 * @param[in] user_data user data
573 * @return 0 on success, otherwise a negative error value.
574 * @retval #ZIGBEE_ERROR_NONE Successful
575 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
576 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
577 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
578 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
579 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
580 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
582 * @see zb_zdo_match_desc_cb()
584 int zb_zdo_match_desc_req(
587 zb_profile_id profileid,
588 unsigned char num_in_clusters,
589 unsigned short *in_cluster_list,
590 unsigned char num_out_clusters,
591 unsigned short *out_cluster_list,
592 zb_zdo_match_desc_cb cb,
597 * @brief called after 'node descriptor request' command.
598 * @details The Node_Desc_cb is generated by a remote device in response to a
599 * Node_Desc_req directed to the remote device. This command shall be unicast to
600 * the originator of the Node_Desc_req command.
602 * The remote device shall generate the Node_Desc_cb command using the format
603 * illustrated in param list. The NWKAddrOfInterest field shall match that specified
604 * in the original Node_Desc_req command. If the NWKAddrOfInterest field
605 * matches the network address of the remote device, it shall set the Status field to
606 * #ZB_ZDP_STATUS_SUCCESS and include its node descriptor in the NodeDescriptor field.
607 * If the NWKAddrOfInterest field does not match the network address of the
608 * remote device and it is an end device, it shall set the Status field to
609 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE and not include the NodeDescriptor field.
611 * If the NWKAddrOfInterest field does not match the network address of the remote
612 * device and it is the coordinator or a router, it shall determine whether the
613 * NWKAddrOfInterest field matches the network address of one of its children. If
614 * the NWKAddrOfInterest field does not match the network address of one of the
615 * children of the remote device, it shall set the Status field to
616 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND and not include the NodeDescriptor field.
618 * If the NWKAddrOfInterest matches the network address of one of the children of the
619 * remote device, it shall determine whether a node descriptor for that device is
620 * available. If a node descriptor is not available for the child indicated by the
621 * NWKAddrOfInterest field, the remote device shall set the Status field to
622 * #ZB_ZDP_STATUS_NO_DESCRIPTOR and not include the NodeDescriptor field.
624 * If a node descriptor is available for the child indicated by the NWKAddrOfInterest
625 * field, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and
626 * include the node descriptor of the matching child device in the NodeDescriptor field.
630 * @remarks The @a node_desc should not be released.
631 * @remarks The @a node_desc can be used only in the callback. To use outside, make a copy.
633 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
634 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
635 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
636 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
637 * @param[out] addr16 Network address for the request
638 * @param[out] node_desc This field shall only be included in the frame if the
639 * status field is equal to #ZB_ZDP_STATUS_SUCCESS.
640 * @param[out] user_data user data
642 * @see zb_zdo_node_desc_req()
644 typedef void (*zb_zdo_node_desc_cb)(
645 zb_zdp_status_e status,
647 const zb_zdo_node_descriptor_h node_desc,
652 * @brief Sends 'node descriptor request' command.
653 * @details The Node_Desc_req command is generated from a local device wishing to inquire
654 * as to the node descriptor of a remote device. This command shall be unicast either
655 * to the remote device itself or to an alternative device that contains the discovery
656 * information of the remote device.
658 * The local device shall generate the Node_Desc_req command using the format
659 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
660 * address of the remote device for which the node descriptor is required.
664 * @privilege %http://tizen.org/privilege/zigbee
666 * @param[in] handle The handle of zigbee
667 * @param[in] addr16 Network address for device of interest
668 * @param[in] cb Response callback
669 * @param[in] user_data user data
671 * @return 0 on success, otherwise a negative error value.
672 * @retval #ZIGBEE_ERROR_NONE Successful
673 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
674 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
675 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
676 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
677 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
678 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
680 * @see zb_zdo_node_desc_cb()
682 int zb_zdo_node_desc_req(
685 zb_zdo_node_desc_cb cb,
690 * @brief Called after 'power descriptor request' command.
691 * @details The Power_Desc_cb is generated by a remote device in response to a
692 * Power_Desc_req directed to the remote device. This command shall be unicast to
693 * the originator of the Power_Desc_req command.
695 * The remote device shall generate the Power_Desc_cb command using the format
696 * illustrated in Table 2.93 in Zigbee Specification.
697 * The NWKAddrOfInterest field shall match that specified
698 * in the original Power_Desc_req command. If the NWKAddrOfInterest field
699 * matches the network address of the remote device, it shall set the Status field to
700 * #ZB_ZDP_STATUS_SUCCESS and include its power descriptor in the PowerDescriptor field.
701 * If the NWKAddrOfInterest field does not match the network address of the
702 * remote device and it is an end device, it shall set the Status field to
703 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE and not include the PowerDescriptor field. If the
704 * NWKAddrOfInterest field does not match the network address of the remote
705 * device and it is the coordinator or a router, it shall determine whether the
706 * NWKAddrOfInterest field matches the network address of one of its children. If
707 * the NWKAddrOfInterest field does not match the network address of one of the
708 * children of the remote device, it shall set the Status field to
709 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND and not include the PowerDescriptor field.
711 * If the NWKAddrOfInterest matches the network address of one of the children of the
712 * remote device, it shall determine whether a power descriptor for that device is
713 * available. If a power descriptor is not available for the child indicated by the
714 * NWKAddrOfInterest field, the remote device shall set the Status field to
715 * #ZB_ZDP_STATUS_NO_DESCRIPTOR and not include the PowerDescriptor field.
717 * If a power descriptor is available for the child indicated by the NWKAddrOfInterest
719 * the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and include
720 * the power descriptor of the matching child device in the PowerDescriptor field.
724 * @remarks The @a power_desc should not be released.
725 * @remarks The @a power_desc can be used only in the callback. To use outside, make a copy.
727 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
728 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
729 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
730 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
731 * @param[out] addr16 Network address for the request
732 * @param[out] power_desc This field shall only be included in the frame if the
733 * status field is equal to #ZB_ZDP_STATUS_SUCCESS.
734 * @param[out] user_data user data
736 * @see zb_zdo_power_desc_req()
738 typedef void (*zb_zdo_power_desc_cb)(
739 zb_zdp_status_e status,
741 const zb_zdo_node_power_descriptor_h power_desc,
746 * @brief Sends 'power descriptor request' command.
747 * @details The Power_Desc_req command is generated from a local device wishing to
748 * inquire as to the power descriptor of a remote device. This command shall be
749 * unicast either to the remote device itself or to an alternative device that contains
750 * the discovery information of the remote device.
752 * The local device shall generate the Power_Desc_req command using the format
753 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
754 * address of the remote device for which the power descriptor is required.
758 * @privilege %http://tizen.org/privilege/zigbee
760 * @param[in] handle The handle of zigbee
761 * @param[in] addr16 Network address for device of interest
762 * @param[in] cb Response callback
763 * @param[in] user_data user data
765 * @return 0 on success, otherwise a negative error value.
766 * @retval #ZIGBEE_ERROR_NONE Successful
767 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
768 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
769 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
770 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
771 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
772 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
774 * @see zb_zdo_power_desc_cb()
776 int zb_zdo_power_desc_req(
779 zb_zdo_power_desc_cb cb,
784 * @brief Called after 'complex descriptor request' command.
785 * @details The Complex_Desc_cb is generated by a remote device in response to a
786 * Complex_Desc_req directed to the remote device. This command shall be unicast
787 * to the originator of the Complex_Desc_req command.
788 * The remote device shall generate the Complex_Desc_cb command using the
789 * format illustrated in param list. The NWKAddrOfInterest field shall match that
790 * specified in the original Complex_Desc_req command. If the
791 * NWKAddrOfInterest field matches the network address of the remote device but a
792 * complex descriptor does not exist, it shall set the Status field to
793 * #ZB_ZDP_STATUS_NOT_SUPPORTED, set the Length field to 0, and not include the
794 * ComplexDescriptor field. If the NWKAddrOfInterest field matches the network
795 * address of the remote device and a complex descriptor exists, it shall set the Status
796 * field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the complex
797 * descriptor, and include its complex descriptor (see sub-clause 2.3.2.6) in the
798 * ComplexDescriptor field.
800 * If the NWKAddrOfInterest field does not match the network address of the
801 * remote device and it is an end device, it shall set the Status field to
802 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
803 * ComplexDescriptor field. If the NWKAddrOfInterest field does not match the
804 * network address of the remote device and it is the coordinator or a router, it shall
805 * determine whether the NWKAddrOfInterest field matches the network address of
806 * one of its children. If the NWKAddrOfInterest field does not match the network
807 * address of one of the children of the remote device, it shall set the Status field to
808 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
809 * ComplexDescriptor field.
811 * If the NWKAddrOfInterest matches the network
812 * address of one of the children of the remote device, it shall determine whether a
813 * complex descriptor for that device is available. If a complex descriptor is not
814 * available for the child indicated by the NWKAddrOfInterest field, the remote
815 * device shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length
816 * field to 0, and not include the ComplexDescriptor field.
818 * If a complex descriptor is available
819 * for the child indicated by the NWKAddrOfInterest field, the remote device shall
820 * set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of
822 * descriptor for that device, and include the complex descriptor of the matching
823 * child device in the ComplexDescriptor field.
827 * @remarks The @a complex_desc should not be released.
828 * @remarks The @a complex_desc can be used only in the callback. To use outside, make a copy.
830 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
831 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
832 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
833 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
834 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
835 * @param[out] addr16 Network address for the request
836 * @param[out] length Length in bytes of the complex_desc field
837 * @param[out] complex_desc This field shall only be included in the frame if the
838 * status field is equal to #ZB_ZDP_STATUS_SUCCESS.
839 * @param[out] user_data user data
841 * @see zb_zdo_complex_desc_req()
843 typedef void (*zb_zdo_complex_desc_cb)(
844 zb_zdp_status_e status,
846 unsigned char length,
847 unsigned char *complex_desc,
852 * @brief Sends 'complex descriptor request' command.
853 * @details The Complex_Desc_req command is generated from a local device wishing to
854 * inquire as to the complex descriptor of a remote device. This command shall be
855 * unicast either to the remote device itself or to an alternative device that contains
856 * the discovery information of the remote device.
858 * The local device shall generate the Complex_Desc_req command using the
859 * format illustrated in param list. The NWKAddrOfInterest field shall contain the
860 * network address of the remote device for which the complex descriptor is
865 * @privilege %http://tizen.org/privilege/zigbee
867 * @param[in] handle The handle of zigbee
868 * @param[in] addr16 Network address for device of interest
869 * @param[in] cb Response callback
870 * @param[in] user_data user data
872 * @return 0 on success, otherwise a negative error value.
873 * @retval #ZIGBEE_ERROR_NONE Successful
874 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
875 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
876 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
877 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
878 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
879 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
881 * @see zb_zdo_complex_desc_cb()
883 int zb_zdo_complex_desc_req(
886 zb_zdo_complex_desc_cb cb,
891 * @brief Called after 'user descriptor request' command.
892 * @details The User_Desc_cb is generated by a remote device in response to a
893 * User_Desc_req directed to the remote device. This command shall be unicast to
894 * the originator of the User_Desc_req command.
896 * The remote device shall generate the User_Desc_cb command using the format
897 * illustrated in Table 2.98 in Zigbee Specification.
898 * The NWKAddrOfInterest field shall match that specified
899 * in the original User_Desc_req command. If the NWKAddrOfInterest field
900 * matches the network address of the remote device but a user descriptor does not
901 * exist, it shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length
902 * field to 0, and not include the UserDescriptor field. If the NWKAddrOfInterest field
903 * matches the network address of the remote device and a user descriptor exists, it
904 * shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the
905 * length of the user descriptor, and include its user descriptor in the UserDescriptor
907 * If the NWKAddrOfInterest field does not match the network address of the
908 * remote device and it is an end device, it shall set the Status field to
909 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
910 * UserDescriptor field.
912 * If the NWKAddrOfInterest field does not match the network
913 * address of the remote device and it is the coordinator or a router, it shall determine
914 * whether the NWKAddrOfInterest field matches the network address of one of its
917 * If the NWKAddrOfInterest field does not match the network address of
918 * one of the children of the remote device, it shall set the Status field to
919 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
920 * UserDescriptor field.
922 * If the NWKAddrOfInterest matches the network address of
923 * one of the children of the remote device, it shall determine whether a user
924 * descriptor for that device is available.
926 * If a user descriptor is not available for the
927 * child indicated by the NWKAddrOfInterest field, the remote device shall set the
928 * Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length field to 0, and not
929 * include the UserDescriptor field.
931 * If a user descriptor is available for the child indicated by the
932 * NWKAddrOfInterest field, the remote device shall set the Status field to
933 * #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the user descriptor for
934 * that device, and include the user descriptor of the matching child device in the
935 * UserDescriptor field.
939 * @remarks The @a user_desc should not be released.
940 * @remarks The @a user_desc can be used only in the callback. To use outside, make a copy.
942 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
943 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
944 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
945 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
946 * #ZB_ZDP_STATUS_NO_DESCRIPTOR
947 * @param[out] addr16 Network address for the request
948 * @param[out] len Length in bytes of the user_desc field
949 * @param[out] user_desc This field shall only be included in the frame if the
950 * status field is equal to #ZB_ZDP_STATUS_SUCCESS.
951 * @param[out] user_data user data
953 * @see zb_zdo_user_desc_req()
955 typedef void (*zb_zdo_user_desc_cb)(
956 zb_zdp_status_e status,
959 unsigned char *user_desc,
964 * @brief Sends 'User descriptor request' command.
965 * @details The User_Desc_req command is generated from a local device wishing to inquire
966 * as to the user descriptor of a remote device. This command shall be unicast either
967 * to the remote device itself or to an alternative device that contains the discovery
968 * information of the remote device.
970 * The local device shall generate the User_Desc_req command using the format
971 * illustrated in Table 2.53 in Zigbee Specification.
972 * The NWKAddrOfInterest field shall contain the network
973 * address of the remote device for which the user descriptor is required.
977 * @privilege %http://tizen.org/privilege/zigbee
979 * @param[in] handle The handle of zigbee
980 * @param[in] addr16 Network address for device of interest
981 * @param[in] cb Response callback
982 * @param[in] user_data user data
984 * @return 0 on success, otherwise a negative error value.
985 * @retval #ZIGBEE_ERROR_NONE Successful
986 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
987 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
988 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
989 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
990 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
991 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
993 * @see zb_zdo_complex_desc_cb()
995 int zb_zdo_user_desc_req(
998 zb_zdo_user_desc_cb cb,
1002 * @brief Called after 'user descriptor confirm' request.
1003 * @details The User_Desc_conf is generated by a remote device in response to a
1004 * User_Desc_set directed to the remote device. This command shall be unicast to
1005 * the originator of the User_Desc_set command.
1007 * The remote device shall generate the User_Desc_conf command using the format
1008 * illustrated in param list. The NWKAddrOfInterest field shall match that
1009 * specified in the original User_Desc_set command. If the NWKAddrOfInterest
1010 * field matches the network address of the remote device but a user descriptor does
1011 * not exist, it shall set the Status field to #ZB_ZDP_STATUS_NOT_SUPPORTED. If the
1012 * NWKAddrOfInterest field matches the network address of the remote device and
1013 * a user descriptor exists, it shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and
1014 * configure the user descriptor with the ASCII character string specified in the original
1015 * User_Desc_set command.
1017 * If the NWKAddrOfInterest field does not match the network address of the
1018 * remote device and it is an end device, it shall set the Status field to
1019 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE.
1021 * If the NWKAddrOfInterest field does not match the
1022 * network address of the remote device and it is the coordinator or a router, it shall
1023 * determine whether the NWKAddrOfInterest field matches the network address of
1024 * one of its children. If the NWKAddrOfInterest field does not match the network
1025 * address of one of the children of the remote device, it shall set the Status field to
1026 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND.
1028 * If the NWKAddrOfInterest matches the network
1029 * address of one of the children of the remote device, it shall determine whether a
1030 * user descriptor for that device is available. If a user descriptor is not available for
1031 * the child indicated by the NWKAddrOfInterest field, the remote device shall set
1032 * the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR.
1034 * If a user descriptor is available for the
1035 * child indicated by the NWKAddrOfInterest field, the remote device shall set the
1036 * Status field to #ZB_ZDP_STATUS_SUCCESS and configure the user descriptor with the ASCII
1037 * character string specified in the original User_Desc_set command.
1041 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
1042 * returned value from NLME-GET.confirm primitive \n
1043 * @param[out] user_data user data
1045 * @see zb_zdo_user_desc_req()
1047 typedef void (*zb_zdo_user_desc_conf_cb)(
1048 zb_zdp_status_e status,
1053 * @brief Sends 'user descriptor set request' command.
1054 * @details The User_Desc_set command is generated from a local device wishing to
1055 * configure the user descriptor on a remote device. This command shall be unicast
1056 * either to the remote device itself or to an alternative device that contains the
1057 * discovery information of the remote device.
1059 * The local device shall generate the User_Desc_set command using the format
1060 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
1061 * address of the remote device for which the user descriptor is to be configured and
1062 * the UserDescription field shall contain the ASCII character string that is to be
1063 * configured in the user descriptor. Characters with ASCII codes numbered 0x00
1064 * through 0x1f are not permitted to be included in this string.
1068 * @privilege %http://tizen.org/privilege/zigbee
1070 * @param[in] handle The handle of zigbee
1071 * @param[in] addr16 Network address for device of interest
1072 * @param[in] len The length of the user_desc filed in bytes
1073 * @param[in] user_desc Pointer of user description
1074 * @param[in] cb Response callback
1075 * @param[in] user_data user data
1077 * @return 0 on success, otherwise a negative error value.
1078 * @retval #ZIGBEE_ERROR_NONE Successful
1079 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1080 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
1081 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1082 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1083 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1085 * @see zb_zdo_user_desc_conf_cb()
1087 int zb_zdo_user_desc_set(
1091 unsigned char *user_desc,
1092 zb_zdo_user_desc_conf_cb cb,
1097 * @brief Sends 'device announce request' command.
1098 * @details The Device_annce is provided to enable ZigBee devices on the network to notify
1099 * other ZigBee devices that the device has joined or re-joined the network,
1100 * identifying the device's 64-bit IEEE address and new 16-bit NWK address, and
1101 * informing the Remote Devices of the capability of the ZigBee device.
1103 * This command shall be invoked for all ZigBee end devices upon join or rejoin. This
1104 * command may also be invoked by ZigBee routers upon join or rejoin as part of
1105 * NWK address conflict resolution.
1107 * The destination addressing on this primitive is
1108 * broadcast to all devices for which macRxOnWhenIdle = TRUE.
1112 * @privilege %http://tizen.org/privilege/zigbee
1114 * @param[in] handle The handle of zigbee
1115 * @param[in] addr16 Network address for device of interest
1116 * @param[in] addr64 The IEEE address for device of interest
1117 * @param[in] capability Capability (see zb_zdp_mac_capability_field_e in zb_zdo.h header)
1119 * @return 0 on success, otherwise a negative error value.
1120 * @retval #ZIGBEE_ERROR_NONE Successful
1121 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1122 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
1123 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1124 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1125 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1127 * @see zb_zdo_user_desc_conf_cb()
1129 int zb_zdo_device_annce(
1132 zb_ieee_addr addr64,
1133 unsigned char capability);
1137 * @brief Creates node power descriptor.
1138 * @details Creates node power descriptor handle
1142 * @privilege %http://tizen.org/privilege/zigbee
1144 * @remarks The @a handle should be released using zb_node_power_desc_destroy().
1146 * @param[out] handle The handle of node power descriptor
1148 * @return 0 on success, otherwise a negative error value.
1149 * @retval #ZIGBEE_ERROR_NONE Successful
1150 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1151 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1152 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1153 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1154 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1156 * @see zb_node_power_desc_clone()
1157 * @see zb_node_power_desc_destroy()
1159 int zb_node_power_desc_create(
1160 zb_zdo_node_power_descriptor_h *handle);
1164 * @brief Clones a node power descriptor.
1168 * @remarks The @a src should be released using zb_node_power_desc_destroy().
1169 * @remarks The @a dst should be released using zb_node_power_desc_destroy().
1171 * @param[in] src handle of source node power descriptor
1172 * @param[in] dst handle of destination node power descriptor
1174 * @return 0 on success, otherwise a negative error value.
1175 * @retval #ZIGBEE_ERROR_NONE Successful
1176 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1177 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1179 * @see zb_node_power_desc_create()
1180 * @see zb_node_power_desc_destroy()
1182 int zb_node_power_desc_clone(
1183 zb_zdo_node_power_descriptor_h src, zb_zdo_node_power_descriptor_h *dst);
1187 * @brief Destroys node power descriptor.
1191 * @param[in] handle The handle of node power descriptor
1193 * @return 0 on success, otherwise a negative error value.
1194 * @retval #ZIGBEE_ERROR_NONE Successful
1195 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1196 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1198 * @see zb_node_power_desc_clone()
1199 * @see zb_node_power_desc_destroy()
1201 int zb_node_power_desc_destroy(
1202 zb_zdo_node_power_descriptor_h handle);
1206 * @brief Gets current power mode from node power descriptor.
1207 * @details The current power mode field of the node power descriptor is four bits in length
1208 * and specifies the current sleep/power-saving mode of the node.
1210 * The current power mode field shall be set to one of the non-reserved values
1214 * @param[in] handle The handle of node power descriptor
1215 * @param[out] current_power_mode 0b0000 : Receiver synchronized with the receiver on when
1216 * idle sub-field of the node descriptor \n
1217 * 0b0001 : Receiver comes on periodically as defined by the
1218 * node power descriptor \n
1219 * 0b0010 : Receiver comes on when stimulated, e.g. by a
1220 * user pressing a button
1222 * @return 0 on success, otherwise a negative error value.
1223 * @retval #ZIGBEE_ERROR_NONE Successful
1224 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1225 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1227 * @see zb_node_power_desc_set_current_power_mode()
1229 int zb_node_power_desc_get_current_power_mode(
1230 zb_zdo_node_power_descriptor_h handle,
1231 zb_zdp_cur_pwr_mode_e* current_power_mode);
1235 * @brief Sets current power mode from node power descriptor.
1236 * @details The current power mode field of the node power descriptor is four bits in length
1237 * and specifies the current sleep/power-saving mode of the node.
1239 * The current power mode field shall be set to one of the non-reserved values
1243 * @param[in] handle The handle of node power descriptor
1244 * @param[in] current_power_mode 0b0000 : Receiver synchronized with the receiver on when
1245 * idle sub-field of the node descriptor \n
1246 * 0b0001 : Receiver comes on periodically as defined by the
1247 * node power descriptor \n
1248 * 0b0010 : Receiver comes on when stimulated, e.g. by a
1249 * user pressing a button
1251 * @return 0 on success, otherwise a negative error value.
1252 * @retval #ZIGBEE_ERROR_NONE Successful
1253 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1254 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1255 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1257 * @see zb_node_power_desc_get_current_power_mode()
1259 int zb_node_power_desc_set_current_power_mode(
1260 zb_zdo_node_power_descriptor_h handle,
1261 zb_zdp_cur_pwr_mode_e current_power_mode);
1265 * @brief Gets available power mode from node power descriptor.
1266 * @details The available power sources field of the node power descriptor is four bits in
1267 * length and specifies the power sources available on this node.
1269 * For each power source supported on this node, the corresponding bit of the available power sources
1270 * field, shall be set to 1. All other bits shall be set to 0.
1274 * @param[in] handle The handle of node power descriptor
1275 * @param[out] available_power_sources 0b0001 : Constant (mains) power \n
1276 * 0b0010 : Rechargeable battery \n
1277 * 0b0100 : Disposable battery \n
1279 * @return 0 on success, otherwise a negative error value.
1280 * @retval #ZIGBEE_ERROR_NONE Successful
1281 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1282 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1284 * @see zb_node_power_desc_set_available_power_sources()
1286 int zb_node_power_desc_get_available_power_sources(
1287 zb_zdo_node_power_descriptor_h handle,
1288 zb_zdp_pwr_src_type_e* available_power_sources);
1292 * @brief Sets available power mode from node power descriptor.
1293 * @details The available power sources field of the node power descriptor is four bits in
1294 * length and specifies the power sources available on this node.
1297 * source supported on this node, the corresponding bit of the available power sources
1298 * field, shall be set to 1. All other bits shall be set to 0.
1302 * @param[in] handle The handle of node power descriptor
1303 * @param[in] available_power_sources 0b0001 : Constant (mains) power \n
1304 * 0b0010 : Rechargeable battery \n
1305 * 0b0100 : Disposable battery \n
1307 * @return 0 on success, otherwise a negative error value.
1308 * @retval #ZIGBEE_ERROR_NONE Successful
1309 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1310 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1311 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1313 * @see zb_node_power_desc_get_available_power_sources()
1315 int zb_node_power_desc_set_available_power_sources(
1316 zb_zdo_node_power_descriptor_h handle,
1317 zb_zdp_pwr_src_type_e available_power_sources);
1321 * @brief Gets current power source from node power descriptor.
1322 * @details The current power source field of the node power descriptor is four bits in
1323 * length and specifies the current power source being utilized by the node.
1325 * For the current power source selected, the corresponding bit of the current power
1326 * source field, shall be set to 1. All other bits shall be set to 0.
1330 * @param[in] handle The handle of node power descriptor
1331 * @param[out] current_power_source 0b0001 : Constant (mains) power \n
1332 * 0b0010 : Rechargeable battery \n
1333 * 0b0100 : Disposable battery \n
1335 * @return 0 on success, otherwise a negative error value.
1336 * @retval #ZIGBEE_ERROR_NONE Successful
1337 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1338 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1340 * @see zb_node_power_desc_set_current_power_source()
1342 int zb_node_power_desc_get_current_power_source(
1343 zb_zdo_node_power_descriptor_h handle,
1344 zb_zdp_pwr_src_type_e* current_power_source);
1348 * @brief Sets current power source from node power descriptor.
1349 * @details The current power source field of the node power descriptor is four bits in
1350 * length and specifies the current power source being utilized by the node.
1352 * For the current power source selected, the corresponding bit of the current power
1353 * source field, shall be set to 1. All other bits shall be set to 0.
1357 * @param[in] handle The handle of node power descriptor
1358 * @param[in] current_power_source 0b0001 : Constant (mains) power \n
1359 * 0b0010 : Rechargeable battery \n
1360 * 0b0100 : Disposable battery \n
1362 * @return 0 on success, otherwise a negative error value.
1363 * @retval #ZIGBEE_ERROR_NONE Successful
1364 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1365 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1366 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1368 * @see zb_node_power_desc_get_current_power_source()
1370 int zb_node_power_desc_set_current_power_source(
1371 zb_zdo_node_power_descriptor_h handle,
1372 zb_zdp_pwr_src_type_e current_power_source);
1376 * @brief Gets current power source level from node power descriptor.
1377 * @details The current power source level field of the node power descriptor is four bits
1378 * in length and specifies the level of charge of the power source.
1381 * source level field shall be set to one of the non-reserved values
1385 * @param[in] handle The handle of node power descriptor
1386 * @param[out] current_power_source_level 0b0000 : Critical \n
1391 * @return 0 on success, otherwise a negative error value.
1392 * @retval #ZIGBEE_ERROR_NONE Successful
1393 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1394 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1396 * @see zb_node_power_desc_set_current_power_source_level()
1398 int zb_node_power_desc_get_current_power_source_level(
1399 zb_zdo_node_power_descriptor_h handle,
1400 zb_zdp_pwr_src_level_e* current_power_source_level);
1404 * @brief Sets current power source level from node power descriptor.
1405 * @details The current power source level field of the node power descriptor is four bits
1406 * in length and specifies the level of charge of the power source.
1409 * source level field shall be set to one of the non-reserved values
1413 * @param[in] handle The handle of node power descriptor
1414 * @param[in] current_power_source_level 0b0000 : Critical \n
1419 * @return 0 on success, otherwise a negative error value.
1420 * @retval #ZIGBEE_ERROR_NONE Successful
1421 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1422 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1424 * @see zb_node_power_desc_get_current_power_source_level()
1426 int zb_node_power_desc_set_current_power_source_level(
1427 zb_zdo_node_power_descriptor_h handle,
1428 zb_zdp_pwr_src_level_e current_power_source_level);
1432 * @brief Creates node descriptor.
1436 * @privilege %http://tizen.org/privilege/zigbee
1438 * @remarks The @a handle should be released using zb_node_desc_destroy().
1440 * @param[out] handle The handle of node descriptor
1442 * @return 0 on success, otherwise a negative error value.
1443 * @retval #ZIGBEE_ERROR_NONE Successful
1444 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1445 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1446 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1447 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1448 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1450 * @see zb_node_desc_clone()
1451 * @see zb_node_desc_destroy()
1453 int zb_node_desc_create(zb_zdo_node_descriptor_h *handle);
1457 * @brief Copies node descriptor.
1461 * @remarks The @a src should be released using zb_node_desc_destroy().
1462 * @remarks The @a dst should be released using zb_node_desc_destroy().
1464 * @param[in] src handle of source node descriptor
1465 * @param[in] dst handle of destination node descriptor
1467 * @return 0 on success, otherwise a negative error value.
1468 * @retval #ZIGBEE_ERROR_NONE Successful
1469 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1470 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1472 * @see zb_node_desc_create()
1473 * @see zb_node_desc_destroy()
1475 int zb_node_desc_clone(zb_zdo_node_descriptor_h src, zb_zdo_node_descriptor_h *dst);
1479 * @brief Destroys node descriptor.
1483 * @param[in] handle The handle of node descriptor
1485 * @return 0 on success, otherwise a negative error value.
1486 * @retval #ZIGBEE_ERROR_NONE Successful
1487 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1488 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1490 * @see zb_node_desc_create()
1491 * @see zb_node_desc_clone()
1493 int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle);
1497 * @brief Gets logical type from node descriptor.
1498 * @details The logical type field of the node descriptor is three bits in length and
1499 * specifies the device type of the ZigBee node.
1501 * The logical type field shall be set to one of the non-reserved values.
1505 * @param[in] handle The handle of node descriptor
1506 * @param[out] logical_type 0b000 : ZigBee coordinator \n
1507 * 0b001 : ZigBee router \n
1508 * 0b010 : ZigBee end device \n
1510 * @return 0 on success, otherwise a negative error value.
1511 * @retval #ZIGBEE_ERROR_NONE Successful
1512 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1513 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1515 * @see zb_node_desc_set_logical_type()
1517 int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
1518 unsigned char* logical_type);
1522 * @brief Sets logical type from to descriptor.
1523 * @details The logical type field of the node descriptor is three bits in length and
1524 * specifies the device type of the ZigBee node.
1526 * The logical type field shall be set to one of the non-reserved values.
1530 * @param[in] handle The handle of node descriptor
1531 * @param[in] logical_type 0b000 : ZigBee coordinator \n
1532 * 0b001 : ZigBee router \n
1533 * 0b010 : ZigBee end device \n
1535 * @return 0 on success, otherwise a negative error value.
1536 * @retval #ZIGBEE_ERROR_NONE Successful
1537 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1538 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1539 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1541 * @see zb_node_desc_get_logical_type()
1543 int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
1544 unsigned char logical_type);
1548 * @brief Gets complex descriptor available from node descriptor.
1549 * @details The complex descriptor available field of the node descriptor is one bit in
1550 * length and specifies whether a complex descriptor is available on this device. \n\n
1551 * If this field is set to 1, a complex descriptor is available. \n\n
1552 * If this field is set to 0, a complex descriptor is not available.
1556 * @param[in] handle The handle of node descriptor
1557 * @param[out] complex_desciptor_available 1 : a complex descriptor is available \n
1558 * 0 : a complex descriptor is not available \n
1560 * @return 0 on success, otherwise a negative error value.
1561 * @retval #ZIGBEE_ERROR_NONE Successful
1562 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1563 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1565 * @see zb_node_desc_set_complex_descriptor_available()
1567 int zb_node_desc_get_complex_desciptor_available(
1568 zb_zdo_node_descriptor_h handle,
1569 unsigned char* complex_desciptor_available);
1573 * @brief Sets complex descriptor available to node descriptor.
1574 * @details The complex descriptor available field of the node descriptor is one bit in
1575 * length and specifies whether a complex descriptor is available on this device. \n\n
1576 * If this field is set to 1, a complex descriptor is available. \n\n
1577 * If this field is set to 0, a complex descriptor is not available.
1581 * @param[in] handle The handle of node descriptor
1582 * @param[in] complex_desciptor_available 1 : a complex descriptor is available \n
1583 * 0 : a complex descriptor is not available \n
1585 * @return 0 on success, otherwise a negative error value.
1586 * @retval #ZIGBEE_ERROR_NONE Successful
1587 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1588 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1589 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1591 * @see zb_node_desc_get_complex_desciptor_available()
1593 int zb_node_desc_set_complex_descriptor_available(
1594 zb_zdo_node_descriptor_h handle,
1595 unsigned char complex_desciptor_available);
1599 * @brief Gets user descriptor available from node descriptor.
1600 * @details The user descriptor available field of the node descriptor is one bit in
1601 * length and specifies whether a user descriptor is available on this device.
1603 * If this field is set to 1, a user descriptor is available.
1604 * If this field is set to 0, a user descriptor is not available.
1608 * @param[in] handle The handle of node descriptor
1609 * @param[out] user_descriptor_available 1 : a user descriptor is available \n
1610 * 0 : a user descriptor is not available \n
1612 * @return 0 on success, otherwise a negative error value.
1613 * @retval #ZIGBEE_ERROR_NONE Successful
1614 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1615 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1617 * @see zb_node_desc_set_user_descriptor_available()
1619 int zb_node_desc_get_user_descriptor_available(
1620 zb_zdo_node_descriptor_h handle,
1621 unsigned char* user_descriptor_available);
1625 * @brief Sets user descriptor available to node descriptor.
1626 * @details The user descriptor available field of the node descriptor is one bit in
1627 * length and specifies whether a user descriptor is available on this device. \n\n
1628 * If this field is set to 1, a user descriptor is available.
1629 * If this field is set to 0, a user descriptor is not available.
1633 * @param[in] handle The handle of node descriptor
1634 * @param[in] user_descriptor_available 1 : a user descriptor is available \n
1635 * 0 : a user descriptor is not available \n
1637 * @return 0 on success, otherwise a negative error value.
1638 * @retval #ZIGBEE_ERROR_NONE Successful
1639 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1640 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1641 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1643 * @see zb_node_desc_get_user_descriptor_available()
1645 int zb_node_desc_set_user_descriptor_available(
1646 zb_zdo_node_descriptor_h handle,
1647 unsigned char user_descriptor_available);
1651 * @brief Gets APS flags available from node descriptor.
1652 * @details The APS flags field of the node descriptor is three bits in length and
1653 * specifies the application support sub-layer capabilities of the node.
1655 * This field is currently not supported and shall be set to zero.
1659 * @param[in] handle The handle of node descriptor
1660 * @param[out] aps_flags 0 : APS flags \n
1662 * @return 0 on success, otherwise a negative error value.
1663 * @retval #ZIGBEE_ERROR_NONE Successful
1664 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1665 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1667 * @see zb_node_desc_set_aps_flags()
1669 int zb_node_desc_get_aps_flags(
1670 zb_zdo_node_descriptor_h handle,
1671 unsigned char* aps_flags);
1674 * @brief Sets APS flags available to node descriptor.
1675 * @details The APS flags field of the node descriptor is three bits in length and
1676 * specifies the application support sub-layer capabilities of the node.
1678 * This field is currently not supported and shall be set to zero.
1682 * @param[in] handle The handle of node descriptor
1683 * @param[in] aps_flags 0 : APS flags
1685 * @return 0 on success, otherwise a negative error value.
1686 * @retval #ZIGBEE_ERROR_NONE Successful
1687 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1688 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1689 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1691 * @see zb_node_desc_get_aps_flags()
1693 int zb_node_desc_set_aps_flags(
1694 zb_zdo_node_descriptor_h handle,
1695 unsigned char aps_flags);
1699 * @brief Gets frequency band from node descriptor.
1700 * @details The frequency band field of the node descriptor is five bits in length and
1701 * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
1702 * utilized by the node.
1704 * For each frequency band supported by the underlying IEEE
1705 * 802.15.4 radio, the corresponding bit of the frequency band field.
1707 * shall be set to 1. All other bits shall be set to 0.
1711 * @param[in] handle The handle of node descriptor
1712 * @param[out] frequency_band 0b00001 : 868-868,6MHz \n
1713 * 0b00010 : Reserved \n
1714 * 0b00100 : 902-928MHz \n
1715 * 0b01000 : 2400-2483.5MHz
1717 * @return 0 on success, otherwise a negative error value.
1718 * @retval #ZIGBEE_ERROR_NONE Successful
1719 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1720 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1722 * @see zb_node_desc_set_frequency_band()
1724 int zb_node_desc_get_frequency_band(
1725 zb_zdo_node_descriptor_h handle,
1726 unsigned char* frequency_band);
1730 * @brief Sets frequency band to node descriptor.
1731 * @details The frequency band field of the node descriptor is five bits in length and
1732 * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
1733 * utilized by the node.
1735 * For each frequency band supported by the underlying IEEE
1736 * 802.15.4 radio, the corresponding bit of the frequency band field.
1737 * shall be set to 1. All other bits shall be set to 0.
1741 * @param[in] handle The handle of node descriptor
1742 * @param[in] frequency_band 0b00001 : 868-868,6MHz \n
1743 * 0b00010 : Reserved \n
1744 * 0b00100 : 902-928MHz \n
1745 * 0b01000 : 2400-2483.5MHz
1747 * @return 0 on success, otherwise a negative error value.
1748 * @retval #ZIGBEE_ERROR_NONE Successful
1749 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1750 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1751 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1753 * @see zb_node_desc_get_frequency_band()
1755 int zb_node_desc_set_frequency_band(
1756 zb_zdo_node_descriptor_h handle,
1757 unsigned char frequency_band);
1761 * @brief Gets MAC capability from node descriptor.
1762 * @details The MAC capability flags field is eight bits in length and specifies the node
1763 * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer. The
1764 * MAC capability flags field shall be formatted as illustrated in below table.
1766 * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
1767 * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
1768 * PAN coordinator sub-field shall be set to 0.
1770 * The device type sub-field is one bit in length and shall be set to 1 if this node is a
1771 * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
1772 * indicating a reduced function device (RFD).
1774 * The power source sub-field is one bit in length and shall be set to 1 if the current
1775 * power source is mains power. Otherwise, the power source sub-field shall be set to
1776 * 0. This information is derived from the node current power source field of the
1777 * node power descriptor.
1779 * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
1780 * device does not disable its receiver to conserve power during idle periods.
1781 * Otherwise, the receiver on when idle sub-field shall be set to 0
1783 * The security capability sub-field is one bit in length and shall be set to 1 if the
1784 * device is capable of sending and receiving frames secured using the security suite
1785 * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
1786 * The allocate address sub-field is one bit in length and shall be set to 0 or 1.
1790 * @param[in] handle The handle of node descriptor
1791 * @param[out] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
1792 * Bit 1 : Device Type \n
1793 * Bit 2 : Power source \n
1794 * Bit 3 : Receiver on when idle \n
1795 * Bit 4-5 : Reserved \n
1796 * Bit 6 : Security capability \n
1797 * Bit 7 : Allocated address \n
1799 * @return 0 on success, otherwise a negative error value.
1800 * @retval #ZIGBEE_ERROR_NONE Successful
1801 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1802 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1804 * @see zb_node_desc_set_mac_capability_flags()
1806 int zb_node_desc_get_mac_capability_flags(
1807 zb_zdo_node_descriptor_h handle,
1808 unsigned char* mac_capability_flags);
1812 * @brief Sets MAC capability to node descriptor.
1813 * @details The MAC capability flags field is eight bits in length and specifies the node
1814 * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer. The
1815 * MAC capability flags field shall be formatted as illustrated in below table.
1817 * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
1818 * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
1819 * PAN coordinator sub-field shall be set to 0.
1821 * The device type sub-field is one bit in length and shall be set to 1 if this node is a
1822 * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
1823 * indicating a reduced function device (RFD).
1825 * The power source sub-field is one bit in length and shall be set to 1 if the current
1826 * power source is mains power. Otherwise, the power source sub-field shall be set to
1827 * 0. This information is derived from the node current power source field of the
1828 * node power descriptor.
1830 * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
1831 * device does not disable its receiver to conserve power during idle periods.
1832 * Otherwise, the receiver on when idle sub-field shall be set to 0
1834 * The security capability sub-field is one bit in length and shall be set to 1 if the
1835 * device is capable of sending and receiving frames secured using the security suite
1836 * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
1837 * The allocate address sub-field is one bit in length and shall be set to 0 or 1.
1841 * @param[in] handle The handle of node descriptor
1842 * @param[in] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
1843 * Bit 1 : Device Type \n
1844 * Bit 2 : Power source \n
1845 * Bit 3 : Receiver on when idle \n
1846 * Bit 4-5 : Reserved \n
1847 * Bit 6 : Security capability \n
1848 * Bit 7 : Allocated address \n
1850 * @return 0 on success, otherwise a negative error value.
1851 * @retval #ZIGBEE_ERROR_NONE Successful
1852 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1853 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1855 * @see zb_node_desc_get_mac_capability_flags()
1857 int zb_node_desc_set_mac_capability_flags(
1858 zb_zdo_node_descriptor_h handle,
1859 unsigned char mac_capability_flags);
1863 * @brief Gets manufacturer code from node descriptor.
1864 * @details The manufacturer code field of the node descriptor is sixteen bits in length
1865 * and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
1866 * the manufacturer to the device.
1870 * @param[in] handle The handle of node descriptor
1871 * @param[out] manufacturer_code manufacturer code
1873 * @return 0 on success, otherwise a negative error value.
1874 * @retval #ZIGBEE_ERROR_NONE Successful
1875 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1876 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1878 * @see zb_node_desc_set_manufacturer_code()
1880 int zb_node_desc_get_manufacturer_code(
1881 zb_zdo_node_descriptor_h handle,
1882 unsigned short* manufacturer_code);
1886 * @brief Sets manufacturer code to node descriptor.
1887 * @details The manufacturer code field of the node descriptor is sixteen bits in length
1888 * and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
1889 * the manufacturer to the device.
1893 * @param[in] handle The handle of node descriptor
1894 * @param[in] manufacturer_code manufacturer code
1896 * @return 0 on success, otherwise a negative error value.
1897 * @retval #ZIGBEE_ERROR_NONE Successful
1898 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1899 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1901 * @see zb_node_desc_get_frequency_band()
1903 int zb_node_desc_set_manufacturer_code(
1904 zb_zdo_node_descriptor_h handle,
1905 unsigned short manufacturer_code);
1909 * @brief Gets maximum buffer size from node descriptor.
1910 * @details The maximum buffer size field of the node descriptor is eight bits in length,
1911 * with a valid range of 0x00-0x7f.
1913 * This field specifies the maximum size, in octets,
1914 * of the network sub-layer data unit (NSDU) for this node. This is the maximum size of
1915 * data or commands passed to or from the application by the application support
1916 * sub-layer, before any fragmentation or re-assembly.
1918 * This field can be used as a high-level indication for network management.
1922 * @param[in] handle The handle of node descriptor
1923 * @param[out] maximum_buffer_size 0x00~0x7f
1925 * @return 0 on success, otherwise a negative error value.
1926 * @retval #ZIGBEE_ERROR_NONE Successful
1927 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1928 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1930 * @see zb_node_desc_set_maximum_buffer_size()
1932 int zb_node_desc_get_maximum_buffer_size(
1933 zb_zdo_node_descriptor_h handle,
1934 unsigned char* maximum_buffer_size);
1938 * @brief Sets maximum buffer size to node descriptor.
1939 * @details The maximum buffer size field of the node descriptor is eight bits in length,
1940 * with a valid range of 0x00-0x7f.
1942 * This field specifies the maximum size, in octets, of the network sub-layer data unit (NSDU)
1943 * for this node. This is the maximum size of data or commands passed to or from
1944 * the application by the application support sub-layer, before any fragmentation or re-assembly.
1946 * This field can be used as a high-level indication for network management.
1950 * @param[in] handle The handle of node descriptor
1951 * @param[in] maximum_buffer_size 0x00~0x7f
1953 * @return 0 on success, otherwise a negative error value.
1954 * @retval #ZIGBEE_ERROR_NONE Successful
1955 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1956 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
1957 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1959 * @see zb_node_desc_get_maximum_buffer_size()
1961 int zb_node_desc_set_maximum_buffer_size(
1962 zb_zdo_node_descriptor_h handle,
1963 unsigned char maximum_buffer_size);
1967 * @brief Gets maximum incoming transfer size from node descriptor.
1968 * @details The maximum transfer size field of the node descriptor is sixteen bits in
1969 * length, with a valid range of 0x0000-0x7fff.
1971 * This field specifies the maximum size, in octets, of the application sub-layer data unit
1972 * (ASDU) that can be transferred to this node in one single message transfer.
1974 * This value can exceed the value of the node maximum buffer size field through the use of fragmentation.
1978 * @param[in] handle The handle of node descriptor
1979 * @param[out] maximum_incoming_transfer_size 0x0000~0x7fff
1981 * @return 0 on success, otherwise a negative error value.
1982 * @retval #ZIGBEE_ERROR_NONE Successful
1983 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1984 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1986 * @see zb_node_desc_set_maximum_buffer_size()
1988 int zb_node_desc_get_maximum_incoming_transfer_size(
1989 zb_zdo_node_descriptor_h handle,
1990 unsigned short* maximum_incoming_transfer_size);
1994 * @brief Sets maximum incoming transfer size to node descriptor.
1995 * @details The maximum transfer size field of the node descriptor is sixteen bits in
1996 * length, with a valid range of 0x0000-0x7fff.
1998 * This field specifies the maximum size, in octets, of the application sub-layer data unit
1999 * (ASDU) that can be transferred to this node in one single message transfer.
2001 * This value can exceed the value of the node maximum buffer size field through the use of fragmentation.
2005 * @param[in] handle The handle of node descriptor
2006 * @param[in] maximum_incoming_transfer_size 0x0000~0x7fff
2008 * @return 0 on success, otherwise a negative error value.
2009 * @retval #ZIGBEE_ERROR_NONE Successful
2010 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2011 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
2012 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2014 * @see zb_node_desc_get_maximum_buffer_size()
2016 int zb_node_desc_set_maximum_incoming_transfer_size(
2017 zb_zdo_node_descriptor_h handle,
2018 unsigned short maximum_incoming_transfer_size);
2022 * @brief Gets server mask from node descriptor.
2023 * @details The server mask field of the node descriptor is sixteen bits in length,
2024 * with bit settings signifying the system server capabilities of this node.
2026 * It is used to facilitate discovery of particular system servers by other nodes on the
2029 * The bit settings are defined in below table.
2033 * @param[in] handle The handle of node descriptor
2034 * @param[out] server_mask Bit 0 : Primary Trust Center \n
2035 * Bit 1 : Backup Trust Center \n
2036 * Bit 2 : Primary Binding Table Cache \n
2037 * Bit 3 : Backup Binding Table Cache \n
2038 * Bit 4 : Primary Discovery Cache \n
2039 * Bit 5 : Backup Discovery Cache \n
2040 * Bit 6 : Network Manager \n
2041 * Bit 7~15 : Reserved
2043 * @return 0 on success, otherwise a negative error value.
2044 * @retval #ZIGBEE_ERROR_NONE Successful
2045 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2046 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2048 * @see zb_node_desc_set_server_mask()
2050 int zb_node_desc_get_server_mask(
2051 zb_zdo_node_descriptor_h handle,
2052 unsigned short* server_mask);
2056 * @brief Sets server mask to node descriptor.
2057 * @details The server mask field of the node descriptor is sixteen bits in length,
2058 * with bit settings signifying the system server capabilities of this node.
2060 * It is used to facilitate discovery of particular system servers by other nodes on the
2063 * The bit settings are defined in below table.
2067 * @param[in] handle The handle of node descriptor
2068 * @param[in] server_mask Bit 0 : Primary Trust Center \n
2069 * Bit 1 : Backup Trust Center \n
2070 * Bit 2 : Primary Binding Table Cache \n
2071 * Bit 3 : Backup Binding Table Cache \n
2072 * Bit 4 : Primary Discovery Cache \n
2073 * Bit 5 : Backup Discovery Cache \n
2074 * Bit 6 : Network Manager \n
2075 * Bit 7~15 : Reserved
2077 * @return 0 on success, otherwise a negative error value.
2078 * @retval #ZIGBEE_ERROR_NONE Successful
2079 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2080 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
2081 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2083 * @see zb_node_desc_get_server_mask()
2085 int zb_node_desc_set_server_mask(
2086 zb_zdo_node_descriptor_h handle,
2087 unsigned short server_mask);
2091 * @brief Gets maximum outgoing transfer size from node descriptor.
2092 * @details The maximum transfer size field of the node descriptor is sixteen bits in,
2093 * length with a valid range of 0x0000-0x7fff.
2095 * This field specifies the maximum size, in octets, of the application sub-layer data unit
2096 * (ASDU) that can be transferred from this node in one single message transfer.
2098 * This value can exceed the value of the node maximum buffer size field through the use
2103 * @param[in] handle The handle of node descriptor
2104 * @param[out] maximum_outgoing_transfer_size 0x0000~0x7ffff
2106 * @return 0 on success, otherwise a negative error value.
2107 * @retval #ZIGBEE_ERROR_NONE Successful
2108 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2109 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2111 * @see zb_node_desc_set_server_mask()
2113 int zb_node_desc_get_maximum_outgoing_transfer_size(
2114 zb_zdo_node_descriptor_h handle,
2115 unsigned short* maximum_outgoing_transfer_size);
2119 * @brief Sets maximum outgoing transfer size to node descriptor.
2120 * @details The maximum transfer size field of the node descriptor is sixteen bits in,
2121 * length with a valid range of 0x0000-0x7fff.
2123 * This field specifies the maximum size,in octets, of the application sub-layer data unit
2124 * (ASDU) that can be transferred from this node in one single message transfer.
2126 * This value can exceed the value of the
2127 * node maximum buffer size field through the use of fragmentation.
2131 * @param[in] handle The handle of node descriptor
2132 * @param[in] maximum_outgoing_transfer_size 0x0000~0x7ffff
2134 * @return 0 on success, otherwise a negative error value.
2135 * @retval #ZIGBEE_ERROR_NONE Successful
2136 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2137 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
2138 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2140 * @see zb_node_desc_set_server_mask()
2142 int zb_node_desc_set_maximum_outgoing_transfer_size(
2143 zb_zdo_node_descriptor_h handle,
2144 unsigned short maximum_outgoing_transfer_size);
2148 * @brief Gets descriptor capability from node descriptor.
2149 * @details The descriptor capability field of the node descriptor is eight bits in length
2150 * , with bit settings signifying the descriptor capabilities of this node.
2152 * It is used to facilitate discovery of particular features of the descriptor fields by
2153 * other nodes on the system. The bit settings are defined in Table.
2157 * @param[in] handle The handle of node descriptor
2158 * @param[out] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
2159 * Bit 1 : Extended Simple Descriptor List Available \n
2161 * @return 0 on success, otherwise a negative error value.
2162 * @retval #ZIGBEE_ERROR_NONE Successful
2163 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2164 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2166 * @see zb_node_desc_set_descriptor_capability_field()
2168 int zb_node_desc_get_descriptor_capability_field(
2169 zb_zdo_node_descriptor_h handle,
2170 unsigned short* descriptor_capability_field);
2174 * @brief Sets descriptor capability to node descriptor.
2175 * @details The descriptor capability field of the node descriptor is eight bits in length
2176 * , with bit settings signifying the descriptor capabilities of this node.
2178 * It is used to facilitate discovery of particular features of the descriptor fields by
2179 * other nodes on the system. The bit settings are defined in Table.
2183 * @param[in] handle The handle of node descriptor
2184 * @param[in] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
2185 * Bit 1 : Extended Simple Descriptor List Available \n
2187 * @return 0 on success, otherwise a negative error value.
2188 * @retval #ZIGBEE_ERROR_NONE Successful
2189 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2190 * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
2191 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2193 * @see zb_node_desc_get_descriptor_capability_field()
2195 int zb_node_desc_set_descriptor_capability_field(
2196 zb_zdo_node_descriptor_h handle,
2197 unsigned short descriptor_capability_field);
2204 //////////////////////////////////////////////////////////////////////////////////////////
2208 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
2209 * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
2211 * @brief Zigbee provides API for Network Management.
2213 * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
2214 * \#include <zigbee.h>
2216 * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_OVERVIEW Overview
2217 * The Network Management services are really handy optional services used for reading the
2218 * various tables contained within ZigBee nodes, and to request certain common actions
2226 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_MODULE
2232 * @brief Called after receiving 'find system server request'.
2233 * @details The System_Server_Discovery_cb is generated from Remote Devices on receipt
2234 * of a System_Server_Discovery_req primitive if the parameter matches the Server
2235 * Mask field in its node descriptor. If there is no match, the
2236 * System_Server_Discovery_req shall be ignored and no response given. Matching
2237 * is performed by masking the ServerMask parameter of the
2238 * System_Server_Discovery_req with the Server Mask field in the node descriptor.
2239 * This command shall be unicast to the device which sent
2240 * System_Server_Discovery_req with Acknowledge request set in TxOptions. The
2241 * parameter ServerMask contains the bits in the parameter of the request which
2242 * match the server mask in the node descriptor.
2246 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2247 * returned value from NLME-GET.confirm primitive \n
2248 * @param[out] server_mask Server Mask Bit Assignment
2249 * @param[out] user_data user data
2251 * @see zb_zdo_system_server_discover_req()
2253 typedef void (*zb_zdo_system_server_discover_cb)(
2254 unsigned char status,
2255 unsigned short server_mask,
2260 * @brief Sends 'find system server request' command.
2261 * @details The System_Server_Discovery_req is generated from a Local Device wishing to
2262 * discover the location of a particular system server or servers as indicated by the
2263 * ServerMask parameter.
2265 * The destination addressing on this request is 'broadcast to
2266 * all devices for which macRxOnWhenIdle = TRUE.'
2269 * @privilege %http://tizen.org/privilege/zigbee
2271 * @param[in] handle The handle of zigbee
2272 * @param[in] server_mask Server Mask Bit Assignment
2273 * @param[in] cb The callback function
2274 * @param[in] user_data user data
2276 * @return 0 on success, otherwise a negative error value.
2277 * @retval #ZIGBEE_ERROR_NONE Successful
2278 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2279 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2280 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2281 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2283 * @see zb_zdo_system_server_discover_cb()
2285 int zb_zdo_system_server_discover_req(
2287 unsigned short server_mask,
2288 zb_zdo_system_server_discover_cb cb,
2293 * @brief Called after 'find node cache request' command.
2294 * @details The Find_node_cache_cb is provided to notify a Local Device of the successful
2295 * iscovery of the Primary Discovery Cache device for the given NWKAddr and
2296 * EEEAddr fields supplied in the request, or to signify that the device of interest is
2297 * apable of responding to discovery requests.
2299 * The Find_node_cache_cb shall be
2300 * enerated only by Primary Discovery Cache devices holding discovery
2301 * nformation for the NWKAddr and IEEEAddr in the request or the device of
2302 * nterest itself and all other Remote Devices shall not supply a response.
2306 * @param[in] cache_nwk_addr NWK Address for the Primary Discovery Cache device holding
2307 * the discovery information.
2308 * @param[out] addr16 Server NWK Address for the device of interest.
2309 * @param[out] addr64 Server IEEE Address for the device of interest.
2310 * @param[out] user_data user data
2312 * @see zb_zdo_find_node_cache_req()
2314 typedef void (*zb_zdo_find_node_cache_cb)(
2315 zb_nwk_addr cache_nwk_addr,
2317 zb_ieee_addr addr64,
2322 * @brief Sends 'find Node cache store request' command.
2323 * @details The Find_node_cache_req is provided to enable ZigBee devices on the network to
2324 * broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a
2325 * device on the network that holds discovery information for the device of interest,
2326 * as specified in the request parameters.
2328 * The effect of a successful
2329 * Find_node_cache_req is to have the Primary Discovery Cache device, holding
2330 * discovery information for the device of interest, unicast a Find_node_cache_cb
2331 * back to the Local Device. Note that, like the NWK_addr_req, only the device
2332 * meeting this criteria shall respond to the request generated by
2333 * Find_node_cache_req.
2336 * @privilege %http://tizen.org/privilege/zigbee
2338 * @param[in] handle The handle of zigbee
2339 * @param[in] addr16 Network address for device of interest
2340 * @param[in] addr64 IEEE address for device of interest
2341 * @param[in] cb Response callback
2342 * @param[in] user_data user data
2344 * @return 0 on success, otherwise a negative error value.
2345 * @retval #ZIGBEE_ERROR_NONE Successful
2346 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2347 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2348 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2349 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2351 * @see zb_zdo_remove_node_cache_cb()
2353 int zb_zdo_find_node_cache_req(
2356 zb_ieee_addr addr64,
2357 zb_zdo_find_node_cache_cb cb,
2362 * @brief Called after 'find discovery cache request' command.
2363 * @details The Find_node_cache_cb is provided to notify a Local Device of the successful
2364 * discovery of the Primary Discovery Cache device for the given NWKAddr and
2365 * IEEEAddr fields supplied in the request, or to signify that the device of interest is
2366 * capable of responding to discovery requests.
2368 * The Find_node_cache_cb shall be
2369 * generated only by Primary Discovery Cache devices holding discovery
2370 * information for the NWKAddr and IEEEAddr in the request or the device of
2371 * interest itself and all other Remote Devices shall not supply a response.
2375 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2376 * returned value from NLME-GET.confirm primitive \n
2377 * @param[out] user_data user data
2379 * @see zb_zdo_discovery_cache_req()
2381 typedef void (*zb_zdo_discovery_cache_cb)(
2382 unsigned char status,
2387 * @brief Sends 'discovery cache request' command.
2388 * @details The Discovery_Cache_req is provided to enable devices on the network to locate
2389 * a Primary Discovery Cache device on the network.
2391 * The destination addressing on
2392 * this primitive shall be broadcast to all devices for which macRxOnWhenIdle =
2396 * @privilege %http://tizen.org/privilege/zigbee
2398 * @param[in] handle The handle of zigbee
2399 * @param[in] addr16 Network address for device of interest
2400 * @param[in] addr64 IEEE address for device of interest
2401 * @param[in] cb Response callback
2402 * @param[in] user_data user data
2404 * @return 0 on success, otherwise a negative error value.
2405 * @retval #ZIGBEE_ERROR_NONE Successful
2406 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2407 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2408 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2409 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2411 * @see zb_zdo_remove_node_cache_cb()
2413 int zb_zdo_discovery_cache_req(
2416 zb_ieee_addr addr64,
2417 zb_zdo_discovery_cache_cb cb,
2422 * @brief Called after 'find discovery store request' command.
2423 * @details The Discovery_store_cb is provided to notify a Local Device of the request status
2424 * from a Primary Discovery Cache device. Included in the response is a status code
2425 * to notify the Local Device whether the request is successful (the Primary Cache
2426 * Device has space to store the discovery cache data for the Local Device), whether
2427 * the request is unsupported (meaning the Remote Device is not a Primary
2428 * Discovery Cache device), or insufficient space exists.
2432 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2433 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2434 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2435 * @param[out] user_data user data
2437 * @see zb_zdo_discovery_store_req()
2439 typedef void (*zb_zdo_discovery_store_cb)(
2440 unsigned char status,
2445 * @brief Sends 'discovery store request' command.
2446 * @details The Discovery_store_req is provided to enable ZigBee end devices on the
2447 * network to request storage of their discovery cache information on a Primary
2448 * Discovery Cache device.
2450 * Included in the request is the amount of storage space the Local Device requires.
2451 * The destination addressing on this request is unicast.
2454 * @privilege %http://tizen.org/privilege/zigbee
2456 * @param[in] handle The handle of zigbee
2457 * @param[in] addr16 Network address for device of interest
2458 * @param[in] addr64 IEEE address for device of interest
2459 * @param[in] node_desc_size Size of node description structure
2460 * @param[in] power_desc_size Size of power description structure
2461 * @param[in] active_ep_size Number of active EP
2462 * @param[in] simple_desc_count Number of simple description structure
2463 * @param[in] simple_desc_list Pointer of simple description structure size
2464 * @param[in] cb Response callback
2465 * @param[in] user_data user data
2467 * @return 0 on success, otherwise a negative error value.
2468 * @retval #ZIGBEE_ERROR_NONE Successful
2469 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2470 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2471 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2472 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2474 * @see zb_zdo_remove_node_cache_cb()
2476 int zb_zdo_discovery_store_req(
2479 zb_ieee_addr addr64,
2480 unsigned char node_desc_size,
2481 unsigned char power_desc_size,
2482 unsigned char active_ep_size,
2483 unsigned char simple_desc_count,
2484 unsigned char *simple_desc_list,
2485 zb_zdo_discovery_store_cb cb,
2490 * @brief Called after 'node description store request' command.
2491 * @details The Node_store_cb is provided to notify a Local Device of the request status
2492 * from a Primary Discovery Cache device.
2494 * Included in the response is a status code
2495 * to notify the Local Device whether the request is successful (the Primary Cache
2496 * Device has space to store the discovery cache data for the Local Device), whether
2497 * the request is not supported (meaning the Remote Device is not a Primary
2498 * Discovery Cache device), or insufficient space exists.
2502 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2503 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2504 * #ZB_ZDP_STATUS_NOT_PERMITTED \n
2505 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2506 * @param[out] user_data user data
2508 * @see zb_zdo_node_desc_store_req()
2510 typedef void (*zb_zdo_node_desc_store_cb)(
2511 unsigned char status,
2516 * @brief Sends 'node description store request' command.
2517 * @details The Node_Desc_store_req is provided to enable ZigBee end devices on the
2518 * network to request storage of their Node Descriptor on a Primary Discovery
2519 * Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status from a
2520 * Discovery_store_req to the same Primary Discovery Cache device.
2522 * Included in this request is the Node Descriptor the Local Device wishes to cache.
2525 * @privilege %http://tizen.org/privilege/zigbee
2527 * @param[in] handle The handle of zigbee
2528 * @param[in] addr16 Network address for device of interest
2529 * @param[in] addr64 IEEE address for device of interest
2530 * @param[in] nodedsc Pointer of node description structure
2531 * @param[in] cb Response callback
2532 * @param[in] user_data user data
2534 * @return 0 on success, otherwise a negative error value.
2535 * @retval #ZIGBEE_ERROR_NONE Successful
2536 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2537 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2538 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2539 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2541 * @see zb_zdo_remove_node_cache_cb()
2543 int zb_zdo_node_desc_store_req(
2546 zb_ieee_addr addr64,
2547 zb_zdo_node_descriptor_h nodedsc,
2548 zb_zdo_node_desc_store_cb cb,
2553 * @brief Called after 'power description store request' command.
2554 * @details The Power_Desc_store_cb is provided to notify a Local Device of the request
2555 * status from a Primary Discovery Cache device. Included in the response is a status
2556 * code to notify the Local Device whether the request is successful (the Primary
2557 * Cache Device has space to store the discovery cache data for the Local Device),
2558 * whether the request is not supported (meaning the Remote Device is not a Primary
2559 * Discovery Cache device), or insufficient space exists.
2563 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2564 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2565 * #ZB_ZDP_STATUS_NOT_PERMITTED \n
2566 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2567 * @param[out] user_data user data
2569 * @see zb_zdo_power_desc_store_req()
2571 typedef void (*zb_zdo_power_desc_store_cb)(
2572 unsigned char status,
2577 * @brief Sends 'power description store request' command.
2578 * @details The Power_Desc_store_req is provided to enable ZigBee end devices on the
2579 * network to request storage of their Power Descriptor on a Primary Discovery
2580 * Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status from a
2581 * Discovery_store_req to the same Primary Discovery Cache device. Included in
2582 * this request is the Power Descriptor the Local Device wishes to cache.
2585 * @privilege %http://tizen.org/privilege/zigbee
2587 * @param[in] handle The handle of zigbee
2588 * @param[in] addr16 Network address for device of interest
2589 * @param[in] addr64 IEEE address for device of interest
2590 * @param[in] powerdsc Pointer of power description structure
2591 * @param[in] cb Response callback
2592 * @param[in] user_data user data
2594 * @return 0 on success, otherwise a negative error value.
2595 * @retval #ZIGBEE_ERROR_NONE Successful
2596 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2597 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2598 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2599 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2601 * @see zb_zdo_remove_node_cache_cb()
2603 int zb_zdo_power_desc_store_req(
2606 zb_ieee_addr addr64,
2607 zb_zdo_node_power_descriptor_h powerdsc,
2608 zb_zdo_power_desc_store_cb cb,
2613 * @brief Called after 'active end-point store request' command.
2614 * @details The Active_EP_store_cb is provided to notify a Local Device of the request
2615 * status from a Primary Discovery Cache device.
2617 * Included in the response is a status
2618 * code to notify the Local Device whether the request is successful (the Primary
2619 * Cache Device has space to store the discovery cache data for the Local Device),
2620 * the request is not supported (meaning the Remote Device is not a Primary
2621 * Discovery Cache device), or insufficient space exists.
2625 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2626 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2627 * #ZB_ZDP_STATUS_NOT_PERMITTED \n
2628 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2629 * @param[out] user_data user data
2631 * @see zb_zdo_active_ep_store_req()
2633 typedef void (*zb_zdo_active_ep_store_cb)(
2634 unsigned char status,
2639 * @brief Sends 'active end-point store request' command.
2640 * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
2641 * network to request storage of their list of Simple Descriptors on a Primary
2642 * Discovery Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status
2643 * from a Discovery_store_req to the same Primary Discovery Cache device. Note that each
2644 * Simple Descriptor for every active endpoint on the Local Device must be
2645 * individually uploaded to the Primary Discovery Cache device via this command
2646 * to enable cached discovery.
2648 * Included in this request is the length of the Simple
2649 * Descriptor the Local Device wishes to cache and the Simple Descriptor itself.
2651 * The endpoint is a field within the Simple Descriptor and is accessed by the Remote
2652 * Device to manage the discovery cache information for the Local Device.
2655 * @privilege %http://tizen.org/privilege/zigbee
2657 * @param[in] handle The handle of zigbee
2658 * @param[in] addr16 Network address for device of interest
2659 * @param[in] addr64 IEEE address for device of interest
2660 * @param[in] active_ep_count Number of End-point List
2661 * @param[in] ep_list End-point list
2662 * @param[in] cb Response callback
2663 * @param[in] user_data user data
2665 * @return 0 on success, otherwise a negative error value.
2666 * @retval #ZIGBEE_ERROR_NONE Successful
2667 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2668 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2669 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2670 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2672 * @see zb_zdo_remove_node_cache_cb()
2674 int zb_zdo_active_ep_store_req(
2677 zb_ieee_addr addr64,
2678 unsigned char active_ep_count,
2679 unsigned char *ep_list,
2680 zb_zdo_active_ep_store_cb cb,
2685 * @brief Called after 'simple description store request' command.
2686 * @details The Simple_Desc_store_cb is provided to notify a Local Device of the request
2687 * status from a Primary Discovery Cache device.
2689 * Included in the response is a status
2690 * code to notify the Local Device whether the request is successful (the Primary
2691 * Cache Device has space to store the discovery cache data for the Local Device),
2692 * the request is not supported (meaning the Remote Device is not a Primary
2693 * Discovery Cache device), or insufficient space exists.
2697 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2698 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2699 * #ZB_ZDP_STATUS_NOT_PERMITTED \n
2700 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2701 * @param[out] user_data user data
2703 * @see zb_zdo_simple_desc_store_req()
2705 typedef void (*zb_zdo_simple_desc_store_cb)(
2706 unsigned char status,
2711 * @brief Sends 'simple description store request' command.
2712 * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
2713 * network to request storage of their list of Simple Descriptors on a Primary
2714 * Discovery Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status
2715 * from a Discovery_store_req to the same Primary Discovery Cache device.
2718 * Simple Descriptor for every active endpoint on the Local Device must be
2719 * individually uploaded to the Primary Discovery Cache device via this command
2720 * to enable cached discovery.
2722 * Included in this request is the length of the Simple
2723 * Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The
2724 * endpoint is a field within the Simple Descriptor and is accessed by the Remote
2725 * Device to manage the discovery cache information for the Local Device.
2728 * @privilege %http://tizen.org/privilege/zigbee
2730 * @param[in] handle The handle of zigbee
2731 * @param[in] addr16 Network address for device of interest
2732 * @param[in] addr64 IEEE address for device of interest
2733 * @param[in] simpledsc Pointer of simple description structure
2734 * @param[in] cb Response callback
2735 * @param[in] user_data user data
2737 * @return 0 on success, otherwise a negative error value.
2738 * @retval #ZIGBEE_ERROR_NONE Successful
2739 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2740 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2741 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2742 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2744 * @see zb_zdo_remove_node_cache_cb()
2746 int zb_zdo_simple_desc_store_req(
2749 zb_ieee_addr addr64,
2750 zb_zdo_simple_desc_h simpledsc,
2751 zb_zdo_simple_desc_store_cb cb,
2756 * @brief Called after 'simple description remove request' command.
2757 * @details The Remove_node_cache_cb is provided to notify a Local Device of the request
2758 * status from a Primary Discovery Cache device.
2760 * Included in the response is a status
2761 * code to notify the Local Device whether the request is successful (the Primary
2762 * Cache Device has removed the discovery cache data for the indicated device of
2763 * interest), or the request is not supported (meaning the Remote Device is not a
2764 * Primary Discovery Cache device).
2768 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2769 * #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
2770 * #ZB_ZDP_STATUS_NOT_PERMITTED \n
2771 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2772 * @param[out] user_data user data
2774 * @see zb_zdo_remove_node_cache_req()
2776 typedef void (*zb_zdo_remove_node_cache_cb)(
2777 unsigned char status,
2782 * @brief Sends 'remove node cache request' command.
2783 * @details The Remove_node_cache_req is provided to enable ZigBee devices on the
2784 * network to request removal of discovery cache information for a specified ZigBee
2785 * end device from a Primary Discovery Cache device.
2787 * The effect of a successful
2788 * Remove_node_cache_req is to undo a previously successful Discovery_store_req
2789 * and additionally remove any cache information stored on behalf of the specified
2790 * ZigBee end device on the Primary Discovery Cache device.
2793 * @privilege %http://tizen.org/privilege/zigbee
2795 * @param[in] handle The handle of zigbee
2796 * @param[in] addr16 Network address for device of interest
2797 * @param[in] addr64 IEEE address for device of interest
2798 * @param[in] cb Response callback
2799 * @param[in] user_data user data
2801 * @return 0 on success, otherwise a negative error value.
2802 * @retval #ZIGBEE_ERROR_NONE Successful
2803 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2804 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2805 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2806 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2808 * @see zb_zdo_remove_node_cache_cb()
2810 int zb_zdo_remove_node_cache_req(
2813 zb_ieee_addr addr64,
2814 zb_zdo_remove_node_cache_cb cb,
2821 //////////////////////////////////////////////////////////////////////////////////////////
2825 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
2826 * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
2828 * @brief Zigbee provides API for Network Management.
2830 * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
2831 * \#include <zigbee.h>
2833 * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_OVERVIEW Overview
2834 * The Network Management services are really handy optional services used for reading the
2835 * various tables contained within ZigBee nodes, and to request certain common actions
2843 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE
2849 * @brief Called after 'network management discovery request' command.
2850 * @details The Mgmt_NWK_Disc_cb is generated in response to an Mgmt_NWK_Disc_req.
2851 * If this management command is not supported, a status of NOT_SUPPORTED shall be
2852 * returned and all parameter fields after the Status field shall be omitted.
2854 * Otherwise, the Remote Device shall implement the following process.
2856 * Upon receipt of and after support for the Mgmt_NWK_Disc_req has been verified,
2857 * the Remote Device shall issue an NLME-NETWORK-DISCOVERY.request primitive using the
2858 * ScanChannels and ScanDuration parameters, supplied in the Mgmt_NWK_Disc_req command.
2860 * Upon receipt of the NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall
2861 * report the results, starting with the StartIndex element, via the Mgmt_NWK_Disc_cb
2864 * The NetworkList field shall contain whole NetworkList records, formatted as specified
2865 * in Table 2.125 in Zigbee specification, until the limit on MSDU size, i.e.,
2866 * aMaxMACFrameSize is reached. The number of results reported shall be set in the
2871 * @remarks The @a nwk_list can be used only in the callback. To use outside, make a copy.
2873 * @param[out] status ZB_ZDP_STATUS_NOT_SUPPORTED or returned value from NLME-NETWORK.DISCOVERY.
2875 * @param[out] network_count The total number of networks reported by the NLME-NETWORK-
2876 * DISCOVERY.confirm.
2877 * @param[out] start_idx The starting point in the NetworkList from the NLME-NETWORK-
2878 * DISCOVERY.confirm where reporting begins for this response.
2879 * @param[out] network_list_count The number of network list descriptors reported within
2881 * @param[out] nwk_list A list of network list descriptors.
2882 * @param[out] user_data User data
2884 * @see zb_zdo_mgmt_nwk_disc_req()
2886 typedef void (*zb_zdo_mgmt_nwk_disc_cb)(
2887 zb_zdp_status_e status,
2888 unsigned char network_count,
2889 unsigned char start_idx,
2890 unsigned char network_list_count,
2891 const zb_zdo_network_list_record_h *nwk_list,
2896 * @brief Bitmask to scan all 802.15.4 channels.
2899 #define ZB_802_15_4_CHANNELS_MASK 0x07FFF800UL
2903 * @brief Sends 'network discover management request' command.
2904 * @details The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the
2905 * Remote Device execute a Scan to report back networks in the vicinity of the Local
2908 * The destination addressing on this command shall be unicast.
2912 * @privilege %http://tizen.org/privilege/zigbee
2914 * @param[in] handle The handle of zigbee
2915 * @param[in] addr16 destination address
2916 * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
2917 * The 27 least significant bits (b0, b1,... b26) indicate
2918 * which channels are to be scanned (1 = scan, 0 = do not scan)
2919 * for each of the 27 valid channels.
2920 * @param[in] scan_duration A value used to calculate the length of time to spend
2921 * scanning each channel. The time spent scanning each channel is
2922 * (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
2923 * the value of the ScanDuration parameter. For more information
2924 * on MAC sub-layer scanning
2925 * @param[in] scan_count A number of beacon-request in one scan-duration
2926 * @param[in] start_idx Starting index
2927 * @param[in] cb Response callback
2928 * @param[in] user_data user data
2930 * @return 0 on success, otherwise a negative error value.
2931 * @retval #ZIGBEE_ERROR_NONE Successful
2932 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2933 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2934 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2935 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2936 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2938 * @see zb_zdo_mgmt_nwk_disc_cb()
2940 int zb_zdo_mgmt_nwk_disc_req(
2943 unsigned int scan_channels,
2944 unsigned char scan_duration,
2945 unsigned char scan_count,
2946 unsigned char start_idx,
2947 zb_zdo_mgmt_nwk_disc_cb cb,
2952 * @brief Called after 'network management LQI request' command.
2953 * @details The Recover_Source_Bind_cb is generated from a backup binding table cache
2954 * device in response to a Recover_Source_Bind_req from a primary binding table
2955 * cache and contains the status of the request. This command shall be unicast to the
2956 * requesting device.
2958 * If the responding device is not a backup binding table cache, it shall return a status
2959 * of #ZB_ZDP_STATUS_NOT_SUPPORTED. If the originator of the request is not recognized as
2960 * a primary binding table cache, it shall return a status of
2961 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE.
2963 * Otherwise, the backup binding table cache shall prepare a list of binding table
2964 * entries from its backup beginning with StartIndex.
2966 * It will fit in as many entries as possible into a Recover_Source_Bind_cb command and
2967 * return a status of #ZB_ZDP_STATUS_SUCCESS.
2969 * If StartIndex is more than the number of entries in the Source table, a status of
2970 * #ZB_ZDP_STATUS_NO_ENTRY is returned.
2972 * For a successful response, SourceTableEntries is the total number of entries in the
2973 * backup source table, and SourceTableListCount is the number of entries which is being
2974 * returned in the response.
2978 * @remarks The @a neighbor_table_list can be used only in the callback. To use outside, make a copy.
2980 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
2981 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
2982 * #ZB_ZDP_STATUS_TABLE_FULL \n
2983 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
2984 * #ZB_ZDP_STATUS_NO_ENTRY \n
2985 * @param[out] neighbor_table_entries Total number of neighbor table entries in the backup
2987 * @param[out] start_idx Starting index within the neighbor table to begin reporting for
2988 * the neighbor table list.
2989 * @param[out] neighbor_table_list_count The number of neighbor table entries included
2990 * within neighbor table list.
2991 * @param[out] neighbor_table_list A list of neighbor table list.
2992 * @param[out] user_data User data
2994 * @see zb_zdo_mgmt_lqi_req()
2996 typedef void (*zb_zdo_mgmt_lqi_cb)(
2997 zb_zdp_status_e status,
2998 unsigned char neighbor_table_entries,
2999 unsigned char start_idx,
3000 unsigned char neighbor_table_list_count,
3001 const zb_zdo_neighbor_table_desc_h *neighbor_table_list,
3006 * @brief Sends 'LQI management request' command.
3007 * @details The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a
3008 * neighbor list for the Remote Device along with associated LQI values to each
3009 * neighbor. The destination addressing on this command shall be unicast only and
3010 * the destination address must be that of a ZigBee Coordinator or ZigBee Router.
3014 * @privilege %http://tizen.org/privilege/zigbee
3016 * @param[in] handle The handle of zigbee
3017 * @param[in] addr16 destination address
3018 * @param[in] start_idx Starting index for the requested elements of the neighbor table
3019 * @param[in] cb Response callback
3020 * @param[in] user_data user data
3022 * @return 0 on success, otherwise a negative error value.
3023 * @retval #ZIGBEE_ERROR_NONE Successful
3024 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3025 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3026 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3027 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3028 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3030 * @see zb_zdo_mgmt_lqi_cb()
3032 int zb_zdo_mgmt_lqi_req(
3035 unsigned char start_idx,
3036 zb_zdo_mgmt_lqi_cb cb,
3041 * @brief Called after 'routing management request' command.
3042 * @details The Mgmt_Rtg_cb is generated in response to an Mgmt_Rtg_req. If this
3043 * management command is not supported, a status of #ZB_ZDP_STATUS_NOT_SUPPORTED shall be
3044 * returned and all parameter fields after the Status field shall be omitted. Otherwise,
3045 * the Remote Device shall implement the following processing.
3047 * Upon receipt of and after support for the Mgmt_Rtg_req has been verified, the
3048 * Remote Device shall perform an NLME-GET.request (for the nwkRouteTable
3049 * attribute) and process the resulting NLME-GET.confirm (containing the
3050 * nwkRouteTable attribute) to create the Mgmt_Rtg_cb command.
3052 * The Mgmt_Rtg_cb command shall contain the same status that was contained in the
3053 * NLME-GET.confirm primitive and if this was not #ZB_ZDP_STATUS_SUCCESS, all parameter
3054 * fields after the status field shall be omitted.
3058 * @remarks The @a routing_table_list can be used only in the callback. To use outside, make a copy.
3060 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3061 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3062 * returned value from NLME-GET.confirm primitive \n
3063 * @param[out] routing_table_entries Total number of routing table entries within the
3065 * @param[out] start_idx Starting index within the Routing Table to begin reporting for
3066 * the RoutingTableList.
3067 * @param[out] routing_table_list_count The number of routing table entries included
3068 * within RoutingTableList.
3069 * @param[out] routing_table_list A list of routing table list.
3070 * @param[out] user_data User data
3072 * @see zb_zdo_mgmt_rtg_req()
3074 typedef void (*zb_zdo_mgmt_rtg_cb)(
3075 zb_zdp_status_e status,
3076 unsigned char routing_table_entries,
3077 unsigned char start_idx,
3078 unsigned char routing_table_list_count,
3079 const zb_zdo_routing_table_h *routing_table_list,
3084 * @brief Sends 'routing management request' command.
3085 * @details The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the
3086 * contents of the Routing Table from the Remote Device. The destination
3087 * addressing on this command shall be unicast only and the destination address
3088 * must be that of the ZigBee Router or ZigBee Coordinator.
3092 * @privilege %http://tizen.org/privilege/zigbee
3094 * @param[in] handle The handle of zigbee
3095 * @param[in] addr16 destination network address
3096 * @param[in] start_idx Starting index for the requested elements of the routing table
3097 * @param[in] cb Response callback
3098 * @param[in] user_data user data
3100 * @return 0 on success, otherwise a negative error value.
3101 * @retval #ZIGBEE_ERROR_NONE Successful
3102 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3103 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3104 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3105 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3106 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3108 * @see zb_zdo_mgmt_rtg_cb()
3110 int zb_zdo_mgmt_rtg_req(
3113 unsigned char start_idx,
3114 zb_zdo_mgmt_rtg_cb cb,
3119 * @brief Called after 'binding management request' command.
3120 * @details The Mgmt_Bind_cb is generated in response to a Mgmt_Bind_req. If this
3121 * management command is not supported, a status of #ZB_ZDP_STATUS_NOT_SUPPORTED shall be
3122 * returned and all parameter fields after the Status field shall be omitted. Otherwise,
3123 * the Remote Device shall implement the following processing.
3125 * Upon receipt of and after support for the Mgmt_Bind_req has been verified, the
3126 * Remote Device shall perform an APSME-GET.request (for the apsBindingTable
3127 * attribute) and process the resulting APSME-GET.confirm (containing the
3128 * apsBindingTable attribute) to create the Mgmt_Bind_cb command. The
3129 * Mgmt_Bind_cb command shall contain the same status that was contained in the
3130 * APSME-GET.confirm primitive and if this was not #ZB_ZDP_STATUS_SUCCESS, all parameter
3131 * fields after the status field shall be omitted.
3133 * From the apsBindingTable attribute, the binding table shall be accessed, starting
3134 * with the index specified by StartIndex, and moved to the BindingTableList field of
3135 * the Mgmt_Bind_cb command. The entries reported from the binding table shall
3136 * be those, starting with StartIndex and including whole BindingTableList records
3137 * until the MSDU size limit, i.e., aMaxMACFrameSize,
3138 * is reached. Within the Mgmt_Bind_Rsp command, the BindingTableEntries field
3139 * shall represent the total number of Binding Table entries in the Remote Device.
3140 * The BindingTableListCount field shall be the number of entries reported in the
3141 * BindingTableList field of the Mgmt_Bind_req command.
3145 * @remarks The @a binding_table_list can be used only in the callback. To use outside, make a copy.
3147 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3148 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3149 * returned value from NLME-GET.confirm primitive \n
3150 * @param[out] binding_table_entries Total number of Binding Table entries within the
3152 * @param[out] start_idx Starting index within the Binding Table to begin reporting for
3153 * the BindingTableList.
3154 * @param[out] binding_table_list_count The number of binding table entries included
3155 * within BindingTableList.
3156 * @param[out] binding_table_list A list of routing table list.
3157 * @param[out] user_data User data
3159 * @see zb_zdo_mgmt_bind_req()
3161 typedef void (*zb_zdo_mgmt_bind_cb)(
3162 zb_zdp_status_e status,
3163 unsigned char binding_table_entries,
3164 unsigned char start_idx,
3165 unsigned char binding_table_list_count,
3166 const zb_zdo_binding_table_h *binding_table_list,
3171 * @brief Sends 'binding management request' command.
3172 * @details The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the
3173 * contents of the Binding Table from the Remote Device.
3175 * The destination addressing on this command shall be unicast only and the destination address
3176 * must be that of a Primary binding table cache or source device holding its own
3181 * @privilege %http://tizen.org/privilege/zigbee
3183 * @param[in] handle The handle of zigbee
3184 * @param[in] addr16 destination network address
3185 * @param[in] start_idx Starting index for the requested elements of the binding table
3186 * @param[in] cb Response callback
3187 * @param[in] user_data user data
3189 * @return 0 on success, otherwise a negative error value.
3190 * @retval #ZIGBEE_ERROR_NONE Successful
3191 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3192 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3193 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3194 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3195 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3197 * @see zb_zdo_mgmt_bind_cb()
3199 int zb_zdo_mgmt_bind_req(
3202 unsigned char start_idx,
3203 zb_zdo_mgmt_bind_cb cb,
3208 * @brief Called after 'direct join management request' command.
3209 * @details The Mgmt_Direct_Join_cb is generated in response to a Mgmt_Direct_Join_req.
3210 * If this management command is not supported, a status of NOT_SUPPORTED
3211 * shall be returned.
3213 * Otherwise, the Remote Device shall implement the following processing.
3214 * Upon receipt and after support for the Mgmt_Direct_Join_req has been verified,
3215 * the Remote Device shall execute the NLME-DIRECT-JOIN.request to directly
3216 * associate the DeviceAddress contained in the Mgmt_Direct_Join_req to the
3219 * The Mgmt_Direct_Join_cb shall contain the same status that was
3220 * contained in the NLME-DIRECT-JOIN.confirm primitive.
3224 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3225 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3226 * #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
3227 * returned value from NLME-DIRECT-JOIN.confirm primitive \n
3228 * @param[out] user_data User data
3230 * @see zb_zdo_mgmt_direct_join_cb()
3232 typedef void (*zb_zdo_mgmt_direct_join_cb)(
3233 unsigned char status,
3238 * @brief Sends 'direct join device management request' command.
3239 * @details The Mgmt_Direct_Join_req is generated from a Local Device requesting that a
3240 * Remote Device permit a device designated by DeviceAddress to join the network directly.
3242 * The Mgmt_Direct_Join_req is generated by a management application
3243 * which directs the request to a Remote Device where the NLME-DIRECT-
3244 * JOIN.request is to be executed using the parameter supplied by
3245 * Mgmt_Direct_Join_req.
3248 * @privilege %http://tizen.org/privilege/zigbee
3250 * @param[in] handle The handle of zigbee
3251 * @param[in] addr64 The IEEE address for designated device to leave
3252 * @param[in] capability Capability (See zb_zdp_mac_capability_field_e in zb_zdo.h header)
3253 * @param[in] cb Response callback
3254 * @param[in] user_data user data
3256 * @return 0 on success, otherwise a negative error value.
3257 * @retval #ZIGBEE_ERROR_NONE Successful
3258 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3259 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3260 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3261 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3262 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3264 * @see zb_zdo_mgmt_direct_join_cb()
3266 int zb_zdo_mgmt_direct_join_req(
3268 zb_ieee_addr addr64,
3269 unsigned char capability,
3270 zb_zdo_mgmt_direct_join_cb cb,
3275 * @brief Called after 'cache management request' command.
3276 * @details The Mgmt_Cache_cb is generated in response to an Mgmt_Cache_req. If this
3277 * management command is not supported, or the Remote Device is not a Primary
3278 * Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter
3279 * fields after the Status field shall be omitted. Otherwise, the Remote Device shall
3280 * implement the following processing.
3282 * Upon receipt of the Mgmt_Cache_req and after support for the Mgmt_Cache_req has been verified,
3283 * the Remote Device shall access an internally maintained list of registered ZigBee End Devices utilizing the
3284 * discovery cache on this Primary Discovery Cache device. The entries reported
3285 * shall be those, starting with StartIndex and including whole DiscoveryCacheList
3286 * records until the limit on MSDU size, i.e., aMaxMACFrameSize is reached.
3288 * Within the Mgmt_Cache_cb command, the
3289 * DiscoveryCacheListEntries field shall represent the total number of registered
3290 * entries in the Remote Device. The parameter DiscoveryCacheListCount shall be
3291 * the number of entries reported in the DiscoveryCacheList field of the
3292 * Mgmt_Cache_cb command.
3296 * @remarks The @a discover_cache_list can be used only in the callback. To use outside, make a copy.
3298 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3299 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3300 * @param[out] discovery_cache_entries discovery cache entries
3301 * @param[out] start_idx data User data
3302 * @param[out] discovery_cache_list_count The list shall contain the number of elements
3303 * given by the DiscoveryCacheListCount parameter.
3304 * @param[out] discover_cache_list A list of descriptors.
3305 * @param[out] user_data User data
3307 * @see zb_zdo_mgmt_cache_req()
3309 typedef void (*zb_zdo_mgmt_cache_cb)(
3310 unsigned char status,
3311 unsigned char discovery_cache_entries,
3312 unsigned char start_idx,
3313 unsigned char discovery_cache_list_count,
3314 const zb_zdo_discovery_cache_h *discover_cache_list,
3319 * @brief Sends 'cache management request' command.
3320 * @details The Mgmt_Cache_req is provided to enable ZigBee devices on the network to
3321 * retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache
3324 * The destination addressing on this primitive shall be unicast.
3327 * @privilege %http://tizen.org/privilege/zigbee
3329 * @param[in] handle The handle of zigbee
3330 * @param[in] addr16 destination network address
3331 * @param[in] start_idx Starring index for the requested elements of the discover cache
3333 * @param[in] cb Response callback
3334 * @param[in] user_data user data
3336 * @return 0 on success, otherwise a negative error value.
3337 * @retval #ZIGBEE_ERROR_NONE Successful
3338 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3339 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3340 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3341 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3343 * @see zb_zdo_mgmt_cache_cb()
3345 int zb_zdo_mgmt_cache_req(
3348 unsigned char start_idx,
3349 zb_zdo_mgmt_cache_cb cb,
3355 * @brief Called after 'leave management request' command.
3356 * @details The Mgmt_Leave_cb is generated in response to a Mgmt_Leave_req.
3358 * If this management command is not supported, a status of NOT_SUPPORTED shall be
3359 * returned. Otherwise, the Remote Device shall implement the following
3362 * Upon receipt of and after support for the Mgmt_Leave_req has been verified, the
3363 * Remote Device shall execute the NLME-LEAVE.request to disassociate from the
3364 * currently associated network. The Mgmt_Leave_cb shall contain the same status
3365 * that was contained in the NLME-LEAVE.confirm primitive.
3367 * Once a device has disassociated, it may execute pre-programmed logic to perform
3368 * NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network.
3372 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3373 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3374 * #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
3375 * returned value from NLME-LEAVE.confirm primitive \n
3376 * @param[in] user_data User data
3378 * @see zb_zdo_mgmt_leave_req()
3380 typedef void (*zb_zdo_mgmt_leave_cb)(
3381 zb_zdp_status_e status,
3386 * @brief Sends 'leave device management request' command.
3387 * @details The Mgmt_Leave_req is generated from a Local Device requesting that a Remote
3388 * Device leave the network or to request that another device leave the network.
3389 * The Mgmt_Leave_req is generated by a management application which directs the
3390 * request to a Remote Device where the NLME-LEAVE.request is to be executed
3391 * using the parameter supplied by Mgmt_Leave_req.
3395 * @privilege %http://tizen.org/privilege/zigbee
3397 * @param[in] handle The handle of zigbee
3398 * @param[in] addr64 The IEEE address for designated device to leave
3399 * @param[in] remove_children This field has a value of 1 if the device being asked to
3400 * leave the network is also being asked to remove its child
3401 * devices, if any. Otherwise, it has a value of 0.
3402 * @param[in] rejoin This field has a value of 1 if the device being asked to leave from
3403 * the current parent is requested to rejoin the network. Otherwise,
3404 * it has a value of 0.
3405 * @param[in] cb Response callback
3406 * @param[in] user_data user data
3408 * @return 0 on success, otherwise a negative error value.
3409 * @retval #ZIGBEE_ERROR_NONE Successful
3410 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3411 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3412 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3413 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3414 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3415 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3417 * @see zb_zdo_mgmt_leave_cb()
3419 int zb_zdo_mgmt_leave_req(
3421 zb_ieee_addr addr64,
3422 bool remove_children,
3424 zb_zdo_mgmt_leave_cb cb,
3429 * @brief Called after 'permit joining management request' command.
3430 * @details The Mgmt_Permit_Joining_cb is generated in response to a unicast
3431 * Mgmt_Permit_Joining_req.
3433 * In the description which follows, note that no
3434 * response shall be sent if the Mgmt_Permit_Joining_req was received as a
3435 * broadcast to all routers. If this management command is not permitted by the
3436 * requesting device, a status of INVALID_REQUEST shall be returned.
3438 * Upon receipt and after support for Mgmt_Permit_Joining_req has been verified, the
3439 * Remote Device shall execute the NLME-PERMIT-JOINING.request.
3441 * The Mgmt_Permit-Joining_cb shall contain the same status that was contained in the
3442 * NLME-PERMIT-JOINING.confirm primitive.
3446 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
3447 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
3448 * #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
3449 * returned value from NLME-DIRECT-JOINING.confirm primitive \n
3450 * @param[out] user_data User data
3452 * @see zb_zdo_mgmt_direct_join_cb()
3454 typedef void (*zb_zdo_mgmt_permit_joining_cb)(
3455 zb_zdp_status_e status,
3460 * @brief Sends 'permit join device management request' command.
3461 * @details The Mgmt_Permit_Joining_req is generated from a Local Device requesting that
3462 * a remote device or devices allow or disallow association. The
3463 * Mgmt_Permit_Joining_req is generated by a management application or
3464 * commissioning tool which directs the request to a remote device(s) where the
3465 * NLME-PERMIT-JOINING.request is executed using the PermitDuration
3466 * parameter supplied by Mgmt_Permit_Joining_req. Additionally, if the remote
3467 * device is the Trust Center and TC_Significance is set to 1, the Trust Center
3468 * authentication policy will be affected. The addressing may be unicast or
3469 * 'broadcast to all routers and coordinator'.
3473 * @privilege %http://tizen.org/privilege/zigbee
3475 * @param[in] handle The handle of zigbee
3476 * @param[in] addr16 destination network address
3477 * @param[in] permit_duration The length of time in seconds during which the ZigBee
3478 * coordinator or router will allow associations. \n
3479 * The value 0x00 and 0xff indicate that permission is
3480 * disabled or enabled, respectively, without a specified time
3482 * @param[in] tc_significance If this is set to 0x01 and the remote device is the Trust Center,
3483 * the command affects the Trust Center authentication policy as
3484 * described in the sub-clauses below; \n \n
3485 * If this is set to 0x00, there is no effect on the Trust Center.
3486 * @param[in] cb Response callback
3487 * @param[in] user_data user data
3489 * @return 0 on success, otherwise a negative error value.
3490 * @retval #ZIGBEE_ERROR_NONE Successful
3491 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3492 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3493 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3494 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3495 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3497 * @see zb_zdo_mgmt_permit_joining_cb()
3499 int zb_zdo_mgmt_permit_joining_req(
3502 unsigned char permit_duration,
3503 unsigned char tc_significance,
3504 zb_zdo_mgmt_permit_joining_cb cb,
3509 * @brief Sends 'update network management request' command.
3510 * @details This command is provided to allow updating of network configuration parameters
3511 * or to request information from devices on network conditions in the local
3512 * operating environment. The destination addressing on this primitive shall be
3513 * unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE.
3517 * @privilege %http://tizen.org/privilege/zigbee
3519 * @param[in] handle The handle of zigbee
3520 * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
3521 * The 27 least significant bits (b0, b1,... b26) indicate
3522 * which channels are to be scanned (1 = scan, 0 = do not scan)
3523 * for each of the 27 valid channels.
3524 * @param[in] scan_duration A value used to calculate the length of time to spend
3525 * scanning each channel.\n The time spent scanning each channel
3526 * is (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
3527 * the value of the ScanDuration parameter. For more information
3528 * on MAC sub-layer scanning
3529 * @param[in] scan_count This field represents the number of energy scan to be conducted
3531 * @param[in] nwk_update_id The value of the nwkUpdateId contained in this request.
3532 * This value is set by the Network Channel Manager prior to
3533 * sending the message. \n
3534 * This field shall only be present of the ScanDuration is 0xfe
3535 * or 0xff. If the ScanDuration is 0xff, then the value in the
3536 * nwkUpdateID shall be ignored. \n
3537 * @param[in] nwk_manager_addr This field shall be present only if the ScanDuration is set
3538 * to 0xff, and, where present, indicates the NWK address for
3539 * the device with the Network Manager bit set in its Node
3542 * @return 0 on success, otherwise a negative error value.
3543 * @retval #ZIGBEE_ERROR_NONE Successful
3544 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3545 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3546 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3547 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3548 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3550 * @see zb_zdo_mgmt_nwk_update_noti()
3552 int zb_zdo_mgmt_nwk_update_req(
3554 unsigned int scan_channels,
3555 unsigned char scan_duration,
3556 unsigned char scan_count,
3557 unsigned char nwk_update_id,
3558 zb_nwk_addr nwk_manager_addr);
3563 * @brief Gets extended pan id from network list record.
3564 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3565 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3567 * Therefore this function can help parsing parameter in network_list_record.
3571 * @param[in] handle The handle of node descriptor
3572 * @param[out] extended_pan_id The 64-bit extended PAN identifier of the discovered
3575 * @return 0 on success, otherwise a negative error value.
3576 * @retval #ZIGBEE_ERROR_NONE Successful
3577 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3578 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3580 * @see zb_zdo_mgmt_nwk_disc_cb()
3582 int zb_network_list_record_get_extended_pan_id(
3583 zb_zdo_network_list_record_h handle,
3584 zb_ieee_addr extended_pan_id);
3588 * @brief Gets logical channel number from network list record.
3589 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3590 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has multiple network_list_record.
3592 * Therefore this function can help parsing parameter in network_list_record.
3596 * @param[in] handle The handle of node descriptor
3597 * @param[out] logical_channel The current logical channel occupied by the network.
3598 * Selected from the available logical channels supported by
3601 * @return 0 on success, otherwise a negative error value.
3602 * @retval #ZIGBEE_ERROR_NONE Successful
3603 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3604 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3606 * @see zb_zdo_mgmt_nwk_disc_cb()
3608 int zb_network_list_record_get_logical_channel(
3609 zb_zdo_network_list_record_h handle,
3610 unsigned char* logical_channel);
3614 * @brief Gets ZigBee version from network list record.
3615 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3616 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3618 * Therefore this function can help parsing parameter in network_list_record.
3622 * @param[in] handle The handle of node descriptor
3623 * @param[out] zigbee_version 0x0~0xf : The version of the ZigBee protocol in use
3624 * in the discovered network.
3626 * @return 0 on success, otherwise a negative error value.
3627 * @retval #ZIGBEE_ERROR_NONE Successful
3628 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3629 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3631 * @see zb_zdo_mgmt_nwk_disc_cb()
3633 int zb_network_list_record_get_zigbee_version(
3634 zb_zdo_network_list_record_h handle,
3635 unsigned char* zigbee_version);
3639 * @brief Gets stack profile from network list record.
3640 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3641 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3643 * Therefore this function can help parsing parameter in network_list_record.
3647 * @param[in] handle The handle of node descriptor
3648 * @param[out] stack_profile 0x0~0xf : A ZigBee stack profile identifier indicating
3649 * the stack profile in use in the discovered network.
3651 * @return 0 on success, otherwise a negative error value.
3652 * @retval #ZIGBEE_ERROR_NONE Successful
3653 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3654 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3656 * @see zb_zdo_mgmt_nwk_disc_cb()
3658 int zb_network_list_record_get_stack_profile(
3659 zb_zdo_network_list_record_h handle,
3660 unsigned char* stack_profile);
3664 * @brief Gets beacon order from network list record.
3665 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3666 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3668 * Therefore this function can help parsing parameter in network_list_record.
3672 * @param[in] handle The handle of node descriptor
3673 * @param[out] beacon_order 0x0~0xf : This specifies how often the MAC sub-layer
3674 * beacon is to be transmitted by a given device on the network. For a discussion of
3676 * MAC sub-layer beacon order
3678 * @return 0 on success, otherwise a negative error value.
3679 * @retval #ZIGBEE_ERROR_NONE Successful
3680 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3681 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3683 * @see zb_zdo_mgmt_nwk_disc_cb()
3685 int zb_network_list_record_get_beacon_order(
3686 zb_zdo_network_list_record_h handle,
3687 unsigned char* beacon_order);
3691 * @brief Gets superframe order from network list record.
3692 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3693 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3695 * Therefore this function can help parsing parameter in network_list_record.
3699 * @param[in] handle The handle of node descriptor
3700 * @param[out] superframe_order 0x0~0xf : For beacon-oriented networks, i.e., beacon
3701 * order < 15, this specifies the length of the active period of the superframe.
3703 * For a discussion of MAC sub-layer superframe order.
3705 * @return 0 on success, otherwise a negative error value.
3706 * @retval #ZIGBEE_ERROR_NONE Successful
3707 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3708 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3710 * @see zb_zdo_mgmt_nwk_disc_cb()
3712 int zb_network_list_record_get_superframe_order(
3713 zb_zdo_network_list_record_h handle,
3714 unsigned char* superframe_order);
3718 * @brief Gets permit joining from network list record.
3719 * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
3720 * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
3722 * Therefore this function can help parsing parameter in network_list_record.
3726 * @param[in] handle The handle of node descriptor
3727 * @param[out] permit_joining 0 or 1 : A value of TRUE indicates that at least one
3728 * ZigBee router on the network currently permits joining, i.e., its NWK has been
3729 * issued an NLME-PERMIT-JOINING primitive and the time limit, if given, has
3732 * @return 0 on success, otherwise a negative error value.
3733 * @retval #ZIGBEE_ERROR_NONE Successful
3734 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3735 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3737 * @see zb_zdo_mgmt_nwk_disc_cb()
3739 int zb_network_list_record_get_permit_joining(
3740 zb_zdo_network_list_record_h handle,
3741 unsigned char* permit_joining);
3745 * @brief Gets destination address from routing table record.
3746 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3747 * command (ClusterID=0x8032) ), it has a routing table record.
3749 * Therefore this function can help parsing parameter in routing table records.
3753 * @param[in] handle The handle of node descriptor
3754 * @param[out] dst_addr The destination address for the binding entry
3756 * @return 0 on success, otherwise a negative error value.
3757 * @retval #ZIGBEE_ERROR_NONE Successful
3758 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3759 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3761 * @see zb_zdo_mgmt_rtg_cb()
3762 * @see zb_routing_table_get_dst_addr()
3763 * @see zb_routing_table_get_dst_status()
3764 * @see zb_routing_table_get_memory_constrained()
3765 * @see zb_routing_table_get_many_to_one()
3766 * @see zb_routing_table_get_route_record_required()
3767 * @see zb_routing_table_get_next_hop_addr()
3769 int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
3770 zb_nwk_addr* dst_addr);
3774 * @brief Gets status bits (3bit) from routing table record.
3775 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3776 * command (ClusterID=0x8032) ), it has a routing table record.
3778 * Therefore this function can help parsing parameter in routing table records.
3782 * @param[in] handle The handle of node descriptor
3783 * @param[out] status 0x0=ACTIVE. \n
3784 * 0x1=DISCOVERY_UNDERWAY. \n
3785 * 0x2=DISCOVERY_FAILED. \n
3787 * 0x4=VALIDATION_UNDERWAY \n
3788 * 0x5-0x7=RESERVED. \n
3790 * @return 0 on success, otherwise a negative error value.
3791 * @retval #ZIGBEE_ERROR_NONE Successful
3792 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3793 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3795 * @see zb_zdo_mgmt_rtg_cb()
3796 * @see zb_routing_table_get_dst_addr()
3797 * @see zb_routing_table_get_dst_status()
3798 * @see zb_routing_table_get_memory_constrained()
3799 * @see zb_routing_table_get_many_to_one()
3800 * @see zb_routing_table_get_route_record_required()
3801 * @see zb_routing_table_get_next_hop_addr()
3803 int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
3804 zb_zdp_status_e* status);
3808 * @brief Gets memory constrained (1bit) from routing table record.
3809 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3810 * command (ClusterID=0x8032) ), it has a routing table record.
3812 * Therefore this function can help parsing parameter in routing table records.
3816 * @param[in] handle The handle of node descriptor
3817 * @param[out] memory_constrained A flag indicating whether the device is a memory
3818 * constrained concentrator.
3820 * @return 0 on success, otherwise a negative error value.
3821 * @retval #ZIGBEE_ERROR_NONE Successful
3822 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3823 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3825 * @see zb_zdo_mgmt_rtg_cb()
3826 * @see zb_routing_table_get_dst_addr()
3827 * @see zb_routing_table_get_dst_status()
3828 * @see zb_routing_table_get_memory_constrained()
3829 * @see zb_routing_table_get_many_to_one()
3830 * @see zb_routing_table_get_route_record_required()
3831 * @see zb_routing_table_get_next_hop_addr()
3833 int zb_routing_table_get_memory_constrained(
3834 zb_zdo_routing_table_h handle, unsigned char* memory_constrained);
3838 * @brief Gets many-to-one (1bit) from routing table record.
3839 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3840 * command (ClusterID=0x8032) ), it has a routing table record.
3842 * Therefore this function can help parsing parameter in routing table records.
3846 * @param[in] handle The handle of node descriptor
3847 * @param[out] many_to_one A flag indicating that the destination is a concentrator that
3848 * issued a many-to-one request.
3850 * @return 0 on success, otherwise a negative error value.
3851 * @retval #ZIGBEE_ERROR_NONE Successful
3852 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3853 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3855 * @see zb_zdo_mgmt_rtg_cb()
3856 * @see zb_routing_table_get_dst_addr()
3857 * @see zb_routing_table_get_dst_status()
3858 * @see zb_routing_table_get_memory_constrained()
3859 * @see zb_routing_table_get_many_to_one()
3860 * @see zb_routing_table_get_route_record_required()
3861 * @see zb_routing_table_get_next_hop_addr()
3863 int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
3864 unsigned char* many_to_one);
3868 * @brief Gets routing record required (1bit) from routing table record.
3869 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3870 * command (ClusterID=0x8032) ), it has a routing table record.
3872 * Therefore this function can help parsing parameter in routing table records.
3876 * @param[in] handle The handle of node descriptor
3877 * @param[out] route_record_required A flag indicating that a route record command frame
3878 * should be sent to the destination prior to the next
3881 * @return 0 on success, otherwise a negative error value.
3882 * @retval #ZIGBEE_ERROR_NONE Successful
3883 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3884 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3886 * @see zb_zdo_mgmt_rtg_cb()
3887 * @see zb_routing_table_get_dst_addr()
3888 * @see zb_routing_table_get_dst_status()
3889 * @see zb_routing_table_get_memory_constrained()
3890 * @see zb_routing_table_get_many_to_one()
3891 * @see zb_routing_table_get_route_record_required()
3892 * @see zb_routing_table_get_next_hop_addr()
3894 int zb_routing_table_get_route_record_required(
3895 zb_zdo_routing_table_h handle, unsigned char* route_record_required);
3899 * @brief Gets next hop address from routing table record.
3900 * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
3901 * command (ClusterID=0x8032) ), it has a routing table record.
3903 * Therefore this function can help parsing parameter in routing table records.
3907 * @param[in] handle The handle of node descriptor
3908 * @param[out] next_hop_addr Next-hop address.
3910 * @return 0 on success, otherwise a negative error value.
3911 * @retval #ZIGBEE_ERROR_NONE Successful
3912 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3913 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3915 * @see zb_zdo_mgmt_rtg_cb()
3916 * @see zb_routing_table_get_dst_addr()
3917 * @see zb_routing_table_get_dst_status()
3918 * @see zb_routing_table_get_memory_constrained()
3919 * @see zb_routing_table_get_many_to_one()
3920 * @see zb_routing_table_get_route_record_required()
3921 * @see zb_routing_table_get_next_hop_addr()
3923 int zb_routing_table_get_next_hop_addr(
3924 zb_zdo_routing_table_h handle, zb_nwk_addr* next_hop_addr);
3928 * @brief Gets extended pan id from neighbor table list record.
3929 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
3930 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
3932 * Therefore this function can help parsing parameter in neigbor_table_list.
3936 * @param[in] handle The handle of node descriptor
3937 * @param[out] extended_pan_id The 64-bit extended PAN id of the neighboring device
3939 * @return 0 on success, otherwise a negative error value.
3940 * @retval #ZIGBEE_ERROR_NONE Successful
3941 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3942 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3944 * @see zb_zdo_mgmt_lqi_cb()
3945 * @see zb_neighbor_table_desc_get_extended_pan_id()
3946 * @see zb_neighbor_table_desc_get_ieee_addr()
3947 * @see zb_neighbor_table_desc_get_nwk_addr()
3948 * @see zb_neighbor_table_desc_get_device_type()
3949 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
3950 * @see zb_neighbor_table_desc_get_relationship()
3951 * @see zb_neighbor_table_desc_get_permit_joining()
3952 * @see zb_neighbor_table_desc_get_depth()
3953 * @see zb_neighbor_table_desc_get_lqi()
3955 int zb_neighbor_table_desc_get_extended_pan_id(
3956 zb_zdo_neighbor_table_desc_h handle,
3957 zb_ieee_addr extended_pan_id);
3961 * @brief Gets IEEE address from neighbor table list record.
3962 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
3963 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
3964 * Therefore this function can help parsing parameter in neigbor_table_list.
3968 * @param[in] handle The handle of node descriptor
3969 * @param[out] addr64 64-bit IEEE address that is unique to every device.
3970 * If this value is unknown at the time of the request, this field shall be set to
3971 * 0xffffffffffffffff.
3973 * @return 0 on success, otherwise a negative error value.
3974 * @retval #ZIGBEE_ERROR_NONE Successful
3975 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3976 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3978 * @see zb_zdo_mgmt_lqi_cb()
3979 * @see zb_neighbor_table_desc_get_extended_pan_id()
3980 * @see zb_neighbor_table_desc_get_ieee_addr()
3981 * @see zb_neighbor_table_desc_get_nwk_addr()
3982 * @see zb_neighbor_table_desc_get_device_type()
3983 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
3984 * @see zb_neighbor_table_desc_get_relationship()
3985 * @see zb_neighbor_table_desc_get_permit_joining()
3986 * @see zb_neighbor_table_desc_get_depth()
3987 * @see zb_neighbor_table_desc_get_lqi()
3989 int zb_neighbor_table_desc_get_ieee_addr(
3990 zb_zdo_neighbor_table_desc_h handle,
3991 zb_ieee_addr addr64);
3995 * @brief Gets network address from neighbor table list record..
3996 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
3997 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
3999 * Therefore this function can help parsing parameter in neigbor_table_list.
4003 * @param[in] handle The handle of node descriptor
4004 * @param[out] addr16 16-bit network address that is unique to every device.
4006 * If this value is unknown at the time of the request, this field shall be set to
4007 * 0xffffffffffffffff.
4009 * @return 0 on success, otherwise a negative error value.
4010 * @retval #ZIGBEE_ERROR_NONE Successful
4011 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4012 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4014 * @see zb_zdo_mgmt_lqi_cb()
4015 * @see zb_neighbor_table_desc_get_extended_pan_id()
4016 * @see zb_neighbor_table_desc_get_ieee_addr()
4017 * @see zb_neighbor_table_desc_get_nwk_addr()
4018 * @see zb_neighbor_table_desc_get_device_type()
4019 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4020 * @see zb_neighbor_table_desc_get_relationship()
4021 * @see zb_neighbor_table_desc_get_permit_joining()
4022 * @see zb_neighbor_table_desc_get_depth()
4023 * @see zb_neighbor_table_desc_get_lqi()
4025 int zb_neighbor_table_desc_get_nwk_addr(
4026 zb_zdo_neighbor_table_desc_h handle,
4027 zb_nwk_addr* addr16);
4031 * @brief Gets device type from neighbor table list record..
4032 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4033 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4035 * Therefore this function can help parsing parameter in neigbor_table_list.
4039 * @param[in] handle The handle of node descriptor
4040 * @param[out] device_type The type of the neighbor device: \n
4041 * 0x0 = ZigBee coordinator \n
4042 * 0x1 = ZigBee router \n
4043 * 0x2 = ZigBee end device \n
4046 * @return 0 on success, otherwise a negative error value.
4047 * @retval #ZIGBEE_ERROR_NONE Successful
4048 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4049 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4051 * @see zb_zdo_mgmt_lqi_cb()
4052 * @see zb_neighbor_table_desc_get_extended_pan_id()
4053 * @see zb_neighbor_table_desc_get_ieee_addr()
4054 * @see zb_neighbor_table_desc_get_nwk_addr()
4055 * @see zb_neighbor_table_desc_get_device_type()
4056 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4057 * @see zb_neighbor_table_desc_get_relationship()
4058 * @see zb_neighbor_table_desc_get_permit_joining()
4059 * @see zb_neighbor_table_desc_get_depth()
4060 * @see zb_neighbor_table_desc_get_lqi()
4062 int zb_neighbor_table_desc_get_device_type(
4063 zb_zdo_neighbor_table_desc_h handle,
4064 unsigned char* device_type);
4068 * @brief Gets RxOnWhenIdle value from neighbor table list record..
4069 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4070 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4072 * Therefore this function can help parsing parameter in neigbor_table_list.
4076 * @param[in] handle The handle of node descriptor
4077 * @param[out] rx_on_when_idle Indicates if neighbor's receiver is
4078 * enabled during idle portions of the \n
4080 * 0x0 = Receiver is off \n
4081 * 0x1 = Receiver is on \n
4084 * @return 0 on success, otherwise a negative error value.
4085 * @retval #ZIGBEE_ERROR_NONE Successful
4086 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4087 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4089 * @see zb_zdo_mgmt_lqi_cb()
4090 * @see zb_neighbor_table_desc_get_extended_pan_id()
4091 * @see zb_neighbor_table_desc_get_ieee_addr()
4092 * @see zb_neighbor_table_desc_get_nwk_addr()
4093 * @see zb_neighbor_table_desc_get_device_type()
4094 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4095 * @see zb_neighbor_table_desc_get_relationship()
4096 * @see zb_neighbor_table_desc_get_permit_joining()
4097 * @see zb_neighbor_table_desc_get_depth()
4098 * @see zb_neighbor_table_desc_get_lqi()
4100 int zb_neighbor_table_desc_get_rx_on_when_idle(
4101 zb_zdo_neighbor_table_desc_h handle,
4102 unsigned char* rx_on_when_idle);
4106 * @brief Gets Relationship value from neighbor table list record.
4107 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4108 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4110 * Therefore this function can help parsing parameter in neigbor_table_list.
4114 * @param[in] handle The handle of node descriptor
4115 * @param[out] relationship The relationship between the
4116 * neighbor and the current device: \n
4117 * 0x0 = neighbor is the parent \n
4118 * 0x1 = neighbor is a child \n
4119 * 0x2 = neighbor is a sibling \n
4120 * 0x3 = None of the above \n
4121 * 0x4 = previous child
4123 * @return 0 on success, otherwise a negative error value.
4124 * @retval #ZIGBEE_ERROR_NONE Successful
4125 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4126 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4128 * @see zb_zdo_mgmt_lqi_cb()
4129 * @see zb_neighbor_table_desc_get_extended_pan_id()
4130 * @see zb_neighbor_table_desc_get_ieee_addr()
4131 * @see zb_neighbor_table_desc_get_nwk_addr()
4132 * @see zb_neighbor_table_desc_get_device_type()
4133 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4134 * @see zb_neighbor_table_desc_get_relationship()
4135 * @see zb_neighbor_table_desc_get_permit_joining()
4136 * @see zb_neighbor_table_desc_get_depth()
4137 * @see zb_neighbor_table_desc_get_lqi()
4139 int zb_neighbor_table_desc_get_relationship(
4140 zb_zdo_neighbor_table_desc_h handle,
4141 unsigned char* relationship);
4145 * @brief Gets Permit joining value from neighbor table list record.
4146 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4147 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4149 * Therefore this function can help parsing parameter in neigbor_table_list.
4153 * @param[in] handle The handle of node descriptor
4154 * @param[out] permit_joining An indication of whether the
4155 * neighbor device is accepting join requests: \n
4156 * 0x0 = neighbor is not accepting join requests \n
4157 * 0x1 = neighbor is accepting join requests \n
4160 * @return 0 on success, otherwise a negative error value.
4161 * @retval #ZIGBEE_ERROR_NONE Successful
4162 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4163 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4165 * @see zb_zdo_mgmt_lqi_cb()
4166 * @see zb_neighbor_table_desc_get_extended_pan_id()
4167 * @see zb_neighbor_table_desc_get_ieee_addr()
4168 * @see zb_neighbor_table_desc_get_nwk_addr()
4169 * @see zb_neighbor_table_desc_get_device_type()
4170 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4171 * @see zb_neighbor_table_desc_get_relationship()
4172 * @see zb_neighbor_table_desc_get_permit_joining()
4173 * @see zb_neighbor_table_desc_get_depth()
4174 * @see zb_neighbor_table_desc_get_lqi()
4176 int zb_neighbor_table_desc_get_permit_joining(
4177 zb_zdo_neighbor_table_desc_h handle,
4178 unsigned char* permit_joining);
4182 * @brief Gets Depth value from neighbor table list record.
4183 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4184 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4186 * Therefore this function can help parsing parameter in neigbor_table_list.
4190 * @param[in] handle The handle of node descriptor
4191 * @param[out] depth The 0x00~nwkcMaxDepth (see. Zigbee Spec.) \n
4192 * tree depth of the neighbor device. \n
4193 * A value of 0x00 indicates that the device is the ZigBee
4194 * coordinator for the network.
4196 * @return 0 on success, otherwise a negative error value.
4197 * @retval #ZIGBEE_ERROR_NONE Successful
4198 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4199 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4201 * @see zb_zdo_mgmt_lqi_cb()
4202 * @see zb_neighbor_table_desc_get_extended_pan_id()
4203 * @see zb_neighbor_table_desc_get_ieee_addr()
4204 * @see zb_neighbor_table_desc_get_nwk_addr()
4205 * @see zb_neighbor_table_desc_get_device_type()
4206 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4207 * @see zb_neighbor_table_desc_get_relationship()
4208 * @see zb_neighbor_table_desc_get_permit_joining()
4209 * @see zb_neighbor_table_desc_get_depth()
4210 * @see zb_neighbor_table_desc_get_lqi()
4212 int zb_neighbor_table_desc_get_depth(
4213 zb_zdo_neighbor_table_desc_h handle,
4214 unsigned char* depth);
4218 * @brief Gets LQI (Link-Quality Indicator) value from neighbor table list record.
4219 * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
4220 * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
4222 * Therefore this function can help parsing parameter in neigbor_table_list.
4226 * @param[in] handle The handle of node descriptor
4227 * @param[out] lqi The estimated link quality for RF transmissions from this device. \n
4228 * (see ZigBee specification for discussion of how this is calculated.)
4230 * @return 0 on success, otherwise a negative error value.
4231 * @retval #ZIGBEE_ERROR_NONE Successful
4232 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4233 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4235 * @see zb_zdo_mgmt_lqi_cb()
4236 * @see zb_neighbor_table_desc_get_extended_pan_id()
4237 * @see zb_neighbor_table_desc_get_ieee_addr()
4238 * @see zb_neighbor_table_desc_get_nwk_addr()
4239 * @see zb_neighbor_table_desc_get_device_type()
4240 * @see zb_neighbor_table_desc_get_rx_on_when_idle()
4241 * @see zb_neighbor_table_desc_get_relationship()
4242 * @see zb_neighbor_table_desc_get_permit_joining()
4243 * @see zb_neighbor_table_desc_get_depth()
4244 * @see zb_neighbor_table_desc_get_lqi()
4246 int zb_neighbor_table_desc_get_lqi(
4247 zb_zdo_neighbor_table_desc_h handle,
4248 unsigned char* lqi);
4252 * @brief Gets source MAC address from binding table record.
4253 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4254 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4256 * Therefore this function can help parsing parameter in binding_table structure.
4260 * @param[in] handle The handle of node descriptor
4261 * @param[out] src_addr The source IEEE address for the binding entry.
4263 * @return 0 on success, otherwise a negative error value.
4264 * @retval #ZIGBEE_ERROR_NONE Successful
4265 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4266 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4268 * @see zb_zdo_mgmt_bind_cb()
4270 int zb_binding_table_get_src_addr(
4271 zb_zdo_binding_table_h handle,
4272 zb_ieee_addr src_addr);
4276 * @brief Gets SrcEndpoint from binding table record.
4277 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4278 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4280 * Therefore this function can help parsing parameter in binding_table structure.
4284 * @param[in] handle The handle of node descriptor
4285 * @param[out] src_ep The source endpoint for the binding entry.
4287 * @return 0 on success, otherwise a negative error value.
4288 * @retval #ZIGBEE_ERROR_NONE Successful
4289 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4290 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4292 * @see zb_zdo_mgmt_bind_cb()
4294 int zb_binding_table_get_src_ep(
4295 zb_zdo_binding_table_h handle,
4296 unsigned char *src_ep);
4300 * @brief Gets ClusterId from binding table record.
4301 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4302 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4304 * Therefore this function can help parsing parameter in binding_table structure.
4308 * @param[in] handle The handle of node descriptor
4309 * @param[out] clusterid The identifier of the cluster on the source device that is bound
4310 * to the destination device.
4312 * @return 0 on success, otherwise a negative error value.
4313 * @retval #ZIGBEE_ERROR_NONE Successful
4314 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4315 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4317 * @see zb_zdo_mgmt_bind_cb()
4319 int zb_binding_table_get_cluster_id(
4320 zb_zdo_binding_table_h handle,
4321 unsigned short *clusterid);
4325 * @brief Gets DstAddrMode from binding table record.
4326 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4327 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4329 * Therefore this function can help parsing parameter in binding_table structure.
4333 * @param[in] handle The handle of node descriptor
4334 * @param[out] dst_addr_mode The addressing mode for the destination address. \n
4335 * This field can take one of the non-reserved values
4336 * from the following list: \n\n
4337 * 0x00 = reserved \n
4338 * 0x01 = 16-bit group address for DstAddr and DstEndpoint not
4340 * 0x02 = reserved \n
4341 * 0x03 = 64-bit extended address for DstAddr and DstEndp present \n
4342 * 0x04 ? 0xff = reserved \n
4344 * @return 0 on success, otherwise a negative error value.
4345 * @retval #ZIGBEE_ERROR_NONE Successful
4346 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4347 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4349 * @see zb_zdo_mgmt_bind_cb()
4351 int zb_binding_table_get_dst_addr_mode(
4352 zb_zdo_binding_table_h handle,
4353 unsigned char *dst_addr_mode);
4357 * @brief Gets nwk DstAddr from binding table record.
4358 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4359 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4361 * Therefore this function can help parsing parameter in binding_table structure.
4365 * @param[in] handle The handle of node descriptor
4366 * @param[out] addr16 The destination address for the binding entry. \n
4367 * As specified by the DstAddrMode field.
4369 * @return 0 on success, otherwise a negative error value.
4370 * @retval #ZIGBEE_ERROR_NONE Successful
4371 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4372 * @retval #ZIGBEE_ERROR_NO_DATA No network address
4373 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4375 * @see zb_zdo_mgmt_bind_cb()
4377 int zb_binding_table_get_dst_addr16(
4378 zb_zdo_binding_table_h handle,
4379 zb_nwk_addr *addr16);
4383 * @brief Gets ieee DstAddr from binding table record.
4384 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4385 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4387 * Therefore this function can help parsing parameter in binding_table structure.
4391 * @param[in] handle The handle of node descriptor
4392 * @param[out] addr64 The destination address for the binding entry. \n
4393 * As specified by the DstAddrMode field.
4395 * @return 0 on success, otherwise a negative error value.
4396 * @retval #ZIGBEE_ERROR_NONE Successful
4397 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4398 * @retval #ZIGBEE_ERROR_NO_DATA No IEEE address
4399 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4401 * @see zb_zdo_mgmt_bind_cb()
4403 int zb_binding_table_get_dst_addr64(
4404 zb_zdo_binding_table_h handle,
4405 zb_ieee_addr addr64);
4409 * @brief Gets DstEndPoint from binding table record.
4410 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4411 * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
4413 * Therefore this function can help parsing parameter in binding_table structure.
4417 * @param[in] handle The handle of node descriptor
4418 * @param[out] dst_ep 0x01~0xff : This field shall be present only if the DstAddrMode
4419 * field has a value of 0x03 and, if present, shall be the destination
4420 * endpoint for the binding entry.
4422 * @return 0 on success, otherwise a negative error value.
4423 * @retval #ZIGBEE_ERROR_NONE Successful
4424 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4425 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4427 * @see zb_zdo_mgmt_bind_cb()
4429 int zb_binding_table_get_dst_ep(
4430 zb_zdo_binding_table_h handle,
4431 unsigned char *dst_ep);
4435 * @brief Gets ExtendedAddress from discovery cache record.
4436 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4437 * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table.
4439 * Therefore this function can help parsing parameter in discovery cache list record.
4443 * @param[in] handle The handle of node descriptor
4444 * @param[out] addr64 64-bit IEEE Address of the cached device.
4446 * @return 0 on success, otherwise a negative error value.
4447 * @retval #ZIGBEE_ERROR_NONE Successful
4448 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4449 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4451 * @see zb_zdo_mgmt_cache_cb()
4453 int zb_discovery_cache_get_ieee_addr(
4454 zb_zdo_discovery_cache_h handle,
4455 zb_ieee_addr addr64);
4459 * @brief Gets NetworkAddress from discovery cache record.
4460 * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
4461 * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table.
4463 * Therefore this function can help parsing parameter in discovery cache list record.
4467 * @param[in] handle The handle of node descriptor
4468 * @param[out] addr16 16-bit network Address of the cached device.
4470 * @return 0 on success, otherwise a negative error value.
4471 * @retval #ZIGBEE_ERROR_NONE Successful
4472 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4473 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4475 * @see zb_zdo_mgmt_cache_cb()
4477 int zb_discovery_cache_get_nwk_addr(
4478 zb_zdo_discovery_cache_h handle,
4479 zb_nwk_addr *addr16);
4485 //////////////////////////////////////////////////////////////////////////////////////////
4487 #endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__ */