bf10b9935fa47ff5826333fb2761e120f4e224b8
[platform/core/api/zigbee.git] / include / zigbee-zdo_internal.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 #ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
17 #define __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
18
19 #include <zigbee-zdo-type.h>
20
21
22 //////////////////////////////////////////////////////////////////////////////////////////
23
24 /**
25  * @internal
26  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
27  * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE Binding Manager
28  *
29  * @brief Zigbee provides API for Binding.
30  *
31  * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_HEADER Required Header
32  *  \#include <zigbee.h>
33  *
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.
39  *
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.
45  *
46  */
47
48 /**
49  * @internal
50  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
51  * @brief NetworkList Record Format in Zigbee Specification.
52  * @since_tizen 4.0
53  */
54 typedef void* zb_zdo_network_list_record_h;
55
56 /**
57  * @internal
58  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
59  * @brief NeighborTableList Record Format in Zigbee Specification.
60  * @since_tizen 4.0
61  */
62 typedef void* zb_zdo_neighbor_table_desc_h;
63
64 /**
65  * @internal
66  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
67  * @brief RoutingTableList Record Format in Zigbee Specification.
68  * @since_tizen 4.0
69  */
70 typedef void* zb_zdo_routing_table_h;
71
72 /**
73  * @internal
74  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
75  * @brief BindingTableList Record Format in Zigbee Specification.
76  * @since_tizen 4.0
77  */
78 typedef void* zb_zdo_binding_table_h;
79
80 /**
81  * @internal
82  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
83  * @brief DiscoveryCacheList Record Format in Zigbee Specification.
84  * @since_tizen 4.0
85  */
86 typedef void* zb_zdo_discovery_cache_h;
87
88 /**
89  * @internal
90  * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE
91  * @{
92  */
93
94 /**
95  * @internal
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.
100  *
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.
103  *
104  * The supplied endpoint shall be checked to determine whether it falls within the
105  * specified range.
106  * If it does not, a Status of #ZB_ZDP_STATUS_INVALID_EP shall be returned.
107  *
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
110  * returned.
111  *
112  * @since_tizen 4.0
113  *
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
120  *
121  * @see zb_zdo_bind_req()
122  *
123  */
124 typedef void (*zb_zdo_bind_cb)(
125                 zb_zdp_status_e status,
126                 void *user_data);
127
128 /**
129  * @internal
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.
134  *
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.
140  *
141  * @since_tizen 4.0
142  * @privlevel public
143  * @privilege %http://tizen.org/privilege/zigbee
144  *
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
164  *
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
173  *
174  * @see zb_zdo_bind_cb()
175  */
176 int zb_zdo_bind_req(
177                 zb_zigbee_h handle,
178                 zb_nwk_addr dst_addr16,
179                 zb_ieee_addr src_addr64,
180                 zb_end_point src_ep,
181                 zb_cluster_id clusterid,
182                 zb_ieee_addr dst_addr64,
183                 unsigned char type,
184                 zb_nwk_addr group_addr,
185                 unsigned char dst_ep,
186                 zb_zdo_bind_cb cb,
187                 void *user_data);
188
189 /**
190  * @internal
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
196  * returned.
197  *
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.
203  *
204  * @since_tizen 4.0
205  *
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
212  *
213  * @see zb_zdo_unbind_req_addr()
214  *
215  */
216 typedef void (*zb_zdo_unbind_cb)(
217                 zb_zdp_status_e status,
218                 void *user_data);
219
220 /**
221  * @internal
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.
226  *
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.
229  *
230  * @since_tizen 4.0
231  * @privlevel public
232  * @privilege %http://tizen.org/privilege/zigbee
233  *
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
253  *
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
262  *
263  * @see zb_zdo_unbind_cb()
264  *
265  */
266 int zb_zdo_unbind_req(
267                 zb_zigbee_h handle,
268                 zb_nwk_addr dst_addr16,
269                 zb_ieee_addr src_addr64,
270                 zb_end_point src_ep,
271                 zb_cluster_id clusterid,
272                 zb_ieee_addr dst_addr64,
273                 unsigned char type,
274                 zb_nwk_addr group_addr,
275                 unsigned char dst_ep,
276                 zb_zdo_unbind_cb cb,
277                 void *user_data);
278
279 /**
280  * @}
281  */
282
283 //////////////////////////////////////////////////////////////////////////////////////////
284
285 /**
286  * @internal
287  * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
288  * @{
289  */
290
291 /**
292  * @internal
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.
305  *
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.
309  *
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).
318  *
319  * If the endpoint
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.
323  *
324  * @since_tizen 4.0
325  *
326  * @remarks The @a app_cluster_list can be used only in the callback. To use outside,
327  * make a copy.
328  *
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
351  *
352  * @see zb_zdo_extended_simple_desc_req()
353  */
354 typedef void (*zb_zdo_extended_simple_desc_cb)(
355                 unsigned char status,
356                 zb_nwk_addr addr16,
357                 unsigned char ep,
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,
362                 void *user_data);
363
364 /**
365  * @internal
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.
371  *
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.
376  *
377  * The NWKAddrOfInterest field shall contain thenetwork address of the remote device
378  * for which the active endpoint list is required.
379  *
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.
383  *
384  * @since_tizen 4.0
385  * @privilege %http://tizen.org/privilege/zigbee
386  *
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
392  *
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
399  *
400  * @see zb_zdo_extended_simple_desc_cb()
401  */
402 int zb_zdo_extended_simple_desc_req(
403                 zb_zigbee_h handle,
404                 zb_nwk_addr addr16,
405                 unsigned char start_idx,
406                 zb_zdo_extended_simple_desc_cb cb,
407                 void *user_data);
408
409 /**
410  * @internal
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.
415  *
416  * The remote device shall generate the Match_Desc_cb command using the format
417  * illustrated in Table 2.96 in Zigbee Specification.
418  *
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
426  * children.
427  *
428  *
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
433  * command.
434  *
435  *
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
448  * MatchList field.
449  *
450  *
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.
460  *
461  *
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.
471  *
472  *
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.
491  *
492  *
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.
502  *
503  * @since_tizen 4.0
504  *
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.
507  *
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
517  *
518  * @see zb_zdo_match_desc_req()
519  */
520 typedef void (*zb_zdo_match_desc_cb)(
521                 zb_zdp_status_e status,
522                 zb_nwk_addr addr16,
523                 unsigned char match_length,
524                 unsigned char *match_list,
525                 void *user_data);
526
527 /**
528  * @internal
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.
536  *
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
545  * 0xFFFF.
546  *
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.
556  *
557  * @since_tizen 4.0
558  * @privlevel public
559  * @privilege %http://tizen.org/privilege/zigbee
560  *
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
572  *
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
581  *
582  * @see zb_zdo_match_desc_cb()
583  */
584 int zb_zdo_match_desc_req(
585                 zb_zigbee_h handle,
586                 zb_nwk_addr addr16,
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,
593                 void *user_data);
594
595 /**
596  * @internal
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.
601  *
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.
610  *
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.
617  *
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.
623  *
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.
627  *
628  * @since_tizen 4.0
629  *
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.
632  *
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
641  *
642  * @see zb_zdo_node_desc_req()
643  */
644 typedef void (*zb_zdo_node_desc_cb)(
645                 zb_zdp_status_e status,
646                 zb_nwk_addr addr16,
647                 const zb_zdo_node_descriptor_h node_desc,
648                 void *user_data);
649
650 /**
651  * @internal
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.
657  *
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.
661  *
662  * @since_tizen 4.0
663  * @privlevel public
664  * @privilege %http://tizen.org/privilege/zigbee
665  *
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
670  *
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
679  *
680  * @see zb_zdo_node_desc_cb()
681  */
682 int zb_zdo_node_desc_req(
683                 zb_zigbee_h handle,
684                 zb_nwk_addr addr16,
685                 zb_zdo_node_desc_cb cb,
686                 void *user_data);
687
688 /**
689  * @internal
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.
694  *
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.
710  *
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.
716  *
717  * If a power descriptor is available for the child indicated by the NWKAddrOfInterest
718  * field,
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.
721  *
722  * @since_tizen 4.0
723  *
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.
726  *
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
735  *
736  * @see zb_zdo_power_desc_req()
737  */
738 typedef void (*zb_zdo_power_desc_cb)(
739                 zb_zdp_status_e status,
740                 zb_nwk_addr addr16,
741                 const zb_zdo_node_power_descriptor_h power_desc,
742                 void *user_data);
743
744 /**
745  * @internal
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.
751  *
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.
755  *
756  * @since_tizen 4.0
757  * @privlevel public
758  * @privilege %http://tizen.org/privilege/zigbee
759  *
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
764  *
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
773  *
774  * @see zb_zdo_power_desc_cb()
775  */
776 int zb_zdo_power_desc_req(
777                 zb_zigbee_h handle,
778                 zb_nwk_addr addr16,
779                 zb_zdo_power_desc_cb cb,
780                 void *user_data);
781
782 /**
783  * @internal
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.
799  *
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.
810  *
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.
817  *
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
821  * the complex
822  * descriptor for that device, and include the complex descriptor of the matching
823  * child device in the ComplexDescriptor field.
824  *
825  * @since_tizen 4.0
826  *
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.
829  *
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
840  *
841  * @see zb_zdo_complex_desc_req()
842  */
843 typedef void (*zb_zdo_complex_desc_cb)(
844                 zb_zdp_status_e status,
845                 zb_nwk_addr addr16,
846                 unsigned char length,
847                 unsigned char *complex_desc,
848                 void *user_data);
849
850 /**
851  * @internal
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.
857  *
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
861  * required.
862  *
863  * @since_tizen 4.0
864  * @privlevel public
865  * @privilege %http://tizen.org/privilege/zigbee
866  *
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
871  *
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
880  *
881  * @see zb_zdo_complex_desc_cb()
882  */
883 int zb_zdo_complex_desc_req(
884                 zb_zigbee_h handle,
885                 zb_nwk_addr addr16,
886                 zb_zdo_complex_desc_cb cb,
887                 void *user_data);
888
889 /**
890  * @internal
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.
895  *
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
906  * field.
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.
911  *
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
915  * children.
916  *
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.
921  *
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.
925  *
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.
930  *
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.
936  *
937  * @since_tizen 4.0
938  *
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.
941  *
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
952  *
953  * @see zb_zdo_user_desc_req()
954  */
955 typedef void (*zb_zdo_user_desc_cb)(
956                 zb_zdp_status_e status,
957                 zb_nwk_addr addr16,
958                 unsigned char len,
959                 unsigned char *user_desc,
960                 void *user_data);
961
962 /**
963  * @internal
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.
969  *
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.
974  *
975  * @since_tizen 4.0
976  * @privlevel public
977  * @privilege %http://tizen.org/privilege/zigbee
978  *
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
983  *
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
992  *
993  * @see zb_zdo_complex_desc_cb()
994  */
995 int zb_zdo_user_desc_req(
996                 zb_zigbee_h handle,
997                 zb_nwk_addr addr16,
998                 zb_zdo_user_desc_cb cb,
999                 void *user_data);
1000 /**
1001  * @internal
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.
1006  *
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.
1016  *
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.
1020  *
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.
1027  *
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.
1033  *
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.
1038  *
1039  * @since_tizen 4.0
1040  *
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
1044  *
1045  * @see zb_zdo_user_desc_req()
1046  */
1047 typedef void (*zb_zdo_user_desc_conf_cb)(
1048                 zb_zdp_status_e status,
1049                 void *user_data);
1050
1051 /**
1052  * @internal
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.
1058  *
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.
1065  *
1066  * @since_tizen 4.0
1067  * @privlevel public
1068  * @privilege %http://tizen.org/privilege/zigbee
1069  *
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
1076  *
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
1084  *
1085  * @see zb_zdo_user_desc_conf_cb()
1086  */
1087 int zb_zdo_user_desc_set(
1088                 zb_zigbee_h handle,
1089                 zb_nwk_addr addr16,
1090                 unsigned char len,
1091                 unsigned char *user_desc,
1092                 zb_zdo_user_desc_conf_cb cb,
1093                 void *user_data);
1094
1095 /**
1096  * @internal
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.
1102  *
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.
1106  *
1107  * The destination addressing on this primitive is
1108  * broadcast to all devices for which macRxOnWhenIdle = TRUE.
1109  *
1110  * @since_tizen 4.0
1111  * @privlevel public
1112  * @privilege %http://tizen.org/privilege/zigbee
1113  *
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)
1118  *
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
1126  *
1127  * @see zb_zdo_user_desc_conf_cb()
1128  */
1129 int zb_zdo_device_annce(
1130                 zb_zigbee_h handle,
1131                 zb_nwk_addr addr16,
1132                 zb_ieee_addr addr64,
1133                 unsigned char capability);
1134
1135 /**
1136  * @internal
1137  * @brief Creates node power descriptor.
1138  * @details Creates node power descriptor handle
1139  *
1140  * @since_tizen 4.0
1141  * @privlevel public
1142  * @privilege %http://tizen.org/privilege/zigbee
1143  *
1144  * @remarks The @a handle should be released using zb_node_power_desc_destroy().
1145  *
1146  * @param[out] handle The handle of node power descriptor
1147  *
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
1155  *
1156  * @see zb_node_power_desc_clone()
1157  * @see zb_node_power_desc_destroy()
1158  */
1159 int zb_node_power_desc_create(
1160                 zb_zdo_node_power_descriptor_h *handle);
1161
1162 /**
1163  * @internal
1164  * @brief Clones a node power descriptor.
1165  *
1166  * @since_tizen 4.0
1167  *
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().
1170  *
1171  * @param[in] src handle of source node power descriptor
1172  * @param[in] dst handle of destination node power descriptor
1173  *
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
1178  *
1179  * @see zb_node_power_desc_create()
1180  * @see zb_node_power_desc_destroy()
1181  */
1182 int zb_node_power_desc_clone(
1183                 zb_zdo_node_power_descriptor_h src, zb_zdo_node_power_descriptor_h *dst);
1184
1185 /**
1186  * @internal
1187  * @brief Destroys node power descriptor.
1188  *
1189  * @since_tizen 4.0
1190  *
1191  * @param[in] handle The handle of node power descriptor
1192  *
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
1197  *
1198  * @see zb_node_power_desc_clone()
1199  * @see zb_node_power_desc_destroy()
1200  */
1201 int zb_node_power_desc_destroy(
1202                 zb_zdo_node_power_descriptor_h handle);
1203
1204 /**
1205  * @internal
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.
1209  *
1210  * The current power mode field shall be set to one of the non-reserved values
1211  *
1212  * @since_tizen 4.0
1213  *
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
1221  *
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
1226  *
1227  * @see zb_node_power_desc_set_current_power_mode()
1228  */
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);
1232
1233 /**
1234  * @internal
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.
1238  *
1239  * The current power mode field shall be set to one of the non-reserved values
1240  *
1241  * @since_tizen 4.0
1242  *
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
1250  *
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
1256  *
1257  * @see zb_node_power_desc_get_current_power_mode()
1258  */
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);
1262
1263 /**
1264  * @internal
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.
1268  *
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.
1271  *
1272  * @since_tizen 4.0
1273  *
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
1278  *
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
1283  *
1284  * @see zb_node_power_desc_set_available_power_sources()
1285  */
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);
1289
1290 /**
1291  * @internal
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.
1295  *
1296  * For each power
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.
1299  *
1300  * @since_tizen 4.0
1301  *
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
1306  *
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
1312  *
1313  * @see zb_node_power_desc_get_available_power_sources()
1314  */
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);
1318
1319 /**
1320  * @internal
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.
1324  *
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.
1327  *
1328  * @since_tizen 4.0
1329  *
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
1334  *
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
1339  *
1340  * @see zb_node_power_desc_set_current_power_source()
1341  */
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);
1345
1346 /**
1347  * @internal
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.
1351  *
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.
1354  *
1355  * @since_tizen 4.0
1356  *
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
1361  *
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
1367  *
1368  * @see zb_node_power_desc_get_current_power_source()
1369  */
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);
1373
1374 /**
1375  * @internal
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.
1379  *
1380  * The current power
1381  * source level field shall be set to one of the non-reserved values
1382  *
1383  * @since_tizen 4.0
1384  *
1385  * @param[in] handle The handle of node power descriptor
1386  * @param[out] current_power_source_level  0b0000 : Critical \n
1387  *                                        0b0100 : 33% \n
1388  *                                        0b1000 : 66% \n
1389  *                                        0b1100 : 100% \n
1390  *
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
1395  *
1396  * @see zb_node_power_desc_set_current_power_source_level()
1397  */
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);
1401
1402 /**
1403  * @internal
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.
1407  *
1408  * The current power
1409  * source level field shall be set to one of the non-reserved values
1410  *
1411  * @since_tizen 4.0
1412  *
1413  * @param[in] handle The handle of node power descriptor
1414  * @param[in] current_power_source_level  0b0000 : Critical \n
1415  *                                        0b0100 : 33% \n
1416  *                                        0b1000 : 66% \n
1417  *                                        0b1100 : 100% \n
1418  *
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
1423  *
1424  * @see zb_node_power_desc_get_current_power_source_level()
1425  */
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);
1429
1430 /**
1431  * @internal
1432  * @brief Creates node descriptor.
1433  *
1434  * @since_tizen 4.0
1435  * @privlevel public
1436  * @privilege %http://tizen.org/privilege/zigbee
1437  *
1438  * @remarks The @a handle should be released using zb_node_desc_destroy().
1439  *
1440  * @param[out] handle The handle of node descriptor
1441  *
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
1449  *
1450  * @see zb_node_desc_clone()
1451  * @see zb_node_desc_destroy()
1452  */
1453 int zb_node_desc_create(zb_zdo_node_descriptor_h *handle);
1454
1455 /**
1456  * @internal
1457  * @brief Copies node descriptor.
1458  *
1459  * @since_tizen 4.0
1460  *
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().
1463  *
1464  * @param[in] src handle of source node descriptor
1465  * @param[in] dst handle of destination node descriptor
1466  *
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
1471  *
1472  * @see zb_node_desc_create()
1473  * @see zb_node_desc_destroy()
1474  */
1475 int zb_node_desc_clone(zb_zdo_node_descriptor_h src, zb_zdo_node_descriptor_h *dst);
1476
1477 /**
1478  * @internal
1479  * @brief Destroys node descriptor.
1480  *
1481  * @since_tizen 4.0
1482  *
1483  * @param[in] handle The handle of node descriptor
1484  *
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
1489  *
1490  * @see zb_node_desc_create()
1491  * @see zb_node_desc_clone()
1492  */
1493 int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle);
1494
1495 /**
1496  * @internal
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.
1500  *
1501  * The logical type field shall be set to one of the non-reserved values.
1502  *
1503  * @since_tizen 4.0
1504  *
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
1509  *
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
1514  *
1515  * @see zb_node_desc_set_logical_type()
1516  */
1517 int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
1518                 unsigned char* logical_type);
1519
1520 /**
1521  * @internal
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.
1525  *
1526  *  The logical type field shall be set to one of the non-reserved values.
1527  *
1528  * @since_tizen 4.0
1529  *
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
1534  *
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
1540  *
1541  * @see zb_node_desc_get_logical_type()
1542  */
1543 int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
1544                 unsigned char logical_type);
1545
1546 /**
1547  * @internal
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.
1553  *
1554  * @since_tizen 4.0
1555  *
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
1559  *
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
1564  *
1565  * @see zb_node_desc_set_complex_descriptor_available()
1566  */
1567 int zb_node_desc_get_complex_desciptor_available(
1568                 zb_zdo_node_descriptor_h handle,
1569                 unsigned char* complex_desciptor_available);
1570
1571 /**
1572  * @internal
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.
1578  *
1579  * @since_tizen 4.0
1580  *
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
1584  *
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
1590  *
1591  * @see zb_node_desc_get_complex_desciptor_available()
1592  */
1593 int zb_node_desc_set_complex_descriptor_available(
1594                 zb_zdo_node_descriptor_h handle,
1595                 unsigned char complex_desciptor_available);
1596
1597 /**
1598  * @internal
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.
1602  *
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.
1605  *
1606  * @since_tizen 4.0
1607  *
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
1611  *
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
1616  *
1617  * @see zb_node_desc_set_user_descriptor_available()
1618  */
1619 int zb_node_desc_get_user_descriptor_available(
1620                 zb_zdo_node_descriptor_h handle,
1621                 unsigned char* user_descriptor_available);
1622
1623 /**
1624  * @internal
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.
1630  *
1631  * @since_tizen 4.0
1632  *
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
1636  *
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
1642  *
1643  * @see zb_node_desc_get_user_descriptor_available()
1644  */
1645 int zb_node_desc_set_user_descriptor_available(
1646                 zb_zdo_node_descriptor_h handle,
1647                 unsigned char user_descriptor_available);
1648
1649 /**
1650  * @internal
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.
1654  *
1655  * This field is currently not supported and shall be set to zero.
1656  *
1657  * @since_tizen 4.0
1658  *
1659  * @param[in] handle The handle of node descriptor
1660  * @param[out] aps_flags 0 : APS flags \n
1661  *
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
1666  *
1667  * @see zb_node_desc_set_aps_flags()
1668  */
1669 int zb_node_desc_get_aps_flags(
1670                 zb_zdo_node_descriptor_h handle,
1671                 unsigned char* aps_flags);
1672 /**
1673  * @internal
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.
1677  *
1678  * This field is currently not supported and shall be set to zero.
1679  *
1680  * @since_tizen 4.0
1681  *
1682  * @param[in] handle The handle of node descriptor
1683  * @param[in] aps_flags 0 : APS flags
1684  *
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
1690  *
1691  * @see zb_node_desc_get_aps_flags()
1692  */
1693 int zb_node_desc_set_aps_flags(
1694                 zb_zdo_node_descriptor_h handle,
1695                 unsigned char aps_flags);
1696
1697 /**
1698  * @internal
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.
1703  *
1704  * For each frequency band supported by the underlying IEEE
1705  * 802.15.4 radio, the corresponding bit of the frequency band field.
1706  *
1707  * shall be set to 1. All other bits shall be set to 0.
1708  *
1709  * @since_tizen 4.0
1710  *
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
1716  *
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
1721  *
1722  * @see zb_node_desc_set_frequency_band()
1723  */
1724 int zb_node_desc_get_frequency_band(
1725                 zb_zdo_node_descriptor_h handle,
1726                 unsigned char* frequency_band);
1727
1728 /**
1729  * @internal
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.
1734  *
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.
1738  *
1739  * @since_tizen 4.0
1740  *
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
1746  *
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
1752  *
1753  * @see zb_node_desc_get_frequency_band()
1754  */
1755 int zb_node_desc_set_frequency_band(
1756                 zb_zdo_node_descriptor_h handle,
1757                 unsigned char frequency_band);
1758
1759 /**
1760  * @internal
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.
1765  *
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.
1769  *
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).
1773  *
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.
1778  *
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
1782  *
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.
1787  *
1788  * @since_tizen 4.0
1789  *
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
1798  *
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
1803  *
1804  * @see zb_node_desc_set_mac_capability_flags()
1805  */
1806 int zb_node_desc_get_mac_capability_flags(
1807                 zb_zdo_node_descriptor_h handle,
1808                 unsigned char* mac_capability_flags);
1809
1810 /**
1811  * @internal
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.
1816  *
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.
1820  *
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).
1824  *
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.
1829  *
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
1833  *
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.
1838  *
1839  * @since_tizen 4.0
1840  *
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
1849  *
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
1854  *
1855  * @see zb_node_desc_get_mac_capability_flags()
1856  */
1857 int zb_node_desc_set_mac_capability_flags(
1858                 zb_zdo_node_descriptor_h handle,
1859                 unsigned char mac_capability_flags);
1860
1861 /**
1862  * @internal
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.
1867  *
1868  * @since_tizen 4.0
1869  *
1870  * @param[in] handle The handle of node descriptor
1871  * @param[out] manufacturer_code manufacturer code
1872  *
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
1877  *
1878  * @see zb_node_desc_set_manufacturer_code()
1879  */
1880 int zb_node_desc_get_manufacturer_code(
1881                 zb_zdo_node_descriptor_h handle,
1882                 unsigned short* manufacturer_code);
1883
1884 /**
1885  * @internal
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.
1890  *
1891  * @since_tizen 4.0
1892  *
1893  * @param[in] handle The handle of node descriptor
1894  * @param[in] manufacturer_code manufacturer code
1895  *
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
1900  *
1901  * @see zb_node_desc_get_frequency_band()
1902  */
1903 int zb_node_desc_set_manufacturer_code(
1904                 zb_zdo_node_descriptor_h handle,
1905                 unsigned short manufacturer_code);
1906
1907 /**
1908  * @internal
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.
1912  *
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.
1917  *
1918  * This field can be used as a high-level indication for network management.
1919  *
1920  * @since_tizen 4.0
1921  *
1922  * @param[in] handle The handle of node descriptor
1923  * @param[out] maximum_buffer_size 0x00~0x7f
1924  *
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
1929  *
1930  * @see zb_node_desc_set_maximum_buffer_size()
1931  */
1932 int zb_node_desc_get_maximum_buffer_size(
1933                 zb_zdo_node_descriptor_h handle,
1934                 unsigned char* maximum_buffer_size);
1935
1936 /**
1937  * @internal
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.
1941  *
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.
1945  *
1946  * This field can be used as a high-level indication for network management.
1947  *
1948  * @since_tizen 4.0
1949  *
1950  * @param[in] handle The handle of node descriptor
1951  * @param[in] maximum_buffer_size 0x00~0x7f
1952  *
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
1958  *
1959  * @see zb_node_desc_get_maximum_buffer_size()
1960  */
1961 int zb_node_desc_set_maximum_buffer_size(
1962                 zb_zdo_node_descriptor_h handle,
1963                 unsigned char maximum_buffer_size);
1964
1965 /**
1966  * @internal
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.
1970  *
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.
1973  *
1974  * This value can exceed the value of  the node maximum buffer size field through the use of fragmentation.
1975  *
1976  * @since_tizen 4.0
1977  *
1978  * @param[in] handle The handle of node descriptor
1979  * @param[out] maximum_incoming_transfer_size 0x0000~0x7fff
1980  *
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
1985  *
1986  * @see zb_node_desc_set_maximum_buffer_size()
1987  */
1988 int zb_node_desc_get_maximum_incoming_transfer_size(
1989                 zb_zdo_node_descriptor_h handle,
1990                 unsigned short* maximum_incoming_transfer_size);
1991
1992 /**
1993  * @internal
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.
1997  *
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.
2000  *
2001  * This value can exceed the value of the node maximum buffer size field through the use of fragmentation.
2002  *
2003  * @since_tizen 4.0
2004  *
2005  * @param[in] handle The handle of node descriptor
2006  * @param[in] maximum_incoming_transfer_size 0x0000~0x7fff
2007  *
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
2013  *
2014  * @see zb_node_desc_get_maximum_buffer_size()
2015  */
2016 int zb_node_desc_set_maximum_incoming_transfer_size(
2017                 zb_zdo_node_descriptor_h handle,
2018                 unsigned short maximum_incoming_transfer_size);
2019
2020 /**
2021  * @internal
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.
2025  *
2026  * It is used to facilitate discovery of particular system servers by other nodes on the
2027  *  system.
2028  *
2029  * The bit settings are defined in below table.
2030  *
2031  * @since_tizen 4.0
2032  *
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
2042  *
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
2047  *
2048  * @see zb_node_desc_set_server_mask()
2049  */
2050 int zb_node_desc_get_server_mask(
2051                 zb_zdo_node_descriptor_h handle,
2052                 unsigned short* server_mask);
2053
2054 /**
2055  * @internal
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.
2059  *
2060  * It is used to facilitate discovery of particular system servers by other nodes on the
2061  *  system.
2062  *
2063  * The bit settings are defined in below table.
2064  *
2065  * @since_tizen 4.0
2066  *
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
2076  *
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
2082  *
2083  * @see zb_node_desc_get_server_mask()
2084  */
2085 int zb_node_desc_set_server_mask(
2086                 zb_zdo_node_descriptor_h handle,
2087                 unsigned short server_mask);
2088
2089 /**
2090  * @internal
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.
2094  *
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.
2097  *
2098  * This value can exceed the value of the  node maximum buffer size field through the use
2099  * of fragmentation.
2100  *
2101  * @since_tizen 4.0
2102  *
2103  * @param[in] handle The handle of node descriptor
2104  * @param[out] maximum_outgoing_transfer_size 0x0000~0x7ffff
2105  *
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
2110  *
2111  * @see zb_node_desc_set_server_mask()
2112  */
2113 int zb_node_desc_get_maximum_outgoing_transfer_size(
2114                 zb_zdo_node_descriptor_h handle,
2115                 unsigned short* maximum_outgoing_transfer_size);
2116
2117 /**
2118  * @internal
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.
2122  *
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.
2125  *
2126  * This value can exceed the value of the
2127  * node maximum buffer size field through the use of fragmentation.
2128  *
2129  * @since_tizen 4.0
2130  *
2131  * @param[in] handle The handle of node descriptor
2132  * @param[in] maximum_outgoing_transfer_size 0x0000~0x7ffff
2133  *
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
2139  *
2140  * @see zb_node_desc_set_server_mask()
2141  */
2142 int zb_node_desc_set_maximum_outgoing_transfer_size(
2143                 zb_zdo_node_descriptor_h handle,
2144                 unsigned short maximum_outgoing_transfer_size);
2145
2146 /**
2147  * @internal
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.
2151  *
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.
2154  *
2155  * @since_tizen 4.0
2156  *
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
2160  *
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
2165  *
2166  * @see zb_node_desc_set_descriptor_capability_field()
2167  */
2168 int zb_node_desc_get_descriptor_capability_field(
2169                 zb_zdo_node_descriptor_h handle,
2170                 unsigned short* descriptor_capability_field);
2171
2172 /**
2173  * @internal
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.
2177  *
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.
2180  *
2181  * @since_tizen 4.0
2182  *
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
2186  *
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
2192  *
2193  * @see zb_node_desc_get_descriptor_capability_field()
2194  */
2195 int zb_node_desc_set_descriptor_capability_field(
2196                 zb_zdo_node_descriptor_h handle,
2197                 unsigned short descriptor_capability_field);
2198
2199
2200 /**
2201  * @}
2202  */
2203
2204 //////////////////////////////////////////////////////////////////////////////////////////
2205
2206 /**
2207  * @internal
2208  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
2209  * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
2210  *
2211  * @brief Zigbee provides API for Network Management.
2212  *
2213  * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
2214  *  \#include <zigbee.h>
2215  *
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
2219  *
2220  * @since_tizen 4.0
2221  *
2222  */
2223
2224 /**
2225  * @internal
2226  * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_MODULE
2227  * @{
2228  */
2229
2230 /**
2231  * @internal
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.
2243  *
2244  * @since_tizen 4.0
2245  *
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
2250  *
2251  * @see zb_zdo_system_server_discover_req()
2252  */
2253 typedef void (*zb_zdo_system_server_discover_cb)(
2254                 unsigned char status,
2255                 unsigned short server_mask,
2256                 void *user_data);
2257
2258 /**
2259  * @internal
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.
2264  *
2265  * The destination addressing on this request is 'broadcast to
2266  * all devices for which macRxOnWhenIdle = TRUE.'
2267  *
2268  * @since_tizen 4.0
2269  * @privilege %http://tizen.org/privilege/zigbee
2270  *
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
2275  *
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
2282  *
2283  * @see zb_zdo_system_server_discover_cb()
2284  */
2285 int zb_zdo_system_server_discover_req(
2286                 zb_zigbee_h handle,
2287                 unsigned short server_mask,
2288                 zb_zdo_system_server_discover_cb cb,
2289                 void *user_data);
2290
2291 /**
2292  * @internal
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.
2298  *
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.
2303  *
2304  * @since_tizen 4.0
2305  *
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
2311  *
2312  * @see zb_zdo_find_node_cache_req()
2313  */
2314 typedef void (*zb_zdo_find_node_cache_cb)(
2315                 zb_nwk_addr cache_nwk_addr,
2316                 zb_nwk_addr addr16,
2317                 zb_ieee_addr addr64,
2318                 void *user_data);
2319
2320 /**
2321  * @internal
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.
2327  *
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.
2334  *
2335  * @since_tizen 4.0
2336  * @privilege %http://tizen.org/privilege/zigbee
2337  *
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
2343  *
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
2350  *
2351  * @see zb_zdo_remove_node_cache_cb()
2352  */
2353 int zb_zdo_find_node_cache_req(
2354                 zb_zigbee_h handle,
2355                 zb_nwk_addr addr16,
2356                 zb_ieee_addr addr64,
2357                 zb_zdo_find_node_cache_cb cb,
2358                 void *user_data);
2359
2360 /**
2361  * @internal
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.
2367  *
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.
2372  *
2373  * @since_tizen 4.0
2374  *
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
2378  *
2379  * @see zb_zdo_discovery_cache_req()
2380  */
2381 typedef void (*zb_zdo_discovery_cache_cb)(
2382                 unsigned char status,
2383                 void *user_data);
2384
2385 /**
2386  * @internal
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.
2390  *
2391  * The destination addressing on
2392  * this primitive shall be broadcast to all devices for which macRxOnWhenIdle =
2393  * TRUE.
2394  *
2395  * @since_tizen 4.0
2396  * @privilege %http://tizen.org/privilege/zigbee
2397  *
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
2403  *
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
2410  *
2411  * @see zb_zdo_remove_node_cache_cb()
2412  */
2413 int zb_zdo_discovery_cache_req(
2414                 zb_zigbee_h handle,
2415                 zb_nwk_addr addr16,
2416                 zb_ieee_addr addr64,
2417                 zb_zdo_discovery_cache_cb cb,
2418                 void *user_data);
2419
2420 /**
2421  * @internal
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.
2429  *
2430  * @since_tizen 4.0
2431  *
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
2436  *
2437  * @see zb_zdo_discovery_store_req()
2438  */
2439 typedef void (*zb_zdo_discovery_store_cb)(
2440                 unsigned char status,
2441                 void *user_data);
2442
2443 /**
2444  * @internal
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.
2449  *
2450  * Included in the request is the amount of storage space the Local Device requires.
2451  * The destination addressing on this request is unicast.
2452  *
2453  * @since_tizen 4.0
2454  * @privilege %http://tizen.org/privilege/zigbee
2455  *
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
2466  *
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
2473  *
2474  * @see zb_zdo_remove_node_cache_cb()
2475  */
2476 int zb_zdo_discovery_store_req(
2477                 zb_zigbee_h handle,
2478                 zb_nwk_addr addr16,
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,
2486                 void *user_data);
2487
2488 /**
2489  * @internal
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.
2493  *
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.
2499  *
2500  * @since_tizen 4.0
2501  *
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
2507  *
2508  * @see zb_zdo_node_desc_store_req()
2509  */
2510 typedef void (*zb_zdo_node_desc_store_cb)(
2511                 unsigned char status,
2512                 void *user_data);
2513
2514 /**
2515  * @internal
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.
2521  *
2522  * Included in this request is the Node Descriptor the Local Device wishes to cache.
2523  *
2524  * @since_tizen 4.0
2525  * @privilege %http://tizen.org/privilege/zigbee
2526  *
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
2533  *
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
2540  *
2541  * @see zb_zdo_remove_node_cache_cb()
2542  */
2543 int zb_zdo_node_desc_store_req(
2544                 zb_zigbee_h handle,
2545                 zb_nwk_addr addr16,
2546                 zb_ieee_addr addr64,
2547                 zb_zdo_node_descriptor_h nodedsc,
2548                 zb_zdo_node_desc_store_cb cb,
2549                 void *user_data);
2550
2551 /**
2552  * @internal
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.
2560  *
2561  * @since_tizen 4.0
2562  *
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
2568  *
2569  * @see zb_zdo_power_desc_store_req()
2570  */
2571 typedef void (*zb_zdo_power_desc_store_cb)(
2572                 unsigned char status,
2573                 void *user_data);
2574
2575 /**
2576  * @internal
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.
2583  *
2584  * @since_tizen 4.0
2585  * @privilege %http://tizen.org/privilege/zigbee
2586  *
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
2593  *
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
2600  *
2601  * @see zb_zdo_remove_node_cache_cb()
2602  */
2603 int zb_zdo_power_desc_store_req(
2604                 zb_zigbee_h handle,
2605                 zb_nwk_addr addr16,
2606                 zb_ieee_addr addr64,
2607                 zb_zdo_node_power_descriptor_h powerdsc,
2608                 zb_zdo_power_desc_store_cb cb,
2609                 void *user_data);
2610
2611 /**
2612  * @internal
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.
2616  *
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.
2622  *
2623  * @since_tizen 4.0
2624  *
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
2630  *
2631  * @see zb_zdo_active_ep_store_req()
2632  */
2633 typedef void (*zb_zdo_active_ep_store_cb)(
2634                 unsigned char status,
2635                 void *user_data);
2636
2637 /**
2638  * @internal
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.
2647  *
2648  * Included in this request is the length of the Simple
2649  * Descriptor the Local Device wishes to cache and the Simple Descriptor itself.
2650  *
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.
2653  *
2654  * @since_tizen 4.0
2655  * @privilege %http://tizen.org/privilege/zigbee
2656  *
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
2664  *
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
2671  *
2672  * @see zb_zdo_remove_node_cache_cb()
2673  */
2674 int zb_zdo_active_ep_store_req(
2675                 zb_zigbee_h handle,
2676                 zb_nwk_addr addr16,
2677                 zb_ieee_addr addr64,
2678                 unsigned char active_ep_count,
2679                 unsigned char *ep_list,
2680                 zb_zdo_active_ep_store_cb cb,
2681                 void *user_data);
2682
2683 /**
2684  * @internal
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.
2688  *
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.
2694  *
2695  * @since_tizen 4.0
2696  *
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
2702  *
2703  * @see zb_zdo_simple_desc_store_req()
2704  */
2705 typedef void (*zb_zdo_simple_desc_store_cb)(
2706                 unsigned char status,
2707                 void *user_data);
2708
2709 /**
2710  * @internal
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.
2716  *
2717  * Note that each
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.
2721  *
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.
2726  *
2727  * @since_tizen 4.0
2728  * @privilege %http://tizen.org/privilege/zigbee
2729  *
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
2736  *
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
2743  *
2744  * @see zb_zdo_remove_node_cache_cb()
2745  */
2746 int zb_zdo_simple_desc_store_req(
2747                 zb_zigbee_h handle,
2748                 zb_nwk_addr addr16,
2749                 zb_ieee_addr addr64,
2750                 zb_zdo_simple_desc_h simpledsc,
2751                 zb_zdo_simple_desc_store_cb cb,
2752                 void *user_data);
2753
2754 /**
2755  * @internal
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.
2759  *
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).
2765  *
2766  * @since_tizen 4.0
2767  *
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
2773  *
2774  * @see zb_zdo_remove_node_cache_req()
2775  */
2776 typedef void (*zb_zdo_remove_node_cache_cb)(
2777                 unsigned char status,
2778                 void *user_data);
2779
2780 /**
2781  * @internal
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.
2786  *
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.
2791  *
2792  * @since_tizen 4.0
2793  * @privilege %http://tizen.org/privilege/zigbee
2794  *
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
2800  *
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
2807  *
2808  * @see zb_zdo_remove_node_cache_cb()
2809  */
2810 int zb_zdo_remove_node_cache_req(
2811                 zb_zigbee_h handle,
2812                 zb_nwk_addr addr16,
2813                 zb_ieee_addr addr64,
2814                 zb_zdo_remove_node_cache_cb cb,
2815                 void *user_data);
2816
2817 /**
2818  * @}
2819  */
2820
2821 //////////////////////////////////////////////////////////////////////////////////////////
2822
2823 /**
2824  * @internal
2825  * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
2826  * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
2827  *
2828  * @brief Zigbee provides API for Network Management.
2829  *
2830  * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
2831  *  \#include <zigbee.h>
2832  *
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
2836  *
2837  * @since_tizen 4.0
2838  *
2839  */
2840
2841 /**
2842  * @internal
2843  * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE
2844  * @{
2845  */
2846
2847 /**
2848  * @internal
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.
2853  *
2854  * Otherwise, the Remote Device shall implement the following process.
2855  *
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.
2859  *
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
2862  * command.
2863  *
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
2867  * NetworkListCount.
2868  *
2869  * @since_tizen 4.0
2870  *
2871  * @remarks The @a nwk_list can be used only in the callback. To use outside, make a copy.
2872  *
2873  * @param[out] status ZB_ZDP_STATUS_NOT_SUPPORTED or returned value from NLME-NETWORK.DISCOVERY.
2874  *                    request
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
2880  *                                this response.
2881  * @param[out] nwk_list A list of network list descriptors.
2882  * @param[out] user_data User data
2883  *
2884  * @see zb_zdo_mgmt_nwk_disc_req()
2885  */
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,
2892                 void *user_data);
2893
2894 /**
2895  * @internal
2896  * @brief Bitmask to scan all 802.15.4 channels.
2897  * @since_tizen 4.0
2898  */
2899 #define ZB_802_15_4_CHANNELS_MASK 0x07FFF800UL
2900
2901 /**
2902  * @internal
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
2906  * Device.
2907  *
2908 * The destination addressing on this command shall be unicast.
2909  *
2910  * @since_tizen 4.0
2911  * @privlevel public
2912  * @privilege %http://tizen.org/privilege/zigbee
2913  *
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
2929  *
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
2937  *
2938  * @see zb_zdo_mgmt_nwk_disc_cb()
2939  */
2940 int zb_zdo_mgmt_nwk_disc_req(
2941                 zb_zigbee_h handle,
2942                 zb_nwk_addr addr16,
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,
2948                 void *user_data);
2949
2950 /**
2951  * @internal
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.
2957  *
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.
2962  *
2963  * Otherwise, the backup binding table cache shall prepare a list of binding table
2964  * entries from its backup beginning with StartIndex.
2965  *
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.
2968  *
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.
2971  *
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.
2975  *
2976  * @since_tizen 4.0
2977  *
2978  * @remarks The @a neighbor_table_list can be used only in the callback. To use outside, make a copy.
2979  *
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
2986  *                                  binding cache.
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
2993  *
2994  * @see zb_zdo_mgmt_lqi_req()
2995  */
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,
3002                 void *user_data);
3003
3004 /**
3005  * @internal
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.
3011  *
3012  * @since_tizen 4.0
3013  * @privlevel public
3014  * @privilege %http://tizen.org/privilege/zigbee
3015  *
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
3021  *
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
3029  *
3030  * @see zb_zdo_mgmt_lqi_cb()
3031  */
3032 int zb_zdo_mgmt_lqi_req(
3033                 zb_zigbee_h handle,
3034                 zb_nwk_addr addr16,
3035                 unsigned char start_idx,
3036                 zb_zdo_mgmt_lqi_cb cb,
3037                 void *user_data);
3038
3039 /**
3040  * @internal
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.
3046  *
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.
3051  *
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.
3055  *
3056  * @since_tizen 4.0
3057  *
3058  * @remarks The @a routing_table_list can be used only in the callback. To use outside, make a copy.
3059  *
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
3064  *                                   remote device.
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
3071  *
3072  * @see zb_zdo_mgmt_rtg_req()
3073  */
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,
3080                 void *user_data);
3081
3082 /**
3083  * @internal
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.
3089  *
3090  * @since_tizen 4.0
3091  * @privlevel public
3092  * @privilege %http://tizen.org/privilege/zigbee
3093  *
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
3099  *
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
3107  *
3108  * @see zb_zdo_mgmt_rtg_cb()
3109  */
3110 int zb_zdo_mgmt_rtg_req(
3111                 zb_zigbee_h handle,
3112                 zb_nwk_addr addr16,
3113                 unsigned char start_idx,
3114                 zb_zdo_mgmt_rtg_cb cb,
3115                 void *user_data);
3116
3117 /**
3118  * @internal
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.
3124  *
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.
3132  *
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.
3142  *
3143  * @since_tizen 4.0
3144  *
3145  * @remarks The @a binding_table_list can be used only in the callback. To use outside, make a copy.
3146  *
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
3151  *                                  Remote Device.
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
3158  *
3159  * @see zb_zdo_mgmt_bind_req()
3160  */
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,
3167                 void *user_data);
3168
3169 /**
3170  * @internal
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.
3174  *
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
3177  * binding table.
3178  *
3179  * @since_tizen 4.0
3180  * @privlevel public
3181  * @privilege %http://tizen.org/privilege/zigbee
3182  *
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
3188  *
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
3196  *
3197  * @see zb_zdo_mgmt_bind_cb()
3198  */
3199 int zb_zdo_mgmt_bind_req(
3200                 zb_zigbee_h handle,
3201                 zb_nwk_addr addr16,
3202                 unsigned char start_idx,
3203                 zb_zdo_mgmt_bind_cb cb,
3204                 void *user_data);
3205
3206 /**
3207  * @internal
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.
3212  *
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
3217  * network.
3218  *
3219  * The Mgmt_Direct_Join_cb shall contain the same status that was
3220  * contained in the NLME-DIRECT-JOIN.confirm primitive.
3221  *
3222  * @since_tizen 4.0
3223  *
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
3229  *
3230  * @see zb_zdo_mgmt_direct_join_cb()
3231  */
3232 typedef void (*zb_zdo_mgmt_direct_join_cb)(
3233                 unsigned char status,
3234                 void *user_data);
3235
3236 /**
3237  * @internal
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.
3241  *
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.
3246  *
3247  * @since_tizen 4.0
3248  * @privilege %http://tizen.org/privilege/zigbee
3249  *
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
3255  *
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
3263  *
3264  * @see zb_zdo_mgmt_direct_join_cb()
3265  */
3266 int zb_zdo_mgmt_direct_join_req(
3267                 zb_zigbee_h handle,
3268                 zb_ieee_addr addr64,
3269                 unsigned char capability,
3270                 zb_zdo_mgmt_direct_join_cb cb,
3271                 void *user_data);
3272
3273 /**
3274  * @internal
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.
3281  *
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.
3287  *
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.
3293  *
3294  * @since_tizen 4.0
3295  *
3296  * @remarks The @a discover_cache_list can be used only in the callback. To use outside, make a copy.
3297  *
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
3306  *
3307  * @see zb_zdo_mgmt_cache_req()
3308  */
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,
3315                 void *user_data);
3316
3317 /**
3318  * @internal
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
3322  * device.
3323  *
3324  * The destination addressing on this primitive shall be unicast.
3325  *
3326  * @since_tizen 4.0
3327  * @privilege %http://tizen.org/privilege/zigbee
3328  *
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
3332  *                      list
3333  * @param[in] cb Response callback
3334  * @param[in] user_data user data
3335  *
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
3342  *
3343  * @see zb_zdo_mgmt_cache_cb()
3344  */
3345 int zb_zdo_mgmt_cache_req(
3346                 zb_zigbee_h handle,
3347                 zb_nwk_addr addr16,
3348                 unsigned char start_idx,
3349                 zb_zdo_mgmt_cache_cb cb,
3350                 void *user_data);
3351
3352
3353 /**
3354  * @internal
3355  * @brief Called after 'leave management request' command.
3356  * @details The Mgmt_Leave_cb is generated in response to a Mgmt_Leave_req.
3357  *
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
3360  * processing.
3361  *
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.
3366  *
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.
3369  *
3370  * @since_tizen 4.0
3371  *
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
3377  *
3378  * @see zb_zdo_mgmt_leave_req()
3379  */
3380 typedef void (*zb_zdo_mgmt_leave_cb)(
3381                 zb_zdp_status_e status,
3382                 void *user_data);
3383
3384 /**
3385  * @internal
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.
3392  *
3393  * @since_tizen 4.0
3394  * @privlevel public
3395  * @privilege %http://tizen.org/privilege/zigbee
3396  *
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
3407  *
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
3416  *
3417  * @see zb_zdo_mgmt_leave_cb()
3418  */
3419 int zb_zdo_mgmt_leave_req(
3420                 zb_zigbee_h handle,
3421                 zb_ieee_addr addr64,
3422                 bool remove_children,
3423                 bool rejoin,
3424                 zb_zdo_mgmt_leave_cb cb,
3425                 void *user_data);
3426
3427 /**
3428  * @internal
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.
3432  *
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.
3437  *
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.
3440  *
3441  * The Mgmt_Permit-Joining_cb shall contain the same status that was contained in the
3442  * NLME-PERMIT-JOINING.confirm primitive.
3443  *
3444  * @since_tizen 4.0
3445  *
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
3451  *
3452  * @see zb_zdo_mgmt_direct_join_cb()
3453  */
3454 typedef void (*zb_zdo_mgmt_permit_joining_cb)(
3455                 zb_zdp_status_e status,
3456                 void *user_data);
3457
3458 /**
3459  * @internal
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'.
3470  *
3471  * @since_tizen 4.0
3472  * @privlevel public
3473  * @privilege %http://tizen.org/privilege/zigbee
3474  *
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
3481  *                            limit.
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
3488  *
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
3496  *
3497  * @see zb_zdo_mgmt_permit_joining_cb()
3498  */
3499 int zb_zdo_mgmt_permit_joining_req(
3500                 zb_zigbee_h handle,
3501                 zb_nwk_addr addr16,
3502                 unsigned char permit_duration,
3503                 unsigned char tc_significance,
3504                 zb_zdo_mgmt_permit_joining_cb cb,
3505                 void *user_data);
3506
3507 /**
3508  * @internal
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.
3514  *
3515  * @since_tizen 4.0
3516  * @privlevel public
3517  * @privilege %http://tizen.org/privilege/zigbee
3518  *
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
3530  *                      and reported
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
3540  *                            Descriptor
3541  *
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
3549  *
3550  * @see zb_zdo_mgmt_nwk_update_noti()
3551  */
3552 int zb_zdo_mgmt_nwk_update_req(
3553                 zb_zigbee_h handle,
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);
3559
3560
3561 /**
3562  * @internal
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.
3566  *
3567  * Therefore this function can help parsing parameter in network_list_record.
3568  *
3569  * @since_tizen 4.0
3570  *
3571  * @param[in] handle The handle of node descriptor
3572  * @param[out] extended_pan_id The 64-bit extended PAN identifier of the discovered
3573  *                             network.
3574  *
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
3579  *
3580  * @see zb_zdo_mgmt_nwk_disc_cb()
3581  */
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);
3585
3586 /**
3587  * @internal
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.
3591  *
3592  *  Therefore this function can help parsing parameter in network_list_record.
3593  *
3594  * @since_tizen 4.0
3595  *
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
3599  *                             the PHY.
3600  *
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
3605  *
3606  * @see zb_zdo_mgmt_nwk_disc_cb()
3607  */
3608 int zb_network_list_record_get_logical_channel(
3609                 zb_zdo_network_list_record_h handle,
3610                 unsigned char* logical_channel);
3611
3612 /**
3613  * @internal
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.
3617  *
3618  * Therefore this function can help parsing parameter in network_list_record.
3619  *
3620  * @since_tizen 4.0
3621  *
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.
3625  *
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
3630  *
3631  * @see zb_zdo_mgmt_nwk_disc_cb()
3632  */
3633 int zb_network_list_record_get_zigbee_version(
3634                 zb_zdo_network_list_record_h handle,
3635                 unsigned char* zigbee_version);
3636
3637 /**
3638  * @internal
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.
3642  *
3643  * Therefore this function can help parsing parameter in network_list_record.
3644  *
3645  * @since_tizen 4.0
3646  *
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.
3650  *
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
3655  *
3656  * @see zb_zdo_mgmt_nwk_disc_cb()
3657  */
3658 int zb_network_list_record_get_stack_profile(
3659                 zb_zdo_network_list_record_h handle,
3660                 unsigned char* stack_profile);
3661
3662 /**
3663  * @internal
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.
3667  *
3668  * Therefore this function can help parsing parameter in network_list_record.
3669  *
3670  * @since_tizen 4.0
3671  *
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
3675  *
3676  * MAC sub-layer beacon order
3677  *
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
3682  *
3683  * @see zb_zdo_mgmt_nwk_disc_cb()
3684  */
3685 int zb_network_list_record_get_beacon_order(
3686                 zb_zdo_network_list_record_h handle,
3687                 unsigned char* beacon_order);
3688
3689 /**
3690  * @internal
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.
3694  *
3695  * Therefore this function can help parsing parameter in network_list_record.
3696  *
3697  * @since_tizen 4.0
3698  *
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.
3702  *
3703  * For a discussion of MAC sub-layer superframe order.
3704  *
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
3709  *
3710  * @see zb_zdo_mgmt_nwk_disc_cb()
3711  */
3712 int zb_network_list_record_get_superframe_order(
3713                 zb_zdo_network_list_record_h handle,
3714                 unsigned char* superframe_order);
3715
3716 /**
3717  * @internal
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.
3721  *
3722  * Therefore this function can help parsing parameter in network_list_record.
3723  *
3724  * @since_tizen 4.0
3725  *
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
3730  * not yet expired.
3731  *
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
3736  *
3737  * @see zb_zdo_mgmt_nwk_disc_cb()
3738  */
3739 int zb_network_list_record_get_permit_joining(
3740                 zb_zdo_network_list_record_h handle,
3741                 unsigned char* permit_joining);
3742
3743 /**
3744  * @internal
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.
3748  *
3749  * Therefore this function can help parsing parameter in routing table records.
3750  *
3751  * @since_tizen 4.0
3752  *
3753  * @param[in] handle The handle of node descriptor
3754  * @param[out] dst_addr The destination address for the binding entry
3755  *
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
3760  *
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()
3768  */
3769 int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
3770                 zb_nwk_addr* dst_addr);
3771
3772 /**
3773  * @internal
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.
3777  *
3778  * Therefore this function can help parsing parameter in routing table records.
3779  *
3780  * @since_tizen 4.0
3781  *
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
3786  *                    0x3=INACTIVE. \n
3787  *                    0x4=VALIDATION_UNDERWAY \n
3788  *                    0x5-0x7=RESERVED. \n
3789  *
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
3794  *
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()
3802  */
3803 int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
3804                 zb_zdp_status_e* status);
3805
3806 /**
3807  * @internal
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.
3811  *
3812  * Therefore this function can help parsing parameter in routing table records.
3813  *
3814  * @since_tizen 4.0
3815  *
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.
3819  *
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
3824  *
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()
3832  */
3833 int zb_routing_table_get_memory_constrained(
3834                 zb_zdo_routing_table_h handle, unsigned char* memory_constrained);
3835
3836 /**
3837  * @internal
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.
3841  *
3842  * Therefore this function can help parsing parameter in routing table records.
3843  *
3844  * @since_tizen 4.0
3845  *
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.
3849  *
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
3854  *
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()
3862  */
3863 int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
3864                 unsigned char* many_to_one);
3865
3866 /**
3867  * @internal
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.
3871  *
3872  * Therefore this function can help parsing parameter in routing table records.
3873  *
3874  * @since_tizen 4.0
3875  *
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
3879  *                                   data packet.
3880  *
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
3885  *
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()
3893  */
3894 int zb_routing_table_get_route_record_required(
3895                 zb_zdo_routing_table_h handle, unsigned char* route_record_required);
3896
3897 /**
3898  * @internal
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.
3902  *
3903  * Therefore this function can help parsing parameter in routing table records.
3904  *
3905  * @since_tizen 4.0
3906  *
3907  * @param[in] handle The handle of node descriptor
3908  * @param[out] next_hop_addr Next-hop address.
3909  *
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
3914  *
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()
3922  */
3923 int zb_routing_table_get_next_hop_addr(
3924                 zb_zdo_routing_table_h handle, zb_nwk_addr* next_hop_addr);
3925
3926 /**
3927  * @internal
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.
3931  *
3932  * Therefore this function can help parsing parameter in neigbor_table_list.
3933  *
3934  * @since_tizen 4.0
3935  *
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
3938  *
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
3943  *
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()
3954  */
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);
3958
3959 /**
3960  * @internal
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.
3965  *
3966  * @since_tizen 4.0
3967  *
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.
3972  *
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
3977  *
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()
3988  */
3989 int zb_neighbor_table_desc_get_ieee_addr(
3990                 zb_zdo_neighbor_table_desc_h handle,
3991                 zb_ieee_addr addr64);
3992
3993 /**
3994  * @internal
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.
3998  *
3999  * Therefore this function can help parsing parameter in neigbor_table_list.
4000  *
4001  * @since_tizen 4.0
4002  *
4003  * @param[in] handle The handle of node descriptor
4004  * @param[out] addr16 16-bit network address that is unique to every device.
4005  *
4006  * If this value is unknown at the time of the request, this field shall be set to
4007  * 0xffffffffffffffff.
4008  *
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
4013  *
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()
4024  */
4025 int zb_neighbor_table_desc_get_nwk_addr(
4026                 zb_zdo_neighbor_table_desc_h handle,
4027                 zb_nwk_addr* addr16);
4028
4029 /**
4030  * @internal
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.
4034  *
4035  * Therefore this function can help parsing parameter in neigbor_table_list.
4036  *
4037  * @since_tizen 4.0
4038  *
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
4044  *                         0x3 = Unknown \n
4045  *
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
4050  *
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()
4061  */
4062 int zb_neighbor_table_desc_get_device_type(
4063                 zb_zdo_neighbor_table_desc_h handle,
4064                 unsigned char* device_type);
4065
4066 /**
4067  * @internal
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.
4071  *
4072  * Therefore this function can help parsing parameter in neigbor_table_list.
4073  *
4074  * @since_tizen 4.0
4075  *
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
4079  *                             CAP: \n
4080  *                             0x0 = Receiver is off \n
4081  *                             0x1 = Receiver is on \n
4082  *                             0x2 = unknown
4083  *
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
4088  *
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()
4099  */
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);
4103
4104 /**
4105  * @internal
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.
4109  *
4110  * Therefore this function can help parsing parameter in neigbor_table_list.
4111  *
4112  * @since_tizen 4.0
4113  *
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
4122  *
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
4127  *
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()
4138  */
4139 int zb_neighbor_table_desc_get_relationship(
4140                 zb_zdo_neighbor_table_desc_h handle,
4141                 unsigned char* relationship);
4142
4143 /**
4144  * @internal
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.
4148  *
4149  * Therefore this function can help parsing parameter in neigbor_table_list.
4150  *
4151  * @since_tizen 4.0
4152  *
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
4158  *                            0x2 = unknown
4159  *
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
4164  *
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()
4175  */
4176 int zb_neighbor_table_desc_get_permit_joining(
4177                 zb_zdo_neighbor_table_desc_h handle,
4178                 unsigned char* permit_joining);
4179
4180 /**
4181  * @internal
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.
4185  *
4186  * Therefore this function can help parsing parameter in neigbor_table_list.
4187  *
4188  * @since_tizen 4.0
4189  *
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.
4195  *
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
4200  *
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()
4211  */
4212 int zb_neighbor_table_desc_get_depth(
4213                 zb_zdo_neighbor_table_desc_h handle,
4214                 unsigned char* depth);
4215
4216 /**
4217  * @internal
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.
4221  *
4222  * Therefore this function can help parsing parameter in neigbor_table_list.
4223  *
4224  * @since_tizen 4.0
4225  *
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.)
4229  *
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
4234  *
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()
4245  */
4246 int zb_neighbor_table_desc_get_lqi(
4247                 zb_zdo_neighbor_table_desc_h handle,
4248                 unsigned char* lqi);
4249
4250 /**
4251  * @internal
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.
4255  *
4256  * Therefore this function can help parsing parameter in binding_table structure.
4257  *
4258  * @since_tizen 4.0
4259  *
4260  * @param[in] handle The handle of node descriptor
4261  * @param[out] src_addr The source IEEE address for the binding entry.
4262  *
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
4267  *
4268  * @see zb_zdo_mgmt_bind_cb()
4269  */
4270 int zb_binding_table_get_src_addr(
4271                 zb_zdo_binding_table_h handle,
4272                 zb_ieee_addr src_addr);
4273
4274 /**
4275  * @internal
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.
4279  *
4280  * Therefore this function can help parsing parameter in binding_table structure.
4281  *
4282  * @since_tizen 4.0
4283  *
4284  * @param[in] handle The handle of node descriptor
4285  * @param[out] src_ep The source endpoint for the binding entry.
4286  *
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
4291  *
4292  * @see zb_zdo_mgmt_bind_cb()
4293  */
4294 int zb_binding_table_get_src_ep(
4295                 zb_zdo_binding_table_h handle,
4296                 unsigned char *src_ep);
4297
4298 /**
4299  * @internal
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.
4303  *
4304  * Therefore this function can help parsing parameter in binding_table structure.
4305  *
4306  * @since_tizen 4.0
4307  *
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.
4311  *
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
4316  *
4317  * @see zb_zdo_mgmt_bind_cb()
4318  */
4319 int zb_binding_table_get_cluster_id(
4320                 zb_zdo_binding_table_h handle,
4321                 unsigned short *clusterid);
4322
4323 /**
4324  * @internal
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.
4328  *
4329  * Therefore this function can help parsing parameter in binding_table structure.
4330  *
4331  * @since_tizen 4.0
4332  *
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
4339  *                              present \n
4340  *                       0x02 = reserved \n
4341  *                       0x03 = 64-bit extended address for DstAddr and DstEndp present \n
4342  *                       0x04 ? 0xff = reserved \n
4343  *
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
4348  *
4349  * @see zb_zdo_mgmt_bind_cb()
4350  */
4351 int zb_binding_table_get_dst_addr_mode(
4352                 zb_zdo_binding_table_h handle,
4353                 unsigned char *dst_addr_mode);
4354
4355 /**
4356  * @internal
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.
4360  *
4361  * Therefore this function can help parsing parameter in binding_table structure.
4362  *
4363  * @since_tizen 4.0
4364  *
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.
4368  *
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
4374  *
4375  * @see zb_zdo_mgmt_bind_cb()
4376  */
4377 int zb_binding_table_get_dst_addr16(
4378                 zb_zdo_binding_table_h handle,
4379                 zb_nwk_addr *addr16);
4380
4381 /**
4382  * @internal
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.
4386  *
4387  * Therefore this function can help parsing parameter in binding_table structure.
4388  *
4389  * @since_tizen 4.0
4390  *
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.
4394  *
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
4400  *
4401  * @see zb_zdo_mgmt_bind_cb()
4402  */
4403 int zb_binding_table_get_dst_addr64(
4404                 zb_zdo_binding_table_h handle,
4405                 zb_ieee_addr addr64);
4406
4407 /**
4408  * @internal
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.
4412  *
4413  * Therefore this function can help parsing parameter in binding_table structure.
4414  *
4415  * @since_tizen 4.0
4416  *
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.
4421  *
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
4426  *
4427  * @see zb_zdo_mgmt_bind_cb()
4428  */
4429 int zb_binding_table_get_dst_ep(
4430                 zb_zdo_binding_table_h handle,
4431                 unsigned char *dst_ep);
4432
4433 /**
4434  * @internal
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.
4438  *
4439  * Therefore this function can help parsing parameter in discovery cache list record.
4440  *
4441  * @since_tizen 4.0
4442  *
4443  * @param[in] handle The handle of node descriptor
4444  * @param[out] addr64 64-bit IEEE Address of the cached device.
4445  *
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
4450  *
4451  * @see zb_zdo_mgmt_cache_cb()
4452  */
4453 int zb_discovery_cache_get_ieee_addr(
4454                 zb_zdo_discovery_cache_h handle,
4455                 zb_ieee_addr addr64);
4456
4457 /**
4458  * @internal
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.
4462  *
4463  * Therefore this function can help parsing parameter in discovery cache list record.
4464  *
4465  * @since_tizen 4.0
4466  *
4467  * @param[in] handle The handle of node descriptor
4468  * @param[out] addr16 16-bit network Address of the cached device.
4469  *
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
4474  *
4475  * @see zb_zdo_mgmt_cache_cb()
4476  */
4477 int zb_discovery_cache_get_nwk_addr(
4478                 zb_zdo_discovery_cache_h handle,
4479                 zb_nwk_addr *addr16);
4480
4481 /**
4482  * @}
4483  */
4484
4485 //////////////////////////////////////////////////////////////////////////////////////////
4486
4487 #endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__ */