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 the zone type of the enroll request.
615 * @param[in] ev Event data structure
616 * @param[out] zone_type Zone type \n
617 * #ZB_ZCL_IAS_ZONE_TYPE_STANDARD_CIE \n
618 * #ZB_ZCL_IAS_ZONE_TYPE_MOTION_SENSOR \n
619 * #ZB_ZCL_IAS_ZONE_TYPE_CONTACT_SWITCH \n
620 * #ZB_ZCL_IAS_ZONE_TYPE_FIRE_SENSOR \n
621 * #ZB_ZCL_IAS_ZONE_TYPE_WATER_SENSOR \n
622 * #ZB_ZCL_IAS_ZONE_TYPE_GAS_SENSOR \n
623 * #ZB_ZCL_IAS_ZONE_TYPE_PERSONAL_EMERGENCY_SENSOR \n
624 * #ZB_ZCL_IAS_ZONE_TYPE_MOVEMENT_SENSOR \n
625 * #ZB_ZCL_IAS_ZONE_TYPE_REMOTE_CONTROL \n
626 * #ZB_ZCL_IAS_ZONE_TYPE_KEY_FOB \n
627 * #ZB_ZCL_IAS_ZONE_TYPE_KEYPAD \n
628 * #ZB_ZCL_IAS_ZONE_TYPE_STANDARD_WARNING_DEVICE \n
629 * #ZB_ZCL_IAS_ZONE_TYPE_INVALID
631 * @return 0 on success, otherwise a negative error value.
632 * @retval #ZIGBEE_ERROR_NONE Successful
633 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
634 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
637 int zb_ev_get_enroll_request_zone_type(zb_event_data_h ev,
638 zb_zcl_ias_zone_type_e* zone_type);
641 * @brief Gets the manufacturer code of the enroll request.
644 * @param[in] ev Event data structure
645 * @param[out] mfg_code Manufacturer code
647 * @return 0 on success, otherwise a negative error value.
648 * @retval #ZIGBEE_ERROR_NONE Successful
649 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
650 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
653 int zb_ev_get_enroll_request_mfg_code(zb_event_data_h ev,
654 unsigned char* mfg_code);
657 * @brief Called after zigbee network formation is completed.
658 * @details Response of forming the zigbee network
662 * @param[out] panid PAN ID
663 * @param[out] user_data user data
665 * @see zb_form_network()
667 typedef void (*zb_form_network_cb)(zb_nwk_addr panid, void *user_data);
670 * @brief Makes the network work as a zigbee coordinator.
674 * @privilege %http://tizen.org/privilege/zigbee
676 * @remarks If you want to change parameters related to network configuration you should
677 * call zb_zdo_set_compatible_startup_parameters() function.
679 * @param[in] handle The handle of zigbee
680 * @param[in] cb zb_form_network_cb()
681 * @param[in] user_data user data
683 * @return 0 on success, otherwise a negative error value.
684 * @retval #ZIGBEE_ERROR_NONE Successful
685 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
686 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
687 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
688 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
690 * @post When forming network is finished, form_network_done event will be generated.
692 * @see zb_disable_network()
693 * @see zb_zdo_set_compatible_startup_parameters()
695 int zb_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data);
698 * @brief Called after disabling the zigbee network.
699 * @details Response of disabling the zigbee network
703 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
704 * #ZB_ZDP_STATUS_NOT_SUPPORTED \n
705 * @param[out] user_data user data
707 * @see zb_form_network()
709 typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data);
711 * @brief Disables network and stops zigbee coordinator role.
712 * @details This function to stop zigbee coordinator
716 * @privilege %http://tizen.org/privilege/zigbee
718 * @param[in] handle The handle of zigbee
719 * @param[in] cb zb_disable_network_cb()
720 * @param[in] user_data user data
722 * @return 0 on success, otherwise a negative error value.
723 * @retval #ZIGBEE_ERROR_NONE Successful
724 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
725 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
726 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
727 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
729 * @see zb_form_network()
731 int zb_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb, void *user_data);
734 * @brief Forces a node to leave one network and to rejoin the other.
735 * @details If @a remove_children is set to true, the target end device will reset its
736 * state-machine to factory defaults.
740 * @privilege %http://tizen.org/privilege/zigbee
742 * @param[in] handle The handle of zigbee
743 * @param[in] addr The source EUI64 of the binding (the remote device's EUI64)
744 * @param[in] remove_children Remove children
745 * @param[in] rejoin Rejoin after leave
747 * @return 0 on success, otherwise a negative error value.
748 * @retval #ZIGBEE_ERROR_NONE Successful
749 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
750 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
751 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
752 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
754 * @see zb_form_network()
756 int zb_leave_device(zb_zigbee_h handle, zb_ieee_addr addr, bool remove_children, bool rejoin);
759 * @brief Allows or disallows the coordinator device to accept other device's association
764 * @privilege %http://tizen.org/privilege/zigbee
766 * @remarks Especially, this can be very useful for disabling joining all throughout the
767 * network. Typically, this is the last step when commissioning a network. It closes it
768 * down to prevent other nodes getting on the network without permission.
770 * @param[in] handle The handle of zigbee
771 * @param[in] timeout Number of seconds during which devices will be allowed to join
772 * the network. A value of 0xff turns permit joining on permanently
774 * @return 0 on success, otherwise a negative error value.
775 * @retval #ZIGBEE_ERROR_NONE Successful
776 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
777 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
778 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
779 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
781 * @see zb_form_network()
783 int zb_permit_join(zb_zigbee_h handle, unsigned char timeout);
786 * @brief Shows current coordinator's IEEE MAC address.
787 * @details The function gets the coordinator's MAC address from the machine which runs
788 * zigbee-service daemon.
792 * @privilege %http://tizen.org/privilege/zigbee
794 * @param[in] handle The handle of zigbee
795 * @param[out] addr64 the Zigbee IEEE MAC address of this machine.
797 * @return 0 on success, otherwise a negative error value.
798 * @retval #ZIGBEE_ERROR_NONE Successful
799 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
800 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
801 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
802 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
804 * @see zb_get_network_info()
806 int zb_get_controller_mac_address(zb_zigbee_h handle, zb_ieee_addr addr64);
809 * @brief Gets information of the current network environment of coordinator.
810 * @details The function shows network environment
814 * @privilege %http://tizen.org/privilege/zigbee
816 * @param[in] handle The handle of zigbee
817 * @param[out] addr64 the Zigbee IEEE MAC address
818 * @param[out] nodeid Node ID
819 * @param[out] panid PAN ID
820 * @param[out] channel 11~26 : 2.4GHz~2.485GHz
821 * @param[out] tx_power Tx power strength
823 * @return 0 on success, otherwise a negative error value.
824 * @retval #ZIGBEE_ERROR_NONE Successful
825 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
826 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
827 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
828 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
830 * @see zb_form_network()
832 int zb_get_network_info(zb_zigbee_h handle, zb_ieee_addr addr64, zb_nwk_addr *nodeid,
833 zb_nwk_addr *panid, unsigned char *channel, unsigned char *tx_power);
836 * @brief Gets all children device list information.
837 * @details This function return end-point list and simple description per each end-point
842 * @privilege %http://tizen.org/privilege/zigbee
844 * @remarks The @a list should be released using zb_end_dev_info_list_free().
846 * @param[in] handle The handle of zigbee
847 * @param[out] count The number of end-devices
848 * @param[out] list The device information list
850 * @return 0 on success, otherwise a negative error value.
851 * @retval #ZIGBEE_ERROR_NONE Successful
852 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
853 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
854 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
855 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
857 * @see zb_end_dev_info_list_free()
860 int zb_end_dev_info_get_list(zb_zigbee_h handle, int *count,
861 zb_end_dev_info_h **list);
864 * @brief Gets endpoint list information.
865 * @details This function return end-point list of each device.
869 * @privilege %http://tizen.org/privilege/zigbee
871 * @remarks The @a ep_list should be released using free().
873 * @param[in] handle The handle of zigbee
874 * @param[in] addr64 the Zigbee IEEE MAC address
875 * @param[out] count The number of endpoints
876 * @param[out] ep_list The device endpoint list
878 * @return 0 on success, otherwise a negative error value.
879 * @retval #ZIGBEE_ERROR_NONE Successful
880 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
881 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
882 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
883 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
885 int zb_end_dev_get_endpoint_list(zb_zigbee_h handle, zb_ieee_addr addr64,
886 unsigned char *count, zb_end_point **ep_list);
889 * @brief Gets cluster list information.
890 * @details This function return in and out cluster list of each device.
894 * @privilege %http://tizen.org/privilege/zigbee
896 * @remarks The @a in_cluster_list should be released using free().
897 * @remarks The @a out_cluster_list should be released using free().
899 * @param[in] handle The handle of zigbee
900 * @param[in] addr64 the Zigbee IEEE MAC address
901 * @param[in] ep endpoint number
902 * @param[out] in_cluster_count The number of in-clusters
903 * @param[out] in_cluster_list The device server cluster list
904 * @param[out] out_cluster_count The number of out-clusters
905 * @param[out] out_cluster_list The device client list
907 * @return 0 on success, otherwise a negative error value.
908 * @retval #ZIGBEE_ERROR_NONE Successful
909 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
910 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
911 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
912 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
914 int zb_end_dev_info_get_cluster_list(zb_zigbee_h handle, zb_ieee_addr addr64, zb_end_point ep,
915 unsigned char *in_cluster_count, zb_cluster_id **in_cluster_list,
916 unsigned char *out_cluster_count, zb_cluster_id **out_cluster_list);
919 * @brief Frees all children device list information.
920 * @details This function return end-point list and simple description per each end-point
925 * @param[in] list The device information list
927 * @return 0 on success, otherwise a negative error value.
928 * @retval #ZIGBEE_ERROR_NONE Successful
929 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
930 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
932 * @see zb_end_dev_info_get_list()
934 int zb_end_dev_info_list_free(zb_end_dev_info_h *list);
937 * @brief Creates an end-device handle.
941 * @privilege %http://tizen.org/privilege/zigbee
943 * @remarks The @a handle should be released using zb_end_dev_destroy().
945 * @param[out] handle The handle of end-device descriptor
947 * @return 0 on success, otherwise a negative error value.
948 * @retval #ZIGBEE_ERROR_NONE Successful
949 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
950 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
951 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
952 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
954 * @see zb_end_dev_info_clone()
955 * @see zb_end_dev_info_destroy()
957 int zb_end_dev_info_create(zb_end_dev_info_h *handle);
960 * @brief Clones an end-device handle.
964 * @remarks The @a src should be released using zb_end_dev_destroy().
965 * @remarks The @a dst should be released using zb_end_dev_destroy().
967 * @param[in] src handle of source end-device descriptor
968 * @param[in] dst handle of destination end-device descriptor
970 * @return 0 on success, otherwise a negative error value.
971 * @retval #ZIGBEE_ERROR_NONE Successful
972 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
973 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
975 * @see zb_end_dev_info_create()
976 * @see zb_end_dev_info_destroy()
978 int zb_end_dev_info_clone(zb_end_dev_info_h src, zb_end_dev_info_h *dst);
981 * @brief Destroys an end-device handle.
985 * @param[in] handle The handle of end-device descriptor
987 * @return 0 on success, otherwise a negative error value.
988 * @retval #ZIGBEE_ERROR_NONE Successful
989 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
990 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
992 * @see zb_end_dev_info_create()
993 * @see zb_end_dev_info_clone()
995 int zb_end_dev_info_destroy(zb_end_dev_info_h handle);
998 * @brief Gets network address of a specific end-point.
1002 * @remarks This function should be called in zb_end_dev_info_cb()
1004 * @param[in] handle The handle of a specific end-device
1005 * @param[out] addr16 network address of the end-point
1007 * @return 0 on success, otherwise a negative error value.
1008 * @retval #ZIGBEE_ERROR_NONE Successful
1009 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1010 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1012 * @see zb_end_dev_info_cb()
1013 * @see zb_foreach_end_dev_info()
1014 * @see zb_end_dev_info_get_list()
1016 int zb_end_dev_info_get_network_address(zb_end_dev_info_h handle,
1017 zb_nwk_addr *addr16);
1020 * @brief Gets ieee address of a specific end-point.
1024 * @remarks This function should be called in zb_end_dev_info_cb()
1026 * @param[in] handle The handle of a specific end-device
1027 * @param[out] addr64 ieee address of the end-point
1029 * @return 0 on success, otherwise a negative error value.
1030 * @retval #ZIGBEE_ERROR_NONE Successful
1031 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1032 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1034 * @see zb_end_dev_info_cb()
1035 * @see zb_foreach_end_dev_info()
1036 * @see zb_end_dev_get_list()
1038 int zb_end_dev_info_get_ieee_address(zb_end_dev_info_h handle, zb_ieee_addr addr64);
1041 * @brief Gets a number of end-points of a specific end-device.
1045 * @remarks This function should be called in zb_end_dev_info_cb()
1047 * @param[in] handle The handle of a specific end-device
1048 * @param[out] count a number of endpoints of the end-point
1050 * @return 0 on success, otherwise a negative error value.
1051 * @retval #ZIGBEE_ERROR_NONE Successful
1052 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1053 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1055 * @see zb_end_dev_info_cb()
1056 * @see zb_foreach_end_dev_info()
1057 * @see zb_end_dev_get_list()
1059 int zb_end_dev_info_get_num_of_ep(zb_end_dev_info_h handle, unsigned char *count);
1062 * @brief Gets pointer of end-points list.
1066 * @remarks This function should be called in zb_end_dev_info_cb().
1067 * The number of items on the list can be found with zb_end_dev_info_get_num_of_ep().
1068 * @remarks The @a ep_list should be released using free().
1070 * @param[in] handle The handle of a specific end-device
1071 * @param[out] ep_list list of endpoints of the end-point
1073 * @return 0 on success, otherwise a negative error value.
1074 * @retval #ZIGBEE_ERROR_NONE Successful
1075 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1076 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1078 * @see zb_end_dev_info_cb()
1079 * @see zb_foreach_end_dev_info()
1080 * @see zb_end_dev_info_get_list()
1081 # @see zb_end_dev_info_get_num_of_ep()
1083 int zb_end_dev_info_get_ep_list(zb_end_dev_info_h handle, zb_end_point **ep_list);
1086 * @brief Gets 802.15.4 MAC capability of a specific end-point.
1090 * @remarks This function should be called in zb_end_dev_info_cb()
1092 * @param[in] handle The handle of a specific end-device
1093 * @param[out] capability 802.15.4 MAC capability of the end-point
1095 * @return 0 on success, otherwise a negative error value.
1096 * @retval #ZIGBEE_ERROR_NONE Successful
1097 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1098 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1099 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1100 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1102 * @see zb_end_dev_info_cb()
1103 * @see zb_foreach_end_dev_info()
1104 * @see zb_end_dev_info_get_list()
1106 int zb_end_dev_info_get_mac_capability(zb_end_dev_info_h handle,
1107 zb_zdp_mac_capability_field_e *capability);
1110 * @brief Gets ability of alternative PAN coordinator of a specific end-point.
1114 * @remarks This function should be called in zb_end_dev_info_cb()
1116 * @param[in] handle The handle of a specific end-device
1117 * @param[out] can_do_it alternative of PAN coordinator of the end-point
1119 * @return 0 on success, otherwise a negative error value.
1120 * @retval #ZIGBEE_ERROR_NONE Successful
1121 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1122 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1123 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1124 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1126 * @see zb_end_dev_info_cb()
1127 * @see zb_foreach_end_dev_info()
1128 * @see zb_end_dev_info_get_list()
1130 int zb_end_dev_info_get_alternative_pan_coordinator(
1131 zb_end_dev_info_h handle, zb_zdp_do_pan_coordinator_e *can_do_it);
1134 * @brief Gets device id of a specific end-point.
1138 * @remarks This function should be called in zb_end_dev_info_cb()
1140 * @param[in] handle The handle of a specific end-device
1141 * @param[in] ep endpoint number
1142 * @param[out] deviceid device id of the end-point
1144 * @return 0 on success, otherwise a negative error value.
1145 * @retval #ZIGBEE_ERROR_NONE Successful
1146 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1147 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1148 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1149 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1151 * @see zb_end_dev_info_cb()
1152 * @see zb_foreach_end_dev_info()
1153 * @see zb_end_dev_info_get_list()
1155 int zb_end_dev_info_get_device_id(zb_end_dev_info_h handle, zb_end_point ep,
1156 zb_device_id *deviceid);
1159 * @brief Gets profile id of a specific end-point.
1163 * @remarks This function should be called in zb_end_dev_info_cb()
1165 * @param[in] handle The handle of a specific end-device
1166 * @param[in] ep endpoint number
1167 * @param[out] profileid profile id of the end-point
1169 * @return 0 on success, otherwise a negative error value.
1170 * @retval #ZIGBEE_ERROR_NONE Successful
1171 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1172 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1173 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1174 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1176 * @see zb_end_dev_info_cb()
1177 * @see zb_foreach_end_dev_info()
1178 * @see zb_end_dev_info_get_list()
1180 int zb_end_dev_info_get_profile_id(zb_end_dev_info_h handle, zb_end_point ep,
1181 zb_profile_id *profileid);
1184 * @brief Gets power source type of a specific end-point.
1188 * @remarks This function should be called in zb_end_dev_info_cb()
1190 * @param[in] handle The handle of a specific end-device
1191 * @param[out] power_src power source type of the end-point
1193 * @return 0 on success, otherwise a negative error value.
1194 * @retval #ZIGBEE_ERROR_NONE Successful
1195 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1196 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1197 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1198 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1200 * @see zb_end_dev_info_cb()
1201 * @see zb_foreach_end_dev_info()
1202 * @see zb_end_dev_info_get_list()
1204 int zb_end_dev_info_get_power_source(zb_end_dev_info_h handle,
1205 zb_zdp_power_e *power_src);
1208 * @brief Gets security capability of a specific end-point.
1212 * @remarks This function should be called in zb_end_dev_info_cb()
1214 * @param[in] handle The handle of a specific end-device
1215 * @param[out] sec_capability security type of the end-point
1217 * @return 0 on success, otherwise a negative error value.
1218 * @retval #ZIGBEE_ERROR_NONE Successful
1219 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1220 * @retval #ZIGBEE_ERROR_NO_DATA No data available
1221 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1222 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1224 * @see zb_end_dev_info_cb()
1225 * @see zb_foreach_end_dev_info()
1226 * @see zb_end_dev_get_list()
1228 int zb_end_dev_info_get_security_capabilty(zb_end_dev_info_h handle,
1229 zb_zdp_security_cap_e *sec_capability);
1236 * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
1242 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1243 * @brief Creates a simple descriptor.
1247 * @privilege %http://tizen.org/privilege/zigbee
1249 * @remarks The @a handle should be released using zb_simple_desc_destroy().
1251 * @param[out] handle The handle of a simple descriptor
1253 * @return 0 on success, otherwise a negative error value.
1254 * @retval #ZIGBEE_ERROR_NONE Successful
1255 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1256 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1257 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1258 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1260 * @see zb_simple_desc_clone()
1261 * @see zb_simple_desc_destroy()
1263 int zb_simple_desc_create(zb_zdo_simple_desc_h *handle);
1266 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1267 * @brief Clones a simple descriptor.
1271 * @remarks The @a dst should be released using zb_simple_desc_destroy().
1273 * @param[in] src handle of a source simple descriptor
1274 * @param[in] dst handle of a destination simple descriptor
1276 * @return 0 on success, otherwise a negative error value.
1277 * @retval #ZIGBEE_ERROR_NONE Successful
1278 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1279 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1281 * @see zb_simple_desc_create()
1282 * @see zb_simple_desc_destroy()
1284 int zb_simple_desc_clone(zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h *dst);
1287 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1288 * @brief Destroys a simple a descriptor handle.
1292 * @param[in] handle The handle of a simple descriptor
1294 * @return 0 on success, otherwise a negative error value.
1295 * @retval #ZIGBEE_ERROR_NONE Successful
1296 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1297 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1299 * @see zb_simple_desc_create()
1300 * @see zb_simple_desc_clone()
1302 int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle);
1305 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1306 * @brief Gets active endpoint number from a simple descriptor handle.
1310 * @param[in] handle The handle of a simple descriptor
1311 * @param[out] ep endpoint number
1313 * @return 0 on success, otherwise a negative error value.
1314 * @retval #ZIGBEE_ERROR_NONE Successful
1315 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1316 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1318 * @see zb_simple_desc_set_ep()
1320 int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, zb_end_point *ep);
1323 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1324 * @brief Sets active endpoint number to a simple descriptor handle.
1328 * @param[in] handle The handle of a simple descriptor
1329 * @param[in] ep endpoint number
1331 * @return 0 on success, otherwise a negative error value.
1332 * @retval #ZIGBEE_ERROR_NONE Successful
1333 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1334 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1336 * @see zb_simple_desc_get_ep()
1338 int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, zb_end_point ep);
1341 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1342 * @brief Gets profile id from a simple descriptor handle.
1346 * @param[in] handle The handle of a simple descriptor
1347 * @param[out] profileid profile id
1349 * @return 0 on success, otherwise a negative error value.
1350 * @retval #ZIGBEE_ERROR_NONE Successful
1351 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1352 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1354 * @see zb_simple_desc_set_profile_id()
1356 int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
1357 zb_profile_id *profileid);
1360 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1361 * @brief Sets profile id to a simple descriptor handle.
1365 * @param[in] handle The handle of a simple descriptor
1366 * @param[in] profileid profile id
1368 * @return 0 on success, otherwise a negative error value.
1369 * @retval #ZIGBEE_ERROR_NONE Successful
1370 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1371 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1373 * @see zb_simple_desc_get_device_id()
1375 int zb_simple_desc_set_profile_id(
1376 zb_zdo_simple_desc_h handle,
1377 zb_profile_id profileid);
1380 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1381 * @brief Gets device id from a simple descriptor handle.
1385 * @param[in] handle The handle of a simple descriptor
1386 * @param[out] deviceid 16-bit device identifier
1388 * @return 0 on success, otherwise a negative error value.
1389 * @retval #ZIGBEE_ERROR_NONE Successful
1390 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1391 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1393 * @see zb_simple_desc_set_device_id()
1395 int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
1396 zb_device_id *deviceid);
1399 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1400 * @brief Sets device id to a simple descriptor handle.
1404 * @param[in] handle The handle of a simple descriptor
1405 * @param[in] deviceid 16-bit device identifier
1407 * @return 0 on success, otherwise a negative error value.
1408 * @retval #ZIGBEE_ERROR_NONE Successful
1409 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1410 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1412 * @see zb_simple_desc_get_device_ver()
1414 int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
1415 zb_device_id deviceid);
1418 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1419 * @brief Gets device version from a simple descriptor handle.
1423 * @param[in] handle The handle of a simple descriptor
1424 * @param[out] device_ver device version
1426 * @return 0 on success, otherwise a negative error value.
1427 * @retval #ZIGBEE_ERROR_NONE Successful
1428 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1429 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1431 * @see zb_simple_desc_set_device_ver()
1433 int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
1434 unsigned short *device_ver);
1437 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1438 * @brief Sets device version to a simple descriptor handle.
1442 * @param[in] handle The handle of a simple descriptor
1443 * @param[in] device_ver device version
1445 * @return 0 on success, otherwise a negative error value.
1446 * @retval #ZIGBEE_ERROR_NONE Successful
1447 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1448 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1450 * @see zb_simple_desc_set_device_ver()
1452 int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
1453 unsigned short device_ver);
1456 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1457 * @brief Gets the number of items in input clusters from a simple descriptor handle.
1461 * @param[in] handle Handle of a simple descriptor
1462 * @param[out] num_of_in_clusters The number of input clusters
1464 * @return 0 on success, otherwise a negative error value.
1465 * @retval #ZIGBEE_ERROR_NONE Successful
1466 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1467 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1469 * @see zb_simple_desc_set_num_of_in_clusters()
1471 int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
1472 unsigned char *num_of_in_clusters);
1475 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1476 * @brief Sets the number of input clusters to a simple descriptor handle.
1480 * @param[in] handle The handle of a simple descriptor
1481 * @param[in] num_of_in_clusters number of input clusters
1483 * @return 0 on success, otherwise a negative error value.
1484 * @retval #ZIGBEE_ERROR_NONE Successful
1485 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1486 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1488 * @see zb_simple_desc_get_num_of_in_clusters()
1490 int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
1491 unsigned char num_of_in_clusters);
1494 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1495 * @brief Gets number of output clusters from a simple descriptor handle.
1499 * @param[in] handle The handle of a simple descriptor
1500 * @param[out] num_of_out_clusters number of output clusters
1502 * @return 0 on success, otherwise a negative error value.
1503 * @retval #ZIGBEE_ERROR_NONE Successful
1504 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1505 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1507 * @see zb_simple_desc_set_num_of_out_clusters()
1509 int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
1510 unsigned char *num_of_out_clusters);
1513 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1514 * @brief Sets number of output clusters to a simple descriptor handle.
1518 * @param[in] handle The handle of a simple descriptor
1519 * @param[in] num_of_out_clusters number of output clusters
1521 * @return 0 on success, otherwise a negative error value.
1522 * @retval #ZIGBEE_ERROR_NONE Successful
1523 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1524 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1526 * @see zb_simple_desc_get_num_of_out_clusters()
1528 int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
1529 unsigned char num_of_out_clusters);
1532 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1533 * @brief Gets input cluster list from a simple descriptor handle.
1537 * @remarks The @a in_clusters should not be released.
1538 * @remarks The @a in_clusters is available until handle is released
1540 * @param[in] handle The handle of simple descriptor
1541 * @param[out] in_clusters input clusters
1543 * @return 0 on success, otherwise a negative error value.
1544 * @retval #ZIGBEE_ERROR_NONE Successful
1545 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1546 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1548 * @see zb_simple_desc_set_in_clusters()
1550 int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
1551 zb_cluster_id **in_clusters);
1554 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1555 * @brief Sets input cluster list to a simple descriptor handle.
1559 * @param[in] handle The handle of a simple descriptor
1560 * @param[in] in_clusters input clusters
1561 * @param[in] num number of input clusters
1563 * @return 0 on success, otherwise a negative error value.
1564 * @retval #ZIGBEE_ERROR_NONE Successful
1565 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1566 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1568 * @see zb_simple_desc_get_in_clusters()
1570 int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
1571 zb_cluster_id *in_clusters, int num);
1574 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1575 * @brief Gets output cluster list from a simple descriptor handle.
1579 * @remarks The @a out_clusters should not be released.
1580 * @remarks The @a out_clusters is available until handle is released
1582 * @param[in] handle The handle of a simple descriptor
1583 * @param[out] out_clusters output clusters
1585 * @return 0 on success, otherwise a negative error value.
1586 * @retval #ZIGBEE_ERROR_NONE Successful
1587 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1588 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1590 * @see zb_simple_desc_get_in_clusters()
1592 int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
1593 zb_cluster_id **out_clusters);
1596 * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
1597 * @brief Sets output cluster list to a simple descriptor handle.
1601 * @param[in] handle The handle of a simple descriptor
1602 * @param[in] out_clusters output clusters
1603 * @param[in] num number of output clusters
1605 * @return 0 on success, otherwise a negative error value.
1606 * @retval #ZIGBEE_ERROR_NONE Successful
1607 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1608 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1610 * @see zb_simple_desc_get_in_clusters()
1612 int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
1613 zb_cluster_id *out_clusters, int num);
1617 * @brief Called after Network / IEEE address request.
1618 * @details The NWK_addr_cb is generated by a Remote Device in response to a
1619 * NWK_addr_req or IEEE_addr_req command inquiring as to the NWK address of the Remote
1620 * Device or the NWK address of an address held in a local discovery cache.
1621 * The destination addressing on this command is unicast.
1625 * @remarks The @a assoc_dev_addr_list should not be released.
1626 * @remarks The @a assoc_dev_addr_list can be used only in the callback. To use outside, make a copy.
1628 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
1629 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
1630 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND
1631 * @param[out] remote_dev_addr64 64-bit address for the remote device
1632 * @param[out] remote_dev_addr16 16-bit address for the remote device
1633 * @param[out] assoc_dev_len The number of items in the 16-bit short addresses #assoc_dev_addr_list.
1634 * If the RequestType in the request is Extended Response
1635 * and there are no associated devices on the Remote Device,
1636 * this field shall be set to 0.
1637 * If an error occurs or the RequestType in the request is
1638 * for a Single Device Response, this field shall not
1640 * @param[out] start_idx Starting index into the list of associated devices for this
1641 * report. If the RequestType in the request is Extended Response
1642 * and there are no associated devices on the Remote Device,
1643 * this field shall not be included in the ZigBee data frame.
1644 * If an error occurs or the RequestType in the request is
1645 * for a Single Device Response, this field shall not
1647 * @param[out] assoc_dev_addr_list A list of 16-bit addresses, one corresponding to each
1648 * associated device to Remote Device; The number of 16-bit
1649 * network addresses contained in this field is specified
1650 * in the NumAssocDev field.
1651 * If the RequestType in the request is Extended Response
1652 * and there are no associated devices on the Remote Device,
1653 * this field shall not be included in the ZigBee data frame.
1654 * If an error occurs or the RequestType in the request is
1655 * for a Single Device Response, this field shall not
1657 * @param[out] user_data user data
1659 * @see zb_zdo_nwk_addr_req()
1661 typedef void (*zb_zdo_addr_cb)(zb_zdp_status_e status, zb_ieee_addr remote_dev_addr64,
1662 zb_nwk_addr remote_dev_addr16, unsigned char assoc_dev_len,
1663 unsigned char start_idx, zb_device_id *assoc_dev_addr_list, void *user_data);
1666 * @brief Sends 'Network address request' command.
1667 * @details The NWK_addr_req is generated from a Local Device wishing to inquire as to the
1668 * 16-bit address of the Remote Device based on its known IEEE address. The
1669 * destination addressing on this command shall be unicast or broadcast to all
1670 * devices for which macRxOnWhenIdle = TRUE.
1674 * @privilege %http://tizen.org/privilege/zigbee
1676 * @param[in] handle The handle of zigbee
1677 * @param[in] addr64 IEEE address for device of interest
1678 * @param[in] request_type \n
1679 * 0x00 - Single device response \n
1680 * 0x01 - Extended response \n
1681 * @param[in] start_idx If the Request type for this command is Extended response,
1682 * is StartIndex provides the starting index for the requested
1683 * elements of the associated devices list
1684 * @param[in] cb Response callback
1685 * @param[in] user_data user data
1687 * @return 0 on success, otherwise a negative error value.
1688 * @retval #ZIGBEE_ERROR_NONE Successful
1689 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1690 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1691 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1692 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1693 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1695 * @see zb_zdo_nwk_addr_cb()
1697 int zb_zdo_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64,
1698 zb_zdp_req_type_e request_type, unsigned char start_idx, zb_zdo_addr_cb cb,
1702 * @brief Sends 'IEEE address request' command.
1703 * @details The IEEE_addr_req is generated from a Local Device wishing to inquire as to
1704 * the 64-bit IEEE address of the Remote Device based on their known 16-bit address.
1705 * The destination addressing on this command shall be unicast.
1709 * @privilege %http://tizen.org/privilege/zigbee
1711 * @param[in] handle The handle of zigbee
1712 * @param[in] addr16 Network address for device of interest
1713 * @param[in] cb Response callback
1714 * @param[in] user_data user data
1716 * @return 0 on success, otherwise a negative error value.
1717 * @retval #ZIGBEE_ERROR_NONE Successful
1718 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1719 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1720 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1721 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1722 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1724 * @see zb_zdo_ieee_addr_cb()
1726 int zb_zdo_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
1730 * @brief Called after active endpoint request command.
1731 * @details The Active_EP_cb is generated by a remote device in response to an
1732 * Active_EP_req directed to the remote device. This command shall be unicast to
1733 * the originator of the Active_EP_req command.
1735 * The remote device shall generate the Active_EP_cb command using the format
1736 * illustrated param list.
1738 * The NWKAddrOfInterest field shall match that specified in the original
1739 * Active_EP_req command.
1741 * If the NWKAddrOfInterest field matches the network address of the remote device,
1742 * it shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field
1743 * to the number of active endpoints on that device and include an ascending list of
1744 * all the identifiers of the active endpoints on that device in the ActiveEPList field.
1746 * If the NWKAddrOfInterest field does not match the network address of the remote device
1747 * and it is an end device, it shall set the Status field to
1748 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the ActiveEPCount field to 0, and not include
1749 * the ActiveEPList field.
1751 * If the NWKAddrOfInterest field does not match the network address of the remote device
1752 * and it is the coordinator or a router, it shall determine whether the NWKAddrOfInterest
1753 * field matches the network address of a device it holds in a discovery cache.
1755 * If the NWKAddrOfInterest field does not match the network address of a device it holds
1756 * in a discovery cache, it shall set the Status field to #ZB_ZDP_STATUS_DEVICE_NOT_FOUND,
1757 * set the ActiveEPCount field to 0, and not include the ActiveEPList field.
1759 * If the NWKAddrOfInterest matches the network address of a device held in a discovery
1760 * cache on the remote device, it shall determine whether that device has any active
1763 * If the discovery information corresponding to the ActiveEP request has not yet been
1764 * uploaded to the discovery cache, the remote device shall set the Status field to
1765 * #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the ActiveEPCount field to 0 and not include the
1766 * ActiveEPList field.
1768 * If the cached device has no active endpoints, the remote device shall set the Status
1769 * field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field to 0, and not include
1770 * the ActiveEPList field.
1772 * If the cached device has active endpoints,
1773 * the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set
1774 * the ActiveEPCount field to the number of active endpoints on that device,
1775 * and include an ascending list of all the identifiers of the active endpoints on that
1776 * device in the ActiveEPList field .
1780 * @remarks The @a ep_list should not be released.
1781 * @remarks The @a ep_list can be used only in the callback. To use outside, make a copy.
1783 * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
1784 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
1785 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
1786 * #ZB_ZDP_STATUS_NO_DESCRIPTOR \n
1787 * @param[out] addr16 Network address for the request
1788 * @param[out] count The count of active endpoints on the remote device
1789 * @param[out] ep_list List of bytes each of which represents an 8-bit endpoints
1790 * @param[out] user_data user data
1792 * @see zb_zdo_active_ep()
1794 typedef void (*zb_zdo_active_ep_cb)(zb_zdp_status_e status, zb_nwk_addr addr16,
1795 unsigned char count, zb_end_point *ep_list, void *user_data);
1798 * @brief Sends 'active end-point request' command.
1799 * @details The Active_EP_req command is generated from a local device wishing to acquire
1800 * the list of endpoints on a remote device with simple descriptors. This command
1801 * shall be unicast either to the remote device itself or to an alternative device that
1802 * contains the discovery information of the remote device.
1804 * The local device shall generate the Active_EP_req command using the format
1805 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
1806 * address of the remote device for which the active endpoint list is required.
1810 * @privilege %http://tizen.org/privilege/zigbee
1812 * @param[in] handle The handle of zigbee
1813 * @param[in] addr16 Network address for device of interest
1814 * @param[in] cb Response callback
1815 * @param[in] user_data user data
1817 * @return 0 on success, otherwise a negative error value.
1818 * @retval #ZIGBEE_ERROR_NONE Successful
1819 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1820 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1821 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1822 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1823 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1825 * @see zb_zdo_active_ep_cb()
1827 int zb_zdo_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
1831 * @brief Called after 'simple descriptor request' command.
1832 * @details The Simple_Desc_cb is generated by a remote device in response to a
1833 * Simple_Desc_req directed to the remote device. This command shall be unicast to
1834 * the originator of the Simple_Desc_req command.
1835 * The remote device shall generate the Simple_Desc_cb command using the format
1836 * illustrated in Table 2.94 in Zigbee Specification. The NWKAddrOfInterest field shall
1837 * match that specified in the original Simple_Desc_req command.
1838 * If the endpoint field specified in the original Simple_Desc_req command does not fall
1839 * within the correct range specified in param list, the remote device shall set the Status
1840 * field to #ZB_ZDP_STATUS_INVALID_EP, set the Length field to 0 and not include the
1841 * SimpleDescriptor field.
1843 * If the NWKAddrOfInterest field matches the network address of the remote
1844 * device, it shall determine whether the endpoint field specifies the identifier of an
1845 * active endpoint on the device. If the endpoint field corresponds to an active
1846 * endpoint, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS,
1847 * set the Length field to the length of the simple descriptor on that endpoint,
1848 * and include the simple descriptor for that endpoint in the SimpleDescriptor field.
1849 * If the endpoint field does not correspond to an active endpoint, the remote device
1850 * shall set the Status field to #ZB_ZDP_STATUS_NOT_ACTIVE, set the Length field to 0,
1851 * and not include the SimpleDescriptor field.
1853 * If the NWKAddrOfInterest field does not match the network address of the
1854 * remote device and it is an end device, it shall set the Status field to
1855 * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
1856 * SimpleDescriptor field. If the NWKAddrOfInterest field does not match the
1857 * network address of the remote device and it is the coordinator or a router, it shall
1858 * determine whether the NWKAddrOfInterest field matches the network address of
1859 * one of its children. If the NWKAddrOfInterest field does not match the network
1860 * address of one of the children of the remote device, it shall set the Status field to
1861 * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
1862 * SimpleDescriptor field.
1864 * If the NWKAddrOfInterest matches the network address of one of the children of
1865 * the remote device, it shall determine whether a simple descriptor for that device
1866 * and on the requested endpoint is available. If a simple descriptor is not available
1867 * on the requested endpoint of the child indicated by the NWKAddrOfInterest field,
1868 * the remote device shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the
1869 * Length field to 0, and not include the SimpleDescriptor field. If a simple descriptor
1870 * is available on the requested endpoint of the child indicated by the
1871 * NWKAddrOfInterest field, the remote device shall set the Status field to
1872 * #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the simple descriptor
1873 * on that endpoint, and include the simple descriptor for that
1874 * endpoint of the matching child device in the SimpleDescriptor field.
1878 * The @a desc can be used only in the callback. To use outside, make a copy using zb_simple_desc_clone().
1880 * @param[out] addr16 Network address for the request
1881 * @param[out] len Length in bytes of the simple descriptor to follow
1882 * @param[out] desc Simple descriptor structure this filed shall only be included
1883 * if the status field is equal to #ZB_ZDP_STATUS_SUCCESS
1884 * @param[out] user_data user data
1886 * @see zb_zdo_simple_desc_req()
1888 typedef void (*zb_zdo_simple_desc_cb)(zb_nwk_addr addr16, unsigned char len,
1889 const zb_zdo_simple_desc_h desc, void *user_data);
1892 * @brief Sends 'simple descriptor request' command.
1893 * @details The Simple_Desc_req command is generated from a local device wishing to
1894 * inquire as to the simple descriptor of a remote device on a specified endpoint. This
1895 * command shall be unicast either to the remote device itself or to an alternative
1896 * device that contains the discovery information of the remote device.
1898 * The local device shall generate the Simple_Desc_req command using the format
1899 * illustrated in param list. The NWKAddrOfInterest field shall contain the network
1900 * address of the remote device for which the simple descriptor is required and the
1901 * endpoint field shall contain the endpoint identifier from which to obtain the
1902 * required simple descriptor.
1906 * @privilege %http://tizen.org/privilege/zigbee
1908 * @param[in] handle The handle of zigbee
1909 * @param[in] addr16 Network address for device of interest
1910 * @param[in] ep The endpoint on the destination
1911 * @param[in] cb Response callback
1912 * @param[in] user_data user data
1914 * @return 0 on success, otherwise a negative error value.
1915 * @retval #ZIGBEE_ERROR_NONE Successful
1916 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1917 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
1918 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
1919 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1920 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1921 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1923 * @see zb_zdo_simple_desc_cb()
1925 int zb_zdo_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
1926 zb_zdo_simple_desc_cb cb, void *user_data);
1933 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
1939 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
1940 * @brief Creates a read attribute status record.
1944 * @privilege %http://tizen.org/privilege/zigbee
1946 * @param[in] handle The handle of read attribute status record
1948 * @return 0 on success, otherwise a negative error value.
1949 * @retval #ZIGBEE_ERROR_NONE Successful
1950 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1951 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
1952 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
1953 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1955 * @see zb_read_attr_status_record_clone()
1956 * @see zb_read_attr_status_record_destroy()
1957 * @see zb_read_attr_status_record_set_id()
1958 * @see zb_read_attr_status_record_set_status()
1959 * @see zb_read_attr_status_record_set_value()
1960 * @see zb_zcl_global_attr_read_cb()
1961 * @see zb_read_attr_status_record_get_status()
1962 * @see zb_read_attr_status_record_get_type()
1963 * @see zb_read_attr_status_record_get_value()
1965 int zb_read_attr_status_record_create(zb_zcl_read_attr_status_record_h *handle);
1968 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
1969 * @brief Clones a read attribute status record.
1973 * @remarks The @a dst should be released using zb_read_attr_status_record_destroy().
1975 * @param[in] src Source handle of read attribute status record
1976 * @param[in] dst Destination handle of read attribute status record
1978 * @return 0 on success, otherwise a negative error value.
1979 * @retval #ZIGBEE_ERROR_NONE Successful
1980 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
1981 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
1983 * @see zb_read_attr_status_record_create()
1984 * @see zb_read_attr_status_record_destroy()
1985 * @see zb_read_attr_status_record_set_id()
1986 * @see zb_read_attr_status_record_set_status()
1987 * @see zb_read_attr_status_record_set_value()
1988 * @see zb_zcl_global_attr_read_cb()
1989 * @see zb_read_attr_status_record_get_status()
1990 * @see zb_read_attr_status_record_get_type()
1991 * @see zb_read_attr_status_record_get_value()
1993 int zb_read_attr_status_record_clone(zb_zcl_read_attr_status_record_h src,
1994 zb_zcl_read_attr_status_record_h *dst);
1997 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
1998 * @brief Destroys a read attribute status record.
2002 * @param[in] handle The handle of read attribute status record
2004 * @return 0 on success, otherwise a negative error value.
2005 * @retval #ZIGBEE_ERROR_NONE Successful
2006 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2007 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2009 * @see zb_read_attr_status_record_create()
2010 * @see zb_read_attr_status_record_clone()
2011 * @see zb_read_attr_status_record_set_id()
2012 * @see zb_read_attr_status_record_set_status()
2013 * @see zb_read_attr_status_record_set_value()
2014 * @see zb_zcl_global_attr_read_cb()
2015 * @see zb_read_attr_status_record_get_status()
2016 * @see zb_read_attr_status_record_get_type()
2017 * @see zb_read_attr_status_record_get_value()
2019 int zb_read_attr_status_record_destroy(zb_zcl_read_attr_status_record_h handle);
2022 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2023 * @brief Gets identifier from read attribute status record.
2024 * @details The attribute identifier field is 16 bits in length and shall contain the
2025 * identifier of the attribute that has been read (or of which an element has been read).
2027 * This field shall contain the same value that was included in the corresponding
2028 * attribute identifier field of the original read attributes or read attributes
2029 * structured command.
2033 * @param[in] handle The handle of read attribute status record
2034 * @param[out] id Attribute identifier
2036 * @return 0 on success, otherwise a negative error value.
2037 * @retval #ZIGBEE_ERROR_NONE Successful
2038 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2039 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2041 * @see zb_read_attr_status_record_create()
2042 * @see zb_read_attr_status_record_destroy()
2043 * @see zb_read_attr_status_record_set_id()
2044 * @see zb_read_attr_status_record_set_status()
2045 * @see zb_read_attr_status_record_set_value()
2046 * @see zb_zcl_global_attr_read_cb()
2047 * @see zb_read_attr_status_record_get_status()
2048 * @see zb_read_attr_status_record_get_type()
2049 * @see zb_read_attr_status_record_get_value()
2051 int zb_read_attr_status_record_get_id(
2052 zb_zcl_read_attr_status_record_h handle, zb_attribute_id* id);
2055 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2056 * @brief Sets identifier to read attribute status record.
2057 * @details The attribute identifier field is 16 bits in length and shall contain the
2058 * identifier of the attribute that has been read (or of which an element has been read).
2060 * This field shall contain the same value that was included in the corresponding
2061 * attribute identifier field of the original read attributes or read attributes
2062 * structured command.
2066 * @param[in] handle The handle of read attribute status record
2067 * @param[in] id Attribute identifier
2069 * @return 0 on success, otherwise a negative error value.
2070 * @retval #ZIGBEE_ERROR_NONE Successful
2071 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2072 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2074 * @see zb_read_attr_status_record_create()
2075 * @see zb_read_attr_status_record_destroy()
2076 * @see zb_read_attr_status_record_set_status()
2077 * @see zb_read_attr_status_record_set_value()
2078 * @see zb_zcl_global_attr_read_cb()
2079 * @see zb_read_attr_status_record_get_id()
2080 * @see zb_read_attr_status_record_get_status()
2081 * @see zb_read_attr_status_record_get_type()
2082 * @see zb_read_attr_status_record_get_value()
2084 int zb_read_attr_status_record_set_id(
2085 zb_zcl_read_attr_status_record_h handle, zb_attribute_id id);
2088 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2089 * @brief Gets status from read attribute status record.
2090 * @details The status field is 8 bits in length and specifies the status of the read
2091 * operation on this attribute.
2093 * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
2094 * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
2099 * @param[in] handle The handle of read attribute status record
2100 * @param[out] status error code @see #zb_zcl_status_e
2102 * @return 0 on success, otherwise a negative error value.
2103 * @retval #ZIGBEE_ERROR_NONE Successful
2104 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2105 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2107 * @see zb_read_attr_status_record_create()
2108 * @see zb_read_attr_status_record_destroy()
2109 * @see zb_read_attr_status_record_set_id()
2110 * @see zb_read_attr_status_record_set_status()
2111 * @see zb_read_attr_status_record_set_value()
2112 * @see zb_zcl_global_attr_read_cb()
2113 * @see zb_read_attr_status_record_get_id()
2114 * @see zb_read_attr_status_record_get_type()
2115 * @see zb_read_attr_status_record_get_value()
2117 int zb_read_attr_status_record_get_status(
2118 zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e* status);
2121 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2122 * @brief Sets status to read attribute status record.
2123 * @details The status field is 8 bits in length and specifies the status of the read
2124 * operation on this attribute.
2128 * @param[in] handle The handle of read attribute status record
2129 * @param[in] status error code @see #zb_zcl_status_e
2131 * @return 0 on success, otherwise a negative error value.
2132 * @retval #ZIGBEE_ERROR_NONE Successful
2133 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2134 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2136 * @see zb_read_attr_status_record_create()
2137 * @see zb_read_attr_status_record_destroy()
2138 * @see zb_read_attr_status_record_set_id()
2139 * @see zb_read_attr_status_record_set_value()
2140 * @see zb_zcl_global_attr_read_cb()
2141 * @see zb_read_attr_status_record_get_id()
2142 * @see zb_read_attr_status_record_get_status()
2143 * @see zb_read_attr_status_record_get_type()
2144 * @see zb_read_attr_status_record_get_value()
2146 int zb_read_attr_status_record_set_status(
2147 zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e status);
2150 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2151 * @brief Gets type from read attribute status record.
2152 * @details The attribute data type field shall contain the data type of the attribute
2153 * in the same read attributes status record.
2155 * This field shall only be included if the associated status
2156 * field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2160 * @param[in] handle The handle of read attribute status record
2161 * @param[out] type Data type
2163 * @return 0 on success, otherwise a negative error value.
2164 * @retval #ZIGBEE_ERROR_NONE Successful
2165 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2166 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2168 * @see zb_read_attr_status_record_create()
2169 * @see zb_read_attr_status_record_destroy()
2170 * @see zb_read_attr_status_record_set_id()
2171 * @see zb_read_attr_status_record_set_status()
2172 * @see zb_read_attr_status_record_set_value()
2173 * @see zb_zcl_global_attr_read_cb()
2174 * @see zb_read_attr_status_record_get_id()
2175 * @see zb_read_attr_status_record_get_status()
2176 * @see zb_read_attr_status_record_get_value()
2178 int zb_read_attr_status_record_get_type(
2179 zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e *type);
2182 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2183 * @brief Sets type to read attribute status record.
2184 * @details The attribute data type field shall contain the data type of the attribute
2185 * in the same read attributes status record.
2189 * @param[in] handle The handle of read attribute status record
2190 * @param[in] type Data type
2192 * @return 0 on success, otherwise a negative error value.
2193 * @retval #ZIGBEE_ERROR_NONE Successful
2194 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2195 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2197 * @see zb_read_attr_status_record_create()
2198 * @see zb_read_attr_status_record_destroy()
2199 * @see zb_read_attr_status_record_set_id()
2200 * @see zb_read_attr_status_record_set_status()
2201 * @see zb_read_attr_status_record_set_value()
2202 * @see zb_zcl_global_attr_read_cb()
2203 * @see zb_read_attr_status_record_get_id()
2204 * @see zb_read_attr_status_record_get_status()
2205 * @see zb_read_attr_status_record_get_type()
2206 * @see zb_read_attr_status_record_get_value()
2208 int zb_read_attr_status_record_set_type(
2209 zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e type);
2212 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2213 * @brief Gets data value from read attribute status record.
2214 * @details The attribute value field is variable in length and shall contain the current
2215 * value of this attribute.
2217 * This field shall only be included if the associated
2218 * status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2219 * For an attribute or element of simple type, this
2220 * field has the format shown in the Table of Data Types .
2224 * @remarks The @a value should be released using free().
2226 * @param[in] handle The handle of read attribute status record
2227 * @param[out] type Attribute data type. The attribute data type shall contain the data
2228 * type of the attribute in the same read attributes status record
2229 * (see #zb_zcl_data_type_e). This field shall only be included if the status
2230 * code is #ZB_ZCL_STATUS_SUCCESS.
2231 * @param[out] value Attribute value. The attribute value field is variable in length
2232 * and shall contain the current value of this attribute. This field shall only be
2233 * included if the associated status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
2234 * For an attribute or element of simple type (not array, structure, set or bag), this
2235 * field has the format shown in the Table of Data Types (see #zb_zcl_data_type_e).
2236 * @param[out] count The number of attribute data
2238 * @return 0 on success, otherwise a negative error value.
2239 * @retval #ZIGBEE_ERROR_NONE Successful
2240 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2241 * @retval #ZIGBEE_ERROR_NO_DATA No data available
2242 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2243 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2245 * @see zb_read_attr_status_record_create()
2246 * @see zb_read_attr_status_record_destroy()
2247 * @see zb_read_attr_status_record_set_id()
2248 * @see zb_read_attr_status_record_set_status()
2249 * @see zb_read_attr_status_record_set_value()
2250 * @see zb_zcl_global_attr_read_cb()
2251 * @see zb_read_attr_status_record_get_id()
2252 * @see zb_read_attr_status_record_get_status()
2253 * @see zb_read_attr_status_record_get_type()
2255 int zb_read_attr_status_record_get_value(
2256 zb_zcl_read_attr_status_record_h handle,
2257 zb_zcl_data_type_e* type,
2258 unsigned char** value,
2262 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
2263 * @brief Sets data value to read attribute status record.
2264 * @details The attribute value field is variable in length and shall contain the current
2265 * value of this attribute.
2267 * For an attribute or element of simple type, this
2268 * field has the format shown in the #zb_zcl_data_type_e.
2272 * @param[in] handle The handle of read attribute status record
2273 * @param[in] type Attribute data type
2274 * @param[in] value Attribute data value
2275 * @param[in] count The length of attribute data
2277 * @return 0 on success, otherwise a negative error value.
2278 * @retval #ZIGBEE_ERROR_NONE Successful
2279 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2280 * @retval #ZIGBEE_ERROR_NO_DATA No data available
2281 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2282 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2284 * @see zb_read_attr_status_record_create()
2285 * @see zb_read_attr_status_record_destroy()
2286 * @see zb_read_attr_status_record_set_id()
2287 * @see zb_read_attr_status_record_set_status()
2288 * @see zb_zcl_global_attr_read_cb()
2289 * @see zb_read_attr_status_record_get_id()
2290 * @see zb_read_attr_status_record_get_status()
2291 * @see zb_read_attr_status_record_get_type()
2292 * @see zb_read_attr_status_record_get_value()
2294 int zb_read_attr_status_record_set_value(
2295 zb_zcl_read_attr_status_record_h handle,
2296 zb_zcl_data_type_e type,
2297 unsigned char* value,
2301 * @brief Called with device attributes.
2302 * @details This callback is called when device attributes are requested with
2303 * #zb_zcl_global_attr_read().
2307 * @remarks The @a records can be used only in the callback.
2308 * If you want to use them outside, copy each of them with #zb_read_attr_status_record_clone().
2309 * @remarks The @a records should not be released.
2311 * @param[out] addr16 The source network address
2312 * @param[out] ep The source end-point of the received information (ex. endpoint 1)
2313 * @param[out] clusterid ZCL cluster id
2314 * @param[out] records Attribute status record
2315 * @param[out] count The number of items in @records
2316 * @param[out] user_data User data
2318 * @see zb_zcl_global_attr_read()
2320 typedef void (*zb_zcl_global_attr_read_cb)(
2323 zb_cluster_id clusterid,
2324 zb_zcl_read_attr_status_record_h *records,
2329 * @brief Sends 'read attributes' command.
2330 * @details Call this function to read attributes of devices.
2334 * @privilege %http://tizen.org/privilege/zigbee
2336 * @param[in] handle The handle of zigbee
2337 * @param[in] addr16 target network address
2338 * @param[in] src_ep source end-point (ex. 1)
2339 * @param[in] dst_ep destination end-point (ex. 1)
2340 * @param[in] zcl_fc frame control bits (default 0x00). \n
2341 * Only OR operation is allowed in ZCL header \n
2343 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2344 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2345 * - Manufacturer Specific : \n
2347 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2348 * #ZB_ZCL_SERVER_TO_CLIENT \n
2349 * - Disable Default Response : \n
2350 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2351 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2352 * @param[in] clusterid ZCL cluster id
2353 * @param[in] attribute_ids Attributes_ids-list
2354 * @param[in] count The number of items in the @a attribute_ids list
2355 * @param[in] cb Response callback function
2356 * @param[in] user_data User data
2358 * @return 0 on success, otherwise a negative error value.
2359 * @retval #ZIGBEE_ERROR_NONE Successful
2360 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2361 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2362 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2363 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2364 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2365 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2367 * @see zb_zcl_global_attr_read_cb()
2369 int zb_zcl_global_attr_read(
2372 zb_end_point src_ep,
2373 zb_end_point dst_ep,
2374 zb_zcl_frame_ctl zcl_fc,
2375 zb_cluster_id clusterid,
2376 zb_attribute_id *attribute_ids,
2378 zb_zcl_global_attr_read_cb cb,
2382 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2383 * @brief Creates write attribute status record.
2384 * @details This allocates heap for write attribute status record
2388 * @privilege %http://tizen.org/privilege/zigbee
2390 * @remarks The @a handle should be released using zb_write_attr_status_destroy().
2392 * @param[out] handle The handle of write attribute status record
2394 * @return 0 on success, otherwise a negative error value.
2395 * @retval #ZIGBEE_ERROR_NONE Successful
2396 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2397 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2398 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2400 * @see zb_zcl_global_write_attr_cb()
2401 * @see zb_write_attr_status_clone()
2402 * @see zb_write_attr_status_destroy()
2403 * @see zb_write_attr_status_get_status()
2404 * @see zb_write_attr_status_set_status()
2405 * @see zb_write_attr_status_get_id()
2406 * @see zb_write_attr_status_set_id()
2408 int zb_write_attr_status_create(zb_zcl_write_attr_status_record_h *handle);
2411 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2412 * @brief Clones a write attribute status record.
2416 * @remarks The @a dst should be released using zb_write_attr_status_destroy().
2418 * @param[in] src Source handle of write attribute status record
2419 * @param[in] dst Destination handle of write attribute status record
2421 * @return 0 on success, otherwise a negative error value.
2422 * @retval #ZIGBEE_ERROR_NONE Successful
2423 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2424 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2426 * @see zb_zcl_global_write_attr_cb()
2427 * @see zb_write_attr_status_create()
2428 * @see zb_write_attr_status_destroy()
2429 * @see zb_write_attr_status_get_status()
2430 * @see zb_write_attr_status_set_status()
2431 * @see zb_write_attr_status_get_id()
2432 * @see zb_write_attr_status_set_id()
2434 int zb_write_attr_status_clone(zb_zcl_write_attr_status_record_h src,
2435 zb_zcl_write_attr_status_record_h *dst);
2438 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2439 * @brief Destroys a write attribute status record.
2443 * @param[in] handle The handle of write attribute status record
2445 * @return 0 on success, otherwise a negative error value.
2446 * @retval #ZIGBEE_ERROR_NONE Successful
2447 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2448 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2450 * @see zb_zcl_global_write_attr_cb()
2451 * @see zb_write_attr_status_create()
2452 * @see zb_write_attr_status_clone()
2453 * @see zb_write_attr_status_get_status()
2454 * @see zb_write_attr_status_set_status()
2455 * @see zb_write_attr_status_get_id()
2456 * @see zb_write_attr_status_set_id()
2458 int zb_write_attr_status_destroy(zb_zcl_write_attr_status_record_h handle);
2461 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2462 * @brief Gets the status from a write attribute status record.
2463 * @details The status field is 8 bits in length and specifies the status of the read
2464 * operation on this attribute.
2466 * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
2467 * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
2472 * @param[in] handle The handle of read attribute status record
2473 * @param[out] status error code @see #zb_zcl_status_e
2475 * @return 0 on success, otherwise a negative error value.
2476 * @retval #ZIGBEE_ERROR_NONE Successful
2477 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2478 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2480 * @see zb_zcl_global_write_attr_cb()
2481 * @see zb_write_attr_status_create()
2482 * @see zb_write_attr_status_clone()
2483 * @see zb_write_attr_status_destroy()
2484 * @see zb_write_attr_status_get_id()
2485 * @see zb_write_attr_status_set_id()
2486 * @see zb_write_attr_status_set_status()
2488 int zb_write_attr_status_get_status(
2489 zb_zcl_write_attr_status_record_h handle,
2490 zb_zcl_status_e *status);
2493 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2494 * @brief Sets the status to a write attribute status record.
2495 * @details The status field is 8 bits in length and specifies the status of the read
2496 * operation on this attribute.
2500 * @param[in] handle The handle of read attribute status record
2501 * @param[in] status error code @see #zb_zcl_status_e
2503 * @return 0 on success, otherwise a negative error value.
2504 * @retval #ZIGBEE_ERROR_NONE Successful
2505 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2506 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2508 * @see zb_zcl_global_write_attr_cb()
2509 * @see zb_write_attr_status_create()
2510 * @see zb_write_attr_status_clone()
2511 * @see zb_write_attr_status_destroy()
2512 * @see zb_write_attr_status_get_status()
2513 * @see zb_write_attr_status_get_id()
2514 * @see zb_write_attr_status_set_id()
2516 int zb_write_attr_status_set_status(
2517 zb_zcl_write_attr_status_record_h handle,
2518 zb_zcl_status_e status);
2521 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2522 * @brief Gets the identifier from a write attribute status record.
2523 * @details The attribute identifier field is 16 bits in length and shall contain the
2524 * identifier of the attribute that has been write (or of which an element has been write).
2526 * This field shall contain the same value that was included in the corresponding
2527 * attribute identifier field of the original write attributes or write attributes
2528 * structured command.
2532 * @param[in] handle The handle of write attribute status record
2533 * @param[out] id Attribute identifier
2535 * @return 0 on success, otherwise a negative error value.
2536 * @retval #ZIGBEE_ERROR_NONE Successful
2537 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2538 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2540 * @see zb_zcl_global_write_attr_cb()
2541 * @see zb_write_attr_status_create()
2542 * @see zb_write_attr_status_clone()
2543 * @see zb_write_attr_status_destroy()
2544 * @see zb_write_attr_status_get_status()
2545 * @see zb_write_attr_status_set_status()
2546 * @see zb_write_attr_status_set_id()
2548 int zb_write_attr_status_get_id(
2549 zb_zcl_write_attr_status_record_h handle,
2550 zb_attribute_id *id);
2553 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
2554 * @brief Sets the identifier to a write attribute status record.
2555 * @details The attribute identifier field is 16 bits in length and shall contain the
2556 * identifier of the attribute that has been write (or of which an element has been write).
2558 * This field shall contain the same value that was included in the corresponding
2559 * attribute identifier field of the original write attributes or write attributes
2560 * structured command.
2564 * @param[in] handle The handle of write attribute status record
2565 * @param[in] id Attribute identifier
2567 * @return 0 on success, otherwise a negative error value.
2568 * @retval #ZIGBEE_ERROR_NONE Successful
2569 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2570 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2572 * @see zb_zcl_global_write_attr_cb()
2573 * @see zb_write_attr_status_create()
2574 * @see zb_write_attr_status_clone()
2575 * @see zb_write_attr_status_destroy()
2576 * @see zb_write_attr_status_get_status()
2577 * @see zb_write_attr_status_set_status()
2578 * @see zb_write_attr_status_get_id()
2580 int zb_write_attr_status_set_id(
2581 zb_zcl_write_attr_status_record_h handle,
2582 zb_attribute_id id);
2585 * @brief Called when write attributes command are requested.
2586 * @details This callback is called when attributes are written with
2587 * #zb_zcl_global_attr_write() or #zb_zcl_global_attr_write_undivided().
2588 * In other words, the write attributes response is generated in response to the write
2589 * attributes command.
2593 * @remarks The @a records can be used only in the callback.
2594 * @remarks If you want to use them outside, copy them with #zb_write_attr_status_clone().
2595 * @remarks The @a records should not be released.
2597 * @param[out] addr16 The source network address
2598 * @param[out] ep The source end-point of the received information (ex. endpoint 1)
2599 * @param[out] clusterid ZCL cluster id
2600 * @param[out] records Attribute status record
2601 * @param[out] count The number of items in @a records
2602 * @param[out] user_data User data
2604 * @see zb_zcl_global_attr_write()
2606 typedef void (*zb_zcl_global_attr_write_cb)(
2609 zb_cluster_id clusterid,
2610 zb_zcl_write_attr_status_record_h *records,
2615 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2616 * @brief Creates a write attribute record.
2620 * @privilege %http://tizen.org/privilege/zigbee
2622 * @param[in] handle The handle of write attribute record
2624 * @return 0 on success, otherwise a negative error value.
2625 * @retval #ZIGBEE_ERROR_NONE Successful
2626 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2627 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2628 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2629 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2631 * @see zb_zcl_global_attr_write()
2632 * @see zb_zcl_global_attr_write_undivided()
2633 * @see zb_zcl_global_write_attr_no_rep()
2634 * @see zb_write_attr_record_destroy()
2635 * @see zb_write_attr_record_set_id()
2636 * @see zb_write_attr_record_set_value()
2638 int zb_write_attr_record_create(zb_zcl_write_attr_record_h *handle);
2641 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2642 * @brief Destroys a write attribute record handle.
2646 * @param[in] handle The handle of write attribute record
2648 * @return 0 on success, otherwise a negative error value.
2649 * @retval #ZIGBEE_ERROR_NONE Successful
2650 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2651 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2653 * @see zb_zcl_global_attr_write()
2654 * @see zb_zcl_global_attr_write_undivided()
2655 * @see zb_zcl_global_write_attr_no_rep()
2656 * @see zb_write_attr_record_create()
2657 * @see zb_write_attr_record_clone()
2658 * @see zb_write_attr_record_set_id()
2659 * @see zb_write_attr_record_set_value()
2661 int zb_write_attr_record_destroy(zb_zcl_write_attr_record_h handle);
2664 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2665 * @brief Sets the attribute identifier of a write attribute record.
2666 * @details The attribute identifier field is 16 bits in length and shall contain the
2667 * identifier of the attribute that is to be written.
2671 * @param[in] handle The handle of write attribute record
2672 * @param[in] id Attribute identifier
2674 * @return 0 on success, otherwise a negative error value.
2675 * @retval #ZIGBEE_ERROR_NONE Successful
2676 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2677 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2679 * @see zb_zcl_global_attr_write()
2680 * @see zb_zcl_global_attr_write_undivided()
2681 * @see zb_zcl_global_write_attr_no_rep()
2682 * @see zb_write_attr_record_create()
2683 * @see zb_write_attr_record_destroy()
2684 * @see zb_write_attr_record_set_value()
2686 int zb_write_attr_record_set_id(zb_zcl_write_attr_record_h handle,
2687 zb_attribute_id id);
2690 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2691 * @brief Sets the attribute data type of a write attribute record.
2692 * @details The attribute data type field shall contain the data type of the attribute
2693 * that is to be written.
2697 * @param[in] handle The handle of write attribute record
2698 * @param[in] type attribute data type
2700 * @return 0 on success, otherwise a negative error value.
2701 * @retval #ZIGBEE_ERROR_NONE Successful
2702 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2703 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2705 * @see zb_zcl_global_attr_write()
2706 * @see zb_zcl_global_attr_write_undivided()
2707 * @see zb_zcl_global_write_attr_no_rep()
2708 * @see zb_write_attr_record_create()
2709 * @see zb_write_attr_record_destroy()
2710 * @see zb_write_attr_record_set_id()
2711 * @see zb_write_attr_record_set_value()
2713 int zb_write_attr_record_set_type(zb_zcl_write_attr_record_h handle,
2714 zb_zcl_data_type_e type);
2717 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
2718 * @brief Sets data value to write attribute status record.
2719 * @details The attribute data type field shall contain the data type of the attribute in
2720 * the same attribute report field
2724 * @param[in] handle The handle of write attribute status record
2725 * @param[in] type Attribute data type
2726 * @param[in] value Attribute data value
2727 * @param[in] count The number of items in @a value
2730 * @return 0 on success, otherwise a negative error value.
2731 * @retval #ZIGBEE_ERROR_NONE Successful
2732 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2733 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2734 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2736 * @see zb_zcl_global_attr_write()
2737 * @see zb_zcl_global_attr_write_undivided()
2738 * @see zb_zcl_global_write_attr_no_rep()
2739 * @see zb_write_attr_record_create()
2740 * @see zb_write_attr_record_destroy()
2741 * @see zb_write_attr_record_set_id()
2742 * @see zb_write_attr_record_set_value()
2744 int zb_write_attr_record_set_value(
2745 zb_zcl_write_attr_record_h handle,
2746 zb_zcl_data_type_e type,
2747 unsigned char* value,
2751 * @brief Sends 'write Attributes' command.
2752 * @details Call this function to write attributes of other devices.
2756 * @privilege %http://tizen.org/privilege/zigbee
2758 * @param[in] handle The handle of zigbee
2759 * @param[in] addr16 target network address
2760 * @param[in] src_ep source end-point (ex. 1)
2761 * @param[in] dst_ep destination end-point (ex. 1)
2762 * @param[in] zcl_fc frame control bits (default 0x00). \n
2763 * Only OR operation is allowed in ZCL header \n
2765 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2766 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2767 * - Manufacturer Specific : \n
2769 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2770 * #ZB_ZCL_SERVER_TO_CLIENT \n
2771 * - Disable Default Response : \n
2772 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2773 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2774 * @param[in] clusterid ZCL cluster id
2775 * @param[in] records Array of #zb_zcl_write_attr_record_h
2776 * @param[in] count The number of items in @a records array
2777 * @param[in] cb Response callback function
2778 * @param[in] user_data User data
2780 * @return 0 on success, otherwise a negative error value.
2781 * @retval #ZIGBEE_ERROR_NONE Successful
2782 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2783 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2784 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2785 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2786 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2787 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2789 * @see zb_zcl_global_attr_write_cb()
2791 int zb_zcl_global_attr_write(
2794 zb_end_point src_ep,
2795 zb_end_point dst_ep,
2796 zb_zcl_frame_ctl zcl_fc,
2797 zb_cluster_id clusterid,
2798 zb_zcl_write_attr_record_h *records,
2800 zb_zcl_global_attr_write_cb cb,
2804 * @brief Sends 'write attributes undivided' command.
2805 * @details Call this function to write attributes without fragmentation to other devices.
2809 * @privilege %http://tizen.org/privilege/zigbee
2811 * @param[in] handle The handle of zigbee
2812 * @param[in] addr16 target network address
2813 * @param[in] src_ep source end-point (ex. 1)
2814 * @param[in] dst_ep destination end-point (ex. 1)
2815 * @param[in] zcl_fc frame control bits (default 0x00). \n
2816 * Only OR operation is allowed in ZCL header \n
2818 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2819 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2820 * - Manufacturer Specific : \n
2822 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2823 * #ZB_ZCL_SERVER_TO_CLIENT \n
2824 * - Disable Default Response : \n
2825 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2826 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2827 * @param[in] clusterid ZCL cluster id
2828 * @param[in] records Array of #zb_zcl_write_attr_record_h
2829 * @param[in] count The number of items in @a records array
2830 * @param[in] cb Response callback function
2831 * @param[in] user_data User data
2833 * @return 0 on success, otherwise a negative error value.
2834 * @retval #ZIGBEE_ERROR_NONE Successful
2835 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2836 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2837 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2838 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2839 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2840 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2842 * @see zb_zcl_global_attr_write_cb()
2844 int zb_zcl_global_attr_write_undivided(
2847 zb_end_point src_ep,
2848 zb_end_point dst_ep,
2849 zb_zcl_frame_ctl zcl_fc,
2850 zb_cluster_id clusterid,
2851 zb_zcl_write_attr_record_h *records,
2853 zb_zcl_global_attr_write_cb cb,
2857 * @brief Sends 'write Attributes without response' command.
2858 * @details Call this function to write attributes of other devices without receiving any
2863 * @privilege %http://tizen.org/privilege/zigbee
2865 * @param[in] handle The handle of zigbee
2866 * @param[in] addr16 target network address
2867 * @param[in] src_ep source end-point (ex. 1)
2868 * @param[in] dst_ep destination end-point (ex. 1)
2869 * @param[in] zcl_fc frame control bits (default 0x00). \n
2870 * Only OR operation is allowed in ZCL header \n
2872 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
2873 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
2874 * - Manufacturer Specific : \n
2876 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
2877 * #ZB_ZCL_SERVER_TO_CLIENT \n
2878 * - Disable Default Response : \n
2879 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
2880 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
2881 * @param[in] clusterid ZCL cluster id
2882 * @param[in] records Array of #zb_zcl_write_attr_record_h
2883 * @param[in] count The number of items in @a records array
2885 * @return 0 on success, otherwise a negative error value.
2886 * @retval #ZIGBEE_ERROR_NONE Successful
2887 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2888 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
2889 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
2890 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
2891 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
2892 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2895 int zb_zcl_global_attr_write_no_rsp(
2898 zb_end_point src_ep,
2899 zb_end_point dst_ep,
2900 zb_zcl_frame_ctl zcl_fc,
2901 zb_cluster_id clusterid,
2902 zb_zcl_write_attr_record_h *records,
2906 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2907 * @brief Clones a report config response record.
2911 * @remarks The @a dst should be released using zb_report_config_response_record_destroy().
2913 * @param[in] src Source handle of report config response record
2914 * @param[in] dst Destination handle of report config response record
2916 * @return 0 on success, otherwise a negative error value.
2917 * @retval #ZIGBEE_ERROR_NONE Successful
2918 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2919 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2921 * @see zb_zcl_global_config_report_write_cb()
2922 * @see zb_report_config_response_record_destroy()
2923 * @see zb_report_config_response_record_get_status()
2924 * @see zb_report_config_response_record_get_dir()
2925 * @see zb_report_config_response_record_get_id()
2927 int zb_report_config_response_record_clone(
2928 zb_zcl_report_config_response_record_h src,
2929 zb_zcl_report_config_response_record_h *dst);
2932 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2933 * @brief Destroys a reporting configuration response record.
2937 * @param[in] handle The handle of reporting configuration response record
2939 * @return 0 on success, otherwise a negative error value.
2940 * @retval #ZIGBEE_ERROR_NONE Successful
2941 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2942 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2944 * @see zb_zcl_global_config_report_write_cb()
2945 * @see zb_report_config_response_record_clone()
2946 * @see zb_report_config_response_record_get_status()
2947 * @see zb_report_config_response_record_get_dir()
2948 * @see zb_report_config_response_record_get_id()
2950 int zb_report_config_response_record_destroy(
2951 zb_zcl_report_config_response_record_h handle);
2954 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2955 * @brief Gets status from a reporting configuration response record.
2956 * @details If the attribute is not implemented on the sender or receiver of the command,
2957 * whichever is relevant (depending on direction), the result shall be set to
2958 * #ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE.
2960 * If the attribute is supported, but is not capable of
2961 * being reported, this field shall be set to #ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE.
2963 * Otherwise, this field shall be set to #ZB_ZCL_STATUS_SUCCESS.
2965 * If the status field is not set to #ZB_ZCL_STATUS_SUCCESS, all fields except the
2966 * direction and attribute identifier fields shall be omitted.
2970 * @param[in] handle The handle of write attribute status record
2971 * @param[out] status status @see #zb_zcl_status_e
2973 * @return 0 on success, otherwise a negative error value.
2974 * @retval #ZIGBEE_ERROR_NONE Successful
2975 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
2976 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
2978 * @see zb_zcl_global_config_report_write_cb()
2979 * @see zb_report_config_response_record_clone()
2980 * @see zb_report_config_response_record_destroy()
2981 * @see zb_report_config_response_record_get_status()
2982 * @see zb_report_config_response_record_get_dir()
2983 * @see zb_report_config_response_record_get_id()
2985 int zb_report_config_response_record_get_status(
2986 zb_zcl_report_config_response_record_h handle,
2987 zb_zcl_status_e *status);
2990 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
2991 * @brief Gets the direction from a reporting configuration response record.
2992 * @details The direction field specifies whether values of the attribute are reported
2993 * (0x00), or whether reports of the attribute are received (0x01).
2995 * If this value is set to 0x00, then the attribute data type field, the minimum
2996 * reporting interval field, the maximum reporting interval field and the reportable
2997 * change field are included in the payload, and the timeout period field is omitted. If
2998 * this value is set to 0x01, then the timeout period field is included in the payload,
2999 * and the attribute data type field, the minimum reporting interval field, the
3000 * maximum reporting interval field and the reportable change field are omitted.
3002 * All other values of this field are reserved.
3006 * @param[in] handle The handle of write attribute status record
3007 * @param[out] dir direction 00 : #ZB_ZCL_CLIENT_TO_SERVER \n
3008 * 01 : #ZB_ZCL_SERVER_TO_CLIENT \n
3010 * @return 0 on success, otherwise a negative error value.
3011 * @retval #ZIGBEE_ERROR_NONE Successful
3012 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3013 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3015 * @see zb_zcl_global_config_report_write_cb()
3016 * @see zb_report_config_response_record_clone()
3017 * @see zb_report_config_response_record_destroy()
3018 * @see zb_report_config_response_record_get_status()
3019 * @see zb_report_config_response_record_get_dir()
3020 * @see zb_report_config_response_record_get_id()
3022 int zb_report_config_response_record_get_dir(
3023 zb_zcl_report_config_response_record_h handle,
3024 zb_zcl_fc_direction_e *dir);
3027 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
3028 * @brief Gets the attribute identifier from a reporting configuration response record.
3029 * @details The attribute identifier field is 16 bits in length and shall contain the
3030 * identifier of the attribute that the reporting configuration details apply to.
3034 * @param[in] handle The handle of write attribute status record
3035 * @param[out] id Attribute identifier
3037 * @return 0 on success, otherwise a negative error value.
3038 * @retval #ZIGBEE_ERROR_NONE Successful
3039 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3040 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3042 * @see zb_zcl_global_config_report_write_cb()
3043 * @see zb_report_config_response_record_clone()
3044 * @see zb_report_config_response_record_destroy()
3045 * @see zb_report_config_response_record_get_status()
3046 * @see zb_report_config_response_record_get_dir()
3047 * @see zb_report_config_response_record_get_id()
3049 int zb_report_config_response_record_get_id(
3050 zb_zcl_report_config_response_record_h handle,
3051 zb_attribute_id *id);
3054 * @brief Called with configure reporting response.
3055 * @details This callback is called after #zb_zcl_global_config_report_write() is called.
3059 * @remarks The @a records can be used only in the callback.
3060 * @remarks The @a records should not be released.
3062 * @param[out] addr16 The source network address
3063 * @param[out] ep The source from which the response was sent (ex. 1)
3064 * @param[out] clusterid ZCL cluster id
3065 * @param[out] records Reporting configuration response record
3066 * @param[out] count The number of reporting configuration response record
3067 * @param[out] user_data User data
3069 * @see zb_zcl_global_config_report_write()
3071 typedef void (*zb_zcl_global_config_report_write_cb)(
3074 zb_cluster_id clusterid,
3075 zb_zcl_report_config_response_record_h *records,
3080 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3081 * @brief Creates a reporting configuration record.
3082 * @details Allocate memory for reporting configuration record
3086 * @privilege %http://tizen.org/privilege/zigbee
3088 * @remarks The @a handle should be released using zb_report_config_record_destroy().
3090 * @param[out] handle The handle of reporting configuration record
3092 * @return 0 on success, otherwise a negative error value.
3093 * @retval #ZIGBEE_ERROR_NONE Successful
3094 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3095 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3096 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3097 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3099 * @see zb_zcl_global_read_report_config_cb()
3100 * @see zb_report_config_record_clone()
3101 * @see zb_report_config_record_destroy()
3102 * @see zb_report_config_record_get_id()
3103 * @see zb_report_config_record_set_id()
3104 * @see zb_report_config_record_get_dir()
3105 * @see zb_report_config_record_set_dir()
3106 * @see zb_report_config_record_get_type()
3107 * @see zb_report_config_record_get_min_interval()
3108 * @see zb_report_config_record_set_min_interval()
3109 * @see zb_report_config_record_get_max_interval()
3110 * @see zb_report_config_record_set_max_interval()
3111 * @see zb_report_config_record_get_change()
3112 * @see zb_report_config_record_set_change()
3113 * @see zb_report_config_record_get_timeout()
3114 * @see zb_report_config_record_set_timeout()
3116 int zb_report_config_record_create(zb_zcl_reporting_config_record_h *handle);
3119 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3120 * @brief Clones a reporting configuration record.
3124 * @remarks The @a dst should be released using zb_report_config_record_destroy().
3126 * @param[in] src Source handle of reporting configuration record
3127 * @param[in] dst Destination handle of reporting configuration record
3129 * @return 0 on success, otherwise a negative error value.
3130 * @retval #ZIGBEE_ERROR_NONE Successful
3131 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3132 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3134 * @see zb_zcl_global_read_report_config_cb()
3135 * @see zb_report_config_record_create()
3136 * @see zb_report_config_record_destroy()
3137 * @see zb_report_config_record_get_id()
3138 * @see zb_report_config_record_set_id()
3139 * @see zb_report_config_record_get_dir()
3140 * @see zb_report_config_record_set_dir()
3141 * @see zb_report_config_record_get_type()
3142 * @see zb_report_config_record_get_min_interval()
3143 * @see zb_report_config_record_set_min_interval()
3144 * @see zb_report_config_record_get_max_interval()
3145 * @see zb_report_config_record_set_max_interval()
3146 * @see zb_report_config_record_get_change()
3147 * @see zb_report_config_record_set_change()
3148 * @see zb_report_config_record_get_timeout()
3149 * @see zb_report_config_record_set_timeout()
3151 int zb_report_config_record_clone(zb_zcl_reporting_config_record_h src,
3152 zb_zcl_reporting_config_record_h *dst);
3155 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3156 * @brief Destroys a reporting configuration record.
3160 * @param[in] handle The handle of reporting configuration record
3162 * @return 0 on success, otherwise a negative error value.
3163 * @retval #ZIGBEE_ERROR_NONE Successful
3164 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3165 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3167 * @see zb_zcl_global_read_report_config_cb()
3168 * @see zb_report_config_record_create()
3169 * @see zb_report_config_record_clone()
3170 * @see zb_report_config_record_get_id()
3171 * @see zb_report_config_record_set_id()
3172 * @see zb_report_config_record_get_dir()
3173 * @see zb_report_config_record_set_dir()
3174 * @see zb_report_config_record_get_type()
3175 * @see zb_report_config_record_get_min_interval()
3176 * @see zb_report_config_record_set_min_interval()
3177 * @see zb_report_config_record_get_max_interval()
3178 * @see zb_report_config_record_set_max_interval()
3179 * @see zb_report_config_record_get_change()
3180 * @see zb_report_config_record_set_change()
3181 * @see zb_report_config_record_get_timeout()
3182 * @see zb_report_config_record_set_timeout()
3184 int zb_report_config_record_destroy(zb_zcl_reporting_config_record_h handle);
3187 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3188 * @brief Gets the direction from a reporting configuration record.
3189 * @details The direction field specifies whether values of the attribute are be reported,
3190 * or whether reports of the attribute are to be received.
3192 * If this value is set to 0x00, then the attribute data type field, the minimum
3193 * reporting interval field, the maximum reporting interval field and the reportable
3194 * change field are included in the payload, and the timeout period field is omitted.
3195 * The record is sent to a cluster server (or client) to configure how it sends reports to
3196 * a client (or server) of the same cluster.
3198 * If this value is set to 0x01, then the timeout period field is included in the payload,
3199 * and the attribute data type field, the minimum reporting interval field, the
3200 * maximum reporting interval field and the reportable change field are omitted. The
3201 * record is sent to a cluster client (or server) to configure how it should expect
3202 * reports from a server (or client) of the same cluster.
3206 * @param[in] handle The handle of write attribute status record
3207 * @param[out] dir 00 : The receiver of the Configure Reporting command shall configure
3208 * reporting to send to each destination as resolved by
3209 * the bindings for the cluster hosting the attributes to be reported.\n
3210 * 01 : This indicates to the receiver of the Configure Reporting
3211 * command that the sender has configured its reporting
3212 * mechanism to transmit reports and that, based on the current
3213 * state of the sender's bindings, the sender will send reports to the
3216 * @return 0 on success, otherwise a negative error value.
3217 * @retval #ZIGBEE_ERROR_NONE Successful
3218 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3219 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3221 * @see zb_zcl_global_read_report_config_cb()
3222 * @see zb_report_config_record_create()
3223 * @see zb_report_config_record_clone()
3224 * @see zb_report_config_record_destroy()
3225 * @see zb_report_config_record_get_id()
3226 * @see zb_report_config_record_set_id()
3227 * @see zb_report_config_record_set_dir()
3228 * @see zb_report_config_record_get_type()
3229 * @see zb_report_config_record_get_min_interval()
3230 * @see zb_report_config_record_set_min_interval()
3231 * @see zb_report_config_record_get_max_interval()
3232 * @see zb_report_config_record_set_max_interval()
3233 * @see zb_report_config_record_get_change()
3234 * @see zb_report_config_record_set_change()
3235 * @see zb_report_config_record_get_timeout()
3236 * @see zb_report_config_record_set_timeout()
3238 int zb_report_config_record_get_dir(zb_zcl_reporting_config_record_h handle,
3239 zb_zcl_fc_direction_e *dir);
3242 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3243 * @brief Sets the direction of a reporting configuration record.
3244 * @details The direction field specifies whether values of the attribute are be reported,
3245 * or whether reports of the attribute are to be received.
3247 * If this value is set to 0x00, then the attribute data type field, the minimum
3248 * reporting interval field, the maximum reporting interval field and the reportable
3249 * change field are included in the payload, and the timeout period field is omitted.
3250 * The record is sent to a cluster server (or client) to configure how it sends reports to
3251 * a client (or server) of the same cluster.
3253 * If this value is set to 0x01, then the timeout period field is included in the payload,
3254 * and the attribute data type field, the minimum reporting interval field, the
3255 * maximum reporting interval field and the reportable change field are omitted. The
3256 * record is sent to a cluster client (or server) to configure how it should expect
3257 * reports from a server (or client) of the same cluster.
3261 * @param[in] handle The handle of write attribute status record
3262 * @param[in] dir 00 : The receiver of the Configure Reporting command shall configure
3263 * reporting to send to each destination as resolved by
3264 * the bindings for the cluster hosting the attributes to be reported.\n
3265 * 01 : This indicates to the receiver of the Configure Reporting
3266 * command that the sender has configured its reporting
3267 * mechanism to transmit reports and that, based on the current
3268 * state of the sender's bindings, the sender will send reports to the
3271 * @return 0 on success, otherwise a negative error value.
3272 * @retval #ZIGBEE_ERROR_NONE Successful
3273 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3274 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3276 * @see zb_zcl_global_read_report_config_cb()
3277 * @see zb_report_config_record_create()
3278 * @see zb_report_config_record_clone()
3279 * @see zb_report_config_record_destroy()
3280 * @see zb_report_config_record_get_id()
3281 * @see zb_report_config_record_set_id()
3282 * @see zb_report_config_record_get_dir()
3283 * @see zb_report_config_record_get_type()
3284 * @see zb_report_config_record_get_min_interval()
3285 * @see zb_report_config_record_set_min_interval()
3286 * @see zb_report_config_record_get_max_interval()
3287 * @see zb_report_config_record_set_max_interval()
3288 * @see zb_report_config_record_get_change()
3289 * @see zb_report_config_record_set_change()
3290 * @see zb_report_config_record_get_timeout()
3291 * @see zb_report_config_record_set_timeout()
3293 int zb_report_config_record_set_dir(zb_zcl_reporting_config_record_h handle,
3294 zb_zcl_fc_direction_e dir);
3297 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3298 * @brief Gets the attribute identifier from a reporting configuration record.
3299 * @details If the direction field is 0x00, this field contains the identifier of the
3300 * attribute that is to be reported.
3302 * If instead the direction field is 0x01, the device shall expect reports of values
3303 * of this attribute.
3307 * @param[in] handle The handle of write attribute status record
3308 * @param[out] id Attribute identifier
3310 * @return 0 on success, otherwise a negative error value.
3311 * @retval #ZIGBEE_ERROR_NONE Successful
3312 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3313 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3315 * @see zb_zcl_global_read_report_config_cb()
3316 * @see zb_report_config_record_create()
3317 * @see zb_report_config_record_clone()
3318 * @see zb_report_config_record_destroy()
3319 * @see zb_report_config_record_set_id()
3320 * @see zb_report_config_record_get_dir()
3321 * @see zb_report_config_record_set_dir()
3322 * @see zb_report_config_record_get_type()
3323 * @see zb_report_config_record_get_min_interval()
3324 * @see zb_report_config_record_set_min_interval()
3325 * @see zb_report_config_record_get_max_interval()
3326 * @see zb_report_config_record_set_max_interval()
3327 * @see zb_report_config_record_get_change()
3328 * @see zb_report_config_record_set_change()
3329 * @see zb_report_config_record_get_timeout()
3330 * @see zb_report_config_record_set_timeout()
3332 int zb_report_config_record_get_id(zb_zcl_reporting_config_record_h handle,
3333 unsigned short *id);
3336 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3337 * @brief Sets the attribute identifier of a reporting configuration record.
3338 * @details If the direction field is 0x00, this field contains the identifier of the
3339 * attribute that is to be reported.
3341 * If instead the direction field is 0x01, the device shall expect reports of values
3342 * of this attribute.
3346 * @param[in] handle The handle of write attribute status record
3347 * @param[in] id Attribute identifier
3349 * @return 0 on success, otherwise a negative error value.
3350 * @retval #ZIGBEE_ERROR_NONE Successful
3351 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3352 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3354 * @see zb_zcl_global_read_report_config_cb()
3355 * @see zb_report_config_record_create()
3356 * @see zb_report_config_record_clone()
3357 * @see zb_report_config_record_destroy()
3358 * @see zb_report_config_record_get_id()
3359 * @see zb_report_config_record_get_dir()
3360 * @see zb_report_config_record_set_dir()
3361 * @see zb_report_config_record_get_type()
3362 * @see zb_report_config_record_get_min_interval()
3363 * @see zb_report_config_record_set_min_interval()
3364 * @see zb_report_config_record_get_max_interval()
3365 * @see zb_report_config_record_set_max_interval()
3366 * @see zb_report_config_record_get_change()
3367 * @see zb_report_config_record_set_change()
3368 * @see zb_report_config_record_get_timeout()
3369 * @see zb_report_config_record_set_timeout()
3371 int zb_report_config_record_set_id(zb_zcl_reporting_config_record_h handle,
3375 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3376 * @brief Gets the attribute data type from a reporting configuration record.
3377 * @details The Attribute data type field contains the data type of the attribute that is
3382 * @param[in] handle The handle of write attribute status record
3383 * @param[out] type attribute data type
3385 * @return 0 on success, otherwise a negative error value.
3386 * @retval #ZIGBEE_ERROR_NONE Successful
3387 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3388 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3390 * @see zb_zcl_global_read_report_config_cb()
3391 * @see zb_report_config_record_create()
3392 * @see zb_report_config_record_clone()
3393 * @see zb_report_config_record_destroy()
3394 * @see zb_report_config_record_get_id()
3395 * @see zb_report_config_record_set_id()
3396 * @see zb_report_config_record_get_dir()
3397 * @see zb_report_config_record_set_dir()
3398 * @see zb_report_config_record_get_min_interval()
3399 * @see zb_report_config_record_set_min_interval()
3400 * @see zb_report_config_record_get_max_interval()
3401 * @see zb_report_config_record_set_max_interval()
3402 * @see zb_report_config_record_get_change()
3403 * @see zb_report_config_record_set_change()
3404 * @see zb_report_config_record_get_timeout()
3405 * @see zb_report_config_record_set_timeout()
3407 int zb_report_config_record_get_type(zb_zcl_reporting_config_record_h handle,
3408 zb_zcl_data_type_e *type);
3411 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3412 * @brief Gets the minimum interval from a reporting configuration record.
3413 * @details The minimum reporting interval field is 16 bits in length and shall contain
3414 * the minimum interval, in seconds, between issuing reports of the specified attribute.
3416 * If this value is set to 0x0000, then there is no minimum limit, unless one is
3417 * imposed by the specification of the cluster using this reporting mechanism or by
3418 * the applicable profile.
3422 * @param[in] handle The handle of write attribute status record
3423 * @param[out] min_i minimum interval time
3425 * @return 0 on success, otherwise a negative error value.
3426 * @retval #ZIGBEE_ERROR_NONE Successful
3427 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3428 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3430 * @see zb_zcl_global_read_report_config_cb()
3431 * @see zb_report_config_record_create()
3432 * @see zb_report_config_record_clone()
3433 * @see zb_report_config_record_destroy()
3434 * @see zb_report_config_record_get_id()
3435 * @see zb_report_config_record_set_id()
3436 * @see zb_report_config_record_get_dir()
3437 * @see zb_report_config_record_set_dir()
3438 * @see zb_report_config_record_set_min_interval()
3439 * @see zb_report_config_record_get_max_interval()
3440 * @see zb_report_config_record_set_max_interval()
3441 * @see zb_report_config_record_get_change()
3442 * @see zb_report_config_record_set_change()
3443 * @see zb_report_config_record_get_timeout()
3444 * @see zb_report_config_record_set_timeout()
3446 int zb_report_config_record_get_min_interval(zb_zcl_reporting_config_record_h handle,
3447 unsigned short *min_i);
3450 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3451 * @brief Sets the minimum interval of a reporting configuration record.
3452 * @details The minimum reporting interval field is 16 bits in length and shall contain
3453 * the minimum interval, in seconds, between issuing reports of the specified attribute.
3455 * If this value is set to 0x0000, then there is no minimum limit, unless one is
3456 * imposed by the specification of the cluster using this reporting mechanism or by
3457 * the applicable profile.
3461 * @param[in] handle The handle of write attribute status record
3462 * @param[in] min_i minimum interval time
3464 * @return 0 on success, otherwise a negative error value.
3465 * @retval #ZIGBEE_ERROR_NONE Successful
3466 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3467 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3469 * @see zb_zcl_global_read_report_config_cb()
3470 * @see zb_report_config_record_create()
3471 * @see zb_report_config_record_clone()
3472 * @see zb_report_config_record_destroy()
3473 * @see zb_report_config_record_get_id()
3474 * @see zb_report_config_record_set_id()
3475 * @see zb_report_config_record_get_dir()
3476 * @see zb_report_config_record_set_dir()
3477 * @see zb_report_config_record_get_min_interval()
3478 * @see zb_report_config_record_get_max_interval()
3479 * @see zb_report_config_record_set_max_interval()
3480 * @see zb_report_config_record_get_change()
3481 * @see zb_report_config_record_set_change()
3482 * @see zb_report_config_record_get_timeout()
3483 * @see zb_report_config_record_set_timeout()
3485 int zb_report_config_record_set_min_interval(zb_zcl_reporting_config_record_h handle,
3486 unsigned short min_i);
3489 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3490 * @brief Gets the maximum interval from a reporting configuration record.
3491 * @details The maximum reporting interval field is 16 bits in length and shall contain
3492 * the maximum interval, in seconds, between issuing reports of the specified attribute.
3494 * If this value is set to 0xffff, then the device shall not issue reports for the
3495 * specified attribute, and the configuration information for that attribute need not be
3500 * @param[in] handle The handle of write attribute status record
3501 * @param[out] max_i maximum interval time
3503 * @return 0 on success, otherwise a negative error value.
3504 * @retval #ZIGBEE_ERROR_NONE Successful
3505 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3506 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3508 * @see zb_zcl_global_read_report_config_cb()
3509 * @see zb_report_config_record_create()
3510 * @see zb_report_config_record_clone()
3511 * @see zb_report_config_record_destroy()
3512 * @see zb_report_config_record_get_id()
3513 * @see zb_report_config_record_set_id()
3514 * @see zb_report_config_record_get_dir()
3515 * @see zb_report_config_record_set_dir()
3516 * @see zb_report_config_record_get_min_interval()
3517 * @see zb_report_config_record_set_min_interval()
3518 * @see zb_report_config_record_set_max_interval()
3519 * @see zb_report_config_record_get_change()
3520 * @see zb_report_config_record_set_change()
3521 * @see zb_report_config_record_get_timeout()
3522 * @see zb_report_config_record_set_timeout()
3524 int zb_report_config_record_get_max_interval(zb_zcl_reporting_config_record_h handle,
3525 unsigned short *max_i);
3528 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3529 * @brief Sets the maximum interval of a reporting configuration record.
3530 * @details The maximum reporting interval field is 16 bits in length and shall contain
3531 * the maximum interval, in seconds, between issuing reports of the specified attribute.
3533 * If this value is set to 0xffff, then the device shall not issue reports for the
3534 * specified attribute, and the configuration information for that attribute need not be
3539 * @param[in] handle The handle of write attribute status record
3540 * @param[in] max_i maximum interval time
3542 * @return 0 on success, otherwise a negative error value.
3543 * @retval #ZIGBEE_ERROR_NONE Successful
3544 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3545 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3547 * @see zb_zcl_global_read_report_config_cb()
3548 * @see zb_report_config_record_create()
3549 * @see zb_report_config_record_clone()
3550 * @see zb_report_config_record_destroy()
3551 * @see zb_report_config_record_get_id()
3552 * @see zb_report_config_record_set_id()
3553 * @see zb_report_config_record_get_dir()
3554 * @see zb_report_config_record_set_dir()
3555 * @see zb_report_config_record_get_min_interval()
3556 * @see zb_report_config_record_set_min_interval()
3557 * @see zb_report_config_record_get_max_interval()
3558 * @see zb_report_config_record_get_change()
3559 * @see zb_report_config_record_set_change()
3560 * @see zb_report_config_record_get_timeout()
3561 * @see zb_report_config_record_set_timeout()
3563 int zb_report_config_record_set_max_interval(zb_zcl_reporting_config_record_h handle,
3564 unsigned short max_i);
3567 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3568 * @brief Gets the timeout from a reporting configuration record.
3569 * @details The timeout period field is 16 bits in length and shall contain the maximum
3570 * expected time, in seconds, between received reports for the attribute specified in
3571 * the attribute identifier field. If more time than this elapses between reports, this
3572 * may be an indication that there is a problem with reporting.
3574 * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
3575 * Note that, for a server/client connection to work properly using automatic
3576 * reporting, the timeout value set for attribute reports to be received by the client (or
3577 * server) cluster must be set somewhat higher than the maximum reporting interval
3578 * set for the attribute on the server (or client) cluster.
3582 * @param[in] handle The handle of write attribute status record
3583 * @param[out] timeout timeout
3585 * @return 0 on success, otherwise a negative error value.
3586 * @retval #ZIGBEE_ERROR_NONE Successful
3587 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3588 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3590 * @see zb_zcl_global_read_report_config_cb()
3591 * @see zb_report_config_record_create()
3592 * @see zb_report_config_record_clone()
3593 * @see zb_report_config_record_destroy()
3594 * @see zb_report_config_record_get_id()
3595 * @see zb_report_config_record_set_id()
3596 * @see zb_report_config_record_get_dir()
3597 * @see zb_report_config_record_set_dir()
3598 * @see zb_report_config_record_get_min_interval()
3599 * @see zb_report_config_record_set_min_interval()
3600 * @see zb_report_config_record_get_max_interval()
3601 * @see zb_report_config_record_set_max_interval()
3602 * @see zb_report_config_record_get_change()
3603 * @see zb_report_config_record_set_change()
3604 * @see zb_report_config_record_set_timeout()
3606 int zb_report_config_record_get_timeout(zb_zcl_reporting_config_record_h handle,
3607 unsigned short *timeout);
3610 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3611 * @brief Sets the timeout of a reporting configuration record.
3612 * @details The timeout period field is 16 bits in length and shall contain the maximum
3613 * expected time, in seconds, between received reports for the attribute specified in
3614 * the attribute identifier field. If more time than this elapses between reports, this
3615 * may be an indication that there is a problem with reporting.
3617 * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
3618 * Note that, for a server/client connection to work properly using automatic
3619 * reporting, the timeout value set for attribute reports to be received by the client (or
3620 * server) cluster must be set somewhat higher than the maximum reporting interval
3621 * set for the attribute on the server (or client) cluster.
3625 * @param[in] handle The handle of write attribute status record
3626 * @param[in] timeout timeout
3628 * @return 0 on success, otherwise a negative error value.
3629 * @retval #ZIGBEE_ERROR_NONE Successful
3630 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3631 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3633 * @see zb_zcl_global_read_report_config_cb()
3634 * @see zb_report_config_record_create()
3635 * @see zb_report_config_record_clone()
3636 * @see zb_report_config_record_destroy()
3637 * @see zb_report_config_record_get_id()
3638 * @see zb_report_config_record_set_id()
3639 * @see zb_report_config_record_get_dir()
3640 * @see zb_report_config_record_set_dir()
3641 * @see zb_report_config_record_get_min_interval()
3642 * @see zb_report_config_record_set_min_interval()
3643 * @see zb_report_config_record_get_max_interval()
3644 * @see zb_report_config_record_set_max_interval()
3645 * @see zb_report_config_record_get_change()
3646 * @see zb_report_config_record_set_change()
3647 * @see zb_report_config_record_get_timeout()
3649 int zb_report_config_record_set_timeout(zb_zcl_reporting_config_record_h handle,
3650 unsigned short timeout);
3653 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3654 * @brief Gets the change from a reporting configuration record.
3655 * @details The reportable change field shall contain the minimum change to the attribute
3656 * that will result in a report being issued. This field is of variable length.
3658 * For attributes with 'analog' data type
3659 * the field has the same data type as the attribute.
3661 * The sign (if any) of the reportable change field is ignored.
3662 * For attributes of 'discrete' data type
3663 * this field is omitted.
3667 * @remarks The @a value should be released using free().
3669 * @param[in] handle The handle of write attribute status record
3670 * @param[out] type attribute type The attribute data type shall contain the data
3671 * type of the attribute in the same read attributes status record
3672 * (see #zb_zcl_data_type_e).
3673 * @param[out] value The reportable change value. The reportable change field shall
3674 * contain the minimum change to the attribute that will result in a report being issued.
3675 * For attributes with 'analog' data type (see #zb_zcl_data_type_e) the field has the
3676 * same data type as the attribute. If the reportable change has not been configured,
3677 * this field shall contain the invalid value for the relevant data type.
3678 * For attributes of 'discrete' data type (see #zb_zcl_data_type_e) this field is not
3680 * @param[out] size attribute data size
3682 * @return 0 on success, otherwise a negative error value.
3683 * @retval #ZIGBEE_ERROR_NONE Successful
3684 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3685 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3687 * @see zb_zcl_global_read_report_config_cb()
3688 * @see zb_report_config_record_create()
3689 * @see zb_report_config_record_clone()
3690 * @see zb_report_config_record_destroy()
3691 * @see zb_report_config_record_get_id()
3692 * @see zb_report_config_record_set_id()
3693 * @see zb_report_config_record_get_dir()
3694 * @see zb_report_config_record_set_dir()
3695 * @see zb_report_config_record_get_min_interval()
3696 * @see zb_report_config_record_set_min_interval()
3697 * @see zb_report_config_record_get_max_interval()
3698 * @see zb_report_config_record_set_max_interval()
3699 * @see zb_report_config_record_get_change()
3700 * @see zb_report_config_record_set_change()
3701 * @see zb_report_config_record_get_timeout()
3702 * @see zb_report_config_record_set_timeout()
3704 int zb_report_config_record_get_change(zb_zcl_reporting_config_record_h handle,
3705 zb_zcl_data_type_e *type, unsigned char **value, int *size);
3708 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
3709 * @brief Sets the change to a reporting configuration record.
3710 * @details The reportable change field shall contain the minimum change to the attribute
3711 * that will result in a report being issued. This field is of variable length.
3712 * For attributes with 'analog' data type
3713 * the field has the same data type as the attribute.
3715 * The sign (if any) of the reportable change field is ignored.
3716 * For attributes of 'discrete' data type
3717 * this field is omitted.
3721 * @param[in] handle The handle of write attribute status record
3722 * @param[in] type attribute type
3723 * @param[in] value attribute data (only analog data type is allowed)
3725 * @return 0 on success, otherwise a negative error value.
3726 * @retval #ZIGBEE_ERROR_NONE Successful
3727 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3728 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3730 * @see zb_zcl_global_read_report_config_cb()
3731 * @see zb_report_config_record_create()
3732 * @see zb_report_config_record_clone()
3733 * @see zb_report_config_record_destroy()
3734 * @see zb_report_config_record_get_id()
3735 * @see zb_report_config_record_set_id()
3736 * @see zb_report_config_record_get_dir()
3737 * @see zb_report_config_record_set_dir()
3738 * @see zb_report_config_record_get_type()
3739 * @see zb_report_config_record_get_min_interval()
3740 * @see zb_report_config_record_set_min_interval()
3741 * @see zb_report_config_record_get_max_interval()
3742 * @see zb_report_config_record_set_max_interval()
3743 * @see zb_report_config_record_get_change()
3744 * @see zb_report_config_record_set_change()
3745 * @see zb_report_config_record_get_timeout()
3746 * @see zb_report_config_record_set_timeout()
3748 int zb_report_config_record_set_change(zb_zcl_reporting_config_record_h handle,
3749 zb_zcl_data_type_e type, unsigned char *value);
3752 * @brief Sends 'setting configure reporting' command.
3753 * @details Call this function to set the configuration of attribute status changing reporting.
3757 * @privilege %http://tizen.org/privilege/zigbee
3759 * @param[in] handle The handle of zigbee
3760 * @param[in] addr16 target network address
3761 * @param[in] src_ep source end-point (ex. 1)
3762 * @param[in] dst_ep destination end-point (ex. 1)
3763 * @param[in] zcl_fc frame control bits (default 0x00). \n
3764 * Only OR operation is allowed in ZCL header \n
3766 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
3767 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
3768 * - Manufacturer Specific : \n
3770 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
3771 * #ZB_ZCL_SERVER_TO_CLIENT \n
3772 * - Disable Default Response : \n
3773 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
3774 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
3775 * @param[in] clusterid ZCL cluster id
3776 * @param[in] records Array of #zb_zcl_reporting_config_record_h
3777 * @param[in] count The number of items in @a records array
3778 * @param[in] cb Response callback function
3779 * @param[in] user_data User data
3781 * @return 0 on success, otherwise a negative error value.
3782 * @retval #ZIGBEE_ERROR_NONE Successful
3783 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3784 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3785 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3786 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3787 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3788 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3790 * @see zb_zcl_global_config_report_write_cb()
3792 int zb_zcl_global_config_report_write(
3795 zb_end_point src_ep,
3796 zb_end_point dst_ep,
3797 zb_zcl_frame_ctl zcl_fc,
3798 zb_cluster_id clusterid,
3799 zb_zcl_reporting_config_record_h *records,
3801 zb_zcl_global_config_report_write_cb cb,
3806 * @brief Called with a configuration report.
3807 * @details This callback is called after zb_zcl_global_config_report_read() is called.
3811 * @remarks The @a records can be used only in the callback.
3812 * @remarks The @a records should not be released.
3814 * @param[out] addr16 Source network address
3815 * @param[out] ep The source end-point (ex. 1)
3816 * @param[out] clusterid ZCL cluster id
3817 * @param[out] records Read reporting configuration response record
3818 * @param[out] count The number of items in @a records
3819 * @param[out] user_data User data
3821 * @see zb_zcl_global_config_report_read()
3823 typedef void (*zb_zcl_global_config_report_read_cb)(
3826 zb_cluster_id clusterid,
3827 zb_zcl_reporting_config_record_h *records,
3832 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3833 * @brief Creates a read reporting configuration record.
3834 * @details Allocates memory for read reporting configuration record.
3838 * @privilege %http://tizen.org/privilege/zigbee
3840 * @remarks The @a handle should be released using zb_read_report_config_record_destroy().
3842 * @param[out] handle The handle of read configuration record
3844 * @return 0 on success, otherwise a negative error value.
3845 * @retval #ZIGBEE_ERROR_NONE Successful
3846 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3847 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3848 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3849 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3851 * @see zb_read_report_config_record_create()
3852 * @see zb_read_report_config_record_destroy()
3853 * @see zb_read_report_config_record_set_id()
3854 * @see zb_read_report_config_record_set_dir()
3856 int zb_read_report_config_record_create(
3857 zb_zcl_read_report_config_record_h *handle);
3860 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3861 * @brief Destroys a read reporting configuration record.
3862 * @details Removes allocated memory for read reporting configuration record.
3866 * @param[in] handle The handle of write attribute record
3868 * @return 0 on success, otherwise a negative error value.
3869 * @retval #ZIGBEE_ERROR_NONE Successful
3870 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3871 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3873 * @see zb_read_report_config_record_create()
3874 * @see zb_read_report_config_record_destroy()
3875 * @see zb_read_report_config_record_set_id()
3876 * @see zb_read_report_config_record_set_dir()
3878 int zb_read_report_config_record_destroy(
3879 zb_zcl_read_report_config_record_h handle);
3882 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3883 * @brief Sets the direction of a read reporting configuration record.
3884 * @details The direction field specifies whether values of the attribute are reported
3885 * (0x00), or whether reports of the attribute are received (0x01).
3887 * All other values of this field are reserved.
3891 * @param[in] handle The handle of write attribute status record
3892 * @param[in] dir direction
3894 * @return 0 on success, otherwise a negative error value.
3895 * @retval #ZIGBEE_ERROR_NONE Successful
3896 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3897 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3899 * @see zb_read_report_config_record_create()
3900 * @see zb_read_report_config_record_destroy()
3901 * @see zb_read_report_config_record_set_id()
3902 * @see zb_read_report_config_record_set_dir()
3904 int zb_read_report_config_record_set_dir(
3905 zb_zcl_read_report_config_record_h handle,
3906 zb_zcl_fc_direction_e dir);
3909 * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
3910 * @brief Sets the attribute identifier of a read reporting configuration record.
3911 * @details The attribute identifier field shall contain the identifier of the attribute
3912 * whose reporting configuration details are to be read.
3916 * @param[in] handle The handle of write attribute status record
3917 * @param[in] id Attribute identifier
3919 * @return 0 on success, otherwise a negative error value.
3920 * @retval #ZIGBEE_ERROR_NONE Successful
3921 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3922 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3924 * @see zb_read_report_config_record_create()
3925 * @see zb_read_report_config_record_destroy()
3926 * @see zb_read_report_config_record_set_id()
3927 * @see zb_read_report_config_record_set_dir()
3929 int zb_read_report_config_record_set_id(
3930 zb_zcl_read_report_config_record_h handle,
3934 * @brief Sends 'reading configure reporting' command.
3935 * @details Call this function to read the configuration of attribute status changing
3940 * @privilege %http://tizen.org/privilege/zigbee
3942 * @param[in] handle The handle of zigbee
3943 * @param[in] addr16 target network address
3944 * @param[in] src_ep source end-point (ex. 1)
3945 * @param[in] dst_ep destination end-point (ex. 1)
3946 * @param[in] zcl_fc frame control bits (default 0x00). \n
3947 * Only OR operation is allowed in ZCL header \n
3949 * #ZB_ZCL_FC_GLOBALLY_USED (default) \n
3950 * #ZB_APS_FC_CLUSTER_SPECIFIC \n
3951 * - Manufacturer Specific : \n
3953 * #ZB_ZCL_CLIENT_TO_SERVER (default) \n
3954 * #ZB_ZCL_SERVER_TO_CLIENT \n
3955 * - Disable Default Response : \n
3956 * #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
3957 * #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
3958 * @param[in] clusterid ZCL cluster id
3959 * @param[in] records Array of #zb_zcl_read_report_config_record_h
3960 * @param[in] count The number of items in @a records array
3961 * @param[in] cb Response callback function
3962 * @param[in] user_data User data
3964 * @return 0 on success, otherwise a negative error value.
3965 * @retval #ZIGBEE_ERROR_NONE Successful
3966 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
3967 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
3968 * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
3969 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
3970 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
3971 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
3973 * @see zb_zcl_global_config_report_read_cb()
3975 int zb_zcl_global_config_report_read(
3978 zb_end_point src_ep,
3979 zb_end_point dst_ep,
3980 zb_zcl_frame_ctl zcl_fc,
3981 zb_cluster_id clusterid,
3982 zb_zcl_read_report_config_record_h *records,
3984 zb_zcl_global_config_report_read_cb cb,
3992 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE
3997 /* Generated Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
3998 * +--------------------------------+--------------------------------------+------------+
3999 * |Command Identifier Field Value | Description | Mandatory/ |
4001 * +--------------------------------+--------------------------------------+------------+
4002 * | 0x00 | Zone Status Change Notification | M |
4003 * | 0x01 | Zone Enroll Request | M |
4004 * | 0x11 | Zone Status Change Notification (Ext)| M |
4005 * +--------------------------------+--------------------------------------+------------+
4009 /* Received Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
4010 * +--------------------------------+--------------------------------------+------------+
4011 * |Command Identifier Field Value | Description | Mandatory/ |
4013 * +--------------------------------+--------------------------------------+------------+
4014 * | 0x00 | Zone Enroll Response | M |
4015 * +--------------------------------+--------------------------------------+------------+
4019 * @brief Values of the Enroll Response Code in Zigbee Cluster Library.
4024 ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS = 0x00, /**< Success */
4025 ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED = 0x01, /**< This specific Zone type is not known to the CIE and is not supported */
4026 ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED = 0x02, /**< CIE does not permit new zones to enroll at this time. */
4027 ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES = 0x03, /**< CIE reached its limit of number of enrolled zones */
4028 } zb_ias_zone_enroll_response_e;
4031 * @brief Sends 'zone enroll response' command.
4032 * @details On receipt, the device embodying the Zone server is notified that it is now
4033 * enrolled as an active alarm device.
4035 * The device embodying the Zone server must authenticate received messages by
4036 * checking the address of their sender against IAS_CIE_Address. This is to ensure
4037 * that only messages from the correct CIE are accepted.
4041 * @privilege %http://tizen.org/privilege/zigbee
4043 * @param[in] handle The handle of zigbee
4044 * @param[in] addr16 Network address
4045 * @param[in] ep Endpoint ID
4046 * @param[in] enroll_response_code #ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS \n
4047 * #ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED \n
4048 * #ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED \n
4049 * #ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES \n
4050 * @param[in] zone_id The Zone ID field is the index into the zone table of the CIE. This
4051 * field is only relevant if the response code is success.
4053 * @return 0 on success, otherwise a negative error value.
4054 * @retval #ZIGBEE_ERROR_NONE Successful
4055 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4056 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
4057 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
4058 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
4059 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
4060 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4063 int zb_zcl_zone_enroll_response(
4067 unsigned char enroll_response_code,
4068 unsigned char zone_id);
4075 * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE
4080 /* Command IDs for the On/Off Cluster in Zigbee Cluster Library
4081 * +--------------------------------+--------------------------------------+------------+
4082 * |Command Identifier Field Value | Description | Mandatory/ |
4084 * +--------------------------------+--------------------------------------+------------+
4085 * | 0x00 | Off | M |
4087 * | 0x02 | Toggle | M |
4088 * +--------------------------------+--------------------------------------+------------+
4092 * @brief On/Off/Toggle value.
4097 ZB_ZCL_OFF = 0x00, /**< Off */
4098 ZB_ZCL_ON = 0x01, /**< On */
4099 ZB_ZCL_TOGGLE = 0x02, /**< Toggle */
4103 * @brief Sends 'on/off/toggle' command.
4104 * @details On receipt of 'on' command, a device shall enter its 'Off' state.
4105 * This state is device dependent, but it is recommended that it is used for power off or
4106 * similar functions.
4108 * On receipt of 'off' command, a device shall enter its 'On' state. This state is
4109 * device dependent, but it is recommended that it is used for power on or similar
4112 * On receipt of 'toggle' command, if a device is in its 'Off' state it shall enter
4113 * its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.
4117 * @privilege %http://tizen.org/privilege/zigbee
4119 * @param[in] handle The handle of zigbee
4120 * @param[in] addr16 Network address
4121 * @param[in] ep Endpoint ID
4122 * @param[in] on_off_type #ZB_ZCL_OFF \n
4126 * @return 0 on success, otherwise a negative error value.
4127 * @retval #ZIGBEE_ERROR_NONE Successful
4128 * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
4129 * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
4130 * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
4131 * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
4132 * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
4133 * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
4136 int zb_zcl_on_off_control(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
4137 zb_zcl_on_off_e on_off_type);
4147 #endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_H__ */