2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_H__
17 #define __TIZEN_CAPI_NETWORK_ZIGBEE_H__
28 * @ingroup CAPI_NETWORK_FRAMEWORK
29 * @addtogroup CAPI_NETWORK_ZIGBEE_MODULE ZigBee
35 * @brief Zigbee profile id.
40 ZB_PROFILE_HOME_AUTOMATION = 0x0104, /**< Zigbee Home Automation profile */
43 #include <tizen_error.h>
46 * @brief Enumeration for zigbee CAPI error code.
50 ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
51 ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
52 ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Out of range */
53 ZIGBEE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
54 ZIGBEE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< DBus error */
55 ZIGBEE_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */
56 ZIGBEE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
57 ZIGBEE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
58 ZIGBEE_ERROR_INVALID_ENDPOINT = TIZEN_ERROR_ZIGBEE | 0x01, /**< Endpoint 0 is reserved for ZDP */
59 ZIGBEE_ERROR_INVALID_ADDRESS = TIZEN_ERROR_ZIGBEE | 0x02, /**< Wrong address */
60 ZIGBEE_ERROR_OPERATION_FAILED = TIZEN_ERROR_ZIGBEE | 0x03, /**< Operation failed */
63 #include <tizen_type.h>
64 #include <zigbee-zdo-type.h>
65 #include <zigbee-zcl-type.h>
68 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
69 * @brief The data type abbreviation : IEEE Address.
73 typedef unsigned char zb_ieee_addr[8];
76 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
77 * @brief The data type abbreviation : Network Address.
81 typedef unsigned short zb_nwk_addr;
84 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
85 * @brief The data type abbreviation : End Point.
89 typedef unsigned char zb_end_point;
92 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
93 * @brief The data type abbreviation : Device ID.
97 typedef unsigned short zb_device_id;
100 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
101 * @brief The data type abbreviation : Profile ID.
105 typedef unsigned short zb_profile_id;
108 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
109 * @brief The data type abbreviation : Cluster ID.
113 typedef unsigned short zb_cluster_id;
116 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
117 * @brief The data type abbreviation : Attribute ID.
121 typedef unsigned short zb_attribute_id;
124 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
125 * @brief The data type abbreviation : Command ID.
129 typedef unsigned char zb_command_id;
132 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
133 * @brief The data type abbreviation : 128 bit security key.
137 typedef unsigned char zb_aes128_key[16];
140 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
141 * @brief The handle of zigbee.
144 typedef void* zb_zigbee_h;
147 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
148 * @brief The event handle.
152 typedef void* zb_event_data_h;
155 * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
156 * @brief The events for zb_event_cb().
161 ZB_ZDP_ENABLE_EVENT = 0x00, /**< This event is received after enabling zigbee system service */
162 ZB_ZDP_FORM_NETWORK_DONE = 0x01, /**< This event comes from coming network operation completed */
163 ZB_ZDP_JOIN_EVENT = 0x02, /**< This event takes place when a new device joins */
164 ZB_ZDP_REJOIN_EVENT = 0x03, /**< This event takes place when an existing device or devices which are received 'leave_network' command are re-joined */
165 ZB_ZDP_CHILD_LEFT = 0x04, /**< This event takes place when a child device leaves current network explicitly */
166 ZB_ZDP_LEAVE_DONE_EVENT = 0x05, /**< This event will take place after dismissing the current network */
167 ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT = 0x10, /**< This event is used when global default response */
168 ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT = 0x21, /**< A Device which supports IAS zone cluster wants to register its ability */
169 ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT = 0x22, /**< A Device which supports IAS zone cluster announces its status change */
170 ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT = 0x23, /**< A Device which supports IAS zone cluster announces its status change */
174 * @brief Creates handle to access the zigbee service.
178 * @remarks The @a handle should be released using zb_destroy().
180 * @param[out] handle The handle of zigbee
182 * @return 0 on success, otherwise a negative error value.
183 * @retval #ZIGBEE_ERROR_NONE Successful
184 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
185 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
186 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
187 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
191 int zb_create(zb_zigbee_h *handle);
194 * @brief Destroys to the zigbee service handle.
195 * @details All this function to stop zigbee service
199 * @param[in] handle The handle of zigbee
201 * @return 0 on success, otherwise a negative error value.
202 * @retval #ZIGBEE_ERROR_NONE Successful
203 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
204 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
208 int zb_destroy(zb_zigbee_h handle);
212 * @brief Enables the zigbee service.
213 * @details All this function to start zigbee service
216 * @privlevel platform
217 * @privilege %http://tizen.org/privilege/zigbee.admin
219 * @remarks You must free all resources of the zigbee by calling zb_destroy()
220 * if zigbee service is no longer needed.
222 * @param[in] handle The handle of zigbee
224 * @return 0 on success, otherwise a negative error value.
225 * @retval #ZIGBEE_ERROR_NONE Successful
226 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
227 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
228 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
229 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
235 int zb_enable(zb_zigbee_h handle);
239 * @brief Disables the zigbee service.
240 * @details Call this function to stop the zigbee service.
243 * @privlevel platform
244 * @privilege %http://tizen.org/privilege/zigbee.admin
246 * @remarks You must free all resources of the zigbee by calling zb_destroy()
247 * if zigbee service is no longer needed.
249 * @param[in] handle The handle of zigbee
251 * @return 0 on success, otherwise a negative error value.
252 * @retval #ZIGBEE_ERROR_NONE Successful
253 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
254 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
255 * @retval #ZIGBEE_ERROR_NO_DATA No data available
256 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
257 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
263 int zb_disable(zb_zigbee_h handle);
266 * @brief Called after receiving events from zigbee service.
267 * @details This function can receive events from the devices in the network.
268 * ex) join, re-join, leave and attribute change report
272 * @remarks The @a ev should not be released.
273 * @remarks The @a ev can be used only in the callback.
275 * @param[out] addr16 Network address (16 bit) from the source device
276 * @param[out] addr64 IEEE address (EUI64) from the source device
277 * @param[out] event_type The event identification
278 * @param[out] ev event data pointer
279 * @param[out] user_data User data
281 * @pre The callback must be registered when using zb_set_event_handler()
283 * @see #ZB_ZDP_ENABLE_EVENT
284 * @see #ZB_ZDP_JOIN_EVENT
285 * @see #ZB_ZDP_REJOIN_EVENT
286 * @see #ZB_ZDP_LEAVE_DONE_EVENT
289 typedef void (*zb_event_cb)(zb_nwk_addr addr16, zb_ieee_addr addr64, zb_event_e event_type,
290 zb_event_data_h ev, void *user_data);
293 * @brief Sets the event handler to get events from the zigbee service.
297 * @param[in] handle The handle of zigbee
298 * @param[in] event_handler The event handler
300 * @return 0 on success, otherwise a negative error value.
301 * @retval #ZIGBEE_ERROR_NONE Successful
302 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
303 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
304 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
310 int zb_set_event_cb(zb_zigbee_h handle, zb_event_cb event_handler);
313 * @brief Gets status code of enable commmand.
316 * @param[in] ev Event data structure
317 * @param[out] status The result of enable command
319 * @return 0 on success, otherwise a negative error value.
320 * @retval #ZIGBEE_ERROR_NONE Successful
321 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
322 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
325 int zb_ev_get_enable_status(zb_event_data_h ev, zb_error_e* status);
328 * @brief Gets PAN ID after forming a network.
331 * @param[in] ev Event data structure
332 * @param[out] pan_id The result of enable command
334 * @return 0 on success, otherwise a negative error value.
335 * @retval #ZIGBEE_ERROR_NONE Successful
336 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
337 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
340 int zb_ev_get_form_network_panid(zb_event_data_h ev, zb_nwk_addr* pan_id);
343 * @brief Gets the number of end-points of a joined device.
346 * @param[in] ev Event data structure
347 * @param[out] count The number of end-points of a device joined to the network
349 * @return 0 on success, otherwise a negative error value.
350 * @retval #ZIGBEE_ERROR_NONE Successful
351 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
352 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
355 int zb_ev_get_join_count(zb_event_data_h ev, unsigned char* count);
358 * @brief Gets the end-point list at a new device joined.
361 * @remarks The @a ep should be released using free().
363 * @param[in] ev Event data structure
364 * @param[out] ep The end point list
366 * @return 0 on success, otherwise a negative error value.
367 * @retval #ZIGBEE_ERROR_NONE Successful
368 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
369 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
372 int zb_ev_get_join_ep(zb_event_data_h ev, zb_end_point** ep);
376 * @brief Gets the status code of leave request commands.
379 * @param[in] ev Event data structure
380 * @param[out] status The result of end-device left command
382 * @return 0 on success, otherwise a negative error value.
383 * @retval #ZIGBEE_ERROR_NONE Successful
384 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
385 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
388 int zb_ev_get_child_left_status(zb_event_data_h ev, zb_error_e* status);
391 * @brief Gets the end-point number of the device which sent this default response.
394 * @param[in] ev Event data structure
395 * @param[out] ep Source end point
397 * @return 0 on success, otherwise a negative error value.
398 * @retval #ZIGBEE_ERROR_NONE Successful
399 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
400 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
403 int zb_ev_get_global_default_rsp_ep(zb_event_data_h ev, zb_end_point* ep);
406 * @brief Gets the cluster id of the device which sent this default response.
409 * @param[in] ev Event data structure
410 * @param[out] clusterid The cluster id
412 * @return 0 on success, otherwise a negative error value.
413 * @retval #ZIGBEE_ERROR_NONE Successful
414 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
415 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
418 int zb_ev_get_global_default_rsp_cluster_id(zb_event_data_h ev,
419 zb_cluster_id* clusterid);
422 * @brief Gets the command id of the device which sent this default response.
425 * @param[in] ev Event data structure
426 * @param[out] commandid The command id
428 * @return 0 on success, otherwise a negative error value.
429 * @retval #ZIGBEE_ERROR_NONE Successful
430 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
431 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
434 int zb_ev_get_global_default_rsp_command_id(zb_event_data_h ev,
435 zb_command_id* commandid);
438 * @brief Gets status code of a default response of the global command request.
441 * @param[in] ev Event data structure
442 * @param[out] status The result of the global command
444 * @return 0 on success, otherwise a negative error value.
445 * @retval #ZIGBEE_ERROR_NONE Successful
446 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
447 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
450 int zb_ev_get_global_default_rsp_status(zb_event_data_h ev,
451 zb_zcl_status_e* status);
454 * @brief Gets the end-point number of the IAS notification.
457 * @param[in] ev Event data structure
458 * @param[out] src_ep Source end point
460 * @return 0 on success, otherwise a negative error value.
461 * @retval #ZIGBEE_ERROR_NONE Successful
462 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
463 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
466 int zb_ev_get_ias_noti_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
469 * @brief Gets zone status of the IAS notification.
472 * @param[in] ev Event data structure
473 * @param[out] zone_status Zone status
474 * Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
475 * Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
476 * Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
477 * Bit 3 : Battery : 1 - Low battery / 0 - Battery OK\n
478 * Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
479 * Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
480 * Notification commands. The CIE device may use these periodic reports as an\n
481 * indication that a zone is operational. Zones that do not implement the periodic\n
482 * reporting are required to set this bit to zero (the CIE will know not to interpret the\n
483 * lack of reports as a problem).\n
484 * Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
485 * Note 2: This bit indicates whether or not a Zone Status Change Notification\n
486 * command will be sent to indicate that an alarm is no longer present. Some Zones\n
487 * do not have the ability to detect that alarm condition is no longer present, they\n
488 * only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
489 * zero, indicating to the CIE not to look for alarm-restore notifications.\n
490 * Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
491 * Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n
493 * @return 0 on success, otherwise a negative error value.
494 * @retval #ZIGBEE_ERROR_NONE Successful
495 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
496 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
499 int zb_ev_get_ias_noti_zone_status(zb_event_data_h ev,
500 unsigned short* zone_status);
503 * @brief Gets the end-point number of the IAS extended notification.
506 * @param[in] ev Event data structure
507 * @param[out] src_ep Source end point
509 * @return 0 on success, otherwise a negative error value.
510 * @retval #ZIGBEE_ERROR_NONE Successful
511 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
512 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
515 int zb_ev_get_ias_ext_noti_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
518 * @brief Gets status of the IAS extended notification.
521 * @param[in] ev Event data structure
522 * @param[out] status Status
524 * @return 0 on success, otherwise a negative error value.
525 * @retval #ZIGBEE_ERROR_NONE Successful
526 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
527 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
530 int zb_ev_get_ias_ext_noti_status(zb_event_data_h ev, unsigned char* status);
533 * @brief Gets zone status of the IAS extended notification.
536 * @param[in] ev Event data structure
537 * @param[out] zone_status Zone status
538 * Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
539 * Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
540 * Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
541 * Bit 3 : Battery : 1 - Low battery / 0 - Battery OK\n
542 * Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
543 * Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
544 * Notification commands. The CIE device may use these periodic reports as an\n
545 * indication that a zone is operational. Zones that do not implement the periodic\n
546 * reporting are required to set this bit to zero (the CIE will know not to interpret the\n
547 * lack of reports as a problem).\n
548 * Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
549 * Note 2: This bit indicates whether or not a Zone Status Change Notification\n
550 * command will be sent to indicate that an alarm is no longer present. Some Zones\n
551 * do not have the ability to detect that alarm condition is no longer present, they\n
552 * only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
553 * zero, indicating to the CIE not to look for alarm-restore notifications.\n
554 * Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
555 * Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n
557 * @return 0 on success, otherwise a negative error value.
558 * @retval #ZIGBEE_ERROR_NONE Successful
559 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
560 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
563 int zb_ev_get_ias_ext_noti_zone_status(zb_event_data_h ev,
564 unsigned short* zone_status);
567 * @brief Gets delay of the IAS extended notification.
570 * @param[in] ev Event data structure
571 * @param[out] delay Delay
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_NOT_SUPPORTED Not supported
579 int zb_ev_get_ias_ext_noti_delay(zb_event_data_h ev, unsigned short* delay);
582 * @brief Gets zone id of the IAS extended notification.
585 * @param[in] ev Event data structure
586 * @param[out] zone_id Zone id
588 * @return 0 on success, otherwise a negative error value.
589 * @retval #ZIGBEE_ERROR_NONE Successful
590 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
591 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
594 int zb_ev_get_ias_ext_noti_zone_id(zb_event_data_h ev, unsigned char* zone_id);
597 * @brief Gets the end-point number of the device which sent this enroll request.
600 * @param[in] ev Event data structure
601 * @param[out] src_ep Source end point
603 * @return 0 on success, otherwise a negative error value.
604 * @retval #ZIGBEE_ERROR_NONE Successful
605 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
606 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
609 int zb_ev_get_enroll_request_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
612 * @brief Gets zone type of the enroll request.
615 * @param[in] ev Event data structure
616 * @param[out] zone_type Zone type
618 * 0x0000 : Standard CIE / Alarm1 - System Alarm, Alarm2 - N/A\n
619 * 0x000d : Motion Sensor / Alarm1 - Intrusion indication, Alarm2 - Presence indication\n
620 * 0x0015 : Contact switch / Alarm1 - 1st portal Open-Close, Alarm2 - 2nd portal Open-Close\n
621 * 0x0028 : Fire sensor / Alarm1 - Fire indication, Alarm2 - N/A\n
622 * 0x002a : Water sensor / Alarm1 - Water overflow indication, Alarm2 - N/A\n
623 * 0x002b : Gas Sensor / Alarm1 - CO indication, Alarm2 - Cooking indication\n
624 * 0x002c : Personal emergency Sensor / Alarm1 - Fall / Concussion, Alarm2 - Emergency button\n
625 * 0x002d : Vibration or Movement Sensor / Alarm1 - Movement indication, Alarm2 - Vibration\n
626 * 0x010f : Remote control / Alarm1 - Panic, Alarm2 - Emergency\n
627 * 0x0115 : Key fob / Alarm1 - Panic, Alarm2 - Emergency\n
628 * 0x021d : Keypad / Alarm1 - Panic, Alarm2 - Emergency\n
629 * 0x0225 : Standard Warning Device (see. EN 50131 European Standards Series for Intruder Alarm Systems)
630 * / Alarm1 - N/A, Alarm2 -N/A\n
631 * 0x8000~0xfffe : Reserved for manufacturer specific types / Alarm1 - N/A, Alarm2 - N/A\n
632 * 0xffff : Invalid Zone Type / Alarm1 - N/A, Alarm2 - N/A\n
634 * @return 0 on success, otherwise a negative error value.
635 * @retval #ZIGBEE_ERROR_NONE Successful
636 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
637 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
640 int zb_ev_get_enroll_request_zone_type(zb_event_data_h ev,
641 unsigned short* zone_type);
643 * @brief Gets manufacturer code of the enroll request.
646 * @param[in] ev Event data structure
647 * @param[out] mfg_code Manufacture code
649 * @return 0 on success, otherwise a negative error value.
650 * @retval #ZIGBEE_ERROR_NONE Successful
651 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
652 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
655 int zb_ev_get_enroll_request_mfg_code(zb_event_data_h ev,
656 unsigned char* mfg_code);
659 * @brief Called after zigbee network formation is completed.
660 * @details Response of forming the zigbee network
664 * @param[out] panid PAN ID
665 * @param[out] user_data user data
667 * @see zb_form_network()
669 typedef void (*zb_form_network_cb)(zb_nwk_addr panid, void *user_data);
672 * @brief Makes the network work as a zigbee coordinator.
676 * @privilege %http://tizen.org/privilege/zigbee
678 * @remarks If you want to change parameters related to network configuration you should
679 * call zb_zdo_set_compatible_startup_parameters() function.
681 * @param[in] handle The handle of zigbee
682 * @param[in] cb zb_form_network_cb()
683 * @param[in] user_data user data
685 * @return 0 on success, otherwise a negative error value.
686 * @retval #ZIGBEE_ERROR_NONE Successful
687 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
688 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
689 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
690 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
692 * @post When forming network is finished, form_network_done event will be generated.
694 * @see zb_disable_network()
695 * @see zb_zdo_set_compatible_startup_parameters()
697 int zb_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data);
700 * @brief Called after disabling the zigbee network.
701 * @details Response of disabling the zigbee network
705 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
706 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
707 * @param[out] user_data user data
709 * @see zb_form_network()
711 typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data);
713 * @brief Disables network and stops zigbee coordinator role.
714 * @details This function to stop zigbee coordinator
718 * @privilege %http://tizen.org/privilege/zigbee
720 * @param[in] handle The handle of zigbee
721 * @param[in] cb zb_disable_network_cb()
722 * @param[in] user_data user data
724 * @return 0 on success, otherwise a negative error value.
725 * @retval #ZIGBEE_ERROR_NONE Successful
726 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
727 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
728 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
729 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
731 * @see zb_form_network()
733 int zb_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb, void *user_data);
736 * @brief Forces a node to leave one network and to rejoin the other.
737 * @details If @a remove_children is set to true, the target end device will reset its
738 * state-machine to factory defaults.
742 * @privilege %http://tizen.org/privilege/zigbee
744 * @param[in] handle The handle of zigbee
745 * @param[in] addr The source EUI64 of the binding (the remote device's EUI64)
746 * @param[in] remove_children Remove children
747 * @param[in] rejoin Rejoin after leave
749 * @return 0 on success, otherwise a negative error value.
750 * @retval #ZIGBEE_ERROR_NONE Successful
751 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
752 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
753 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
754 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
756 * @see zb_form_network()
758 int zb_leave_device(zb_zigbee_h handle, zb_ieee_addr addr, bool remove_children, bool rejoin);
761 * @brief Allows or disallows the coordinator device to accept other device's association
766 * @privilege %http://tizen.org/privilege/zigbee
768 * @remarks Especially, this can be very useful for disabling joining all throughout the
769 * network. Typically, this is the last step when commissioning a network. It closes it
770 * down to prevent other nodes getting on the network without permission.
772 * @param[in] handle The handle of zigbee
773 * @param[in] timeout Number of seconds during which devices will be allowed to join
774 * the network. A value of 0xff turns permit joining on permanently
776 * @return 0 on success, otherwise a negative error value.
777 * @retval #ZIGBEE_ERROR_NONE Successful
778 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
779 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
780 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
781 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
783 * @see zb_form_network()
785 int zb_permit_join(zb_zigbee_h handle, unsigned char timeout);
788 * @brief Shows current coordinator's IEEE MAC address.
789 * @details The function gets the coordinator's MAC address from the machine which runs
790 * zigbee-service daemon.
794 * @privilege %http://tizen.org/privilege/zigbee
796 * @param[in] handle The handle of zigbee
797 * @param[out] addr64 the Zigbee IEEE MAC address of this machine.
799 * @return 0 on success, otherwise a negative error value.
800 * @retval #ZIGBEE_ERROR_NONE Successful
801 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
802 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
803 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
804 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
806 * @see zb_get_network_info()
808 int zb_get_controller_mac_address(zb_zigbee_h handle, zb_ieee_addr addr64);
811 * @brief Gets information of the current network environment of coordinator.
812 * @details The function shows network environment
816 * @privilege %http://tizen.org/privilege/zigbee
818 * @param[in] handle The handle of zigbee
819 * @param[out] addr64 the Zigbee IEEE MAC address
820 * @param[out] nodeid Node ID
821 * @param[out] panid PAN ID
822 * @param[out] channel 11~26 : 2.4GHz~2.485GHz
823 * @param[out] tx_power Tx power strength
825 * @return 0 on success, otherwise a negative error value.
826 * @retval #ZIGBEE_ERROR_NONE Successful
827 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
828 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
829 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
830 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
832 * @see zb_form_network()
834 int zb_get_network_info(zb_zigbee_h handle, zb_ieee_addr addr64, zb_nwk_addr *nodeid,
835 zb_nwk_addr *panid, unsigned char *channel, unsigned char *tx_power);
838 * @brief Gets all children device list information.
839 * @details This function return end-point list and simple description per each end-point
844 * @privilege %http://tizen.org/privilege/zigbee
846 * @remarks The @a list should be released using zb_end_dev_info_list_free().
848 * @param[in] handle The handle of zigbee
849 * @param[out] count The number of end-devices
850 * @param[out] list The device information list
852 * @return 0 on success, otherwise a negative error value.
853 * @retval #ZIGBEE_ERROR_NONE Successful
854 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
855 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
856 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
857 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
859 * @see zb_end_dev_info_list_free()
862 int zb_end_dev_info_get_list(zb_zigbee_h handle, int *count,
863 zb_end_dev_info_h **list);
866 * @brief Gets endpoint list information.
867 * @details This function return end-point list of each device.
871 * @privilege %http://tizen.org/privilege/zigbee
873 * @remarks The @a ep_list should be released using free().
875 * @param[in] handle The handle of zigbee
876 * @param[in] addr64 the Zigbee IEEE MAC address
877 * @param[out] count The number of endpoints
878 * @param[out] ep_list The device endpoint list
880 * @return 0 on success, otherwise a negative error value.
881 * @retval #ZIGBEE_ERROR_NONE Successful
882 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
883 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
884 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
885 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
887 int zb_end_dev_get_endpoint_list(zb_zigbee_h handle, zb_ieee_addr addr64,
888 unsigned char *count, zb_end_point **ep_list);
891 * @brief Gets cluster list information.
892 * @details This function return in and out cluster list of each device.
896 * @privilege %http://tizen.org/privilege/zigbee
898 * @remarks The @a in_cluster_list should be released using free().
899 * @remarks The @a out_cluster_list should be released using free().
901 * @param[in] handle The handle of zigbee
902 * @param[in] addr64 the Zigbee IEEE MAC address
903 * @param[in] ep endpoint number
904 * @param[out] in_cluster_count The number of in-clusters
905 * @param[out] in_cluster_list The device server cluster list
906 * @param[out] out_cluster_count The number of out-clusters
907 * @param[out] out_cluster_list The device client list
909 * @return 0 on success, otherwise a negative error value.
910 * @retval #ZIGBEE_ERROR_NONE Successful
911 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
912 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
913 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
914 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
916 int zb_end_dev_info_get_cluster_list(zb_zigbee_h handle, zb_ieee_addr addr64, zb_end_point ep,
917 unsigned char *in_cluster_count, zb_cluster_id **in_cluster_list,
918 unsigned char *out_cluster_count, zb_cluster_id **out_cluster_list);
921 * @brief Frees all children device list information.
922 * @details This function return end-point list and simple description per each end-point
927 * @param[in] list The device information list
929 * @return 0 on success, otherwise a negative error value.
930 * @retval #ZIGBEE_ERROR_NONE Successful
931 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
932 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
934 * @see zb_end_dev_info_get_list()
936 int zb_end_dev_info_list_free(zb_end_dev_info_h *list);
939 * @brief Creates an end-device handle.
943 * @privilege %http://tizen.org/privilege/zigbee
945 * @remarks The @a handle should be released using zb_end_dev_destroy().
947 * @param[out] handle The handle of end-device descriptor
949 * @return 0 on success, otherwise a negative error value.
950 * @retval #ZIGBEE_ERROR_NONE Successful
951 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
952 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
953 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
954 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
956 * @see zb_end_dev_info_clone()
957 * @see zb_end_dev_info_destroy()
959 int zb_end_dev_info_create(zb_end_dev_info_h *handle);
962 * @brief Clones an end-device handle.
966 * @remarks The @a src should be released using zb_end_dev_destroy().
967 * @remarks The @a dst should be released using zb_end_dev_destroy().
969 * @param[in] src handle of source end-device descriptor
970 * @param[in] dst handle of destination end-device descriptor
972 * @return 0 on success, otherwise a negative error value.
973 * @retval #ZIGBEE_ERROR_NONE Successful
974 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
975 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
977 * @see zb_end_dev_info_create()
978 * @see zb_end_dev_info_destroy()
980 int zb_end_dev_info_clone(zb_end_dev_info_h src, zb_end_dev_info_h *dst);
983 * @brief Destroys an end-device handle.
987 * @param[in] handle The handle of end-device descriptor
989 * @return 0 on success, otherwise a negative error value.
990 * @retval #ZIGBEE_ERROR_NONE Successful
991 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
992 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
994 * @see zb_end_dev_info_create()
995 * @see zb_end_dev_info_clone()
997 int zb_end_dev_info_destroy(zb_end_dev_info_h handle);
1000 * @brief Gets network address of a specific end-point.
1004 * @remarks This function should be called in zb_end_dev_info_cb()
1006 * @param[in] handle The handle of a specific end-device
1007 * @param[out] addr16 network address of the end-point
1009 * @return 0 on success, otherwise a negative error value.
1010 * @retval #ZIGBEE_ERROR_NONE Successful
1011 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1012 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1014 * @see zb_end_dev_info_cb()
1015 * @see zb_foreach_end_dev_info()
1016 * @see zb_end_dev_info_get_list()
1018 int zb_end_dev_info_get_network_address(zb_end_dev_info_h handle,
1019 zb_nwk_addr *addr16);
1022 * @brief Gets ieee address of a specific end-point.
1026 * @remarks This function should be called in zb_end_dev_info_cb()
1028 * @param[in] handle The handle of a specific end-device
1029 * @param[out] addr64 ieee address of the end-point
1031 * @return 0 on success, otherwise a negative error value.
1032 * @retval #ZIGBEE_ERROR_NONE Successful
1033 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1034 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1036 * @see zb_end_dev_info_cb()
1037 * @see zb_foreach_end_dev_info()
1038 * @see zb_end_dev_get_list()
1040 int zb_end_dev_info_get_ieee_address(zb_end_dev_info_h handle, zb_ieee_addr addr64);
1043 * @brief Gets a number of end-points of a specific end-device.
1047 * @remarks This function should be called in zb_end_dev_info_cb()
1049 * @param[in] handle The handle of a specific end-device
1050 * @param[out] count a number of endpoints of the end-point
1052 * @return 0 on success, otherwise a negative error value.
1053 * @retval #ZIGBEE_ERROR_NONE Successful
1054 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1055 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1057 * @see zb_end_dev_info_cb()
1058 * @see zb_foreach_end_dev_info()
1059 * @see zb_end_dev_get_list()
1061 int zb_end_dev_info_get_num_of_ep(zb_end_dev_info_h handle, unsigned char *count);
1064 * @brief Gets pointer of end-points list.
1068 * @remarks This function should be called in zb_end_dev_info_cb().
1069 * The number of items on the list can be found with zb_end_dev_info_get_num_of_ep().
1070 * @remarks The @a ep_list should be released using free().
1072 * @param[in] handle The handle of a specific end-device
1073 * @param[out] ep_list list of endpoints of the end-point
1075 * @return 0 on success, otherwise a negative error value.
1076 * @retval #ZIGBEE_ERROR_NONE Successful
1077 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1078 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1080 * @see zb_end_dev_info_cb()
1081 * @see zb_foreach_end_dev_info()
1082 * @see zb_end_dev_info_get_list()
1083 # @see zb_end_dev_info_get_num_of_ep()
1085 int zb_end_dev_info_get_ep_list(zb_end_dev_info_h handle, zb_end_point **ep_list);
1088 * @brief Gets 802.15.4 MAC capability of a specific end-point.
1092 * @remarks This function should be called in zb_end_dev_info_cb()
1094 * @param[in] handle The handle of a specific end-device
1095 * @param[out] capability 802.15.4 MAC capability of the end-point
1097 * @return 0 on success, otherwise a negative error value.
1098 * @retval #ZIGBEE_ERROR_NONE Successful
1099 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1100 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1101 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1102 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1104 * @see zb_end_dev_info_cb()
1105 * @see zb_foreach_end_dev_info()
1106 * @see zb_end_dev_info_get_list()
1108 int zb_end_dev_info_get_mac_capability(zb_end_dev_info_h handle,
1109 zb_zdp_mac_capability_field_e *capability);
1112 * @brief Gets ability of alternative PAN coordinator of a specific end-point.
1116 * @remarks This function should be called in zb_end_dev_info_cb()
1118 * @param[in] handle The handle of a specific end-device
1119 * @param[out] can_do_it alternative of PAN coordinator of the end-point
1121 * @return 0 on success, otherwise a negative error value.
1122 * @retval #ZIGBEE_ERROR_NONE Successful
1123 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1124 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1125 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1126 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1128 * @see zb_end_dev_info_cb()
1129 * @see zb_foreach_end_dev_info()
1130 * @see zb_end_dev_info_get_list()
1132 int zb_end_dev_info_get_alternative_pan_coordinator(
1133 zb_end_dev_info_h handle, zb_zdp_do_pan_coordinator_e *can_do_it);
1136 * @brief Gets device id of a specific end-point.
1140 * @remarks This function should be called in zb_end_dev_info_cb()
1142 * @param[in] handle The handle of a specific end-device
1143 * @param[in] ep endpoint number
1144 * @param[out] deviceid device id of the end-point
1146 * @return 0 on success, otherwise a negative error value.
1147 * @retval #ZIGBEE_ERROR_NONE Successful
1148 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1149 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1150 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1151 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1153 * @see zb_end_dev_info_cb()
1154 * @see zb_foreach_end_dev_info()
1155 * @see zb_end_dev_info_get_list()
1157 int zb_end_dev_info_get_device_id(zb_end_dev_info_h handle, zb_end_point ep,
1158 zb_device_id *deviceid);
1161 * @brief Gets profile id of a specific end-point.
1165 * @remarks This function should be called in zb_end_dev_info_cb()
1167 * @param[in] handle The handle of a specific end-device
1168 * @param[in] ep endpoint number
1169 * @param[out] profileid profile id of the end-point
1171 * @return 0 on success, otherwise a negative error value.
1172 * @retval #ZIGBEE_ERROR_NONE Successful
1173 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1174 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1175 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1176 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1178 * @see zb_end_dev_info_cb()
1179 * @see zb_foreach_end_dev_info()
1180 * @see zb_end_dev_info_get_list()
1182 int zb_end_dev_info_get_profile_id(zb_end_dev_info_h handle, zb_end_point ep,
1183 zb_profile_id *profileid);
1186 * @brief Gets power source type of a specific end-point.
1190 * @remarks This function should be called in zb_end_dev_info_cb()
1192 * @param[in] handle The handle of a specific end-device
1193 * @param[out] power_src power source type of the end-point
1195 * @return 0 on success, otherwise a negative error value.
1196 * @retval #ZIGBEE_ERROR_NONE Successful
1197 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1198 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1199 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1200 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1202 * @see zb_end_dev_info_cb()
1203 * @see zb_foreach_end_dev_info()
1204 * @see zb_end_dev_info_get_list()
1206 int zb_end_dev_info_get_power_source(zb_end_dev_info_h handle,
1207 zb_zdp_power_e *power_src);
1210 * @brief Gets security capability of a specific end-point.
1214 * @remarks This function should be called in zb_end_dev_info_cb()
1216 * @param[in] handle The handle of a specific end-device
1217 * @param[out] sec_capability security type of the end-point
1219 * @return 0 on success, otherwise a negative error value.
1220 * @retval #ZIGBEE_ERROR_NONE Successful
1221 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1222 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1223 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1224 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1226 * @see zb_end_dev_info_cb()
1227 * @see zb_foreach_end_dev_info()
1228 * @see zb_end_dev_get_list()
1230 int zb_end_dev_info_get_security_capabilty(zb_end_dev_info_h handle,
1231 zb_zdp_security_cap_e *sec_capability);
1238 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
1244 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1245 * @brief Creates a simple descriptor.
1249 * @privilege %http://tizen.org/privilege/zigbee
1251 * @remarks The @a handle should be released using zb_simple_desc_destroy().
1253 * @param[out] handle The handle of a simple descriptor
1255 * @return 0 on success, otherwise a negative error value.
1256 * @retval #ZIGBEE_ERROR_NONE Successful
1257 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1258 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1259 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1260 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1262 * @see zb_simple_desc_clone()
1263 * @see zb_simple_desc_destroy()
1265 int zb_simple_desc_create(zb_zdo_simple_desc_h *handle);
1268 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1269 * @brief Clones a simple descriptor.
1273 * @remarks The @a dst should be released using zb_simple_desc_destroy().
1275 * @param[in] src handle of a source simple descriptor
1276 * @param[in] dst handle of a destination simple descriptor
1278 * @return 0 on success, otherwise a negative error value.
1279 * @retval #ZIGBEE_ERROR_NONE Successful
1280 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1281 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1283 * @see zb_simple_desc_create()
1284 * @see zb_simple_desc_destroy()
1286 int zb_simple_desc_clone(zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h *dst);
1289 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1290 * @brief Destroys a simple a descriptor handle.
1294 * @param[in] handle The handle of a simple descriptor
1296 * @return 0 on success, otherwise a negative error value.
1297 * @retval #ZIGBEE_ERROR_NONE Successful
1298 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1299 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1301 * @see zb_simple_desc_create()
1302 * @see zb_simple_desc_clone()
1304 int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle);
1307 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1308 * @brief Gets active endpoint number from a simple descriptor handle.
1312 * @param[in] handle The handle of a simple descriptor
1313 * @param[out] ep endpoint number
1315 * @return 0 on success, otherwise a negative error value.
1316 * @retval #ZIGBEE_ERROR_NONE Successful
1317 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1318 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1320 * @see zb_simple_desc_set_ep()
1322 int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, zb_end_point *ep);
1325 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1326 * @brief Sets active endpoint number to a simple descriptor handle.
1330 * @param[in] handle The handle of a simple descriptor
1331 * @param[in] ep endpoint number
1333 * @return 0 on success, otherwise a negative error value.
1334 * @retval #ZIGBEE_ERROR_NONE Successful
1335 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1336 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1338 * @see zb_simple_desc_get_ep()
1340 int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, zb_end_point ep);
1343 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1344 * @brief Gets profile id from a simple descriptor handle.
1348 * @param[in] handle The handle of a simple descriptor
1349 * @param[out] profileid profile id
1351 * @return 0 on success, otherwise a negative error value.
1352 * @retval #ZIGBEE_ERROR_NONE Successful
1353 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1354 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1356 * @see zb_simple_desc_set_profile_id()
1358 int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
1359 zb_profile_id *profileid);
1362 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1363 * @brief Sets profile id to a simple descriptor handle.
1367 * @param[in] handle The handle of a simple descriptor
1368 * @param[in] profileid profile id
1370 * @return 0 on success, otherwise a negative error value.
1371 * @retval #ZIGBEE_ERROR_NONE Successful
1372 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1373 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1375 * @see zb_simple_desc_get_device_id()
1377 int zb_simple_desc_set_profile_id(
1378 zb_zdo_simple_desc_h handle,
1379 zb_profile_id profileid);
1382 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1383 * @brief Gets device id from a simple descriptor handle.
1387 * @param[in] handle The handle of a simple descriptor
1388 * @param[out] deviceid 16-bit device identifier
1390 * @return 0 on success, otherwise a negative error value.
1391 * @retval #ZIGBEE_ERROR_NONE Successful
1392 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1393 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1395 * @see zb_simple_desc_set_device_id()
1397 int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
1398 zb_device_id *deviceid);
1401 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1402 * @brief Sets device id to a simple descriptor handle.
1406 * @param[in] handle The handle of a simple descriptor
1407 * @param[in] deviceid 16-bit device identifier
1409 * @return 0 on success, otherwise a negative error value.
1410 * @retval #ZIGBEE_ERROR_NONE Successful
1411 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1412 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1414 * @see zb_simple_desc_get_device_ver()
1416 int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
1417 zb_device_id deviceid);
1420 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1421 * @brief Gets device version from a simple descriptor handle.
1425 * @param[in] handle The handle of a simple descriptor
1426 * @param[out] device_ver device version
1428 * @return 0 on success, otherwise a negative error value.
1429 * @retval #ZIGBEE_ERROR_NONE Successful
1430 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1431 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1433 * @see zb_simple_desc_set_device_ver()
1435 int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
1436 unsigned short *device_ver);
1439 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1440 * @brief Sets device version to a simple descriptor handle.
1444 * @param[in] handle The handle of a simple descriptor
1445 * @param[in] device_ver device version
1447 * @return 0 on success, otherwise a negative error value.
1448 * @retval #ZIGBEE_ERROR_NONE Successful
1449 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1450 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1452 * @see zb_simple_desc_set_device_ver()
1454 int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
1455 unsigned short device_ver);
1458 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1459 * @brief Gets the number of items in input clusters from a simple descriptor handle.
1463 * @param[in] handle Handle of a simple descriptor
1464 * @param[out] num_of_in_clusters The number of input clusters
1466 * @return 0 on success, otherwise a negative error value.
1467 * @retval #ZIGBEE_ERROR_NONE Successful
1468 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1469 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1471 * @see zb_simple_desc_set_num_of_in_clusters()
1473 int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
1474 unsigned char *num_of_in_clusters);
1477 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1478 * @brief Sets the number of input clusters to a simple descriptor handle.
1482 * @param[in] handle The handle of a simple descriptor
1483 * @param[in] num_of_in_clusters number of input clusters
1485 * @return 0 on success, otherwise a negative error value.
1486 * @retval #ZIGBEE_ERROR_NONE Successful
1487 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1488 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1490 * @see zb_simple_desc_get_num_of_in_clusters()
1492 int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
1493 unsigned char num_of_in_clusters);
1496 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1497 * @brief Gets number of output clusters from a simple descriptor handle.
1501 * @param[in] handle The handle of a simple descriptor
1502 * @param[out] num_of_out_clusters number of output clusters
1504 * @return 0 on success, otherwise a negative error value.
1505 * @retval #ZIGBEE_ERROR_NONE Successful
1506 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1507 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1509 * @see zb_simple_desc_set_num_of_out_clusters()
1511 int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
1512 unsigned char *num_of_out_clusters);
1515 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1516 * @brief Sets number of output clusters to a simple descriptor handle.
1520 * @param[in] handle The handle of a simple descriptor
1521 * @param[in] num_of_out_clusters number of output clusters
1523 * @return 0 on success, otherwise a negative error value.
1524 * @retval #ZIGBEE_ERROR_NONE Successful
1525 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1526 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1528 * @see zb_simple_desc_get_num_of_out_clusters()
1530 int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
1531 unsigned char num_of_out_clusters);
1534 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1535 * @brief Gets input cluster list from a simple descriptor handle.
1539 * @remarks The @a in_clusters should not be released.
1540 * @remarks The @a in_clusters is available until handle is released
1542 * @param[in] handle The handle of simple descriptor
1543 * @param[out] in_clusters input clusters
1545 * @return 0 on success, otherwise a negative error value.
1546 * @retval #ZIGBEE_ERROR_NONE Successful
1547 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1548 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1550 * @see zb_simple_desc_set_in_clusters()
1552 int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
1553 zb_cluster_id **in_clusters);
1556 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1557 * @brief Sets input cluster list to a simple descriptor handle.
1561 * @param[in] handle The handle of a simple descriptor
1562 * @param[in] in_clusters input clusters
1563 * @param[in] num number of input clusters
1565 * @return 0 on success, otherwise a negative error value.
1566 * @retval #ZIGBEE_ERROR_NONE Successful
1567 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1568 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1570 * @see zb_simple_desc_get_in_clusters()
1572 int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
1573 zb_cluster_id *in_clusters, int num);
1576 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1577 * @brief Gets output cluster list from a simple descriptor handle.
1581 * @remarks The @a out_clusters should not be released.
1582 * @remarks The @a out_clusters is available until handle is released
1584 * @param[in] handle The handle of a simple descriptor
1585 * @param[out] out_clusters output clusters
1587 * @return 0 on success, otherwise a negative error value.
1588 * @retval #ZIGBEE_ERROR_NONE Successful
1589 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1590 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1592 * @see zb_simple_desc_get_in_clusters()
1594 int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
1595 zb_cluster_id **out_clusters);
1598 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1599 * @brief Sets output cluster list to a simple descriptor handle.
1603 * @param[in] handle The handle of a simple descriptor
1604 * @param[in] out_clusters output clusters
1605 * @param[in] num number of output clusters
1607 * @return 0 on success, otherwise a negative error value.
1608 * @retval #ZIGBEE_ERROR_NONE Successful
1609 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1610 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1612 * @see zb_simple_desc_get_in_clusters()
1614 int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
1615 zb_cluster_id *out_clusters, int num);
1619 * @brief Called after Network / IEEE address request.
1620 * @details The NWK_addr_cb is generated by a Remote Device in response to a
1621 * NWK_addr_req or IEEE_addr_req command inquiring as to the NWK address of the Remote
1622 * Device or the NWK address of an address held in a local discovery cache.
1623 * The destination addressing on this command is unicast.
1627 * @remarks The @a assoc_dev_addr_list should not be released.
1628 * @remarks The @a assoc_dev_addr_list can be used only in the callback. To use outside, make a copy.
1630 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
1631 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
1632 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND
1633 * @param[out] remote_dev_addr64 64-bit address for the remote device
1634 * @param[out] remote_dev_addr16 16-bit address for the remote device
1635 * @param[out] assoc_dev_len The number of items in the 16-bit short addresses to follow.
1636 * If the RequestType in the request is Extended Response
1637 * and there are no associated devices on the Remote Device,
1638 * this field shall be set to 0.
1639 * If an error occurs or the RequestType in the request is
1640 * for a Single Device Response, this field shall not
1641 * be included in the frame.
1642 * @param[out] start_idx Starting index into the list of associated devices for this
1643 * report. If the RequestType in the request is Extended Response
1644 * and there are no associated devices on the Remote Device,
1645 * this field shall not be included in the frame.
1646 * If an error occurs or the RequestType in the request is
1647 * for a Single Device Response, this field shall not
1648 * be included in the frame.
1649 * @param[out] assoc_dev_addr_list A list of 16-bit addresses, one corresponding to each
1650 * associated device to Remote Device; The number of 16-bit
1651 * network addresses contained in this field is specified
1652 * in the NumAssocDev field.
1653 * If the RequestType in the request is Extended Response
1654 * and there are no associated devices on the Remote Device,
1655 * this field shall not be included in the frame.
1656 * If an error occurs or the RequestType in the request is
1657 * for a Single Device Response, this field shall not
1658 * be included in the frame.
1659 * @param[out] user_data user data
1661 * @see zb_zdo_nwk_addr_req()
1663 typedef void (*zb_zdo_addr_cb)(zb_zdp_status_e status, zb_ieee_addr remote_dev_addr64,
1664 zb_nwk_addr remote_dev_addr16, unsigned char assoc_dev_len,
1665 unsigned char start_idx, zb_device_id *assoc_dev_addr_list, void *user_data);
1668 * @brief Sends 'Network address request' command.
1669 * @details The NWK_addr_req is generated from a Local Device wishing to inquire as to the
1670 * 16-bit address of the Remote Device based on its known IEEE address. The
1671 * destination addressing on this command shall be unicast or broadcast to all
1672 * devices for which macRxOnWhenIdle = TRUE.
1676 * @privilege %http://tizen.org/privilege/zigbee
1678 * @param[in] handle The handle of zigbee
1679 * @param[in] addr64 IEEE address for device of interest
1680 * @param[in] request_type \n
1681 * 0x00 - Single device response \n
1682 * 0x01 - Extended response \n
1683 * @param[in] start_idx If the Request type for this command is Extended response,
1684 * is StartIndex provides the starting index for the requested
1685 * elements of the associated devices list
1686 * @param[in] cb Response callback
1687 * @param[in] user_data user data
1689 * @return 0 on success, otherwise a negative error value.
1690 * @retval #ZIGBEE_ERROR_NONE Successful
1691 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1692 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1693 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1694 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1695 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1697 * @see zb_zdo_nwk_addr_cb()
1699 int zb_zdo_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64,
1700 zb_zdp_req_type_e request_type, unsigned char start_idx, zb_zdo_addr_cb cb,
1704 * @brief Sends 'IEEE address request' command.
1705 * @details The IEEE_addr_req is generated from a Local Device wishing to inquire as to
1706 * the 64-bit IEEE address of the Remote Device based on their known 16-bit address.
1707 * The destination addressing on this command shall be unicast.
1711 * @privilege %http://tizen.org/privilege/zigbee
1713 * @param[in] handle The handle of zigbee
1714 * @param[in] addr16 Network address for device of interest
1715 * @param[in] cb Response callback
1716 * @param[in] user_data user data
1718 * @return 0 on success, otherwise a negative error value.
1719 * @retval #ZIGBEE_ERROR_NONE Successful
1720 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1721 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1722 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1723 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1724 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1726 * @see zb_zdo_ieee_addr_cb()
1728 int zb_zdo_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
1732 * @brief Called after active endpoint request command.
1733 * @details The Active_EP_cb is generated by a remote device in response to an
1734 * Active_EP_req directed to the remote device. This command shall be unicast to
1735 * the originator of the Active_EP_req command.
1737 * The remote device shall generate the Active_EP_cb command using the format
1738 * illustrated param list.
1740 * The NWKAddrOfInterest field shall match that specified in the original
1741 * Active_EP_req command.
1743 * If the NWKAddrOfInterest field matches the network address of the remote device,
1744 * it shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field
1745 * to the number of active endpoints on that device and include an ascending list of
1746 * all the identifiers of the active endpoints on that device in the ActiveEPList field.
1748 * If the NWKAddrOfInterest field does not match the network address of the remote device
1749 * and it is an end device, it shall set the Status field to
1750 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the ActiveEPCount field to 0, and not include
1751 * the ActiveEPList field.
1753 * If the NWKAddrOfInterest field does not match the network address of the remote device
1754 * and it is the coordinator or a router, it shall determine whether the NWKAddrOfInterest
1755 * field matches the network address of a device it holds in a discovery cache.
1757 * If the NWKAddrOfInterest field does not match the network address of a device it holds
1758 * in a discovery cache, it shall set the Status field to #ZB_ZDP_STATUS_DEVICE_NOT_FOUND,
1759 * set the ActiveEPCount field to 0, and not include the ActiveEPList field.
1761 * If the NWKAddrOfInterest matches the network address of a device held in a discovery
1762 * cache on the remote device, it shall determine whether that device has any active
1765 * If the discovery information corresponding to the ActiveEP request has not yet been
1766 * uploaded to the discovery cache, the remote device shall set the Status field to
1767 * #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the ActiveEPCount field to 0 and not include the
1768 * ActiveEPList field.
1770 * If the cached device has no active endpoints, the remote device shall set the Status
1771 * field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field to 0, and not include
1772 * the ActiveEPList field.
1774 * If the cached device has active endpoints,
1775 * the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set
1776 * the ActiveEPCount field to the number of active endpoints on that device,
1777 * and include an ascending list of all the identifiers of the active endpoints on that
1778 * device in the ActiveEPList field .
1782 * @remarks The @a ep_list should not be released.
1783 * @remarks The @a ep_list can be used only in the callback. To use outside, make a copy.
1785 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
1786 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
1787 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
1788 * #ZB_ZDP_STATUS_NO_DESCRIPTOR \n
1789 * @param[out] addr16 Network address for the request
1790 * @param[out] count The count of active endpoints on the remote device
1791 * @param[out] ep_list List of bytes each of which represents an 8-bit endpoints
1792 * @param[out] user_data user data
1794 * @see zb_zdo_active_ep()
1796 typedef void (*zb_zdo_active_ep_cb)(zb_zdp_status_e status, zb_nwk_addr addr16,
1797 unsigned char count, zb_end_point *ep_list, void *user_data);
1800 * @brief Sends 'active end-point request' command.
1801 * @details The Active_EP_req command is generated from a local device wishing to acquire
1802 * the list of endpoints on a remote device with simple descriptors. This command
1803 * shall be unicast either to the remote device itself or to an alternative device that
1804 * contains the discovery information of the remote device.
1806 * The local device shall generate the Active_EP_req command using the format
1807 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
1808 * address of the remote device for which the active endpoint list is required.
1812 * @privilege %http://tizen.org/privilege/zigbee
1814 * @param[in] handle The handle of zigbee
1815 * @param[in] addr16 Network address for device of interest
1816 * @param[in] cb Response callback
1817 * @param[in] user_data user data
1819 * @return 0 on success, otherwise a negative error value.
1820 * @retval #ZIGBEE_ERROR_NONE Successful
1821 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1822 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1823 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1824 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1825 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1827 * @see zb_zdo_active_ep_cb()
1829 int zb_zdo_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
1833 * @brief Called after 'simple descriptor request' command.
1834 * @details The Simple_Desc_cb is generated by a remote device in response to a
1835 * Simple_Desc_req directed to the remote device. This command shall be unicast to
1836 * the originator of the Simple_Desc_req command.
1837 * The remote device shall generate the Simple_Desc_cb command using the format
1838 * illustrated in Table 2.94 in Zigbee Specification. The NWKAddrOfInterest field shall
1839 * match that specified in the original Simple_Desc_req command.
1840 * If the endpoint field specified in the original Simple_Desc_req command does not fall
1841 * within the correct range specified in param list, the remote device shall set the Status
1842 * field to #ZB_ZDP_STATUS_INVALID_EP, set the Length field to 0 and not include the
1843 * SimpleDescriptor field.
1845 * If the NWKAddrOfInterest field matches the network address of the remote
1846 * device, it shall determine whether the endpoint field specifies the identifier of an
1847 * active endpoint on the device. If the endpoint field corresponds to an active
1848 * endpoint, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS,
1849 * set the Length field to the length of the simple descriptor on that endpoint,
1850 * and include the simple descriptor for that endpoint in the SimpleDescriptor field.
1851 * If the endpoint field does not correspond to an active endpoint, the remote device
1852 * shall set the Status field to #ZB_ZDP_STATUS_NOT_ACTIVE, set the Length field to 0,
1853 * and not include the SimpleDescriptor field.
1855 * If the NWKAddrOfInterest field does not match the network address of the
1856 * remote device and it is an end device, it shall set the Status field to
1857 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
1858 * SimpleDescriptor field. If the NWKAddrOfInterest field does not match the
1859 * network address of the remote device and it is the coordinator or a router, it shall
1860 * determine whether the NWKAddrOfInterest field matches the network address of
1861 * one of its children. If the NWKAddrOfInterest field does not match the network
1862 * address of one of the children of the remote device, it shall set the Status field to
1863 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
1864 * SimpleDescriptor field.
1866 * If the NWKAddrOfInterest matches the network address of one of the children of
1867 * the remote device, it shall determine whether a simple descriptor for that device
1868 * and on the requested endpoint is available. If a simple descriptor is not available
1869 * on the requested endpoint of the child indicated by the NWKAddrOfInterest field,
1870 * the remote device shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the
1871 * Length field to 0, and not include the SimpleDescriptor field. If a simple descriptor
1872 * is available on the requested endpoint of the child indicated by the
1873 * NWKAddrOfInterest field, the remote device shall set the Status field to
1874 * #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the simple descriptor
1875 * on that endpoint, and include the simple descriptor for that
1876 * endpoint of the matching child device in the SimpleDescriptor field.
1880 * The @a desc can be used only in the callback. To use outside, make a copy using zb_simple_desc_clone().
1882 * @param[out] addr16 Network address for the request
1883 * @param[out] len Length in bytes of the simple descriptor to follow
1884 * @param[out] desc Simple descriptor structure this filed shall only be included
1885 * in the frame if the status field is equal to #ZB_ZDP_STATUS_SUCCESS
1886 * @param[out] user_data user data
1888 * @see zb_zdo_simple_desc_req()
1890 typedef void (*zb_zdo_simple_desc_cb)(zb_nwk_addr addr16, unsigned char len,
1891 const zb_zdo_simple_desc_h desc, void *user_data);
1894 * @brief Sends 'simple descriptor request' command.
1895 * @details The Simple_Desc_req command is generated from a local device wishing to
1896 * inquire as to the simple descriptor of a remote device on a specified endpoint. This
1897 * command shall be unicast either to the remote device itself or to an alternative
1898 * device that contains the discovery information of the remote device.
1900 * The local device shall generate the Simple_Desc_req command using the format
1901 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
1902 * address of the remote device for which the simple descriptor is required and the
1903 * endpoint field shall contain the endpoint identifier from which to obtain the
1904 * required simple descriptor.
1908 * @privilege %http://tizen.org/privilege/zigbee
1910 * @param[in] handle The handle of zigbee
1911 * @param[in] addr16 Network address for device of interest
1912 * @param[in] ep The endpoint on the destination
1913 * @param[in] cb Response callback
1914 * @param[in] user_data user data
1916 * @return 0 on success, otherwise a negative error value.
1917 * @retval #ZIGBEE_ERROR_NONE Successful
1918 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1919 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
1920 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1921 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1922 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1923 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1925 * @see zb_zdo_simple_desc_cb()
1927 int zb_zdo_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
1928 zb_zdo_simple_desc_cb cb, void *user_data);
1935 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
1941 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
1942 * @brief Creates a read attribute status record.
1946 * @privilege %http://tizen.org/privilege/zigbee
1948 * @param[in] handle The handle of read attribute status record
1950 * @return 0 on success, otherwise a negative error value.
1951 * @retval #ZIGBEE_ERROR_NONE Successful
1952 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1953 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1954 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1955 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1957 * @see zb_read_attr_status_record_clone()
1958 * @see zb_read_attr_status_record_destroy()
1959 * @see zb_read_attr_status_record_set_id()
1960 * @see zb_read_attr_status_record_set_status()
1961 * @see zb_read_attr_status_record_set_value()
1962 * @see zb_zcl_global_attr_read_cb()
1963 * @see zb_read_attr_status_record_get_status()
1964 * @see zb_read_attr_status_record_get_type()
1965 * @see zb_read_attr_status_record_get_value()
1967 int zb_read_attr_status_record_create(zb_zcl_read_attr_status_record_h *handle);
1970 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
1971 * @brief Clones a read attribute status record.
1975 * @remarks The @a dst should be released using zb_read_attr_status_record_destroy().
1977 * @param[in] src Source handle of read attribute status record
1978 * @param[in] dst Destination handle of read attribute status record
1980 * @return 0 on success, otherwise a negative error value.
1981 * @retval #ZIGBEE_ERROR_NONE Successful
1982 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1983 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1985 * @see zb_read_attr_status_record_create()
1986 * @see zb_read_attr_status_record_destroy()
1987 * @see zb_read_attr_status_record_set_id()
1988 * @see zb_read_attr_status_record_set_status()
1989 * @see zb_read_attr_status_record_set_value()
1990 * @see zb_zcl_global_attr_read_cb()
1991 * @see zb_read_attr_status_record_get_status()
1992 * @see zb_read_attr_status_record_get_type()
1993 * @see zb_read_attr_status_record_get_value()
1995 int zb_read_attr_status_record_clone(zb_zcl_read_attr_status_record_h src,
1996 zb_zcl_read_attr_status_record_h *dst);
1999 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2000 * @brief Destroys a read attribute status record.
2004 * @param[in] handle The handle of read attribute status record
2006 * @return 0 on success, otherwise a negative error value.
2007 * @retval #ZIGBEE_ERROR_NONE Successful
2008 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2009 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2011 * @see zb_read_attr_status_record_create()
2012 * @see zb_read_attr_status_record_clone()
2013 * @see zb_read_attr_status_record_set_id()
2014 * @see zb_read_attr_status_record_set_status()
2015 * @see zb_read_attr_status_record_set_value()
2016 * @see zb_zcl_global_attr_read_cb()
2017 * @see zb_read_attr_status_record_get_status()
2018 * @see zb_read_attr_status_record_get_type()
2019 * @see zb_read_attr_status_record_get_value()
2021 int zb_read_attr_status_record_destroy(zb_zcl_read_attr_status_record_h handle);
2024 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2025 * @brief Gets identifier from read attribute status record.
2026 * @details The attribute identifier field is 16 bits in length and shall contain the
2027 * identifier of the attribute that has been read (or of which an element has been read).
2029 * This field shall contain the same value that was included in the corresponding
2030 * attribute identifier field of the original read attributes or read attributes
2031 * structured command.
2035 * @param[in] handle The handle of read attribute status record
2036 * @param[out] id Attribute identifier
2038 * @return 0 on success, otherwise a negative error value.
2039 * @retval #ZIGBEE_ERROR_NONE Successful
2040 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2041 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2043 * @see zb_read_attr_status_record_create()
2044 * @see zb_read_attr_status_record_destroy()
2045 * @see zb_read_attr_status_record_set_id()
2046 * @see zb_read_attr_status_record_set_status()
2047 * @see zb_read_attr_status_record_set_value()
2048 * @see zb_zcl_global_attr_read_cb()
2049 * @see zb_read_attr_status_record_get_status()
2050 * @see zb_read_attr_status_record_get_type()
2051 * @see zb_read_attr_status_record_get_value()
2053 int zb_read_attr_status_record_get_id(
2054 zb_zcl_read_attr_status_record_h handle, zb_attribute_id* id);
2057 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2058 * @brief Sets identifier to read attribute status record.
2059 * @details The attribute identifier field is 16 bits in length and shall contain the
2060 * identifier of the attribute that has been read (or of which an element has been read).
2062 * This field shall contain the same value that was included in the corresponding
2063 * attribute identifier field of the original read attributes or read attributes
2064 * structured command.
2068 * @param[in] handle The handle of read attribute status record
2069 * @param[in] id Attribute identifier
2071 * @return 0 on success, otherwise a negative error value.
2072 * @retval #ZIGBEE_ERROR_NONE Successful
2073 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2074 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2076 * @see zb_read_attr_status_record_create()
2077 * @see zb_read_attr_status_record_destroy()
2078 * @see zb_read_attr_status_record_set_status()
2079 * @see zb_read_attr_status_record_set_value()
2080 * @see zb_zcl_global_attr_read_cb()
2081 * @see zb_read_attr_status_record_get_id()
2082 * @see zb_read_attr_status_record_get_status()
2083 * @see zb_read_attr_status_record_get_type()
2084 * @see zb_read_attr_status_record_get_value()
2086 int zb_read_attr_status_record_set_id(
2087 zb_zcl_read_attr_status_record_h handle, zb_attribute_id id);
2090 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2091 * @brief Gets status from read attribute status record.
2092 * @details The status field is 8 bits in length and specifies the status of the read
2093 * operation on this attribute.
2095 * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
2096 * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
2101 * @param[in] handle The handle of read attribute status record
2102 * @param[out] status error code @see #zb_zcl_status_e
2104 * @return 0 on success, otherwise a negative error value.
2105 * @retval #ZIGBEE_ERROR_NONE Successful
2106 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2107 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2109 * @see zb_read_attr_status_record_create()
2110 * @see zb_read_attr_status_record_destroy()
2111 * @see zb_read_attr_status_record_set_id()
2112 * @see zb_read_attr_status_record_set_status()
2113 * @see zb_read_attr_status_record_set_value()
2114 * @see zb_zcl_global_attr_read_cb()
2115 * @see zb_read_attr_status_record_get_id()
2116 * @see zb_read_attr_status_record_get_type()
2117 * @see zb_read_attr_status_record_get_value()
2119 int zb_read_attr_status_record_get_status(
2120 zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e* status);
2123 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2124 * @brief Sets status to read attribute status record.
2125 * @details The status field is 8 bits in length and specifies the status of the read
2126 * operation on this attribute.
2130 * @param[in] handle The handle of read attribute status record
2131 * @param[in] status error code @see #zb_zcl_status_e
2133 * @return 0 on success, otherwise a negative error value.
2134 * @retval #ZIGBEE_ERROR_NONE Successful
2135 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2136 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2138 * @see zb_read_attr_status_record_create()
2139 * @see zb_read_attr_status_record_destroy()
2140 * @see zb_read_attr_status_record_set_id()
2141 * @see zb_read_attr_status_record_set_value()
2142 * @see zb_zcl_global_attr_read_cb()
2143 * @see zb_read_attr_status_record_get_id()
2144 * @see zb_read_attr_status_record_get_status()
2145 * @see zb_read_attr_status_record_get_type()
2146 * @see zb_read_attr_status_record_get_value()
2148 int zb_read_attr_status_record_set_status(
2149 zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e status);
2152 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2153 * @brief Gets type from read attribute status record.
2154 * @details The attribute data type field shall contain the data type of the attribute
2155 * in the same read attributes status record.
2157 * This field shall only be included in #zb_zcl_data_type_e if the associated status
2158 * field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2162 * @param[in] handle The handle of read attribute status record
2163 * @param[out] type Data type
2165 * @return 0 on success, otherwise a negative error value.
2166 * @retval #ZIGBEE_ERROR_NONE Successful
2167 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2168 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2170 * @see zb_read_attr_status_record_create()
2171 * @see zb_read_attr_status_record_destroy()
2172 * @see zb_read_attr_status_record_set_id()
2173 * @see zb_read_attr_status_record_set_status()
2174 * @see zb_read_attr_status_record_set_value()
2175 * @see zb_zcl_global_attr_read_cb()
2176 * @see zb_read_attr_status_record_get_id()
2177 * @see zb_read_attr_status_record_get_status()
2178 * @see zb_read_attr_status_record_get_value()
2180 int zb_read_attr_status_record_get_type(
2181 zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e *type);
2184 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2185 * @brief Sets type to read attribute status record.
2186 * @details The attribute data type field shall contain the data type of the attribute
2187 * in the same read attributes status record.
2191 * @param[in] handle The handle of read attribute status record
2192 * @param[in] type Data type
2194 * @return 0 on success, otherwise a negative error value.
2195 * @retval #ZIGBEE_ERROR_NONE Successful
2196 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2197 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2199 * @see zb_read_attr_status_record_create()
2200 * @see zb_read_attr_status_record_destroy()
2201 * @see zb_read_attr_status_record_set_id()
2202 * @see zb_read_attr_status_record_set_status()
2203 * @see zb_read_attr_status_record_set_value()
2204 * @see zb_zcl_global_attr_read_cb()
2205 * @see zb_read_attr_status_record_get_id()
2206 * @see zb_read_attr_status_record_get_status()
2207 * @see zb_read_attr_status_record_get_type()
2208 * @see zb_read_attr_status_record_get_value()
2210 int zb_read_attr_status_record_set_type(
2211 zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e type);
2214 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2215 * @brief Gets data value from read attribute status record.
2216 * @details The attribute value field is variable in length and shall contain the current
2217 * value of this attribute.
2219 * This field shall only be included if the associated
2220 * status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2221 * For an attribute or element of simple type, this
2222 * field has the format shown in the Table of Data Types .
2226 * @remarks The @a value should be released using free().
2228 * @param[in] handle The handle of read attribute status record
2229 * @param[out] type Attribute data type. The attribute data type shall contain the data
2230 * type of the attribute in the same read attributes status record
2231 * (see #zb_zcl_data_type_e). This field shall only be included if the status
2232 * code is #ZB_ZCL_STATUS_SUCCESS.
2233 * @param[out] value Attribute value. The attribute value field is variable in length
2234 * and shall contain the current value of this attribute. This field shall only be
2235 * included if the associated status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2236 * For an attribute or element of simple type (not array, structure, set or bag), this
2237 * field has the format shown in the Table of Data Types (see #zb_zcl_data_type_e).
2238 * @param[out] count The number of attribute data
2240 * @return 0 on success, otherwise a negative error value.
2241 * @retval #ZIGBEE_ERROR_NONE Successful
2242 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2243 * @retval #ZIGBEE_ERROR_NO_DATA No data available
2244 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2245 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2247 * @see zb_read_attr_status_record_create()
2248 * @see zb_read_attr_status_record_destroy()
2249 * @see zb_read_attr_status_record_set_id()
2250 * @see zb_read_attr_status_record_set_status()
2251 * @see zb_read_attr_status_record_set_value()
2252 * @see zb_zcl_global_attr_read_cb()
2253 * @see zb_read_attr_status_record_get_id()
2254 * @see zb_read_attr_status_record_get_status()
2255 * @see zb_read_attr_status_record_get_type()
2257 int zb_read_attr_status_record_get_value(
2258 zb_zcl_read_attr_status_record_h handle,
2259 zb_zcl_data_type_e* type,
2260 unsigned char** value,
2264 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2265 * @brief Sets data value to read attribute status record.
2266 * @details The attribute value field is variable in length and shall contain the current
2267 * value of this attribute.
2269 * For an attribute or element of simple type, this
2270 * field has the format shown in the #zb_zcl_data_type_e.
2274 * @param[in] handle The handle of read attribute status record
2275 * @param[in] type Attribute data type
2276 * @param[in] value Attribute data value
2277 * @param[in] count The length of attribute data
2279 * @return 0 on success, otherwise a negative error value.
2280 * @retval #ZIGBEE_ERROR_NONE Successful
2281 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2282 * @retval #ZIGBEE_ERROR_NO_DATA No data available
2283 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2284 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2286 * @see zb_read_attr_status_record_create()
2287 * @see zb_read_attr_status_record_destroy()
2288 * @see zb_read_attr_status_record_set_id()
2289 * @see zb_read_attr_status_record_set_status()
2290 * @see zb_zcl_global_attr_read_cb()
2291 * @see zb_read_attr_status_record_get_id()
2292 * @see zb_read_attr_status_record_get_status()
2293 * @see zb_read_attr_status_record_get_type()
2294 * @see zb_read_attr_status_record_get_value()
2296 int zb_read_attr_status_record_set_value(
2297 zb_zcl_read_attr_status_record_h handle,
2298 zb_zcl_data_type_e type,
2299 unsigned char* value,
2303 * @brief Called with device attributes.
2304 * @details This callback is called when device attributes are requested with
2305 * #zb_zcl_global_attr_read().
2309 * @remarks The @a records can be used only in the callback.
2310 * If you want to use them outside, copy each of them with #zb_read_attr_status_record_clone().
2311 * @remarks The @a records should not be released.
2313 * @param[out] addr16 The source network address
2314 * @param[out] ep The source end-point of the received information (ex. endpoint 1)
2315 * @param[out] clusterid ZCL cluster id
2316 * @param[out] records Attribute status record
2317 * @param[out] count The number of items in @records
2318 * @param[out] user_data User data
2320 * @see zb_zcl_global_attr_read()
2322 typedef void (*zb_zcl_global_attr_read_cb)(
2325 zb_cluster_id clusterid,
2326 zb_zcl_read_attr_status_record_h *records,
2331 * @brief Sends 'read attributes' command.
2332 * @details Call this function to read attributes of devices.
2336 * @privilege %http://tizen.org/privilege/zigbee
2338 * @param[in] handle The handle of zigbee
2339 * @param[in] addr16 target network address
2340 * @param[in] src_ep source end-point (ex. 1)
2341 * @param[in] dst_ep destination end-point (ex. 1)
2342 * @param[in] zcl_fc frame control bits (default 0x00). \n
2343 * Only OR operation is allowed in ZCL header \n
2345 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2346 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2347 * - Manufacturer Specific : \n
2349 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2350 * #ZB_ZCL_SERVER_TO_CLIENT \n
2351 * - Disable Default Response : \n
2352 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2353 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2354 * @param[in] clusterid ZCL cluster id
2355 * @param[in] attribute_ids Attributes_ids-list
2356 * @param[in] count The number of items in the @a attribute_ids list
2357 * @param[in] cb Response callback function
2358 * @param[in] user_data User data
2360 * @return 0 on success, otherwise a negative error value.
2361 * @retval #ZIGBEE_ERROR_NONE Successful
2362 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2363 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2364 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2365 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2366 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2367 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2369 * @see zb_zcl_global_attr_read_cb()
2371 int zb_zcl_global_attr_read(
2374 zb_end_point src_ep,
2375 zb_end_point dst_ep,
2376 zb_zcl_frame_ctl zcl_fc,
2377 zb_cluster_id clusterid,
2378 zb_attribute_id *attribute_ids,
2380 zb_zcl_global_attr_read_cb cb,
2384 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2385 * @brief Creates write attribute status record.
2386 * @details This allocates heap for write attribute status record
2390 * @privilege %http://tizen.org/privilege/zigbee
2392 * @remarks The @a handle should be released using zb_write_attr_status_destroy().
2394 * @param[out] handle The handle of write attribute status record
2396 * @return 0 on success, otherwise a negative error value.
2397 * @retval #ZIGBEE_ERROR_NONE Successful
2398 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2399 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2400 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2402 * @see zb_zcl_global_write_attr_cb()
2403 * @see zb_write_attr_status_clone()
2404 * @see zb_write_attr_status_destroy()
2405 * @see zb_write_attr_status_get_status()
2406 * @see zb_write_attr_status_set_status()
2407 * @see zb_write_attr_status_get_id()
2408 * @see zb_write_attr_status_set_id()
2410 int zb_write_attr_status_create(zb_zcl_write_attr_status_record_h *handle);
2413 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2414 * @brief Clones a write attribute status record.
2418 * @remarks The @a dst should be released using zb_write_attr_status_destroy().
2420 * @param[in] src Source handle of write attribute status record
2421 * @param[in] dst Destination handle of write attribute status record
2423 * @return 0 on success, otherwise a negative error value.
2424 * @retval #ZIGBEE_ERROR_NONE Successful
2425 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2426 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2428 * @see zb_zcl_global_write_attr_cb()
2429 * @see zb_write_attr_status_create()
2430 * @see zb_write_attr_status_destroy()
2431 * @see zb_write_attr_status_get_status()
2432 * @see zb_write_attr_status_set_status()
2433 * @see zb_write_attr_status_get_id()
2434 * @see zb_write_attr_status_set_id()
2436 int zb_write_attr_status_clone(zb_zcl_write_attr_status_record_h src,
2437 zb_zcl_write_attr_status_record_h *dst);
2440 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2441 * @brief Destroys a write attribute status record.
2445 * @param[in] handle The handle of write attribute status record
2447 * @return 0 on success, otherwise a negative error value.
2448 * @retval #ZIGBEE_ERROR_NONE Successful
2449 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2450 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2452 * @see zb_zcl_global_write_attr_cb()
2453 * @see zb_write_attr_status_create()
2454 * @see zb_write_attr_status_clone()
2455 * @see zb_write_attr_status_get_status()
2456 * @see zb_write_attr_status_set_status()
2457 * @see zb_write_attr_status_get_id()
2458 * @see zb_write_attr_status_set_id()
2460 int zb_write_attr_status_destroy(zb_zcl_write_attr_status_record_h handle);
2463 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2464 * @brief Gets the status from a write attribute status record.
2465 * @details The status field is 8 bits in length and specifies the status of the read
2466 * operation on this attribute.
2468 * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
2469 * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
2474 * @param[in] handle The handle of read attribute status record
2475 * @param[out] status error code @see #zb_zcl_status_e
2477 * @return 0 on success, otherwise a negative error value.
2478 * @retval #ZIGBEE_ERROR_NONE Successful
2479 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2480 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2482 * @see zb_zcl_global_write_attr_cb()
2483 * @see zb_write_attr_status_create()
2484 * @see zb_write_attr_status_clone()
2485 * @see zb_write_attr_status_destroy()
2486 * @see zb_write_attr_status_get_id()
2487 * @see zb_write_attr_status_set_id()
2488 * @see zb_write_attr_status_set_status()
2490 int zb_write_attr_status_get_status(
2491 zb_zcl_write_attr_status_record_h handle,
2492 zb_zcl_status_e *status);
2495 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2496 * @brief Sets the status to a write attribute status record.
2497 * @details The status field is 8 bits in length and specifies the status of the read
2498 * operation on this attribute.
2502 * @param[in] handle The handle of read attribute status record
2503 * @param[in] status error code @see #zb_zcl_status_e
2505 * @return 0 on success, otherwise a negative error value.
2506 * @retval #ZIGBEE_ERROR_NONE Successful
2507 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2508 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2510 * @see zb_zcl_global_write_attr_cb()
2511 * @see zb_write_attr_status_create()
2512 * @see zb_write_attr_status_clone()
2513 * @see zb_write_attr_status_destroy()
2514 * @see zb_write_attr_status_get_status()
2515 * @see zb_write_attr_status_get_id()
2516 * @see zb_write_attr_status_set_id()
2518 int zb_write_attr_status_set_status(
2519 zb_zcl_write_attr_status_record_h handle,
2520 zb_zcl_status_e status);
2523 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2524 * @brief Gets the identifier from a write attribute status record.
2525 * @details The attribute identifier field is 16 bits in length and shall contain the
2526 * identifier of the attribute that has been write (or of which an element has been write).
2528 * This field shall contain the same value that was included in the corresponding
2529 * attribute identifier field of the original write attributes or write attributes
2530 * structured command.
2534 * @param[in] handle The handle of write attribute status record
2535 * @param[out] id Attribute identifier
2537 * @return 0 on success, otherwise a negative error value.
2538 * @retval #ZIGBEE_ERROR_NONE Successful
2539 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2540 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2542 * @see zb_zcl_global_write_attr_cb()
2543 * @see zb_write_attr_status_create()
2544 * @see zb_write_attr_status_clone()
2545 * @see zb_write_attr_status_destroy()
2546 * @see zb_write_attr_status_get_status()
2547 * @see zb_write_attr_status_set_status()
2548 * @see zb_write_attr_status_set_id()
2550 int zb_write_attr_status_get_id(
2551 zb_zcl_write_attr_status_record_h handle,
2552 zb_attribute_id *id);
2555 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2556 * @brief Sets the identifier to a write attribute status record.
2557 * @details The attribute identifier field is 16 bits in length and shall contain the
2558 * identifier of the attribute that has been write (or of which an element has been write).
2560 * This field shall contain the same value that was included in the corresponding
2561 * attribute identifier field of the original write attributes or write attributes
2562 * structured command.
2566 * @param[in] handle The handle of write attribute status record
2567 * @param[in] id Attribute identifier
2569 * @return 0 on success, otherwise a negative error value.
2570 * @retval #ZIGBEE_ERROR_NONE Successful
2571 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2572 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2574 * @see zb_zcl_global_write_attr_cb()
2575 * @see zb_write_attr_status_create()
2576 * @see zb_write_attr_status_clone()
2577 * @see zb_write_attr_status_destroy()
2578 * @see zb_write_attr_status_get_status()
2579 * @see zb_write_attr_status_set_status()
2580 * @see zb_write_attr_status_get_id()
2582 int zb_write_attr_status_set_id(
2583 zb_zcl_write_attr_status_record_h handle,
2584 zb_attribute_id id);
2587 * @brief Called when write attributes command are requested.
2588 * @details This callback is called when attributes are written with
2589 * #zb_zcl_global_attr_write() or #zb_zcl_global_attr_write_undivided().
2590 * In other words, the write attributes response is generated in response to the write
2591 * attributes command.
2595 * @remarks The @a records can be used only in the callback.
2596 * @remarks If you want to use them outside, copy them with #zb_write_attr_status_clone().
2597 * @remarks The @a records should not be released.
2599 * @param[out] addr16 The source network address
2600 * @param[out] ep The source end-point of the received information (ex. endpoint 1)
2601 * @param[out] clusterid ZCL cluster id
2602 * @param[out] records Attribute status record
2603 * @param[out] count The number of items in @a records
2604 * @param[out] user_data User data
2606 * @see zb_zcl_global_attr_write()
2608 typedef void (*zb_zcl_global_attr_write_cb)(
2611 zb_cluster_id clusterid,
2612 zb_zcl_write_attr_status_record_h *records,
2617 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2618 * @brief Creates a write attribute record.
2622 * @privilege %http://tizen.org/privilege/zigbee
2624 * @param[in] handle The handle of write attribute record
2626 * @return 0 on success, otherwise a negative error value.
2627 * @retval #ZIGBEE_ERROR_NONE Successful
2628 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2629 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2630 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2631 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2633 * @see zb_zcl_global_attr_write()
2634 * @see zb_zcl_global_attr_write_undivided()
2635 * @see zb_zcl_global_write_attr_no_rep()
2636 * @see zb_write_attr_record_destroy()
2637 * @see zb_write_attr_record_set_id()
2638 * @see zb_write_attr_record_set_value()
2640 int zb_write_attr_record_create(zb_zcl_write_attr_record_h *handle);
2643 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2644 * @brief Destroys a write attribute record handle.
2648 * @param[in] handle The handle of write attribute record
2650 * @return 0 on success, otherwise a negative error value.
2651 * @retval #ZIGBEE_ERROR_NONE Successful
2652 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2653 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2655 * @see zb_zcl_global_attr_write()
2656 * @see zb_zcl_global_attr_write_undivided()
2657 * @see zb_zcl_global_write_attr_no_rep()
2658 * @see zb_write_attr_record_create()
2659 * @see zb_write_attr_record_clone()
2660 * @see zb_write_attr_record_set_id()
2661 * @see zb_write_attr_record_set_value()
2663 int zb_write_attr_record_destroy(zb_zcl_write_attr_record_h handle);
2666 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2667 * @brief Sets the attribute identifier of a write attribute record.
2668 * @details The attribute identifier field is 16 bits in length and shall contain the
2669 * identifier of the attribute that is to be written.
2673 * @param[in] handle The handle of write attribute record
2674 * @param[in] id Attribute identifier
2676 * @return 0 on success, otherwise a negative error value.
2677 * @retval #ZIGBEE_ERROR_NONE Successful
2678 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2679 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2681 * @see zb_zcl_global_attr_write()
2682 * @see zb_zcl_global_attr_write_undivided()
2683 * @see zb_zcl_global_write_attr_no_rep()
2684 * @see zb_write_attr_record_create()
2685 * @see zb_write_attr_record_destroy()
2686 * @see zb_write_attr_record_set_value()
2688 int zb_write_attr_record_set_id(zb_zcl_write_attr_record_h handle,
2689 zb_attribute_id id);
2692 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2693 * @brief Sets the attribute data type of a write attribute record.
2694 * @details The attribute data type field shall contain the data type of the attribute
2695 * that is to be written.
2699 * @param[in] handle The handle of write attribute record
2700 * @param[in] type attribute data type
2702 * @return 0 on success, otherwise a negative error value.
2703 * @retval #ZIGBEE_ERROR_NONE Successful
2704 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2705 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2707 * @see zb_zcl_global_attr_write()
2708 * @see zb_zcl_global_attr_write_undivided()
2709 * @see zb_zcl_global_write_attr_no_rep()
2710 * @see zb_write_attr_record_create()
2711 * @see zb_write_attr_record_destroy()
2712 * @see zb_write_attr_record_set_id()
2713 * @see zb_write_attr_record_set_value()
2715 int zb_write_attr_record_set_type(zb_zcl_write_attr_record_h handle,
2716 zb_zcl_data_type_e type);
2719 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2720 * @brief Sets data value to write attribute status record.
2721 * @details The attribute data type field shall contain the data type of the attribute in
2722 * the same attribute report field
2726 * @param[in] handle The handle of write attribute status record
2727 * @param[in] type Attribute data type
2728 * @param[in] value Attribute data value
2729 * @param[in] count The number of items in @a value
2732 * @return 0 on success, otherwise a negative error value.
2733 * @retval #ZIGBEE_ERROR_NONE Successful
2734 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2735 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2736 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2738 * @see zb_zcl_global_attr_write()
2739 * @see zb_zcl_global_attr_write_undivided()
2740 * @see zb_zcl_global_write_attr_no_rep()
2741 * @see zb_write_attr_record_create()
2742 * @see zb_write_attr_record_destroy()
2743 * @see zb_write_attr_record_set_id()
2744 * @see zb_write_attr_record_set_value()
2746 int zb_write_attr_record_set_value(
2747 zb_zcl_write_attr_record_h handle,
2748 zb_zcl_data_type_e type,
2749 unsigned char* value,
2753 * @brief Sends 'write Attributes' command.
2754 * @details Call this function to write attributes of other devices.
2758 * @privilege %http://tizen.org/privilege/zigbee
2760 * @param[in] handle The handle of zigbee
2761 * @param[in] addr16 target network address
2762 * @param[in] src_ep source end-point (ex. 1)
2763 * @param[in] dst_ep destination end-point (ex. 1)
2764 * @param[in] zcl_fc frame control bits (default 0x00). \n
2765 * Only OR operation is allowed in ZCL header \n
2767 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2768 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2769 * - Manufacturer Specific : \n
2771 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2772 * #ZB_ZCL_SERVER_TO_CLIENT \n
2773 * - Disable Default Response : \n
2774 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2775 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2776 * @param[in] clusterid ZCL cluster id
2777 * @param[in] records Array of #zb_zcl_write_attr_record_h
2778 * @param[in] count The number of items in @a records array
2779 * @param[in] cb Response callback function
2780 * @param[in] user_data User data
2782 * @return 0 on success, otherwise a negative error value.
2783 * @retval #ZIGBEE_ERROR_NONE Successful
2784 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2785 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2786 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2787 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2788 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2789 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2791 * @see zb_zcl_global_attr_write_cb()
2793 int zb_zcl_global_attr_write(
2796 zb_end_point src_ep,
2797 zb_end_point dst_ep,
2798 zb_zcl_frame_ctl zcl_fc,
2799 zb_cluster_id clusterid,
2800 zb_zcl_write_attr_record_h *records,
2802 zb_zcl_global_attr_write_cb cb,
2806 * @brief Sends 'write attributes undivided' command.
2807 * @details Call this function to write attributes without fragmentation to other devices.
2811 * @privilege %http://tizen.org/privilege/zigbee
2813 * @param[in] handle The handle of zigbee
2814 * @param[in] addr16 target network address
2815 * @param[in] src_ep source end-point (ex. 1)
2816 * @param[in] dst_ep destination end-point (ex. 1)
2817 * @param[in] zcl_fc frame control bits (default 0x00). \n
2818 * Only OR operation is allowed in ZCL header \n
2820 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2821 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2822 * - Manufacturer Specific : \n
2824 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2825 * #ZB_ZCL_SERVER_TO_CLIENT \n
2826 * - Disable Default Response : \n
2827 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2828 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2829 * @param[in] clusterid ZCL cluster id
2830 * @param[in] records Array of #zb_zcl_write_attr_record_h
2831 * @param[in] count The number of items in @a records array
2832 * @param[in] cb Response callback function
2833 * @param[in] user_data User data
2835 * @return 0 on success, otherwise a negative error value.
2836 * @retval #ZIGBEE_ERROR_NONE Successful
2837 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2838 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2839 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2840 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2841 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2842 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2844 * @see zb_zcl_global_attr_write_cb()
2846 int zb_zcl_global_attr_write_undivided(
2849 zb_end_point src_ep,
2850 zb_end_point dst_ep,
2851 zb_zcl_frame_ctl zcl_fc,
2852 zb_cluster_id clusterid,
2853 zb_zcl_write_attr_record_h *records,
2855 zb_zcl_global_attr_write_cb cb,
2859 * @brief Sends 'write Attributes without response' command.
2860 * @details Call this function to write attributes of other devices without receiving any
2865 * @privilege %http://tizen.org/privilege/zigbee
2867 * @param[in] handle The handle of zigbee
2868 * @param[in] addr16 target network address
2869 * @param[in] src_ep source end-point (ex. 1)
2870 * @param[in] dst_ep destination end-point (ex. 1)
2871 * @param[in] zcl_fc frame control bits (default 0x00). \n
2872 * Only OR operation is allowed in ZCL header \n
2874 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2875 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2876 * - Manufacturer Specific : \n
2878 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2879 * #ZB_ZCL_SERVER_TO_CLIENT \n
2880 * - Disable Default Response : \n
2881 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2882 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2883 * @param[in] clusterid ZCL cluster id
2884 * @param[in] records Array of #zb_zcl_write_attr_record_h
2885 * @param[in] count The number of items in @a records array
2887 * @return 0 on success, otherwise a negative error value.
2888 * @retval #ZIGBEE_ERROR_NONE Successful
2889 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2890 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2891 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2892 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2893 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2894 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2897 int zb_zcl_global_attr_write_no_rsp(
2900 zb_end_point src_ep,
2901 zb_end_point dst_ep,
2902 zb_zcl_frame_ctl zcl_fc,
2903 zb_cluster_id clusterid,
2904 zb_zcl_write_attr_record_h *records,
2908 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2909 * @brief Clones a report config response record.
2913 * @remarks The @a dst should be released using zb_report_config_response_record_destroy().
2915 * @param[in] src Source handle of report config response record
2916 * @param[in] dst Destination handle of report config response record
2918 * @return 0 on success, otherwise a negative error value.
2919 * @retval #ZIGBEE_ERROR_NONE Successful
2920 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2921 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2923 * @see zb_zcl_global_config_report_write_cb()
2924 * @see zb_report_config_response_record_destroy()
2925 * @see zb_report_config_response_record_get_status()
2926 * @see zb_report_config_response_record_get_dir()
2927 * @see zb_report_config_response_record_get_id()
2929 int zb_report_config_response_record_clone(
2930 zb_zcl_report_config_response_record_h src,
2931 zb_zcl_report_config_response_record_h *dst);
2934 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2935 * @brief Destroys a reporting configuration response record.
2939 * @param[in] handle The handle of reporting configuration response record
2941 * @return 0 on success, otherwise a negative error value.
2942 * @retval #ZIGBEE_ERROR_NONE Successful
2943 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2944 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2946 * @see zb_zcl_global_config_report_write_cb()
2947 * @see zb_report_config_response_record_clone()
2948 * @see zb_report_config_response_record_get_status()
2949 * @see zb_report_config_response_record_get_dir()
2950 * @see zb_report_config_response_record_get_id()
2952 int zb_report_config_response_record_destroy(
2953 zb_zcl_report_config_response_record_h handle);
2956 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2957 * @brief Gets status from a reporting configuration response record.
2958 * @details If the attribute is not implemented on the sender or receiver of the command,
2959 * whichever is relevant (depending on direction), the result shall be set to
2960 * #ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE.
2962 * If the attribute is supported, but is not capable of
2963 * being reported, this field shall be set to #ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE.
2965 * Otherwise, this field shall be set to #ZB_ZCL_STATUS_SUCCESS.
2967 * If the status field is not set to #ZB_ZCL_STATUS_SUCCESS, all fields except the
2968 * direction and attribute identifier fields shall be omitted.
2972 * @param[in] handle The handle of write attribute status record
2973 * @param[out] status status @see #zb_zcl_status_e
2975 * @return 0 on success, otherwise a negative error value.
2976 * @retval #ZIGBEE_ERROR_NONE Successful
2977 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2978 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2980 * @see zb_zcl_global_config_report_write_cb()
2981 * @see zb_report_config_response_record_clone()
2982 * @see zb_report_config_response_record_destroy()
2983 * @see zb_report_config_response_record_get_status()
2984 * @see zb_report_config_response_record_get_dir()
2985 * @see zb_report_config_response_record_get_id()
2987 int zb_report_config_response_record_get_status(
2988 zb_zcl_report_config_response_record_h handle,
2989 zb_zcl_status_e *status);
2992 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2993 * @brief Gets the direction from a reporting configuration response record.
2994 * @details The direction field specifies whether values of the attribute are reported
2995 * (0x00), or whether reports of the attribute are received (0x01).
2997 * If this value is set to 0x00, then the attribute data type field, the minimum
2998 * reporting interval field, the maximum reporting interval field and the reportable
2999 * change field are included in the payload, and the timeout period field is omitted. If
3000 * this value is set to 0x01, then the timeout period field is included in the payload,
3001 * and the attribute data type field, the minimum reporting interval field, the
3002 * maximum reporting interval field and the reportable change field are omitted.
3004 * All other values of this field are reserved.
3008 * @param[in] handle The handle of write attribute status record
3009 * @param[out] dir direction 00 : #ZB_ZCL_CLIENT_TO_SERVER \n
3010 * 01 : #ZB_ZCL_SERVER_TO_CLIENT \n
3012 * @return 0 on success, otherwise a negative error value.
3013 * @retval #ZIGBEE_ERROR_NONE Successful
3014 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3015 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3017 * @see zb_zcl_global_config_report_write_cb()
3018 * @see zb_report_config_response_record_clone()
3019 * @see zb_report_config_response_record_destroy()
3020 * @see zb_report_config_response_record_get_status()
3021 * @see zb_report_config_response_record_get_dir()
3022 * @see zb_report_config_response_record_get_id()
3024 int zb_report_config_response_record_get_dir(
3025 zb_zcl_report_config_response_record_h handle,
3026 zb_zcl_fc_direction_e *dir);
3029 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
3030 * @brief Gets the attribute identifier from a reporting configuration response record.
3031 * @details The attribute identifier field is 16 bits in length and shall contain the
3032 * identifier of the attribute that the reporting configuration details apply to.
3036 * @param[in] handle The handle of write attribute status record
3037 * @param[out] id Attribute identifier
3039 * @return 0 on success, otherwise a negative error value.
3040 * @retval #ZIGBEE_ERROR_NONE Successful
3041 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3042 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3044 * @see zb_zcl_global_config_report_write_cb()
3045 * @see zb_report_config_response_record_clone()
3046 * @see zb_report_config_response_record_destroy()
3047 * @see zb_report_config_response_record_get_status()
3048 * @see zb_report_config_response_record_get_dir()
3049 * @see zb_report_config_response_record_get_id()
3051 int zb_report_config_response_record_get_id(
3052 zb_zcl_report_config_response_record_h handle,
3053 zb_attribute_id *id);
3056 * @brief Called with configure reporting response.
3057 * @details This callback is called after #zb_zcl_global_config_report_write() is called.
3061 * @remarks The @a records can be used only in the callback.
3062 * @remarks The @a records should not be released.
3064 * @param[out] addr16 The source network address
3065 * @param[out] ep The source from which the response was sent (ex. 1)
3066 * @param[out] clusterid ZCL cluster id
3067 * @param[out] records Reporting configuration response record
3068 * @param[out] count The number of reporting configuration response record
3069 * @param[out] user_data User data
3071 * @see zb_zcl_global_config_report_write()
3073 typedef void (*zb_zcl_global_config_report_write_cb)(
3076 zb_cluster_id clusterid,
3077 zb_zcl_report_config_response_record_h *records,
3082 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3083 * @brief Creates a reporting configuration record.
3084 * @details Allocate memory for reporting configuration record
3088 * @privilege %http://tizen.org/privilege/zigbee
3090 * @remarks The @a handle should be released using zb_report_config_record_destroy().
3092 * @param[out] handle The handle of reporting configuration record
3094 * @return 0 on success, otherwise a negative error value.
3095 * @retval #ZIGBEE_ERROR_NONE Successful
3096 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3097 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3098 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3099 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3101 * @see zb_zcl_global_read_report_config_cb()
3102 * @see zb_report_config_record_clone()
3103 * @see zb_report_config_record_destroy()
3104 * @see zb_report_config_record_get_id()
3105 * @see zb_report_config_record_set_id()
3106 * @see zb_report_config_record_get_dir()
3107 * @see zb_report_config_record_set_dir()
3108 * @see zb_report_config_record_get_type()
3109 * @see zb_report_config_record_get_min_interval()
3110 * @see zb_report_config_record_set_min_interval()
3111 * @see zb_report_config_record_get_max_interval()
3112 * @see zb_report_config_record_set_max_interval()
3113 * @see zb_report_config_record_get_change()
3114 * @see zb_report_config_record_set_change()
3115 * @see zb_report_config_record_get_timeout()
3116 * @see zb_report_config_record_set_timeout()
3118 int zb_report_config_record_create(zb_zcl_reporting_config_record_h *handle);
3121 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3122 * @brief Clones a reporting configuration record.
3126 * @remarks The @a dst should be released using zb_report_config_record_destroy().
3128 * @param[in] src Source handle of reporting configuration record
3129 * @param[in] dst Destination handle of reporting configuration record
3131 * @return 0 on success, otherwise a negative error value.
3132 * @retval #ZIGBEE_ERROR_NONE Successful
3133 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3134 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3136 * @see zb_zcl_global_read_report_config_cb()
3137 * @see zb_report_config_record_create()
3138 * @see zb_report_config_record_destroy()
3139 * @see zb_report_config_record_get_id()
3140 * @see zb_report_config_record_set_id()
3141 * @see zb_report_config_record_get_dir()
3142 * @see zb_report_config_record_set_dir()
3143 * @see zb_report_config_record_get_type()
3144 * @see zb_report_config_record_get_min_interval()
3145 * @see zb_report_config_record_set_min_interval()
3146 * @see zb_report_config_record_get_max_interval()
3147 * @see zb_report_config_record_set_max_interval()
3148 * @see zb_report_config_record_get_change()
3149 * @see zb_report_config_record_set_change()
3150 * @see zb_report_config_record_get_timeout()
3151 * @see zb_report_config_record_set_timeout()
3153 int zb_report_config_record_clone(zb_zcl_reporting_config_record_h src,
3154 zb_zcl_reporting_config_record_h *dst);
3157 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3158 * @brief Destroys a reporting configuration record.
3162 * @param[in] handle The handle of reporting configuration record
3164 * @return 0 on success, otherwise a negative error value.
3165 * @retval #ZIGBEE_ERROR_NONE Successful
3166 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3167 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3169 * @see zb_zcl_global_read_report_config_cb()
3170 * @see zb_report_config_record_create()
3171 * @see zb_report_config_record_clone()
3172 * @see zb_report_config_record_get_id()
3173 * @see zb_report_config_record_set_id()
3174 * @see zb_report_config_record_get_dir()
3175 * @see zb_report_config_record_set_dir()
3176 * @see zb_report_config_record_get_type()
3177 * @see zb_report_config_record_get_min_interval()
3178 * @see zb_report_config_record_set_min_interval()
3179 * @see zb_report_config_record_get_max_interval()
3180 * @see zb_report_config_record_set_max_interval()
3181 * @see zb_report_config_record_get_change()
3182 * @see zb_report_config_record_set_change()
3183 * @see zb_report_config_record_get_timeout()
3184 * @see zb_report_config_record_set_timeout()
3186 int zb_report_config_record_destroy(zb_zcl_reporting_config_record_h handle);
3189 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3190 * @brief Gets the direction from a reporting configuration record.
3191 * @details The direction field specifies whether values of the attribute are be reported,
3192 * or whether reports of the attribute are to be received.
3194 * If this value is set to 0x00, then the attribute data type field, the minimum
3195 * reporting interval field, the maximum reporting interval field and the reportable
3196 * change field are included in the payload, and the timeout period field is omitted.
3197 * The record is sent to a cluster server (or client) to configure how it sends reports to
3198 * a client (or server) of the same cluster.
3200 * If this value is set to 0x01, then the timeout period field is included in the payload,
3201 * and the attribute data type field, the minimum reporting interval field, the
3202 * maximum reporting interval field and the reportable change field are omitted. The
3203 * record is sent to a cluster client (or server) to configure how it should expect
3204 * reports from a server (or client) of the same cluster.
3208 * @param[in] handle The handle of write attribute status record
3209 * @param[out] dir 00 : The receiver of the Configure Reporting command shall configure
3210 * reporting to send to each destination as resolved by
3211 * the bindings for the cluster hosting the attributes to be reported.\n
3212 * 01 : This indicates to the receiver of the Configure Reporting
3213 * command that the sender has configured its reporting
3214 * mechanism to transmit reports and that, based on the current
3215 * state of the sender's bindings, the sender will send reports to the
3218 * @return 0 on success, otherwise a negative error value.
3219 * @retval #ZIGBEE_ERROR_NONE Successful
3220 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3221 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3223 * @see zb_zcl_global_read_report_config_cb()
3224 * @see zb_report_config_record_create()
3225 * @see zb_report_config_record_clone()
3226 * @see zb_report_config_record_destroy()
3227 * @see zb_report_config_record_get_id()
3228 * @see zb_report_config_record_set_id()
3229 * @see zb_report_config_record_set_dir()
3230 * @see zb_report_config_record_get_type()
3231 * @see zb_report_config_record_get_min_interval()
3232 * @see zb_report_config_record_set_min_interval()
3233 * @see zb_report_config_record_get_max_interval()
3234 * @see zb_report_config_record_set_max_interval()
3235 * @see zb_report_config_record_get_change()
3236 * @see zb_report_config_record_set_change()
3237 * @see zb_report_config_record_get_timeout()
3238 * @see zb_report_config_record_set_timeout()
3240 int zb_report_config_record_get_dir(zb_zcl_reporting_config_record_h handle,
3241 zb_zcl_fc_direction_e *dir);
3244 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3245 * @brief Sets the direction of a reporting configuration record.
3246 * @details The direction field specifies whether values of the attribute are be reported,
3247 * or whether reports of the attribute are to be received.
3249 * If this value is set to 0x00, then the attribute data type field, the minimum
3250 * reporting interval field, the maximum reporting interval field and the reportable
3251 * change field are included in the payload, and the timeout period field is omitted.
3252 * The record is sent to a cluster server (or client) to configure how it sends reports to
3253 * a client (or server) of the same cluster.
3255 * If this value is set to 0x01, then the timeout period field is included in the payload,
3256 * and the attribute data type field, the minimum reporting interval field, the
3257 * maximum reporting interval field and the reportable change field are omitted. The
3258 * record is sent to a cluster client (or server) to configure how it should expect
3259 * reports from a server (or client) of the same cluster.
3263 * @param[in] handle The handle of write attribute status record
3264 * @param[in] dir 00 : The receiver of the Configure Reporting command shall configure
3265 * reporting to send to each destination as resolved by
3266 * the bindings for the cluster hosting the attributes to be reported.\n
3267 * 01 : This indicates to the receiver of the Configure Reporting
3268 * command that the sender has configured its reporting
3269 * mechanism to transmit reports and that, based on the current
3270 * state of the sender's bindings, the sender will send reports to the
3273 * @return 0 on success, otherwise a negative error value.
3274 * @retval #ZIGBEE_ERROR_NONE Successful
3275 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3276 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3278 * @see zb_zcl_global_read_report_config_cb()
3279 * @see zb_report_config_record_create()
3280 * @see zb_report_config_record_clone()
3281 * @see zb_report_config_record_destroy()
3282 * @see zb_report_config_record_get_id()
3283 * @see zb_report_config_record_set_id()
3284 * @see zb_report_config_record_get_dir()
3285 * @see zb_report_config_record_get_type()
3286 * @see zb_report_config_record_get_min_interval()
3287 * @see zb_report_config_record_set_min_interval()
3288 * @see zb_report_config_record_get_max_interval()
3289 * @see zb_report_config_record_set_max_interval()
3290 * @see zb_report_config_record_get_change()
3291 * @see zb_report_config_record_set_change()
3292 * @see zb_report_config_record_get_timeout()
3293 * @see zb_report_config_record_set_timeout()
3295 int zb_report_config_record_set_dir(zb_zcl_reporting_config_record_h handle,
3296 zb_zcl_fc_direction_e dir);
3299 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3300 * @brief Gets the attribute identifier from a reporting configuration record.
3301 * @details If the direction field is 0x00, this field contains the identifier of the
3302 * attribute that is to be reported.
3304 * If instead the direction field is 0x01, the device shall expect reports of values
3305 * of this attribute.
3309 * @param[in] handle The handle of write attribute status record
3310 * @param[out] id Attribute identifier
3312 * @return 0 on success, otherwise a negative error value.
3313 * @retval #ZIGBEE_ERROR_NONE Successful
3314 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3315 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3317 * @see zb_zcl_global_read_report_config_cb()
3318 * @see zb_report_config_record_create()
3319 * @see zb_report_config_record_clone()
3320 * @see zb_report_config_record_destroy()
3321 * @see zb_report_config_record_set_id()
3322 * @see zb_report_config_record_get_dir()
3323 * @see zb_report_config_record_set_dir()
3324 * @see zb_report_config_record_get_type()
3325 * @see zb_report_config_record_get_min_interval()
3326 * @see zb_report_config_record_set_min_interval()
3327 * @see zb_report_config_record_get_max_interval()
3328 * @see zb_report_config_record_set_max_interval()
3329 * @see zb_report_config_record_get_change()
3330 * @see zb_report_config_record_set_change()
3331 * @see zb_report_config_record_get_timeout()
3332 * @see zb_report_config_record_set_timeout()
3334 int zb_report_config_record_get_id(zb_zcl_reporting_config_record_h handle,
3335 unsigned short *id);
3338 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3339 * @brief Sets the attribute identifier of a reporting configuration record.
3340 * @details If the direction field is 0x00, this field contains the identifier of the
3341 * attribute that is to be reported.
3343 * If instead the direction field is 0x01, the device shall expect reports of values
3344 * of this attribute.
3348 * @param[in] handle The handle of write attribute status record
3349 * @param[in] id Attribute identifier
3351 * @return 0 on success, otherwise a negative error value.
3352 * @retval #ZIGBEE_ERROR_NONE Successful
3353 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3354 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3356 * @see zb_zcl_global_read_report_config_cb()
3357 * @see zb_report_config_record_create()
3358 * @see zb_report_config_record_clone()
3359 * @see zb_report_config_record_destroy()
3360 * @see zb_report_config_record_get_id()
3361 * @see zb_report_config_record_get_dir()
3362 * @see zb_report_config_record_set_dir()
3363 * @see zb_report_config_record_get_type()
3364 * @see zb_report_config_record_get_min_interval()
3365 * @see zb_report_config_record_set_min_interval()
3366 * @see zb_report_config_record_get_max_interval()
3367 * @see zb_report_config_record_set_max_interval()
3368 * @see zb_report_config_record_get_change()
3369 * @see zb_report_config_record_set_change()
3370 * @see zb_report_config_record_get_timeout()
3371 * @see zb_report_config_record_set_timeout()
3373 int zb_report_config_record_set_id(zb_zcl_reporting_config_record_h handle,
3377 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3378 * @brief Gets the attribute data type from a reporting configuration record.
3379 * @details The Attribute data type field contains the data type of the attribute that is
3384 * @param[in] handle The handle of write attribute status record
3385 * @param[out] type attribute data type
3387 * @return 0 on success, otherwise a negative error value.
3388 * @retval #ZIGBEE_ERROR_NONE Successful
3389 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3390 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3392 * @see zb_zcl_global_read_report_config_cb()
3393 * @see zb_report_config_record_create()
3394 * @see zb_report_config_record_clone()
3395 * @see zb_report_config_record_destroy()
3396 * @see zb_report_config_record_get_id()
3397 * @see zb_report_config_record_set_id()
3398 * @see zb_report_config_record_get_dir()
3399 * @see zb_report_config_record_set_dir()
3400 * @see zb_report_config_record_get_min_interval()
3401 * @see zb_report_config_record_set_min_interval()
3402 * @see zb_report_config_record_get_max_interval()
3403 * @see zb_report_config_record_set_max_interval()
3404 * @see zb_report_config_record_get_change()
3405 * @see zb_report_config_record_set_change()
3406 * @see zb_report_config_record_get_timeout()
3407 * @see zb_report_config_record_set_timeout()
3409 int zb_report_config_record_get_type(zb_zcl_reporting_config_record_h handle,
3410 zb_zcl_data_type_e *type);
3413 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3414 * @brief Gets the minimum interval from a reporting configuration record.
3415 * @details The minimum reporting interval field is 16 bits in length and shall contain
3416 * the minimum interval, in seconds, between issuing reports of the specified attribute.
3418 * If this value is set to 0x0000, then there is no minimum limit, unless one is
3419 * imposed by the specification of the cluster using this reporting mechanism or by
3420 * the applicable profile.
3424 * @param[in] handle The handle of write attribute status record
3425 * @param[out] min_i minimum interval time
3427 * @return 0 on success, otherwise a negative error value.
3428 * @retval #ZIGBEE_ERROR_NONE Successful
3429 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3430 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3432 * @see zb_zcl_global_read_report_config_cb()
3433 * @see zb_report_config_record_create()
3434 * @see zb_report_config_record_clone()
3435 * @see zb_report_config_record_destroy()
3436 * @see zb_report_config_record_get_id()
3437 * @see zb_report_config_record_set_id()
3438 * @see zb_report_config_record_get_dir()
3439 * @see zb_report_config_record_set_dir()
3440 * @see zb_report_config_record_set_min_interval()
3441 * @see zb_report_config_record_get_max_interval()
3442 * @see zb_report_config_record_set_max_interval()
3443 * @see zb_report_config_record_get_change()
3444 * @see zb_report_config_record_set_change()
3445 * @see zb_report_config_record_get_timeout()
3446 * @see zb_report_config_record_set_timeout()
3448 int zb_report_config_record_get_min_interval(zb_zcl_reporting_config_record_h handle,
3449 unsigned short *min_i);
3452 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3453 * @brief Sets the minimum interval of a reporting configuration record.
3454 * @details The minimum reporting interval field is 16 bits in length and shall contain
3455 * the minimum interval, in seconds, between issuing reports of the specified attribute.
3457 * If this value is set to 0x0000, then there is no minimum limit, unless one is
3458 * imposed by the specification of the cluster using this reporting mechanism or by
3459 * the applicable profile.
3463 * @param[in] handle The handle of write attribute status record
3464 * @param[in] min_i minimum interval time
3466 * @return 0 on success, otherwise a negative error value.
3467 * @retval #ZIGBEE_ERROR_NONE Successful
3468 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3469 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3471 * @see zb_zcl_global_read_report_config_cb()
3472 * @see zb_report_config_record_create()
3473 * @see zb_report_config_record_clone()
3474 * @see zb_report_config_record_destroy()
3475 * @see zb_report_config_record_get_id()
3476 * @see zb_report_config_record_set_id()
3477 * @see zb_report_config_record_get_dir()
3478 * @see zb_report_config_record_set_dir()
3479 * @see zb_report_config_record_get_min_interval()
3480 * @see zb_report_config_record_get_max_interval()
3481 * @see zb_report_config_record_set_max_interval()
3482 * @see zb_report_config_record_get_change()
3483 * @see zb_report_config_record_set_change()
3484 * @see zb_report_config_record_get_timeout()
3485 * @see zb_report_config_record_set_timeout()
3487 int zb_report_config_record_set_min_interval(zb_zcl_reporting_config_record_h handle,
3488 unsigned short min_i);
3491 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3492 * @brief Gets the maximum interval from a reporting configuration record.
3493 * @details The maximum reporting interval field is 16 bits in length and shall contain
3494 * the maximum interval, in seconds, between issuing reports of the specified attribute.
3496 * If this value is set to 0xffff, then the device shall not issue reports for the
3497 * specified attribute, and the configuration information for that attribute need not be
3502 * @param[in] handle The handle of write attribute status record
3503 * @param[out] max_i maximum interval time
3505 * @return 0 on success, otherwise a negative error value.
3506 * @retval #ZIGBEE_ERROR_NONE Successful
3507 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3508 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3510 * @see zb_zcl_global_read_report_config_cb()
3511 * @see zb_report_config_record_create()
3512 * @see zb_report_config_record_clone()
3513 * @see zb_report_config_record_destroy()
3514 * @see zb_report_config_record_get_id()
3515 * @see zb_report_config_record_set_id()
3516 * @see zb_report_config_record_get_dir()
3517 * @see zb_report_config_record_set_dir()
3518 * @see zb_report_config_record_get_min_interval()
3519 * @see zb_report_config_record_set_min_interval()
3520 * @see zb_report_config_record_set_max_interval()
3521 * @see zb_report_config_record_get_change()
3522 * @see zb_report_config_record_set_change()
3523 * @see zb_report_config_record_get_timeout()
3524 * @see zb_report_config_record_set_timeout()
3526 int zb_report_config_record_get_max_interval(zb_zcl_reporting_config_record_h handle,
3527 unsigned short *max_i);
3530 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3531 * @brief Sets the maximum interval of a reporting configuration record.
3532 * @details The maximum reporting interval field is 16 bits in length and shall contain
3533 * the maximum interval, in seconds, between issuing reports of the specified attribute.
3535 * If this value is set to 0xffff, then the device shall not issue reports for the
3536 * specified attribute, and the configuration information for that attribute need not be
3541 * @param[in] handle The handle of write attribute status record
3542 * @param[in] max_i maximum interval time
3544 * @return 0 on success, otherwise a negative error value.
3545 * @retval #ZIGBEE_ERROR_NONE Successful
3546 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3547 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3549 * @see zb_zcl_global_read_report_config_cb()
3550 * @see zb_report_config_record_create()
3551 * @see zb_report_config_record_clone()
3552 * @see zb_report_config_record_destroy()
3553 * @see zb_report_config_record_get_id()
3554 * @see zb_report_config_record_set_id()
3555 * @see zb_report_config_record_get_dir()
3556 * @see zb_report_config_record_set_dir()
3557 * @see zb_report_config_record_get_min_interval()
3558 * @see zb_report_config_record_set_min_interval()
3559 * @see zb_report_config_record_get_max_interval()
3560 * @see zb_report_config_record_get_change()
3561 * @see zb_report_config_record_set_change()
3562 * @see zb_report_config_record_get_timeout()
3563 * @see zb_report_config_record_set_timeout()
3565 int zb_report_config_record_set_max_interval(zb_zcl_reporting_config_record_h handle,
3566 unsigned short max_i);
3569 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3570 * @brief Gets the timeout from a reporting configuration record.
3571 * @details The timeout period field is 16 bits in length and shall contain the maximum
3572 * expected time, in seconds, between received reports for the attribute specified in
3573 * the attribute identifier field. If more time than this elapses between reports, this
3574 * may be an indication that there is a problem with reporting.
3576 * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
3577 * Note that, for a server/client connection to work properly using automatic
3578 * reporting, the timeout value set for attribute reports to be received by the client (or
3579 * server) cluster must be set somewhat higher than the maximum reporting interval
3580 * set for the attribute on the server (or client) cluster.
3584 * @param[in] handle The handle of write attribute status record
3585 * @param[out] timeout timeout
3587 * @return 0 on success, otherwise a negative error value.
3588 * @retval #ZIGBEE_ERROR_NONE Successful
3589 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3590 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3592 * @see zb_zcl_global_read_report_config_cb()
3593 * @see zb_report_config_record_create()
3594 * @see zb_report_config_record_clone()
3595 * @see zb_report_config_record_destroy()
3596 * @see zb_report_config_record_get_id()
3597 * @see zb_report_config_record_set_id()
3598 * @see zb_report_config_record_get_dir()
3599 * @see zb_report_config_record_set_dir()
3600 * @see zb_report_config_record_get_min_interval()
3601 * @see zb_report_config_record_set_min_interval()
3602 * @see zb_report_config_record_get_max_interval()
3603 * @see zb_report_config_record_set_max_interval()
3604 * @see zb_report_config_record_get_change()
3605 * @see zb_report_config_record_set_change()
3606 * @see zb_report_config_record_set_timeout()
3608 int zb_report_config_record_get_timeout(zb_zcl_reporting_config_record_h handle,
3609 unsigned short *timeout);
3612 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3613 * @brief Sets the timeout of a reporting configuration record.
3614 * @details The timeout period field is 16 bits in length and shall contain the maximum
3615 * expected time, in seconds, between received reports for the attribute specified in
3616 * the attribute identifier field. If more time than this elapses between reports, this
3617 * may be an indication that there is a problem with reporting.
3619 * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
3620 * Note that, for a server/client connection to work properly using automatic
3621 * reporting, the timeout value set for attribute reports to be received by the client (or
3622 * server) cluster must be set somewhat higher than the maximum reporting interval
3623 * set for the attribute on the server (or client) cluster.
3627 * @param[in] handle The handle of write attribute status record
3628 * @param[in] timeout timeout
3630 * @return 0 on success, otherwise a negative error value.
3631 * @retval #ZIGBEE_ERROR_NONE Successful
3632 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3633 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3635 * @see zb_zcl_global_read_report_config_cb()
3636 * @see zb_report_config_record_create()
3637 * @see zb_report_config_record_clone()
3638 * @see zb_report_config_record_destroy()
3639 * @see zb_report_config_record_get_id()
3640 * @see zb_report_config_record_set_id()
3641 * @see zb_report_config_record_get_dir()
3642 * @see zb_report_config_record_set_dir()
3643 * @see zb_report_config_record_get_min_interval()
3644 * @see zb_report_config_record_set_min_interval()
3645 * @see zb_report_config_record_get_max_interval()
3646 * @see zb_report_config_record_set_max_interval()
3647 * @see zb_report_config_record_get_change()
3648 * @see zb_report_config_record_set_change()
3649 * @see zb_report_config_record_get_timeout()
3651 int zb_report_config_record_set_timeout(zb_zcl_reporting_config_record_h handle,
3652 unsigned short timeout);
3655 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3656 * @brief Gets the change from a reporting configuration record.
3657 * @details The reportable change field shall contain the minimum change to the attribute
3658 * that will result in a report being issued. This field is of variable length.
3660 * For attributes with 'analog' data type
3661 * the field has the same data type as the attribute.
3663 * The sign (if any) of the reportable change field is ignored.
3664 * For attributes of 'discrete' data type
3665 * this field is omitted.
3669 * @remarks The @a value should be released using free().
3671 * @param[in] handle The handle of write attribute status record
3672 * @param[out] type attribute type The attribute data type shall contain the data
3673 * type of the attribute in the same read attributes status record
3674 * (see #zb_zcl_data_type_e).
3675 * @param[out] value The reportable change value. The reportable change field shall
3676 * contain the minimum change to the attribute that will result in a report being issued.
3677 * For attributes with 'analog' data type (see #zb_zcl_data_type_e) the field has the
3678 * same data type as the attribute. If the reportable change has not been configured,
3679 * this field shall contain the invalid value for the relevant data type.
3680 * For attributes of 'discrete' data type (see #zb_zcl_data_type_e) this field is not
3682 * @param[out] size attribute data size
3684 * @return 0 on success, otherwise a negative error value.
3685 * @retval #ZIGBEE_ERROR_NONE Successful
3686 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3687 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3689 * @see zb_zcl_global_read_report_config_cb()
3690 * @see zb_report_config_record_create()
3691 * @see zb_report_config_record_clone()
3692 * @see zb_report_config_record_destroy()
3693 * @see zb_report_config_record_get_id()
3694 * @see zb_report_config_record_set_id()
3695 * @see zb_report_config_record_get_dir()
3696 * @see zb_report_config_record_set_dir()
3697 * @see zb_report_config_record_get_min_interval()
3698 * @see zb_report_config_record_set_min_interval()
3699 * @see zb_report_config_record_get_max_interval()
3700 * @see zb_report_config_record_set_max_interval()
3701 * @see zb_report_config_record_get_change()
3702 * @see zb_report_config_record_set_change()
3703 * @see zb_report_config_record_get_timeout()
3704 * @see zb_report_config_record_set_timeout()
3706 int zb_report_config_record_get_change(zb_zcl_reporting_config_record_h handle,
3707 zb_zcl_data_type_e *type, unsigned char **value, int *size);
3710 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3711 * @brief Sets the change to a reporting configuration record.
3712 * @details The reportable change field shall contain the minimum change to the attribute
3713 * that will result in a report being issued. This field is of variable length.
3714 * For attributes with 'analog' data type
3715 * the field has the same data type as the attribute.
3717 * The sign (if any) of the reportable change field is ignored.
3718 * For attributes of 'discrete' data type
3719 * this field is omitted.
3723 * @param[in] handle The handle of write attribute status record
3724 * @param[in] type attribute type
3725 * @param[in] value attribute data (only analog data type is allowed)
3727 * @return 0 on success, otherwise a negative error value.
3728 * @retval #ZIGBEE_ERROR_NONE Successful
3729 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3730 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3732 * @see zb_zcl_global_read_report_config_cb()
3733 * @see zb_report_config_record_create()
3734 * @see zb_report_config_record_clone()
3735 * @see zb_report_config_record_destroy()
3736 * @see zb_report_config_record_get_id()
3737 * @see zb_report_config_record_set_id()
3738 * @see zb_report_config_record_get_dir()
3739 * @see zb_report_config_record_set_dir()
3740 * @see zb_report_config_record_get_type()
3741 * @see zb_report_config_record_get_min_interval()
3742 * @see zb_report_config_record_set_min_interval()
3743 * @see zb_report_config_record_get_max_interval()
3744 * @see zb_report_config_record_set_max_interval()
3745 * @see zb_report_config_record_get_change()
3746 * @see zb_report_config_record_set_change()
3747 * @see zb_report_config_record_get_timeout()
3748 * @see zb_report_config_record_set_timeout()
3750 int zb_report_config_record_set_change(zb_zcl_reporting_config_record_h handle,
3751 zb_zcl_data_type_e type, unsigned char *value);
3754 * @brief Sends 'setting configure reporting' command.
3755 * @details Call this function to set the configuration of attribute status changing reporting.
3759 * @privilege %http://tizen.org/privilege/zigbee
3761 * @param[in] handle The handle of zigbee
3762 * @param[in] addr16 target network address
3763 * @param[in] src_ep source end-point (ex. 1)
3764 * @param[in] dst_ep destination end-point (ex. 1)
3765 * @param[in] zcl_fc frame control bits (default 0x00). \n
3766 * Only OR operation is allowed in ZCL header \n
3768 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
3769 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
3770 * - Manufacturer Specific : \n
3772 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
3773 * #ZB_ZCL_SERVER_TO_CLIENT \n
3774 * - Disable Default Response : \n
3775 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
3776 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
3777 * @param[in] clusterid ZCL cluster id
3778 * @param[in] records Array of #zb_zcl_reporting_config_record_h
3779 * @param[in] count The number of items in @a records array
3780 * @param[in] cb Response callback function
3781 * @param[in] user_data User data
3783 * @return 0 on success, otherwise a negative error value.
3784 * @retval #ZIGBEE_ERROR_NONE Successful
3785 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3786 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3787 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3788 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3789 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3790 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3792 * @see zb_zcl_global_config_report_write_cb()
3794 int zb_zcl_global_config_report_write(
3797 zb_end_point src_ep,
3798 zb_end_point dst_ep,
3799 zb_zcl_frame_ctl zcl_fc,
3800 zb_cluster_id clusterid,
3801 zb_zcl_reporting_config_record_h *records,
3803 zb_zcl_global_config_report_write_cb cb,
3808 * @brief Called with a configuration report.
3809 * @details This callback is called after zb_zcl_global_config_report_read() is called.
3813 * @remarks The @a records can be used only in the callback.
3814 * @remarks The @a records should not be released.
3816 * @param[out] addr16 Source network address
3817 * @param[out] ep The source end-point (ex. 1)
3818 * @param[out] clusterid ZCL cluster id
3819 * @param[out] records Read reporting configuration response record
3820 * @param[out] count The number of items in @a records
3821 * @param[out] user_data User data
3823 * @see zb_zcl_global_config_report_read()
3825 typedef void (*zb_zcl_global_config_report_read_cb)(
3828 zb_cluster_id clusterid,
3829 zb_zcl_reporting_config_record_h *records,
3834 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3835 * @brief Creates a read reporting configuration record.
3836 * @details Allocates memory for read reporting configuration record.
3840 * @privilege %http://tizen.org/privilege/zigbee
3842 * @remarks The @a handle should be released using zb_read_report_config_record_destroy().
3844 * @param[out] handle The handle of read configuration record
3846 * @return 0 on success, otherwise a negative error value.
3847 * @retval #ZIGBEE_ERROR_NONE Successful
3848 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3849 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3850 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3851 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3853 * @see zb_read_report_config_record_create()
3854 * @see zb_read_report_config_record_destroy()
3855 * @see zb_read_report_config_record_set_id()
3856 * @see zb_read_report_config_record_set_dir()
3858 int zb_read_report_config_record_create(
3859 zb_zcl_read_report_config_record_h *handle);
3862 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3863 * @brief Destroys a read reporting configuration record.
3864 * @details Removes allocated memory for read reporting configuration record.
3868 * @param[in] handle The handle of write attribute record
3870 * @return 0 on success, otherwise a negative error value.
3871 * @retval #ZIGBEE_ERROR_NONE Successful
3872 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3873 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3875 * @see zb_read_report_config_record_create()
3876 * @see zb_read_report_config_record_destroy()
3877 * @see zb_read_report_config_record_set_id()
3878 * @see zb_read_report_config_record_set_dir()
3880 int zb_read_report_config_record_destroy(
3881 zb_zcl_read_report_config_record_h handle);
3884 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3885 * @brief Sets the direction of a read reporting configuration record.
3886 * @details The direction field specifies whether values of the attribute are reported
3887 * (0x00), or whether reports of the attribute are received (0x01).
3889 * All other values of this field are reserved.
3893 * @param[in] handle The handle of write attribute status record
3894 * @param[in] dir direction
3896 * @return 0 on success, otherwise a negative error value.
3897 * @retval #ZIGBEE_ERROR_NONE Successful
3898 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3899 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3901 * @see zb_read_report_config_record_create()
3902 * @see zb_read_report_config_record_destroy()
3903 * @see zb_read_report_config_record_set_id()
3904 * @see zb_read_report_config_record_set_dir()
3906 int zb_read_report_config_record_set_dir(
3907 zb_zcl_read_report_config_record_h handle,
3908 zb_zcl_fc_direction_e dir);
3911 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3912 * @brief Sets the attribute identifier of a read reporting configuration record.
3913 * @details The attribute identifier field shall contain the identifier of the attribute
3914 * whose reporting configuration details are to be read.
3918 * @param[in] handle The handle of write attribute status record
3919 * @param[in] id Attribute identifier
3921 * @return 0 on success, otherwise a negative error value.
3922 * @retval #ZIGBEE_ERROR_NONE Successful
3923 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3924 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3926 * @see zb_read_report_config_record_create()
3927 * @see zb_read_report_config_record_destroy()
3928 * @see zb_read_report_config_record_set_id()
3929 * @see zb_read_report_config_record_set_dir()
3931 int zb_read_report_config_record_set_id(
3932 zb_zcl_read_report_config_record_h handle,
3936 * @brief Sends 'reading configure reporting' command.
3937 * @details Call this function to read the configuration of attribute status changing
3942 * @privilege %http://tizen.org/privilege/zigbee
3944 * @param[in] handle The handle of zigbee
3945 * @param[in] addr16 target network address
3946 * @param[in] src_ep source end-point (ex. 1)
3947 * @param[in] dst_ep destination end-point (ex. 1)
3948 * @param[in] zcl_fc frame control bits (default 0x00). \n
3949 * Only OR operation is allowed in ZCL header \n
3951 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
3952 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
3953 * - Manufacturer Specific : \n
3955 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
3956 * #ZB_ZCL_SERVER_TO_CLIENT \n
3957 * - Disable Default Response : \n
3958 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
3959 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
3960 * @param[in] clusterid ZCL cluster id
3961 * @param[in] records Array of #zb_zcl_read_report_config_record_h
3962 * @param[in] count The number of items in @a records array
3963 * @param[in] cb Response callback function
3964 * @param[in] user_data User data
3966 * @return 0 on success, otherwise a negative error value.
3967 * @retval #ZIGBEE_ERROR_NONE Successful
3968 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3969 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3970 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3971 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3972 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3973 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3975 * @see zb_zcl_global_config_report_read_cb()
3977 int zb_zcl_global_config_report_read(
3980 zb_end_point src_ep,
3981 zb_end_point dst_ep,
3982 zb_zcl_frame_ctl zcl_fc,
3983 zb_cluster_id clusterid,
3984 zb_zcl_read_report_config_record_h *records,
3986 zb_zcl_global_config_report_read_cb cb,
3994 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE
3999 /* Generated Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
4000 * +--------------------------------+--------------------------------------+------------+
4001 * |Command Identifier Field Value | Description | Mandatory/ |
4003 * +--------------------------------+--------------------------------------+------------+
4004 * | 0x00 | Zone Status Change Notification | M |
4005 * | 0x01 | Zone Enroll Request | M |
4006 * | 0x11 | Zone Status Change Notification (Ext)| M |
4007 * +--------------------------------+--------------------------------------+------------+
4011 /* Received Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
4012 * +--------------------------------+--------------------------------------+------------+
4013 * |Command Identifier Field Value | Description | Mandatory/ |
4015 * +--------------------------------+--------------------------------------+------------+
4016 * | 0x00 | Zone Enroll Response | M |
4017 * +--------------------------------+--------------------------------------+------------+
4021 * @brief Values of the Enroll Response Code in Zigbee Cluster Library.
4026 ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS = 0x00, /**< Success */
4027 ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED = 0x01, /**< This specific Zone type is not known to the CIE and is not supported */
4028 ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED = 0x02, /**< CIE does not permit new zones to enroll at this time. */
4029 ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES = 0x03, /**< CIE reached its limit of number of enrolled zones */
4030 } zb_ias_zone_enroll_response_e;
4033 * @brief Sends 'zone enroll response' command.
4034 * @details On receipt, the device embodying the Zone server is notified that it is now
4035 * enrolled as an active alarm device.
4037 * The device embodying the Zone server must authenticate received messages by
4038 * checking the address of their sender against IAS_CIE_Address. This is to ensure
4039 * that only messages from the correct CIE are accepted.
4043 * @privilege %http://tizen.org/privilege/zigbee
4045 * @param[in] handle The handle of zigbee
4046 * @param[in] addr16 Network address
4047 * @param[in] ep Endpoint ID
4048 * @param[in] enroll_response_code #ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS \n
4049 * #ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED \n
4050 * #ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED \n
4051 * #ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES \n
4052 * @param[in] zone_id The Zone ID field is the index into the zone table of the CIE. This
4053 * field is only relevant if the response code is success.
4055 * @return 0 on success, otherwise a negative error value.
4056 * @retval #ZIGBEE_ERROR_NONE Successful
4057 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4058 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
4059 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
4060 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
4061 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
4062 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4065 int zb_zcl_zone_enroll_response(
4069 unsigned char enroll_response_code,
4070 unsigned char zone_id);
4077 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE
4082 /* Command IDs for the On/Off Cluster in Zigbee Cluster Library
4083 * +--------------------------------+--------------------------------------+------------+
4084 * |Command Identifier Field Value | Description | Mandatory/ |
4086 * +--------------------------------+--------------------------------------+------------+
4087 * | 0x00 | Off | M |
4089 * | 0x02 | Toggle | M |
4090 * +--------------------------------+--------------------------------------+------------+
4094 * @brief On/Off/Toggle value.
4099 ZB_ZCL_OFF = 0x00, /**< Off */
4100 ZB_ZCL_ON = 0x01, /**< On */
4101 ZB_ZCL_TOGGLE = 0x02, /**< Toggle */
4105 * @brief Sends 'on/off/toggle' command.
4106 * @details On receipt of 'on' command, a device shall enter its 'Off' state.
4107 * This state is device dependent, but it is recommended that it is used for power off or
4108 * similar functions.
4110 * On receipt of 'off' command, a device shall enter its 'On' state. This state is
4111 * device dependent, but it is recommended that it is used for power on or similar
4114 * On receipt of 'toggle' command, if a device is in its 'Off' state it shall enter
4115 * its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.
4119 * @privilege %http://tizen.org/privilege/zigbee
4121 * @param[in] handle The handle of zigbee
4122 * @param[in] addr16 Network address
4123 * @param[in] ep Endpoint ID
4124 * @param[in] on_off_type #ZB_ZCL_OFF \n
4128 * @return 0 on success, otherwise a negative error value.
4129 * @retval #ZIGBEE_ERROR_NONE Successful
4130 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4131 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
4132 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
4133 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
4134 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
4135 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4138 int zb_zcl_on_off_control(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
4139 zb_zcl_on_off_e on_off_type);
4149 #endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_H__ */