Fixed ACR issue 17/182617/28 accepted/tizen/unified/20180717.143348 submit/tizen/20180717.021733
authorsaerome.kim <saerome.kim@samsung.com>
Tue, 26 Jun 2018 12:58:37 +0000 (21:58 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Tue, 17 Jul 2018 02:05:43 +0000 (11:05 +0900)
- Change unused functions as private.
- Fixed API doxygen rule check errors.
- Changed libraray name from libzigbee.so to libcapi-network-zigbee.so
- Added getter functions to get received events in detail
- Enable feature check.
- Fixed many typo.
- Changed some API names.

Change-Id: Iadad7610091f4dd9a5847c9c9e1ad6ac0e914410
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
95 files changed:
CMakeLists.txt
common/CMakeLists.txt
common/zb-common.h [moved from common/zb_common.h with 57% similarity]
common/zb-log.h [moved from common/zb_log.h with 100% similarity]
common/zb-utils.c [new file with mode: 0644]
common/zb-utils.h [new file with mode: 0644]
common/zb_utils.c [deleted file]
common/zb_utils.h [deleted file]
doc/zigbee_doc.h
include/zb_error.h [deleted file]
include/zb_ha.h [deleted file]
include/zb_type.h [deleted file]
include/zb_zcl.h [deleted file]
include/zb_zdo.h [deleted file]
include/zcl/zb_zcl_alarm_cluster.h [deleted file]
include/zcl/zb_zcl_attribute_ids.h [deleted file]
include/zcl/zb_zcl_attribute_type.h [deleted file]
include/zcl/zb_zcl_basic_cluster.h [deleted file]
include/zcl/zb_zcl_cluster_ids.h [deleted file]
include/zcl/zb_zcl_color_control_cluster.h [deleted file]
include/zcl/zb_zcl_commands.h [deleted file]
include/zcl/zb_zcl_global_commands.h [deleted file]
include/zcl/zb_zcl_groups_cluster.h [deleted file]
include/zcl/zb_zcl_ias_zone_cluster.h [deleted file]
include/zcl/zb_zcl_identify_cluster.h [deleted file]
include/zcl/zb_zcl_level_control_cluster.h [deleted file]
include/zcl/zb_zcl_on_off_cluster.h [deleted file]
include/zcl/zb_zcl_poll_control_cluster.h [deleted file]
include/zcl/zb_zcl_scenes_cluster.h [deleted file]
include/zcl/zb_zcl_thermostat_cluster.h [deleted file]
include/zcl/zb_zcl_type.h [deleted file]
include/zdo/zb_zdo_bind_mgr.h [deleted file]
include/zdo/zb_zdo_dev_disc.h [deleted file]
include/zdo/zb_zdo_nwk_mgr.h [deleted file]
include/zdo/zb_zdo_type.h [deleted file]
include/zigbee-zcl-type.h [new file with mode: 0644]
include/zigbee-zcl_internal.h [new file with mode: 0644]
include/zigbee-zcl_private.h [new file with mode: 0644]
include/zigbee-zdo-type.h [new file with mode: 0644]
include/zigbee-zdo_internal.h [new file with mode: 0644]
include/zigbee-zdo_private.h [new file with mode: 0644]
include/zigbee.h
include/zigbee_internal.h [changed mode: 0755->0644]
include/zigbee_private.h [new file with mode: 0644]
lib/CMakeLists.txt
lib/capi-network-zigbee.pc.in
lib/zbl-custom.c [moved from lib/zbl_custom.c with 57% similarity]
lib/zbl-dbus.c [moved from lib/zbl_dbus.c with 83% similarity]
lib/zbl-dbus.h [new file with mode: 0644]
lib/zbl-zcl-alarm.c [moved from lib/zbl_zcl_alarm.c with 75% similarity]
lib/zbl-zcl-basic.c [moved from lib/zbl_zcl_basic.c with 83% similarity]
lib/zbl-zcl-color-control.c [moved from lib/zbl_zcl_color_control.c with 72% similarity]
lib/zbl-zcl-global-cmd.c [moved from lib/zbl_zcl_global_commands.c with 52% similarity]
lib/zbl-zcl-groups.c [moved from lib/zbl_zcl_groups.c with 72% similarity]
lib/zbl-zcl-identify.c [moved from lib/zbl_zcl_identify.c with 78% similarity]
lib/zbl-zcl-isa-zone.c [moved from lib/zbl_zcl_isa_zone.c with 77% similarity]
lib/zbl-zcl-level-control.c [moved from lib/zbl_zcl_level_control.c with 74% similarity]
lib/zbl-zcl-on-off.c [moved from lib/zbl_zcl_on_off.c with 81% similarity]
lib/zbl-zcl-poll-control.c [moved from lib/zbl_zcl_poll_control.c with 73% similarity]
lib/zbl-zcl-scenes.c [moved from lib/zbl_zcl_scenes.c with 69% similarity]
lib/zbl-zcl-thermostat.c [moved from lib/zbl_zcl_thermostat.c with 79% similarity]
lib/zbl-zcl.c [new file with mode: 0644]
lib/zbl-zdo-bind-mgr.c [moved from lib/zbl_zdo_bind_mgr.c with 63% similarity]
lib/zbl-zdo-dev-disc.c [new file with mode: 0644]
lib/zbl-zdo-nwk-mgr.c [new file with mode: 0644]
lib/zbl-zdo-svc-disc.c [moved from lib/zbl_zdo_svc_disc.c with 63% similarity]
lib/zbl-zdo.c [new file with mode: 0644]
lib/zbl.c
lib/zbl.h
lib/zbl_dbus.h [deleted file]
lib/zbl_zcl.c [deleted file]
lib/zbl_zdo.c [deleted file]
lib/zbl_zdo_dev_disc.c [deleted file]
lib/zbl_zdo_nwk_mgr.c [deleted file]
packaging/capi-network-zigbee.spec
test/CMakeLists.txt
test/custom.c
test/main.c
test/main.h
test/zcl-alarm.c [moved from test/zcl_cluster_alarm.c with 64% similarity]
test/zcl-basic.c [moved from test/zcl_cluster_basic.c with 86% similarity]
test/zcl-color-ctrl.c [moved from test/zcl_cluster_colorctrl.c with 78% similarity]
test/zcl-global-cmd.c [new file with mode: 0644]
test/zcl-group.c [moved from test/zcl_cluster_group.c with 64% similarity]
test/zcl-ias-zone.c [moved from test/zcl_cluster_ias_zone.c with 83% similarity]
test/zcl-identity.c [moved from test/zcl_cluster_identity.c with 73% similarity]
test/zcl-level-ctrl.c [moved from test/zcl_cluster_levelctrl.c with 76% similarity]
test/zcl-on-off.c [moved from test/zcl_cluster_onoff.c with 65% similarity]
test/zcl-poll-ctrl.c [moved from test/zcl_cluster_pollctrl.c with 77% similarity]
test/zcl-scene.c [moved from test/zcl_cluster_scene.c with 63% similarity]
test/zcl-thermostat.c [moved from test/zcl_cluster_thermostat.c with 85% similarity]
test/zcl_global_cmd.c [deleted file]
test/zdo-binding.c [moved from test/zdo_binding.c with 52% similarity]
test/zdo-device.c [moved from test/zdo_device.c with 59% similarity]
test/zdo-network.c [moved from test/zdo_network.c with 57% similarity]

index f61b90e..c3e97a5 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(zigbee C)
+PROJECT(capi-network-zigbee C)
 
 INCLUDE(FindPkgConfig)
 
@@ -9,10 +9,8 @@ SET(CMAKE_C_FLAGS ${CMAKE_CFALGS} ${EXTRA_CFLAGS})
 
 SET(CAPI_NETWORK_ZIGBEE "capi-network-zigbee")
 SET(CLIENT ${PROJECT_NAME})
-SET(DAEMON "${PROJECT_NAME}-daemon")
-SET(DBUS_INTERFACE "org.tizen.${PROJECT_NAME}")
-SET(DBUS_OBJECT_PATH "/org/tizen/${PROJECT_NAME}")
-#SET(ZB_DBUS "zb-dbus")
+SET(DBUS_INTERFACE "org.tizen.zigbee")
+SET(DBUS_OBJECT_PATH "/org/tizen/zigbee")
 
 # enable client log
 ADD_DEFINITIONS("-DZB_ENABLE_CLIENT_LOG")
index 1e7796a..7837c17 100644 (file)
@@ -1,6 +1,6 @@
 #FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
 
-#MESSAGE("KSR ${GDBUS_CODEGEN}")
+#MESSAGE("${GDBUS_CODEGEN}")
 #ADD_CUSTOM_COMMAND(
 #      OUTPUT dbus
 #      COMMAND ${GDBUS_CODEGEN} --generate-c-code ${ZB_DBUS}
@@ -11,4 +11,4 @@
 
 #ADD_CUSTOM_TARGET(GENERATED_DBUS_CODE DEPENDS dbus)
 
-#MESSAGE("KSR ${dbus}")
+#MESSAGE("${dbus}")
similarity index 57%
rename from common/zb_common.h
rename to common/zb-common.h
index 44a2233..fa2eb8e 100644 (file)
 #ifndef __TIZEN_NETWORK_ZIGBEE_INTERNAL_COMMON_H__
 #define __TIZEN_NETWORK_ZIGBEE_INTERNAL_COMMON_H__
 
+#include <error.h>
+#include <stdlib.h>
+
 #include <system_info.h>
 
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-#include <zcl/zb_zcl_type.h>
+#include "zb-log.h"
+#include "zb-utils.h"
+
+#include "zigbee.h"
+#include "zigbee_internal.h"
+#include "zigbee_private.h"
+#include "zigbee-zdo_internal.h"
+#include "zigbee-zdo_private.h"
+#include "zigbee-zcl_internal.h"
+#include "zigbee-zcl_private.h"
 
+#define CHECK_ZIGBEE_FEATURE
 #define ZIGBEE_FEATURE "http://tizen.org/feature/network.zigbee"
 
 #ifdef CHECK_ZIGBEE_FEATURE
 #define NOT_USED(var) ((var) = (var))
 
 /*---------------------------------------------------------------------------------------
+ * For Event
+ *--------------------------------------------------------------------------------------*/
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZDP_ENABLE_EVENT callback data.
+ * @details The result of enabling zigbee system service.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char status; /**< Status of enabling zigbee system service */
+} zb_event_enable_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZDP_FORM_NETWORK_DONE callback data.
+ * @details This event comes from coming network operation completed.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       zb_nwk_addr pan_id; /**< Pan ID */
+} zb_event_form_network_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZDP_JOIN_EVENT callback data.
+ * @details This event takes place when new device joined.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char count; /**< Number of endpoint list */
+       unsigned char ep[MAX_ENDPOINT_CLUSTERS]; /**< Endpoint list */
+} zb_event_join_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZDP_CHILD_LEFT callback data.
+ * @details This event takes place when a child device leave current network explicitly.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char status; /**< Left status of child device */
+} zb_event_child_left_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT callback data.
+ * @details This event is used when global default response.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char ep; /**< End-point */
+       unsigned short clusterid; /**< Cluster id */
+       unsigned char commandid; /**< Command id */
+       unsigned char status; /**< Status */
+} zb_event_global_default_rsp_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT callback data.
+ * @details This event is took place when report attribute command received.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       void* records; /**< Array of attribute report record */
+       unsigned char count; /**< count of records */
+} zb_event_global_attr_report_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_ALARM_EVENT callback data.
+ * @details This event is related to alarm cluster.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned short count; /**< Alarm count */
+} zb_event_alarm_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT callback data.
+ * @details A Device which supports IAS zone cluster want to register its ability.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char src_ep; /**< Source endpoint */
+       unsigned short zone_type; /**< Zone type 0x0000 : Standard CIE / Alarm1 - System Alarm, Alarm2 - N/A\n
+               *  0x000d : Motion Sensor / Alarm1 - Intrusion indication, Alarm2 - Presence indication\n
+               *  0x0015 : Contact switch / Alarm1 - 1st portal Open-Close, Alarm2 - 2nd portal Open-Close\n
+               *  0x0028 : Fire sensor / Alarm1 - Fire indication, Alarm2 - N/A\n
+               *  0x002a : Water sensor / Alarm1 - Water overflow indication, Alarm2 - N/A\n
+               *  0x002b : Gas Sensor / Alarm1 - CO indication, Alarm2 - Cooking indication\n
+               *  0x002c : Personal emergency Sensor / Alarm1 - Fall / Concussion, Alarm2 - Emergency button\n
+               *  0x002d : Vibration or Movement Sensor / Alarm1 - Movement indication, Alarm2 - Vibration\n
+               *  0x010f : Remote control / Alarm1 - Panic, Alarm2 - Emergency\n
+               *  0x0115 : Key fob / Alarm1 - Panic, Alarm2 - Emergency\n
+               *  0x021d : Keypad / Alarm1 - Panic, Alarm2 - Emergency\n
+               *  0x0225 : Standard Warning Device (see. EN 50131 European Standards Series for Intruder Alarm Systems)
+               *           / Alarm1 - N/A, Alarm2 -N/A\n
+               *  0x8000~0xfffe : Reserved for manufacturer specific types / Alarm1 - N/A, Alarm2 - N/A\n
+               *  0xffff : Invalid Zone Type / Alarm1 - N/A, Alarm2 - N/A\n */
+       unsigned char mfg_code; /**< Manufacturer Code */
+} zb_event_ias_enroll_request_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT callback data.
+ * @details A Device which supports IAS zone cluster announces its status change.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char src_ep; /**< Source endpoint */
+       unsigned short zone_status; /**<  zone_status Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+               *   Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+               *   Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
+               *   Bit 3 : Battery : 1 - Low batter / 0 - Battery OK\n
+               *   Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
+               *   Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
+               *   Notification commands. The CIE device may use these periodic reports as an\n
+               *   indication that a zone is operational. Zones that do not implement the periodic\n
+               *   reporting are required to set this bit to zero (the CIE will know not to interpret the\n
+               *   lack of reports as a problem).\n
+               *   Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
+               *   Note 2: This bit indicates whether or not a Zone Status Change Notification\n
+               *   command will be sent to indicate that an alarm is no longer present. Some Zones\n
+               *   do not have the ability to detect that alarm condition is no longer present, they\n
+               *   only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
+               *   zero, indicating to the CIE not to look for alarm-restore notifications.\n
+               *   Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
+               *   Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n */
+} zb_event_ias_noti_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for the #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT callback data.
+ * @details A Device which supports IAS zone cluster announces its status change.
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       unsigned char src_ep; /**< Source endpoint */
+       unsigned char status; /**< Extended status */
+       unsigned short zone_status; /**< Zone status */
+       unsigned short delay; /**< Delay */
+       unsigned char zone_id; /**< Zone ID */
+} zb_event_ias_extended_noti_s;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The structure type for response data of zb_event_cb().
+ * @details This function can receive events from the devices in the network.
+ * ex) join, re-join, leave and attribute change report
+ *
+ * @since_tizen 4.0
+ */
+typedef struct {
+       union {
+               zb_event_enable_s *enable; /**< The result of enabling zigbee system service. */
+               zb_event_form_network_s *form_network; /**< This event comes from coming network operation completed. */
+               zb_event_join_s *join; /**< This event takes place when new device joined. */
+               zb_event_child_left_s *child_left; /**< This event takes place when a child device leave current network explicitly. */
+               zb_event_global_default_rsp_s *global_default_rsp; /**< This event is used when global default response. */
+               zb_event_global_attr_report_s *global_attr_report; /**< This event is took place when report attribute command received. */
+               zb_event_alarm_s *alarm; /**< This event is related to alarm cluster. */
+               zb_event_ias_enroll_request_s *ias_enroll_request; /**< A Device which supports IAS zone cluster want to register its ability. */
+               zb_event_ias_noti_s *ias_noti; /**< A Device which supports IAS zone cluster announces its status change. */
+               zb_event_ias_extended_noti_s *ias_extended_noti; /**< A Device which supports IAS zone cluster announces its status change. */
+       } data;
+} zb_event_data_s;
+
+
+/*---------------------------------------------------------------------------------------
  * For ZDO
  *--------------------------------------------------------------------------------------*/
 
  */
 struct zb_zdo_simple_desc_s {
        unsigned char ep; /**< Endpoint ID */
-       unsigned short profile_id; /**< Profile ID */
-       unsigned short device_id; /**< Device ID */
+       unsigned short profileid; /**< Profile ID */
+       unsigned short deviceid; /**< Device ID */
        unsigned char device_ver; /**< Device Version */
        unsigned char num_of_in_clusters; /**< Number of In-Cluster */
        unsigned char num_of_out_clusters; /**< Number of Out-Cluster */
@@ -140,13 +331,13 @@ struct zb_zdo_node_power_descriptor_s {
  * @since_tizen 4.0
  */
 struct zb_end_device_info_s {
-       nwk_addr addr16; /**< 16bit network address */
-       ieee_addr addr64; /**< EUI64 ieee address */
+       zb_nwk_addr addr16; /**< 16bit network address */
+       zb_ieee_addr addr64; /**< EUI64 ieee address */
        unsigned char node_type; /**< node type : coordinator, router or end-device */
        unsigned char capability; /**< mac capability is updated when device_annce received */
        unsigned char num_of_ep; /**< number of endpoints */
        unsigned char ep[32]; /**< end-point list */
-       struct zb_zdo_simple_desc_s **desc; /**< Simple Descriptor when get_simple_desc_rsp received */
+       struct zb_zdo_simple_desc_s **desc; /**< Simple Descriptor when get_simple_desc_cb received */
        GList *list; /**< list to next */
 };
 
@@ -179,12 +370,12 @@ struct zb_zdo_node_descriptor_s {
  * @since_tizen 4.0
  */
 struct zb_zdo_network_list_record_s {
-       ieee_addr extended_pan_id; /**< Extended PAN ID */
+       zb_ieee_addr extended_pan_id; /**< Extended PAN ID */
        unsigned char logical_channel; /**< Logical Channel Number */
        unsigned char stack_profile; /**< Stack Profile Version */
        unsigned char zigbee_version; /**< Supported Zigbee Protocol Version */
-       unsigned char beacon_order; /**< Beacon Order (See. 802.15.4 PHY/MAC Specification) */
-       unsigned char superframe_order; /**< Superframe Order (See. 802.15.4 PHY/MAC Specification) */
+       unsigned char beacon_order; /**< Beacon Order (see. 802.15.4 PHY/MAC Specification) */
+       unsigned char superframe_order; /**< Superframe Order (see. 802.15.4 PHY/MAC Specification) */
        unsigned char permit_joining; /**< Permit Joining Flag */
 #if 0
        unsigned char router_capability;
@@ -200,10 +391,10 @@ struct zb_zdo_network_list_record_s {
  * @since_tizen 4.0
  */
 struct zb_zdo_neighbor_table_desc_s {
-       ieee_addr extended_pan_id; /**< Extended PAN ID */
-       ieee_addr addr64; /**< IEEE Address */
-       nwk_addr addr16; /**< Network Address */
-       unsigned char device_type; /**< Device Type see #zb_zdo_logical_type_e */
+       zb_ieee_addr extended_pan_id; /**< Extended PAN ID */
+       zb_ieee_addr addr64; /**< IEEE Address */
+       zb_nwk_addr addr16; /**< Network Address */
+       unsigned char device_type; /**< Device Type see #zb_zdp_logical_type_e */
        unsigned char rx_on_when_idle; /**< Can Receive on Idle State */
        unsigned char relationship; /**< Relationship (i.e. parent, children or sibling) */
        unsigned char permit_joining; /**< Can handle join request */
@@ -219,12 +410,12 @@ struct zb_zdo_neighbor_table_desc_s {
  * @since_tizen 4.0
  */
 struct zb_zdo_routing_table_s {
-       nwk_addr dst_addr; /**< Network Address */
+       zb_nwk_addr dst_addr; /**< Network Address */
        unsigned char status; /**< Status */
        unsigned char memory_constrained; /* Is memory constrained device */
        unsigned char many_to_one; /* Can support many-to-on endpoint routing */
        unsigned char route_record_required;  /* Route record required */
-       nwk_addr next_hop_addr; /* Next hop address */
+       zb_nwk_addr next_hop_addr; /* Next hop address */
        GList *list; /**< list to next */
 };
 
@@ -235,12 +426,12 @@ struct zb_zdo_routing_table_s {
  * @since_tizen 4.0
  */
 struct zb_zdo_binding_table_s {
-       ieee_addr src_addr64; /**< IEEE address */
+       zb_ieee_addr src_addr64; /**< IEEE address */
        unsigned char src_ep; /**< Source endpoint */
-       unsigned short cluster_id; /**< Cluster ID */
+       unsigned short clusterid; /**< Cluster ID */
        unsigned char dst_addr_mode; /**< Destination address mode */
-       nwk_addr dst_addr16; /**< Destination network address this is up-to dst_addr_mode */
-       ieee_addr dst_addr64; /**< Destination network address this is up-to dst_addr_mode */
+       zb_nwk_addr dst_addr16; /**< Destination network address this is up-to dst_addr_mode */
+       zb_ieee_addr dst_addr64; /**< Destination network address this is up-to dst_addr_mode */
        unsigned char dst_ep; /**< Destination Endpoint */
        GList *list; /**< next node */
 };
@@ -252,8 +443,8 @@ struct zb_zdo_binding_table_s {
  * @since_tizen 4.0
  */
 struct zb_zdo_discovery_cache_s {
-       ieee_addr addr64; /**< IEEE Address */
-       nwk_addr addr16; /**< Network Address */
+       zb_ieee_addr addr64; /**< IEEE Address */
+       zb_nwk_addr addr16; /**< Network Address */
        GList *list; /**< next child */
 };
 
@@ -281,15 +472,29 @@ struct attribute_wstr_s {
        wchar_t *v; /**< element value */
 };
 
+
+/**
+ * @brief value format for the cluster attribute data
+ *
+ * @since_tizen 4.0
+ */
+struct zb_value_s {
+       unsigned char type; /**< value type */
+       unsigned short size; /**< size of value */
+       unsigned char val[16 + 1]; /**< value */
+       struct attribute_str_s *str; /**< for 1 byte string */
+       struct attribute_wstr_s *wstr; /**< for 2 byte string */
+};
+
 /**
- * @brief Figure 2.8 Format of Attribute Value Field for an array, Set or Bag in Zigbee Cluster Libarry
+ * @brief Format of Attribute Value Field for an array, Set or Bag in Zigbee Cluster Libarry
  *
  * @since_tizen 4.0
  */
 struct attribute_array_s {
        unsigned char t; /**< element type */
        unsigned short n; /**< number of elements */
-       zb_value_h v; /**< element value */
+       struct zb_value_s *v; /**< element value */
 };
 
 /**
@@ -299,7 +504,7 @@ struct attribute_array_s {
  */
 struct attribute_element_value {
        unsigned char t; /**< element type */
-       zb_value_h v; /**< element value */
+       struct zb_value_s *v; /**< element value */
 };
 
 /**
@@ -313,19 +518,6 @@ struct attribute_struct_s {
 };
 
 /**
- * @brief value format for the cluster attribute data
- *
- * @since_tizen 4.0
- */
-struct zb_value_s {
-       unsigned char type; /**< value type */
-       unsigned short size; /**< size of value */
-       unsigned char val[16 + 1]; /**< value */
-       struct attribute_str_s *str; /**< for 1 byte string */
-       struct attribute_wstr_s *wstr; /**< for 2 byte string */
-};
-
-/**
  * @brief Format of the Read Attribute Status Record Field
  *
  * @since_tizen 4.0
similarity index 100%
rename from common/zb_log.h
rename to common/zb-log.h
diff --git a/common/zb-utils.c b/common/zb-utils.c
new file mode 100644 (file)
index 0000000..bffa520
--- /dev/null
@@ -0,0 +1,406 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <errno.h>
+#include <string.h>
+
+#include "zigbee.h"
+#include "zigbee_internal.h"
+#include "zigbee_private.h"
+#include "zigbee-zdo_internal.h"
+#include "zigbee-zdo_private.h"
+#include "zigbee-zcl_internal.h"
+#include "zigbee-zcl_private.h"
+
+#include "zb-log.h"
+
+char* zb_utils_strdup(const char *src)
+{
+       char *dest = NULL;
+
+       RETV_IF(NULL == src, NULL);
+
+       errno = 0;
+       dest = strdup(src);
+       if (NULL == dest) {
+               ERR("strdup() Fiil(%d)\n", errno);
+               return NULL;
+       }
+
+       return dest;
+}
+
+#define CASE_TO_STR(x) case x: return #x;
+
+const char* zb_zdo_get_status_str(int id)
+{
+       switch (id) {
+       CASE_TO_STR(ZB_ZDP_STATUS_SUCCESS)
+       CASE_TO_STR(ZB_ZDP_STATUS_INVALID_REQUEST_TYPE)
+       CASE_TO_STR(ZB_ZDP_STATUS_DEVICE_NOT_FOUND)
+       CASE_TO_STR(ZB_ZDP_STATUS_INVALID_EP)
+       CASE_TO_STR(ZB_ZDP_STATUS_NOT_ACTIVE)
+       CASE_TO_STR(ZB_ZDP_STATUS_NOT_SUPPORTED)
+       CASE_TO_STR(ZB_ZDP_STATUS_TIMEOUT)
+       CASE_TO_STR(ZB_ZDP_STATUS_NO_MATCH)
+       CASE_TO_STR(ZB_ZDP_STATUS_NO_ENTRY)
+       CASE_TO_STR(ZB_ZDP_STATUS_NO_DESCRIPTOR)
+       CASE_TO_STR(ZB_ZDP_STATUS_INSUFFICIENT_SPACE)
+       CASE_TO_STR(ZB_ZDP_STATUS_NOT_PERMITTED)
+       CASE_TO_STR(ZB_ZDP_STATUS_TABLE_FULL)
+       CASE_TO_STR(ZB_ZDP_STATUS_NOT_AUTHORIZED)
+       CASE_TO_STR(ZB_ZDP_STATUS_DEVICE_BINDING_TABLE_FULL)
+       default :
+               return "ZB_ZDP_STATUS_UNKNOWN";
+       }
+}
+
+const char* zb_end_dev_get_profile_id_str(zb_profile_id profileid)
+{
+       switch (profileid) {
+       CASE_TO_STR(ZB_PROFILE_HOME_AUTOMATION)
+       default :
+               return "ZB_UNKNOWN_PROFILE";
+       }
+}
+
+const char* zb_end_dev_get_device_id_str(zb_device_id deviceid)
+{
+       switch (deviceid) {
+       /* General devices */
+       CASE_TO_STR(ZB_HA_ON_OFF_SWITCH)
+       CASE_TO_STR(ZB_HA_LEVEL_CONTROL_SWITCH)
+       CASE_TO_STR(ZB_HA_ON_OFF_OUTPUT)
+       CASE_TO_STR(ZB_HA_LEVEL_CONTROLLABLE_OUTPUT)
+       CASE_TO_STR(ZB_HA_SCENE_SELECOTOR)
+       CASE_TO_STR(ZB_HA_CONFIGURATION_TOOL)
+       CASE_TO_STR(ZB_HA_REMOTE_CONTROL)
+       CASE_TO_STR(ZB_HA_COMBINED_INTERFACE)
+       CASE_TO_STR(ZB_HA_RANGE_EXTENDER)
+       CASE_TO_STR(ZB_HA_MAINS_POWER_OUTLET)
+       CASE_TO_STR(ZB_HA_DOOR_LOCK)
+       CASE_TO_STR(ZB_HA_DOOR_LOCK_CONTROLLER)
+       CASE_TO_STR(ZB_HA_SIMPLE_SENSOR)
+       CASE_TO_STR(ZB_HA_CONSUMPTION_AWARENESS_DEVICE)
+       CASE_TO_STR(ZB_HA_HOME_GATEWAY)
+       CASE_TO_STR(ZB_HA_SMART_PLUG)
+       CASE_TO_STR(ZB_HA_WHITE_GOODS)
+       CASE_TO_STR(ZB_HA_METER_INTERFACE)
+       /* Lighting devices */
+       CASE_TO_STR(ZB_HA_ON_OFF_LIGHT)
+       CASE_TO_STR(ZB_HA_DIMMABLE_LIGHT)
+       CASE_TO_STR(ZB_HA_COLOR_DIMMABLE_LIGHT)
+       CASE_TO_STR(ZB_HA_ON_OFF_LIGHT_SWITCH)
+       CASE_TO_STR(ZB_HA_DIMMER_SWITCH)
+       CASE_TO_STR(ZB_HA_COLOR_DIMMER_SWITCH)
+       CASE_TO_STR(ZB_HA_LIGHT_SENSOR)
+       CASE_TO_STR(ZB_HA_OCUPANCY_SENSOR)
+       /* Closures devices */
+       CASE_TO_STR(ZB_HA_SHADE)
+       CASE_TO_STR(ZB_HA_SHADE_CONTROLLER)
+       CASE_TO_STR(ZB_HA_WINDOW_COVERING_DEVICE)
+       CASE_TO_STR(ZB_HA_WINDOW_COVERING_CONTROLLER)
+       /* HVAC devices */
+       CASE_TO_STR(ZB_HA_HEATING_COOLLING_UNIT)
+       CASE_TO_STR(ZB_HA_THERMOSTAT)
+       CASE_TO_STR(ZB_HA_TEMPERATURE_SENSOR)
+       CASE_TO_STR(ZB_HA_PUMP)
+       CASE_TO_STR(ZB_HA_PUMP_CONTROLLER)
+       CASE_TO_STR(ZB_HA_PRESSURE_SENSOR)
+       CASE_TO_STR(ZB_HA_FLOW_SENSOR)
+       CASE_TO_STR(ZB_HA_MINI_SPLIT_AC)
+       /* Intruder Alarms system */
+       CASE_TO_STR(ZB_HA_IAS_CONTROL_AND_INDICATING_EQUIPMENT)
+       CASE_TO_STR(ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT)
+       CASE_TO_STR(ZB_HA_IAS_ZONE)
+       default :
+               return "ZB_HA_UNKNOWN_DEVICE";
+       }
+}
+
+const char* zb_zcl_get_status_str(int status)
+{
+       switch (status) {
+       CASE_TO_STR(ZB_ZCL_STATUS_SUCCESS)
+       CASE_TO_STR(ZB_ZCL_STATUS_FAILURE)
+       CASE_TO_STR(ZB_ZCL_STATUS_NOT_AUTHORIZED)
+       CASE_TO_STR(ZB_ZCL_STATUS_RESERVED_FIELD_NOT_ZERO)
+       CASE_TO_STR(ZB_ZCL_STATUS_MALFORMED_COMMAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNSUP_CLUSTER_COMMAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNSUP_GENERAL_COMMAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_INVALID_FIELD)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE)
+       CASE_TO_STR(ZB_ZCL_STATUS_INVALID_VALUE)
+       CASE_TO_STR(ZB_ZCL_STATUS_READ_ONLY)
+       CASE_TO_STR(ZB_ZCL_STATUS_INSUFFICIENT_SPACE)
+       CASE_TO_STR(ZB_ZCL_STATUS_DUPLICATE_EXISTS)
+       CASE_TO_STR(ZB_ZCL_STATUS_NOT_FOUND)
+       CASE_TO_STR(ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE)
+       CASE_TO_STR(ZB_ZCL_STATUS_INVALID_DATA_TYPE)
+       CASE_TO_STR(ZB_ZCL_STATUS_INVALID_SELECTOR)
+       CASE_TO_STR(ZB_ZCL_STATUS_WRITE_ONLY)
+       CASE_TO_STR(ZB_ZCL_STATUS_INCONSISTENT_STARTUP_STATE)
+       CASE_TO_STR(ZB_ZCL_STATUS_DEFINED_OUT_OF_BAND)
+       CASE_TO_STR(ZB_ZCL_STATUS_INCONSISTENT)
+       CASE_TO_STR(ZB_ZCL_STATUS_ACTION_DENIED)
+       CASE_TO_STR(ZB_ZCL_STATUS_TIMEOUT)
+       CASE_TO_STR(ZB_ZCL_STATUS_ABORT)
+       CASE_TO_STR(ZB_ZCL_STATUS_INVALID_IMAGE)
+       CASE_TO_STR(ZB_ZCL_STATUS_WAIT_FOR_DATA)
+       CASE_TO_STR(ZB_ZCL_STATUS_NO_IMAGE_AVAILABLE)
+       CASE_TO_STR(ZB_ZCL_STATUS_REQUIRE_MORE_IMAGE)
+       default:
+               return "ZB_ZCL_STATUS_UNDEFINED";
+       }
+}
+
+const char* zb_zcl_get_cluster_id_str(int clusterid)
+{
+       switch (clusterid) {
+       CASE_TO_STR(ZB_ZCL_CLUSTER_BASIC)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_POWER_CONFIG)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DEVICE_TEMP)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_IDENTIFY)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_GROUPS)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_SCENES)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ON_OFF)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ON_OFF_SWITCH_CONFIG)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_LEVEL_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ALARM)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_TIME)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_RSSI_LOCATION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_BINARY_INPUT_BASIC)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_COMMISSIONING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PARTITION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_OTA_BOOTLOAD)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_POWER_PROFILE)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_APPLIANCE_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_POLL_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_SHADE_CONFIG)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DOOR_LOCK)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_WINDOW_COVERING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PUMP_CONFIG_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_THERMOSTAT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_FAN_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DEHUMID_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_THERMOSTAT_UI_CONFIG)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_COLOR_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_BALLAST_CONFIGURATION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ILLUM_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ILLUM_LEVEL_SENSING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_TEMP_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PRESSURE_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_FLOW_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_RELATIVE_HUMIDITY_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_OCCUPANCY_SENSING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_IAS_ZONE)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_IAS_ACE)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_IAS_WD)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_GENERIC_TUNNEL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_BACNET_PROTOCOL_TUNNEL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_11073_PROTOCOL_TUNNEL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ISO7816_PROTOCOL_TUNNEL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PRICE)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DEMAND_RESPONSE_LOAD_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_SIMPLE_METERING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_MESSAGING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_TUNNELING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PREPAYMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ENERGY_MANAGEMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_TOU_CALENDAR)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DEVICE_MANAGEMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_EVENTS)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_MDU_PAIRING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_KEY_ESTABLISHMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_INFORMATION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DATA_SHARING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_GAMING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DATA_RATE_CONTROL)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_VOICE_OVER_ZIGBEE)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_CHATTING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_PAYMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_BILLING)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_APPLIANCE_IDENTIFICATION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_METER_IDENTIFICATION)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_APPLIANCE_EVENTS_AND_ALERT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_APPLIANCE_STATISTICS)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ELECTRICAL_MEASUREMENT)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_DIAGNOSTICS)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ZLL_COMMISSIONING)
+       default:
+               return "UNDEFINED_CLUSTER";
+       }
+}
+
+typedef struct _attr_type_size {
+       unsigned char type;
+       unsigned char size;
+} AttrTypeSize;
+
+static AttrTypeSize attribute_sizes[] = {
+       {ZB_ZCL_NO_DATA_ATTRIBUTE_TYPE, 0},
+       {ZB_ZCL_8_BIT_DATA, 1},
+       {ZB_ZCL_16_BIT_DATA, 2},
+       {ZB_ZCL_24_BIT_DATA, 3},
+       {ZB_ZCL_32_BIT_DATA, 4},
+       {ZB_ZCL_40_BIT_DATA, 5},
+       {ZB_ZCL_48_BIT_DATA, 6},
+       {ZB_ZCL_56_BIT_DATA, 7},
+       {ZB_ZCL_64_BIT_DATA, 8},
+       {ZB_ZCL_BOOLEAN, 1},
+       {ZB_ZCL_8_BIT_BITMAP, 1},
+       {ZB_ZCL_16_BIT_BITMAP, 2},
+       {ZB_ZCL_24_BIT_BITMAP, 3},
+       {ZB_ZCL_32_BIT_BITMAP, 4},
+       {ZB_ZCL_40_BIT_BITMAP, 5},
+       {ZB_ZCL_48_BIT_BITMAP, 6},
+       {ZB_ZCL_56_BIT_BITMAP, 7},
+       {ZB_ZCL_64_BIT_BITMAP, 8},
+       {ZB_ZCL_UNSIGNED_8_BIT_INTEGER, 1},
+       {ZB_ZCL_UNSIGNED_16_BIT_INTEGER, 2},
+       {ZB_ZCL_UNSIGNED_24_BIT_INTEGER, 3},
+       {ZB_ZCL_UNSIGNED_32_BIT_INTEGER, 4},
+       {ZB_ZCL_UNSIGNED_40_BIT_INTEGER, 5},
+       {ZB_ZCL_UNSIGNED_48_BIT_INTEGER, 6},
+       {ZB_ZCL_UNSIGNED_56_BIT_INTEGER, 7},
+       {ZB_ZCL_UNSIGNED_64_BIT_INTEGER, 8},
+       {ZB_ZCL_SIGNED_8_BIT_INTEGER, 1},
+       {ZB_ZCL_SIGNED_16_BIT_INTEGER, 2},
+       {ZB_ZCL_SIGNED_24_BIT_INTEGER, 3},
+       {ZB_ZCL_SIGNED_32_BIT_INTEGER, 4},
+       {ZB_ZCL_SIGNED_40_BIT_INTEGER, 5},
+       {ZB_ZCL_SIGNED_48_BIT_INTEGER, 6},
+       {ZB_ZCL_SIGNED_56_BIT_INTEGER, 7},
+       {ZB_ZCL_SIGNED_64_BIT_INTEGER, 8},
+       {ZB_ZCL_8_BIT_ENUMERATION, 1},
+       {ZB_ZCL_16_BIT_ENUMERATION, 2},
+       {ZB_ZCL_SEMI_PRECISION, 2},
+       {ZB_ZCL_SINGLE_PRECISION, 4},
+       {ZB_ZCL_DOUBLE_PRECISION, 8},
+       {ZB_ZCL_TIME_OF_DAY, 4},
+       {ZB_ZCL_DATE, 4},
+       {ZB_ZCL_UTC_TIME, 4},
+       {ZB_ZCL_CLUSTER_ID, 2},
+       {ZB_ZCL_ATTRIBUTE_ID, 2},
+       {ZB_ZCL_BACNET_OID, 4},
+       {ZB_ZCL_IEEE_ADDRESS, 8},
+       {ZB_ZCL_128_BIT_SECURITY_KEY, 16},
+};
+
+static unsigned char analog_discrete_thresholds[] = {
+       0x07, ZB_ZCL_DATA_TYPE_NONE,
+       0x1F, ZB_ZCL_DATA_TYPE_DISCRETE,
+       0x2F, ZB_ZCL_DATA_TYPE_ANALOG,
+       0x37, ZB_ZCL_DATA_TYPE_DISCRETE,
+       0x3F, ZB_ZCL_DATA_TYPE_ANALOG,
+       0x57, ZB_ZCL_DATA_TYPE_DISCRETE,
+       0xDF, ZB_ZCL_DATA_TYPE_NONE,
+       0xE7, ZB_ZCL_DATA_TYPE_ANALOG,
+       0xFF, ZB_ZCL_DATA_TYPE_NONE
+};
+
+int zb_zcl_get_analog_or_discret(zb_zcl_data_type_e type)
+{
+       int index = 0;
+
+       unsigned char var = analog_discrete_thresholds[index];
+
+       while (var < type && var < 0xFF) {
+               index += 2;
+               var = analog_discrete_thresholds[index];
+       }
+
+       return analog_discrete_thresholds[index+1];
+}
+
+int zb_zcl_get_data_size(zb_zcl_data_type_e type)
+{
+       int i;
+       int count;
+
+       count = (int)(sizeof(attribute_sizes) / 2);
+       for (i = 0; i < count; i++) {
+               if (attribute_sizes[i].type == type)
+                       return attribute_sizes[i].size;
+       }
+       return -1;
+}
+
+const char* zb_zcl_get_data_type_str(zb_zcl_data_type_e type)
+{
+       switch (type) {
+       CASE_TO_STR(ZB_ZCL_NO_DATA_ATTRIBUTE_TYPE)
+       CASE_TO_STR(ZB_ZCL_8_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_16_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_24_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_32_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_40_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_48_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_56_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_64_BIT_DATA)
+       CASE_TO_STR(ZB_ZCL_BOOLEAN)
+       CASE_TO_STR(ZB_ZCL_8_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_16_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_24_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_32_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_40_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_48_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_56_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_64_BIT_BITMAP)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_8_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_16_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_24_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_32_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_40_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_48_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_56_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_UNSIGNED_64_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_8_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_16_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_24_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_32_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_40_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_48_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_56_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_SIGNED_64_BIT_INTEGER)
+       CASE_TO_STR(ZB_ZCL_8_BIT_ENUMERATION)
+       CASE_TO_STR(ZB_ZCL_16_BIT_ENUMERATION)
+       CASE_TO_STR(ZB_ZCL_SEMI_PRECISION)
+       CASE_TO_STR(ZB_ZCL_SINGLE_PRECISION)
+       CASE_TO_STR(ZB_ZCL_DOUBLE_PRECISION)
+       CASE_TO_STR(ZB_ZCL_OCTET_STRING)
+       CASE_TO_STR(ZB_ZCL_CHARACTER_STRING)
+       CASE_TO_STR(ZB_ZCL_LONG_OCTET_STRING)
+       CASE_TO_STR(ZB_ZCL_LONG_CHARACTER_STRING)
+       CASE_TO_STR(ZB_ZCL_ARRAY)
+       CASE_TO_STR(ZB_ZCL_STRUCTURE)
+       CASE_TO_STR(ZB_ZCL_SET)
+       CASE_TO_STR(ZB_ZCL_BAG)
+       CASE_TO_STR(ZB_ZCL_TIME_OF_DAY)
+       CASE_TO_STR(ZB_ZCL_DATE)
+       CASE_TO_STR(ZB_ZCL_UTC_TIME)
+       CASE_TO_STR(ZB_ZCL_CLUSTER_ID)
+       CASE_TO_STR(ZB_ZCL_ATTRIBUTE_ID)
+       CASE_TO_STR(ZB_ZCL_BACNET_OID)
+       CASE_TO_STR(ZB_ZCL_IEEE_ADDRESS)
+       CASE_TO_STR(ZB_ZCL_128_BIT_SECURITY_KEY)
+       default:
+               return "UNKNOWN_DATA_TYPE";
+       }
+}
+
diff --git a/common/zb-utils.h b/common/zb-utils.h
new file mode 100644 (file)
index 0000000..66fbb66
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__
+#define __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__
+
+#include <zigbee.h>
+
+/**
+ * @brief Duplicate string.
+ * @since_tizen 4.0
+ * @remarks The returned string should be released using free().
+ * @param[in] src Messge to be duplicated
+ * @return pointer of error message id string
+ */
+char* zb_utils_strdup(const char *src);
+
+/**
+ * @brief Returns readable ZDO error code.
+ * @since_tizen 4.0
+ * @param[in] id ZDO id
+ * @return pointer of error message id string
+ */
+const char* zb_zdo_get_status_str(int id);
+
+/**
+ * @brief Returns readable Zigbee profile id.
+ * @since_tizen 4.0
+ * @param[in] profileid ZigBee profile id
+ * @return pointer of profile id string
+ */
+const char* zb_end_dev_get_profile_id_str(zb_profile_id profileid);
+
+/**
+ * @brief Returns readable Zigbee device id.
+ * @since_tizen 4.0
+ * @param[in] deviceid ZigBee device id
+ * @return pointer of device id string
+ */
+const char* zb_end_dev_get_device_id_str(zb_device_id deviceid);
+
+/**
+ * @brief Returns readable Zigbee Cluster Library error code for human.
+ * @since_tizen 4.0
+ * @param[in] id ZigBee Cluster Library Status code
+ * @return pointer of status code string
+ */
+const char* zb_zcl_get_status_str(int id);
+
+/**
+ * @brief Returns readable cluster name for human.
+ * @since_tizen 4.0
+ * @param[in] id ZigBee Cluster ID
+ * @return pointer of cluster name string
+ */
+const char* zb_zcl_get_cluster_id_str(int id);
+
+/**
+ * @brief Returns type of attribute type.
+ * @since_tizen 4.0
+ * @param[in] type attribute type
+ * @return #zb_zcl_data_category_e
+ * @retval #ZB_ZCL_DATA_TYPE_NONE Data type none
+ * @retval #ZB_ZCL_DATA_TYPE_DISCRETE Discrete data type
+ * @retval #ZB_ZCL_DATA_TYPE_ANALOG Analog data type
+ */
+int zb_zcl_get_analog_or_discret(zb_zcl_data_type_e type);
+
+/**
+ * @brief Returns size of data type.
+ * @since_tizen 4.0
+ * @param[in] type attribute type
+ * @return size of attribute data type
+ */
+int zb_zcl_get_data_size(zb_zcl_data_type_e type);
+
+/**
+ * @brief Returns data type name.
+ * @since_tizen 4.0
+ * @param[in] type Data type
+ * @return pointer of data type string
+ */
+const char* zb_zcl_get_data_type_str(zb_zcl_data_type_e type);
+
+
+#endif /* __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__ */
diff --git a/common/zb_utils.c b/common/zb_utils.c
deleted file mode 100644 (file)
index 8886d21..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <errno.h>
-#include <string.h>
-#include <zcl/zb_zcl_type.h>
-
-#include "zb_log.h"
-
-char* zb_utils_strdup(const char *src)
-{
-       char *dest = NULL;
-
-       RETV_IF(NULL == src, NULL);
-
-       errno = 0;
-       dest = strdup(src);
-       if (NULL == dest) {
-               ERR("strdup() Fiil(%d)\n", errno);
-               return NULL;
-       }
-
-       return dest;
-}
diff --git a/common/zb_utils.h b/common/zb_utils.h
deleted file mode 100644 (file)
index 0a78999..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__
-#define __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__
-
-char* zb_utils_strdup(const char *src);
-
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_INTERNAL_UTIL_H__ */
index 4408b2c..099c16c 100644 (file)
  * by calling the zb_enable function.
  * Finally, we call the zb_form_network function to form the Zigbee network. \n
  *
- * Example :
- * @code
-#include <zigbee.h>
-...
-static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_event_data_s ev)
-{
-       unsigned char status, count, ep, command_id;
-       unsigned short cluster_id;
-
-       printf("Event received = %s [0x%02X]", zb_event_str[e], e);
-
-       switch (e) {
-       case ZB_ZDP_JOIN_EVENT:
-       {
-               count = ev.data.join->count;
-               printf("  %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X joined",
-                       addr64[0], addr64[1], addr64[2], addr64[3],
-                       addr64[4], addr64[5], addr64[6], addr64[7]);
-               printf("end-point count=%d", count);
-               break;
-       }
-       ...
-}
-...
-static void zigbee_enable_cb(unsigned char status, void *user_data)
-{
-       printf("  Enable result received = 0x%02X\n", status);
-}
-...
-static void zigbee_form_network_done_cb(nwk_addr panid, void *user_data)
-{
-       nwk_addr nodeid;
-       nwk_addr panid;
-       unsigned char channel;
-       unsigned char tx_power;
-
-       ret = zb_get_network_info(handle, co_addr64, &nodeid, &panid, &channel, &tx_power);
-       printf("zb_get_network_info ret=[0x%02X]\n", (int)ret);
-       printf("  IEEE ADDR : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n",
-                               co_addr64[0], co_addr64[1], co_addr64[2],
-                               co_addr64[3], co_addr64[4], co_addr64[5],
-                               co_addr64[6], co_addr64[7]);
-       printf("  nodeID [0x%02X]\n", nodeid);
-       printf("  PanID [0x%02X]\n", panid);
-       printf("  Channel [%d] Tx Power [%d]\n", channel, tx_power);
-}
-...
-zigbee_h handle = NULL;
-...
-static void _init_zigbee_service(...)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-
-       ret = zb_create(&handle);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf("zb_create ret=[0x%x]\n", (int)handle);
-               return;
-       }
-
-       ret = zb_set_event_cb(handle, zigbee_event_cb);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf("zb_set_event_cb(0x%X) - FAILED!!!", ret);
-               return RET_FAILURE;
-       }
-
-       printf(" - zb_set_event_cb() ret: [0x%X]", ret);
-
-       ret = zb_form_network(handle, zigbee_form_network_done_cb, NULL);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf(" - zb_form_network ret=[0x%x]\n", ret);
-               return;
-       }
-       ...
-}
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_ALLOW_DEVICES_TO_JOIN_NETWORK Allow devices to Join the Network
- * Once the zigbee network is formed, it allows the end-device to join the network by
- * calling zb_permit_join function.
- *
- * Example :
- * @code
-#include <zigbee.h>
-...
-static int _permit_join(zigbee_h handle)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       unsigned char timeout = 90;
-
-       ret = zb_permit_join(handle, timeout);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf("zb_permit_join(0x%X) - FAILED!!!", ret);
-               return ret;
-       }
-
-       printf(" - zb_permit_join() ret: [0x%X]", ret);
-
-       return ret;
-}
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_DEVICES_JOINED Devices Joined
- * When end-device joins the network, ZB_ZDP_JOIN_EVENT is received in the event handler
- * registered through the set_event_cb function.
- * When the end-device is joined, the zb_get_all_device_list function can be used to obtain
- * information about the end-device or router device that is joined.
- * If necessary, you can control the device by remembering the network address and
- * end-point information of the joined device.
- *
- * Example :
- * @code
-#include <zigbee.h>
-...
-static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_event_data_s ev)
-{
-       unsigned char status, count, ep, command_id;
-       unsigned short cluster_id;
-
-       printf("Event received = %s [0x%02X]", zb_event_str[e], e);
-
-       switch (e) {
-       case ZB_ZDP_ENABLE_EVENT:
-       {
-               status = ev.data.enable->status;
-               printf("  service enabled = %d", status);
-               break;
-       }
-       case ZB_ZDP_FORM_NETWORK_DONE:
-       {
-               printf("  form network done");
-               break;
-       }
-       case ZB_ZDP_JOIN_EVENT:
-       {
-               count = ev.data.join->count;
-               printf("  %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X joined",
-                       addr64[0], addr64[1], addr64[2], addr64[3],
-                       addr64[4], addr64[5], addr64[6], addr64[7]);
-               printf("end-point count=%d", count);
-               break;
-       }
-       ...
-}
-...
-nwk_addr g_power_outlet_addr;
-unsigend char g_power_outlet_ep;
-...
-nwk_addr g_open_close_sensor_addr;
-unsigend char g_open_close_sensor_ep;
-...
-static int _get_end_device_list(zigbee_h handle)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       int i, j;
-       int count;
-       nwk_addr addr16;
-       ieee_addr addr64;
-       unsigned char num_of_ep;
-       unsigned char ep_list[10];
-       zb_end_device_info_h *list = NULL;
-
-       ret = zb_get_all_device_list(handle, &count, &list);
-       for (i = 0; i < count && list; i++) {
-               zb_get_network_address(list[i], &addr16);
-               zb_get_ieee_address((list)[i], addr64);
-
-               if (!strncmp((char *)power_outlet_addr64, (char *)addr64, sizeof(addr64))) {
-                       g_power_outlet_addr = addr16;
-                       printf(Power Outlet Find!!");
-               }
-               else if (!strncmp((char *)open_close_addr64, (char *)addr64, sizeof(addr64))) {
-                       g_open_close_sensor_addr = addr16;
-                       printf("Open/Close Sensor Find!!");
-               }
-               printf("network address = 0x%02X", addr16);
-               printf("   ieee address = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
-                       addr64[0], addr64[1], addr64[2], addr64[3],
-                       addr64[4], addr64[5], addr64[6], addr64[7]);
-
-               zb_get_num_of_ep((list)[i], &num_of_ep);
-               printf("number of end-points = 0x%04X", num_of_ep);
-
-               memset(ep_list, 0, sizeof(ep_list));
-               zb_get_ep_list((list)[i], ep_list);
-
-               for (j = 0; j < num_of_ep; j++) {
-                       if (!strncmp((char *)power_outlet_addr64, (char *)addr64, sizeof(addr64))) {
-                               g_power_outlet_ep = ep_list[j];
-                       }
-                       else if (!strncmp((char *)open_close_addr64, (char *)addr64, sizeof(addr64))) {
-                               g_open_close_sensor_ep = ep_list[j];
-                       }
-                       printf("%02x ", ep_list[j]);
-               }
-               printf("\n");
-       }
-       zb_device_list_free(list);
-
-       printf(" - zb_get_all_device_list() ret: [0x%X]", ret);
-
-       return ret;
-}
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_CONTROL_DEVICES Control the Devices
- * A joined end-device can be controlled using an API that handles cluster-specific
- * commands supported by end-device.
- *
- * Example :
- * @code
-#include <zigbee.h>
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_CONTROL_DEVICE_ATTRIBUTES Control Attributes
- *
- * Example :
- * @code
-#include <zigbee.h>
-static int _run_on(zigbee_h handle)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-
-       ret = zb_zcl_onoff_control(handle, g_power_outlet_addr, g_power_outlet_ep, ZB_ZCL_ON);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf("zb_zcl_onoff_control(0x%X) - FAILED!!!", ret);
-               return ret;
-       }
-
-       printf(" - zb_zcl_onoff_control() ret: [0x%X]", ret);
-
-       return ret;
-}
-
-static int _run_off(zigbee_h handle)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-
-       ret = zb_zcl_onoff_control(handle, g_power_outlet_addr, g_power_outlet_ep, ZB_ZCL_OFF);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               printf("zb_zcl_onoff_control(0x%X) - FAILED!!!", ret);
-               return ret;
-       }
-
-       printf(" - zb_zcl_onoff_control() ret: [0x%X]", ret);
+ */
 
-       return ret;
-}
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_RECEIVING_EVENT_FROM_DEVICES Receiving Events From the Devices
- * If an IAS zone sensor such as an open / close sensor is joined to the network,
- * the following attribute changed notification event can be received when an open / close event occurs.
- *
- * Example :
- * @code
-#include <zigbee.h>
-static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_event_data_s ev)
-{
-       unsigned char status, count, ep, command_id;
-       unsigned short cluster_id;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE Zigbee Device Object
+ *
+ * @brief Zigbee provides API for ZDO access.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_OVERVIEW Overview
+ * The ZigBee Device Object (ZDO) is simply the application running
+ * on endpoint 0 in every ZigBee device. (Remember, application endpoints are numbered
+ * 1 through 240.)
+ *
+ * This application, ZDO, keeps track of the state of the ZigBee device on and off the
+ * network, and provides an interface to the ZigBee Device Profile (ZDP), a specialized
+ * Application Profile (with profile ID 0x0000) for discovering, configuring, and
+ * maintaining ZigBee devices and services on the network.
+ *
+ * ZDO not only interacts with APS, but also interacts directly with the network layer.
+ * ZDO controls the network layer, telling it when to form or join a network,
+ * and when to leave, and provides the application interface to network
+ * layer management services. For example, ZDO can be configured to continue attempting
+ * to join a network until it is successful, or until a user-specified number-of-retries has
+ * occurred before giving up, and informing the application of the join failure.
+ *
+ * The over-the-air Application Profile supported by ZDO, called the ZigBee Device Profile
+ * (ZDP), is no different than any other, and in most stacks is handled just like any other
+ * application object on an endpoint. ZDP services are separated into client and server.
+ * Client side services (also called requests), are always optional in ZigBee, but many of the
+ * server side ZDP services (also called responses), are mandatory.
+ * Nearly every service follows the same pattern when used. A client device (the node which
+ * is doing the asking) first makes a request. The server device then sends the response back
+ * to the client device. The cluster number for the response is exactly the same as the cluster
+ * number for the request, but with the high bit set. For example, the ZDP command IEEE_
+ * addr_req(@ref zb_zdo_ieee_addr_req) is cluster 0x0001,
+ * and IEEE_addr_cb (@ref zb_zdo_addr_cb) is cluster 0x8001.
+ *
+ * It doesn't matter how many hops the nodes are from each other. The nodes A and B could
+ * be 10 hops away from each other, and the ZDP request/response mechanism will work
+ * in exactly the same way, just as it does for applications sending data on an application
+ * endpoint.
+ *
+ * For sleeping devices, the parents of the device keep track of the IEEE and short address
+ * of the child, and will respond for them. However, all other information about the sleeping
+ * device, such as the list of active endpoints, are not recorded by the parent and must be
+ * retrieved directly from the devices themselves.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_FEATURE Related Features
+ * This function is related with the following features:
+ * - http://tizen.org/feature/network.zigbee
+ *
+ * It is recommended to design applications with regard to features, for reliability.
+ *
+ * You can check if a device supports the related features for these functions by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
+ *
+ * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a>
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       printf("Event received = %s [0x%02X]", zb_event_str[e], e);
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE Device Discovery
+ *
+ * @brief Zigbee provides API for Device Discovery.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_OVERVIEW Overview
+ * The ZigBee Device Profile (ZDP) contains a set of commands for discovering various
+ * aspects about nodes in the network. The ZigBee specification calls these "device
+ * discovery services," which can be confusing because endpoints contain device IDs which
+ * really describe individual ZigBee applications running in that node. So, when you see
+ * ZDP Device Discovery, think node-wide (not application/endpoint specific) services.
+ *
+ * Device discovery services have a few things in common:
+ *
+ * - They provide additional information about a node.
+ * - They are all optional from the client side, but some server side processing is
+ * mandatory (a common subset among all ZigBee devices).
+ * - They are node-wide, and do not represent any particular application, or
+ * Application Profile residing on an endpoint in the node.
+ *
+ * The ZDP device discovery services are listed below in the section. Notice that all the
+ * ZDP services on the client side are optional. ZigBee does not require that a node be able
+ * to send NWK_addr_req , for example. But on the server side of this equation (a node
+ * receiving a NWK_addr_req and responding to it), the ZDP service is mandatory.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       switch (e) {
-       ...
-       case ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT:
-       {
-               unsigned short zone_status;
+  /**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE Simple Descriptor
+ *
+ * @brief The simple descriptor.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE_OVERVIEW Overview
+ * The simple descriptor ties everything together on an endpoint, and an endpoint defines
+ * an application. The simple descriptor contains many of the fields: an endpoint ID, a
+ * profile ID, cluster IDs and a device ID.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-               zone_status = ev.data.ias_noti->zone_status;
-               ep = ev.data.ias_noti->src_ep;
-               printf("  addr16      = 0x%04X", addr16);
-               printf("  endpoint    = 0x%02X", ep);
-               printf("  zone_status = 0x%04X", zone_status);
-               break;
-       }
-       case ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT:
-       {
-               unsigned short zone_status, zone_id, delay;
-               unsigned char extended_status;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE Zigbee Cluster Library
+ *
+ * @brief Zigbee provides API for ZCL access.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_OVERVIEW Overview
+ * The ZigBee Cluster Library (ZCL) is intended to act as a repository for cluster
+ * functionality that is developed by ZigBee and, as a consequence, it will be a
+ * working library with regular updates as new functionality is added. A developer
+ * constructing a new application profile should use the ZCL to find relevant cluster
+ * functionality that can be incorporated into the new profile so as not to "re-invent
+ * the wheel". This also allows ZigBee profiles to be developed with more of an
+ * object oriented style approach.
+ *
+ * @subsection CAPI_NETWORK_ZIGBEE_ZCL_MODULE_CLIENT_SERVER_MODEL Client/Server Model
+ * Throughout the ZCL, a client/server model is employed.
+ *
+ * A cluster is a related collection of commands and attributes, which together define
+ * an interface to specific functionality. Typically, the entity that stores the attributes
+ * of a cluster is referred to as the server of that cluster and an entity that affects or
+ * manipulates those attributes is referred to as the client of that cluster. However, if
+ * required, attributes may also be present on the client of a cluster.
+ *
+ * Commands that allow devices to manipulate attributes, e.g. in this document the
+ * read attribute (@ref zb_zcl_global_attr_read) or write attribute
+ * (@ref zb_zcl_global_attr_write) commands, are (typically)
+ * sent from a client device and received by the server device. Any response to those
+ * commands, e.g. in this document the read attribute response (@ref zb_zcl_global_attr_read_cb)
+ * or the write attribute response (@ref zb_zcl_global_attr_write_cb) commands,
+ * are sent from the server device and received by the client device.
+ *
+ * Conversely, the command that facilitates dynamic attribute reporting, i.e. the
+ * report attribute command (@ref zb_zcl_global_config_report_write) is (typically) sent from
+ * the server device (as typically this is where the attribute data itself is stored)
+ * and sent to the client device that has been bound to the server device.
+ *
+ * The clusters supported by an application object within an application profile are
+ * identified through the simple descriptor (@ref zb_zdo_simple_desc_req,
+ * @ref zb_zdo_simple_desc_cb), specified on each active
+ * endpoint of a device. In the simple descriptor, the application input cluster list
+ * shall contain the list of server clusters supported on the device and the application
+ * output cluster list shall contain the list of client clusters supported on the device.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_FEATURE Related Features
+ * This function is related with the following features:
+ * - http://tizen.org/feature/network.zigbee
+ *
+ * It is recommended to design applications with regard to features, for reliability.
+ *
+ * You can check if a device supports the related features for this function by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
+ *
+ * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a>
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-               ep = ev.data.ias_extended_noti->src_ep;
-               zone_status = ev.data.ias_extended_noti->zone_status;
-               extended_status = ev.data.ias_extended_noti->extended_status;
-               zone_id = ev.data.ias_extended_noti->zone_id;
-               delay = ev.data.ias_extended_noti->delay;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE Global Commands
+ *
+ * @brief Zigbee global commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE_OVERVIEW Overview
+ * Global command frames are used for manipulating attributes and other general
+ * tasks that are not specific to an individual cluster.
+ *
+ * The command frames defined in this section.
+ *
+ * Each command frame shall be constructed with the frame type sub-field of the frame
+ * control field set to 0b00.
+ *
+ * All clusters (server and client) shall support generation, reception and execution
+ * of the Default response command.
+ *
+ * Each cluster (server or client) that implements attributes shall support reception
+ * of, execution of, and response to all commands to discover, read, and write these
+ * attributes. However, if no attributes with structured types are supported, it is not
+ * required to support the structured read and write commands.
+ *
+ * Implementation of commands to report, configure reporting of, and read reporting
+ * configuration of attributes is only mandatory if the cluster has attributes whose
+ * reportability is mandatory.
+ *
+ * Generation of these commands is application dependent
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-               printf("  addr16          = 0x%04X", addr16);
-               printf("  endpoint        = 0x%02X", ep);
-               printf("  zone_status     = 0x%04X", zone_status);
-               printf("  extended_status = 0x%02X", extended_status);
-               printf("  zone_id         = 0x%04X", zone_id);
-               printf("  delay           = 0x%04X", delay);
+ /**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE Read Attribute Status Record
+ *
+ * @brief The read attribute status record.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE_OVERVIEW Overview
+ * The read attributes status record is generated in response to a read attributes
+ * or read attributes structured command. The command frame shall contain a read
+ * attribute status record for each attribute identifier specified in the original read
+ * attributes or read attributes structured command. For each read attribute status
+ * record, the attribute identifier field shall contain the identifier specified in the
+ * original read attributes or read attributes structured command. The status field
+ * shall contain a suitable status code.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-               // Closed or not alarmed
-               if (0x01 == (zone_status & 0x01))
-                       zb_zcl_onoff_control(handle, g_power_outlet_addr, g_power_outlet_ep, ZB_ZCL_OFF);
-               // Opened or alarmed
-               else if (0x00 == (zone_status & 0x01))
-                       zb_zcl_onoff_control(handle, g_power_outlet_addr, g_power_outlet_ep, ZB_ZCL_ON);
-               break;
-       }
-       ...
-}
- *
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_LEAVING_DEVICES_FROM_NETWORK Leaving the devices From the Network
- *
- * Example :
- * @code
-#include <zigbee.h>
-...
-static int _run_leave_device(zigbee_h handle, bool remove_children, bool rejoin)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       bool remove_children = true;
-       bool rejoin = false;
-       unsigned char var = 0;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE Write Attribute Status Record
+ *
+ * @brief The write attribute status record.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE Overview
+ * The write attributes response status record is generated in response to a write
+ * attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       ret = zb_leave_device(handle, dest_addr64, remove_children, rejoin);
-       if (ret != ZIGBEE_ERROR_NONE) {
-               printf("zb_leave_device(0x%X) - FAILED!!!", ret);
-               return ret;
-       }
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE Write Attribute Record
+ *
+ * @brief The write attribute record.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE_OVERVIEW Overview
+ * The write attributes record is generated when a device wishes to change the
+ * values of one or more attributes located on another device. Each write attribute
+ * record shall contain the identifier and the actual value of the attribute to be
+ * written.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       printf(" - zb_leave_device() ret: [0x%X]", ret);
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE Reporting Configuration Record
+ *
+ * @brief The reporting configuration record.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE Overview
+ * The Configure Reporting record is used to configure the reporting mechanism
+ * for one or more of the attributes of a cluster.
+ * The individual cluster definitions specify which attributes shall be available to this
+ * reporting mechanism, however specific implementations of a cluster may make
+ * additional attributes available.
+ *
+ * Note that attributes with data types of array, structure, set or bag cannot be
+ * reported.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       return ret;
-}
- *
- * @endcode
- *
- * @subsection CAPI_NETWORK_ZIGBEE_MODULE_LEAVING_DEVICES_DISABLE_NETWORK Disable Network
- * When all is done, disable the network and destroy the handle that was used.
- *
- * Example :
- * @code
-#include <zigbee.h>
-...
-static int _run_disable(zigbee_h handle)
-{
-       // De-register event callback
-       int ret = ZIGBEE_ERROR_NONE;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE Reporting Configuration Response Record
+ *
+ * @brief The reporting configuration response record.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE Overview
+ * The Reporting Configuration Response Record is generated in response to a
+ * #zb_zcl_global_config_report_write().
+ *
+ * Note that attributes with data types of array, structure, set or bag cannot be
+ * reported.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       printf(" - zb_disable() ret: [0x%X]", ret);
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE Read Reporting Configuration Record
+ *
+ * @brief The read reporting configuration record.
+ *
+ * Note that attributes with data types of array, structure, set or bag cannot be
+ * reported.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE_MODULE Overview
+ * The Read Reporting Configuration Record is used to read the configuration
+ * details of the reporting mechanism for one or more of the attributes of a cluster
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       if (NULL == handle) {
-               printf("Already destroyed or not created.");
-               return ret;
-       }
 
-       zb_destroy(handle);
-       handle = NULL;
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE IAS zone Cluster
+ *
+ * @brief Zigbee IAS zone cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE_OVERVIEW Overview
+ * The IAS Zone cluster defines an interface to the functionality of an IAS security
+ * zone device. IAS Zone supports up to two alarm types per zone, low battery
+ * reports and supervision of the IAS network.
+ *
+ * @since_tizen 4.0
+ *
+ */
 
-       return ret;
-}
- * @endcode
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE On/Off Cluster
+ *
+ * @brief Zigbee on/off cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE_OVERVIEW Overview
+ * Attributes and commands for switching devices between 'On' and 'Off' states.
+ *
+ * @since_tizen 4.0
+ *
  */
 
+
 #endif __TIZEN_NETWORK_ZIGBEE_DOC_H__
 
diff --git a/include/zb_error.h b/include/zb_error.h
deleted file mode 100755 (executable)
index 5d24758..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ERROR_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ERROR_H__
-
-#include <tizen_error.h>
-
-#ifndef TIZEN_ERROR_ZIGBEE
-#define TIZEN_ERROR_ZIGBEE -0x02F70000
-#endif
-
-/**
- * @file zb_error.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Enumeration for zigbee CAPI error code.
- * @since_tizen 4.0
- *
- * @{
- */
-typedef enum {
-       ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE,                            /**< Successful */
-       ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,  /**< Invalid parameter */
-       ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Out of range */
-       ZIGBEE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,          /**< Out of memory */
-       ZIGBEE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,                    /**< DBus error */
-       ZIGBEE_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA,                      /**< No data available */
-       ZIGBEE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,          /**< Not supported */
-       ZIGBEE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,  /**< Permission denied */
-       ZIGBEE_ERROR_INVALID_ENDPOINT = TIZEN_ERROR_ZIGBEE | 0x01,       /**< Endpoint 0 is reserved for ZDP */
-       ZIGBEE_ERROR_INVALID_ADDRESS = TIZEN_ERROR_ZIGBEE | 0x02,        /**< Wrong address */
-       ZIGBEE_ERROR_OPERATION_FAILED = TIZEN_ERROR_ZIGBEE | 0x03,       /**< Operation failed */
-} zb_error_e;
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ERROR_H__ */
diff --git a/include/zb_ha.h b/include/zb_ha.h
deleted file mode 100755 (executable)
index ac4578e..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_HA_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_HA_H__
-
-/**
- * @brief Zigbee profile id.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_PROFILE_HOME_AUTOMATION = 0x0104, /**< Zigbee Home Automation profile */
-} zb_profile_id_e;
-
-/**
- * @brief Devices specified the HA profile.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       /* General devices */
-       ZB_HA_ON_OFF_SWITCH = 0x0000, /**< On/off switch device */
-       ZB_HA_LEVEL_CONTROL_SWITCH = 0x0001, /**< Level control device */
-       ZB_HA_ON_OFF_OUTPUT = 0x0002, /**< On/off output device */
-       ZB_HA_LEVEL_CONTROLLABLE_OUTPUT = 0x0003, /**< Controllable output device */
-       ZB_HA_SCENE_SELECOTOR = 0x0004, /**< Scene selector device */
-       ZB_HA_CONFIGURATION_TOOL = 0x0005, /**< Configuration tool device */
-       ZB_HA_REMOTE_CONTROL = 0x0006, /**< Remote control device */
-       ZB_HA_COMBINED_INTERFACE = 0x0007, /**< Combined interface device */
-       ZB_HA_RANGE_EXTENDER = 0x0008, /**< Range extender device */
-       ZB_HA_MAINS_POWER_OUTLET = 0x0009, /**< Main power outlet device */
-       ZB_HA_DOOR_LOCK = 0x000A, /**< Door lock device */
-       ZB_HA_DOOR_LOCK_CONTROLLER = 0x000B, /**< Door lock controller device */
-       ZB_HA_SIMPLE_SENSOR = 0x000C, /**< Simple sensor device */
-       ZB_HA_CONSUMPTION_AWARENESS_DEVICE = 0x000D, /**< Consumption awareness device */
-       ZB_HA_HOME_GATEWAY = 0x0050, /**< Home gateway device */
-       ZB_HA_SMART_PLUG = 0x0051, /**< Smart plug device */
-       ZB_HA_WHITE_GOODS = 0x0052, /**< White goods device */
-       ZB_HA_METER_INTERFACE = 0x0053, /**< Meter interface device */
-       /* Lighting devices */
-       ZB_HA_ON_OFF_LIGHT = 0x0100, /**< On/off light device */
-       ZB_HA_DIMMABLE_LIGHT = 0x0101, /**< Dimmable light device */
-       ZB_HA_COLOR_DIMMABLE_LIGHT = 0x0102, /**< Color dimmable light device */
-       ZB_HA_ON_OFF_LIGHT_SWITCH = 0x0103, /**< On/off light device */
-       ZB_HA_DIMMER_SWITCH = 0x0104, /**< Dimmer switch device */
-       ZB_HA_COLOR_DIMMER_SWITCH = 0x0105, /**< Color dimmer switch device */
-       ZB_HA_LIGHT_SENSOR = 0x0106, /**< Light sensor device */
-       ZB_HA_OCUPANCY_SENSOR = 0x0107, /**< Ocupancy sensor device */
-       /* Closures devices */
-       ZB_HA_SHADE = 0x0200, /**< Shade device */
-       ZB_HA_SHADE_CONTROLLER = 0x0201, /**< Shade controller device */
-       ZB_HA_WINDOW_COVERING_DEVICE = 0x0202, /**< Window covering device */
-       ZB_HA_WINDOW_COVERING_CONTROLLER = 0x0203, /**< Window covering controller device */
-       /* HVAC devices */
-       ZB_HA_HEATING_COOLLING_UNIT = 0x0300, /**< Heating coolling device */
-       ZB_HA_THERMOSTAT = 0x0301, /**< Thermostat device */
-       ZB_HA_TEMPERATURE_SENSOR = 0x0302, /**< Temperature sensor device */
-       ZB_HA_PUMP = 0x0303, /**< Pump device */
-       ZB_HA_PUMP_CONTROLLER = 0x0304, /**< Pump controller device */
-       ZB_HA_PRESSURE_SENSOR = 0x0305, /**< Pressure sensor device */
-       ZB_HA_FLOW_SENSOR = 0x0306, /**< Flow sensor device */
-       ZB_HA_MINI_SPLIT_AC = 0x0307, /**< Mini split device */
-       /* Intruder Alarms system */
-       ZB_HA_IAS_CONTROL_AND_INDICATING_EQUIPMENT = 0x0400, /**< IAS control and indicating equipment device */
-       ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT = 0x0401, /**< IAS ancillary control device */
-       ZB_HA_IAS_ZONE = 0x0402, /**< IAS zone device */
-       ZB_HA_IAS_WARNIGN_DEVICE = 0x0403, /**< IAS warning device */
-} ha_device_id_e;
-
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_HA_H__ */
diff --git a/include/zb_type.h b/include/zb_type.h
deleted file mode 100755 (executable)
index 3cae9c9..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZB_TYPE_H__
-#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZB_TYPE_H__
-
-#include <tizen_type.h>
-
-/**
- * @file zb_type.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The data type abbreviation : IEEE Address.
- *
- * @since_tizen 4.0
- */
-typedef unsigned char ieee_addr[8];
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The data type abbreviation : Network Address.
- *
- * @since_tizen 4.0
- */
-typedef unsigned short nwk_addr;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The data type abbreviation : 128 bit security key.
- *
- * @since_tizen 4.0
- */
-typedef unsigned char aes128_key[16];
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The handle of zigbee.
- * @details A #zigbee_h is an opaque data structure.\n
- * #zigbee_h is a data type of zigbee's response which consists of result, handler and etc.
- *
- * @since_tizen 4.0
- */
-typedef void* zigbee_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The events for zb_event_cb.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_ENABLE_EVENT = 0x00, /**< This event is received after enabling zigbee system service */
-       ZB_ZDP_FORM_NETWORK_DONE = 0x01, /**< This event comes from coming network operation completed */
-       ZB_ZDP_JOIN_EVENT = 0x02, /**< This event takes place when new device joined */
-       ZB_ZDP_REJOIN_EVENT = 0x03, /**< This event takes place when existing device or devices which are received 'leave_network' command is re-joined */
-       ZB_ZDP_CHILD_LEFT = 0x04, /**< This event takes place when a child device leave current network explicitly */
-       ZB_ZDP_LEAVE_DONE_EVENT = 0x05, /**< This event will take place after dismiss current network */
-       ZB_ZDP_UPDATED_NETWORK_NOTIFICATION_EVENT = 0x06, /**< A device updated its network information */
-       ZB_ZDP_BIND_RSP_EVENT = 0x07, /**< Binding end-points result */
-       ZB_ZDP_UNBIND_RSP_EVENT = 0x08, /**< Unbinding end-points result */
-       ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT = 0x10, /**< This event is used when global default response */
-       ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT = 0x11, /**< This event is took place when report attribute command received */
-       ZB_ZCL_ALARM_EVENT = 0x20, /**< Events related to alarm cluster */
-       ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT = 0x21, /**< A Device which supports IAS zone cluster want to register its ability */
-       ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT = 0x22, /**< A Device which supports IAS zone cluster notifies its status change */
-       ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT = 0x23, /**< A Device which supports IAS zone cluster notifies its status change */
-       ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_ATTRIBUTE_REPORT_EVENT = 0x30, /**< This event will be received after level control cluster attribute changed */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_REPORT_EVENT = 0x31, /**< This event will be received after color control cluster X attribute changed */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_REPORT_EVENT = 0x32, /**< This event will be received after color control cluster Y attribute changed */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_REPORT_EVENT = 0x33, /**< This event will be received after color control cluster hue attribute changed */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_REPORT_EVENT = 0x34, /**< This event will be received after color control cluster saturation attribute changed */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_TEMPERATURE_ATTRIBUTE_REPORT_EVENT = 0x35, /**< This event will be received after color control cluster temperature attribute changed */
-       ZB_ZCL_DOOR_LOCK_OPERATIONAL_NOTIFICATION_EVENT = 0x40, /**< This event is received when door-lock operation has been finished */
-       ZB_ZCL_DOOR_LOCK_PROGRAMING_NOTIFICATION_EVENT = 0x41, /**< This event is received when door-lock programming has been changed */
-       ZB_ZCL_SIMPLE_METERING_REMOVE_MIRROR_EVENT = 0x51, /**< This event is used to request the ESP to remove its mirror of Metering */
-       ZB_ZCL_SIMPLE_METERING_REQUEST_MIRROR_EVENT = 0x52, /**< This event is used to request the ESP to mirror Metering Device data */
-} zb_event_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZDP_ENABLE_EVENT callback data.
- * @details The result of enabling zigbee system service.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char status; /**< Status of enabling zigbee system service */
-} zb_event_enable_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZDP_FORM_NETWORK_DONE callback data.
- * @details This event comes from coming network operation completed.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       nwk_addr pan_id; /**< Pan ID */
-} zb_event_form_network_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZDP_JOIN_EVENT callback data.
- * @details This event takes place when new device joined.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char count; /**< Number of endpoint list */
-       unsigned char ep[10]; /**< Endpoint list */
-} zb_event_join_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZDP_CHILD_LEFT callback data.
- * @details This event takes place when a child device leave current network explicitly.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char status; /**< Left status of child device */
-} zb_event_child_left_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT callback data.
- * @details This event is used when global default response.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char ep; /**< End-point */
-       unsigned short cluster_id; /**< Cluster id */
-       unsigned char command_id; /**< Command id */
-       unsigned char status; /**< Status */
-} zb_event_global_default_rsp_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT callback data.
- * @details This event is took place when report attribute command received.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       void* records; /**< Array of attribute report record */
-       unsigned char count; /**< count of records */
-} zb_event_global_attr_report_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_ALARM_EVENT callback data.
- * @details This event is related to alarm cluster.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned short count; /**< Alarm count */
-} zb_event_alarm_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT callback data.
- * @details A Device which supports IAS zone cluster want to register its ability.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char src_ep; /**< Source endpoint */
-       unsigned short zone_type; /**< Zone type 0x0000 : Standard CIE / Alarm1 - System Alarm, Alarm2 - N/A\n
-                                                               *  0x000d : Motion Sensor / Alarm1 - Intrusion indication, Alarm2 - Presence indication\n
-                                                               *  0x0015 : Contact switch / Alarm1 - 1st portal Open-Close, Alarm2 - 2nd portal Open-Close\n
-                                                               *  0x0028 : Fire sensor / Alarm1 - Fire indication, Alarm2 - N/A\n
-                                                               *  0x002a : Water sensor / Alarm1 - Water overflow indication, Alarm2 - N/A\n
-                                                               *  0x002b : Gas Sensor / Alarm1 - CO indication, Alarm2 - Cooking indication\n
-                                                               *  0x002c : Personal emergency Sensor / Alarm1 - Fall / Concussion, Alarm2 - Emergency button\n
-                                                               *  0x002d : Vibration or Movement Sensor / Alarm1 - Movement indication, Alarm2 - Vibration\n
-                                                               *  0x010f : Remote control / Alarm1 - Panic, Alarm2 - Emergency\n
-                                                               *  0x0115 : Key fob / Alarm1 - Panic, Alarm2 - Emergency\n
-                                                               *  0x021d : Keypad / Alarm1 - Panic, Alarm2 - Emergency\n
-                                                               *  0x0225 : Standard Warning Device (see. EN 50131 European Standards Series for Intruder Alarm Systems)
-                                                               *           / Alarm1 - N/A, Alarm2 -N/A\n
-                                                               *  0x8000~0xfffe : Reserved for manufacturer specific types / Alarm1 - N/A, Alarm2 - N/A\n
-                                                               *  0xffff : Invalid Zone Type / Alarm1 - N/A, Alarm2 - N/A\n */
-       unsigned char mfg_code; /**< Manufacturer Code */
-} zb_event_ias_enroll_request_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT callback data.
- * @details A Device which supports IAS zone cluster notifies its status change.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char src_ep; /**< Source endpoint */
-       unsigned short zone_status; /**<  zone_status Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
-                                                               *   Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
-                                                               *   Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
-                                                               *   Bit 3 : Battery : 1 - Low batter / 0 - Battery OK\n
-                                                               *   Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
-                                                               *   Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
-                                                               *   Notification commands. The CIE device may use these periodic reports as an\n
-                                                               *   indication that a zone is operational. Zones that do not implement the periodic\n
-                                                               *   reporting are required to set this bit to zero (the CIE will know not to interpret the\n
-                                                               *   lack of reports as a problem).\n
-                                                               *   Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
-                                                               *   Note 2: This bit indicates whether or not a Zone Status Change Notification\n
-                                                               *   command will be sent to indicate that an alarm is no longer present. Some Zones\n
-                                                               *   do not have the ability to detect that alarm condition is no longer present, they\n
-                                                               *   only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
-                                                               *   zero, indicating to the CIE not to look for alarm-restore notifications.\n
-                                                               *   Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
-                                                               *   Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n */
-} zb_event_ias_noti_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for the #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT callback data.
- * @details A Device which supports IAS zone cluster notifies its status change.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       unsigned char src_ep; /**< Source endpoint */
-       unsigned char extended_status; /**< Extended status */
-       unsigned short zone_status; /**< Zone status */
-       unsigned short delay; /**< Delay */
-       unsigned char zone_id; /**< Zone ID */
-} zb_event_ias_extended_noti_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief The structure type for response data of zb_event_cb.
- * @details This function can receive events from the devices in the network.
- * ex) join, re-join, leave and attribute change report
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       union {
-               zb_event_enable_s *enable; /**< The result of enabling zigbee system service. */
-               zb_event_form_network_s *form_network; /**< This event comes from coming network operation completed. */
-               zb_event_join_s *join; /**< This event takes place when new device joined. */
-               zb_event_child_left_s *child_left; /**< This event takes place when a child device leave current network explicitly. */
-               zb_event_global_default_rsp_s *global_default_rsp; /**< This event is used when global default response. */
-               zb_event_global_attr_report_s *global_attr_report; /**< This event is took place when report attribute command received. */
-               zb_event_alarm_s *alarm; /**< This event is related to alarm cluster. */
-               zb_event_ias_enroll_request_s *ias_enroll_request; /**< A Device which supports IAS zone cluster want to register its ability. */
-               zb_event_ias_noti_s *ias_noti; /**< A Device which supports IAS zone cluster notifies its status change. */
-               zb_event_ias_extended_noti_s *ias_extended_noti; /**< A Device which supports IAS zone cluster notifies its status change. */
-       } data;
-} zb_event_data_s;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Request or Response at ZCL Header.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_CLIENT_TO_SERVER = (0 << 3), /**< Request */
-       ZB_ZCL_SERVER_TO_CLIENT = (1 << 3), /**< Response */
-} zb_zcl_fc_direction_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Disable default response or not at ZCL Header.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_LEAVE_WELL_ALONE = (0 << 4), /**< Enable default response */
-       ZB_ZCL_DISABLE_DEFAULT_RESPONSE = (1 << 4), /**< Disable default response */
-} zb_zcl_fc_disable_default_response_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Default ZCL frame control at APS Header.
- *
- * @since_tizen 4.0
- */
-#define ZB_ZCL_FC_DEFAULT 0x00 /**< Generally used / Not manufacture / Request / with Default Response */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Broadcast address to all router device.
- *
- * @since_tizen 4.0
- */
-#define ZB_BROADCAST_ADDRESS 0xFFFC /**< Broadcast to all routers. */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Broadcast address to devices which support 'rx_on_idle' feature.
- *
- * @since_tizen 4.0
- */
-#define ZB_RX_ON_WHEN_IDLE_BROADCAST_ADDRESS 0xFFFD /**< Broadcast to all non-sleepy devices. */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Broadcast address to all devices.
- *
- * @since_tizen 4.0
- */
-#define ZB_SLEEPY_BROADCAST_ADDRESS 0xFFFF /**< Broadcast to all devices, including sleepy end devices. */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Uses this value as the return value to stop foreach function.
- *
- * @since_tizen 4.0
- */
-#define ZIGBEE_FUNC_STOP false
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @brief Uses this value as the return value to continue foreach function.
- *
- * @since_tizen 4.0
- */
-#define ZIGBEE_FUNC_CONTINUE true
-
-
-#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZB_TYPE_H__ */
diff --git a/include/zb_zcl.h b/include/zb_zcl.h
deleted file mode 100755 (executable)
index 863887d..0000000
+++ /dev/null
@@ -1,2845 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_H__
-
-/**
- * @file zb_zcl.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE Zigbee Cluster Library
- *
- * @brief Zigbee provides API for ZCL access.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_OVERVIEW Overview
- * The ZigBee Cluster Library (ZCL) is intended to act as a repository for cluster
- * functionality that is developed by ZigBee and, as a consequence, it will be a
- * working library with regular updates as new functionality is added. A developer
- * constructing a new application profile should use the ZCL to find relevant cluster
- * functionality that can be incorporated into the new profile so as not to "re-invent
- * the wheel". This also allows ZigBee profiles to be developed with more of an
- * object oriented style approach.
- *
- * @subsection CAPI_NETWORK_ZIGBEE_ZCL_MODULE_CLIENT_SERVER_MODEL Client/Server Model
- * Throughout the ZCL, a client/server model is employed.\n\n
- *
- * A cluster is a related collection of commands and attributes, which together define
- * an interface to specific functionality. Typically, the entity that stores the attributes
- * of a cluster is referred to as the server of that cluster and an entity that affects or
- * manipulates those attributes is referred to as the client of that cluster. However, if
- * required, attributes may also be present on the client of a cluster.\n\n
- *
- * Commands that allow devices to manipulate attributes, e.g. in this document the
- * read attribute (@ref zb_zcl_global_read_attr) or write attribute
- * (@ref zb_zcl_global_write_attr) commands, are (typically)
- * sent from a client device and received by the server device. Any response to those
- * commands, e.g. in this document the read attribute response (@ref zb_zcl_global_rsp)
- * or the write attribute response (@ref zb_zcl_global_rsp) commands,
- * are sent from the server device and received by the client device.\n\n
- *
- * Conversely, the command that facilitates dynamic attribute reporting, i.e. the
- * report attribute command (@ref zb_zcl_global_config_report) is (typically) sent from
- * the server device (as typically this is where the attribute data itself is stored)
- * and sent to the client device that has been bound to the server device.\n\n
- *
- * The clusters supported by an application object within an application profile are
- * identified through the simple descriptor (@ref zb_zdo_simple_desc_req,
- * @ref zb_zdo_simple_desc_rsp), specified on each active
- * endpoint of a device. In the simple descriptor, the application input cluster list
- * shall contain the list of server clusters supported on the device and the application
- * output cluster list shall contain the list of client clusters supported on the device.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_MODULE_FEATURE Related Features
- * This function is related with the following features:\n
- * - http://tizen.org/feature/network.zigbee\n
- *
- * It is recommended to design applications with regard to features, for reliability.\n
- *
- * You can check if a device supports the related features for this function by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a>
- *
- * @since_tizen 4.0
- *
- * @{
- */
-#include <zcl/zb_zcl_type.h>
-#include <zcl/zb_zcl_commands.h>
-#include <zcl/zb_zcl_cluster_ids.h>
-#include <zcl/zb_zcl_attribute_ids.h>
-#include <zcl/zb_zcl_attribute_type.h>
-#include <zcl/zb_zcl_global_commands.h>
-#include <zcl/zb_zcl_alarm_cluster.h>
-#include <zcl/zb_zcl_color_control_cluster.h>
-#include <zcl/zb_zcl_basic_cluster.h>
-#include <zcl/zb_zcl_groups_cluster.h>
-#include <zcl/zb_zcl_identify_cluster.h>
-#include <zcl/zb_zcl_level_control_cluster.h>
-#include <zcl/zb_zcl_on_off_cluster.h>
-#include <zcl/zb_zcl_poll_control_cluster.h>
-#include <zcl/zb_zcl_scenes_cluster.h>
-#include <zcl/zb_zcl_thermostat_cluster.h>
-#include <zcl/zb_zcl_ias_zone_cluster.h>
-
-/**
- * @brief Returns readable Zigbee Cluster Library status code for human.
- * @details Returns Zigbee Cluster Library status code
- *
- * @since_tizen 4.0
- *
- * @param[in] id ZigBee Cluster Library Status code
- *
- * @return pointer of status code string
- *
- */
-const char* zb_get_zcl_error_message(int id);
-
-/**
- * @brief Returns readable cluster name for human.
- * @details Returns Zigbee Cluster name and ID
- *
- * @since_tizen 4.0
- *
- * @param[in] id ZigBee Cluster ID
- *
- * @return pointer of cluster name string
- *
- */
-const char* zb_get_cluster_name(int id);
-
-/**
- * @brief Returns measuring unit of attribute type.
- * @details This helps to know measuring unit of attribute type
- *
- * @since_tizen 4.0
- *
- * @param[in] type attribute type
- *
- * @return #zb_zcl_data_category_e
- * @retval #DATA_TYPE_NONE Data type none
- * @retval #DATA_TYPE_DISCRETE Discrete data type
- * @retval #DATA_TYPE_ANALOG Analog data type
- *
- */
-int zb_get_analog_or_discret(unsigned char type);
-
-/**
- * @brief Returns attribute size.
- * @details Returns size of attribute data
- *
- * @since_tizen 4.0
- *
- * @param[in] type attribute type
- *
- * @return size of attribute data type
- *
- */
-int zb_get_data_size(zb_zcl_data_type_e type);
-
-/**
- * @brief Creates simple value data.
- * @details The simple value data shall contain the data type of the attribute value
- * according to the data type in #zb_zcl_data_type_e.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle handle of simple data value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_destroy_value()
- */
-int zb_create_value(
-               zb_value_h *handle);
-
-/**
- * @brief Destroys simple value data.
- * @details Remove allocated memory for simple value data
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple data value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_value()
- */
-int zb_destroy_value(
-               zb_value_h handle);
-
-/**
- * @brief Sets value from zb_value_h.
- * @details Sets data from zb_value_h, expected value type as follows : \n
- * val : 16 byte buffer \n
- * ieee_addr addr64 : 64-bit IEEE address \n
- * aes128_key key16 : 128-bit key \n
- * str :  for 1 byte string \n
- *  -> 1st byte is string length, the other are string data.) \n
- * wstr : for 2 byte string \n
- *  -> 1st 2 byte are string length, the other are string data.) \n
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of value structure
- * @param[in] type data type : \n
- * @param[in] value read buffer
- * @param[in] count number of read buffer
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_set_value(zb_value_h handle, unsigned char type, unsigned char *value, int count);
-
-/**
- * @brief Gets value from zb_value_h.
- * @details Gets data from zb_value_h, expected value type as follows : \n
- * val : 16 byte buffer \n
- * struct attribute_str_s *str :  for 1 byte string \n
- *  -> 1st byte is string length, the other are string data.) \n
- * struct attribute_wstr_s *wstr : for 2 byte string \n
- *  -> 1st 2 byte are string length, the other are string data.) \n
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of value structure
- * @param[out] type data type
- * @param[out] value read buffer
- * @param[out] count number of read buffer
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_get_value(zb_value_h handle, unsigned char *type, unsigned char **value, int *count);
-
-/**
- * @brief Creates read attribute status record.
- * @details This allocates heap for read attribute status record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle handle of read attribute status record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_destroy_read_attr_status_record()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- */
-int zb_create_read_attr_status_record(read_attr_status_record_h *handle);
-
-/**
- * @brief Destroys read attribute status record.
- * @details This destroys read attribute status record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- */
-int zb_destroy_read_attr_status_record(read_attr_status_record_h handle);
-
-/**
- * @brief Gets identifier from read attribute status record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that has been read (or of which an element has been read).
- * \n\n This field shall contain the same value that was included in the corresponding a
- * ttribute identifier field of the original read attributes or read attributes structured
- * command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_get_id_from_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned short* id);
-
-/**
- * @brief Sets identifier to read attribute status record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that has been read (or of which an element has been read).
- * \n\n This field shall contain the same value that was included in the corresponding a
- * ttribute identifier field of the original read attributes or read attributes structured
- * command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_set_id_to_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Gets identifier from read attribute status record.
- * @details The status field is 8 bits in length and specifies the status of the read
- * operation on this attribute. \n\n This field shall be set to SUCCESS, if the operation
- * was successful, or an error code, as specified in zb_zcl_status_e if the operation was
- * not successful.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] status error code @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_get_status_from_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char* status);
-
-/**
- * @brief Sets identifier to read attribute status record.
- * @details The status field is 8 bits in length and specifies the status of the read
- * operation on this attribute. \n\n This field shall be set to SUCCESS, if the operation
- * was successful, or an error code, as specified in zb_zcl_status_e if the operation was
- * not successful.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] status error code @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_set_status_to_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char status);
-
-
-/**
- * @brief Gets identifier from read attribute status record.
- * @details The attribute data type field shall contain the data type of the attribute
- * in the same read attributes status record (see #zb_zcl_data_type_e). \n\n This field shall only
- * be included in zb_zcl_data_type_e if the associated status field contains a value of
- * SUCCESS.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] type data type in @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_get_type_from_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char *type);
-
-/**
- * @brief Sets identifier to read attribute status record.
- * @details The attribute data type field shall contain the data type of the attribute
- * in the same read attributes status record (see #zb_zcl_data_type_e).
- * \n\n This field shall only be included in zb_zcl_data_type_e if the associated status
- * field contains a value of SUCCESS.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] type data type in @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_set_type_to_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char type);
-
-/**
- * @brief Gets data value from read attribute status record.
- * @details The attribute value field is variable in length and shall contain the current
- * value of this attribute. \n\n This field shall only be included if the associated
- * status field contains a value of SUCCESS. \n\n
- * For an attribute or element of simple type, this
- * field has the format shown in the Table of Data Types (see #zb_zcl_data_type_e).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] type data type in #zb_zcl_data_type_e
- * @param[out] value data value pointer
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_set_value_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- */
-int zb_get_value_from_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char type,
-               zb_value_h value);
-
-/**
- * @brief Sets data value to read attribute status record.
- * @details The attribute value field is variable in length and shall contain the current
- * value of this attribute. \n\n This field shall only be included if the associated
- * status field contains a value of SUCCESS. \n\n
- * For an attribute or element of simple type, this
- * field has the format shown in the Table of Data Types (see #zb_zcl_data_type_e).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] type data type in #zb_zcl_data_type_e
- * @param[in] value data value pointer
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_attr_status_record()
- * @see zb_destroy_read_attr_status_record()
- * @see zb_set_id_to_read_attr_status_record()
- * @see zb_set_status_to_read_attr_status_record()
- * @see zb_set_type_to_read_attr_status_record()
- * @see zb_zcl_global_read_attr_rsp()
- * @see zb_get_id_from_read_attr_status_record()
- * @see zb_get_status_from_read_attr_status_record()
- * @see zb_get_type_from_read_attr_status_record()
- * @see zb_get_value_from_read_attr_status_record()
- */
-int zb_set_value_to_read_attr_status_record(
-               read_attr_status_record_h handle,
-               unsigned char type,
-               zb_value_h value);
-
-/**
- * @brief Creates discover attribute information record.
- * @details This allocates heap for discover attribute information record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of discover attribute information record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_destroy_discover_attr_info()
- * @see zb_get_id_from_discover_attr_info()
- * @see zb_get_type_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_create_discover_attr_info(discover_attr_info_record_h *handle);
-
-/**
- * @brief Destroys discover attribute information record.
- * @details This destroys discover attribute information record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of discover attribute information record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_discover_attr_info()
- * @see zb_get_id_from_discover_attr_info()
- * @see zb_get_type_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_destroy_discover_attr_info(discover_attr_info_record_h handle);
-
-/**
- * @brief Gets identifier from discover attribute info.
- * @details The attribute identifier field shall contain the identifier of a discovered
- * attribute. \n\n Attributes shall be included in ascending order, starting with the
- * lowest attribute identifier that is greater than or equal to the start attribute
- * identifier field of the received discover attributes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_discover_attr_info()
- * @see zb_destroy_discover_attr_info()
- * @see zb_get_type_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_get_id_from_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets identifier to discover attribute info.
- * @details The attribute identifier field shall contain the identifier of a discovered
- * attribute. \n\n Attributes shall be included in ascending order, starting with the
- * lowest attribute identifier that is greater than or equal to the start attribute
- * identifier field of the received discover attributes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_discover_attr_info()
- * @see zb_destroy_discover_attr_info()
- * @see zb_get_type_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_set_id_to_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Gets data type from discover attribute info.
- * @details The attribute data type field shall contain the data type of the attribute in
- * the same attribute report field (see #zb_zcl_data_type_e)
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_discover_attr_info()
- * @see zb_destroy_discover_attr_info()
- * @see zb_get_id_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_get_type_from_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned char *type);
-
-/**
- * @brief Sets data type to discover attribute info.
- * @details The attribute data type field shall contain the data type of the attribute in
- * the same attribute report field (see #zb_zcl_data_type_e)
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_discover_attr_info()
- * @see zb_destroy_discover_attr_info()
- * @see zb_get_id_from_discover_attr_info()
- * @see zb_zcl_global_discover_attr_rsp()
- */
-int zb_set_type_to_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned char type);
-
-/**
- * @brief Creates write attribute record.
- * @details Allocate memory for write attribute record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle handle of write attribute record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_destroy_write_attr_record()
- * @see zb_set_id_to_write_attr_record()
- * @see zb_set_type_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- * @see zb_set_value_to_write_attr_record()
- */
-int zb_create_write_attr_record(
-               write_attr_record_h *handle);
-
-/**
- * @brief Destroys write attribute record.
- * @details Remove allocated memory for write attribute record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_create_write_attr_record()
- * @see zb_set_id_to_write_attr_record()
- * @see zb_set_type_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- * @see zb_set_value_to_write_attr_record()
- */
-int zb_destroy_write_attr_record(
-               write_attr_record_h handle);
-
-/**
- * @brief Sets attribute identifier write attribute record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that is to be written.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_create_write_attr_record()
- * @see zb_destroy_write_attr_record()
- * @see zb_set_type_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- * @see zb_set_value_to_write_attr_record()
- */
-int zb_set_id_to_write_attr_record(
-               write_attr_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Sets attribute data type write attribute record.
- * @details The attribute data type field shall contain the data type of the attribute
- * that is to be written.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute record
- * @param[in] type attribute data type
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_create_write_attr_record()
- * @see zb_destroy_write_attr_record()
- * @see zb_set_id_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- * @see zb_set_value_to_write_attr_record()
- */
-int zb_set_type_to_write_attr_record(
-               write_attr_record_h handle,
-               unsigned char type);
-
-/**
- * @brief Sets attribute data write attribute record.
- * @details The attribute data type field shall contain the data type of the attribute
- * that is to be written.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute record
- * @param[in] type attribute type
- * @param[in] value attribute data
- * @param[in] count length of attribute data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_create_write_attr_record()
- * @see zb_destroy_write_attr_record()
- * @see zb_set_id_to_write_attr_record()
- * @see zb_set_type_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- * @see zb_set_value_to_write_attr_record()
- */
-int zb_set_buf_to_write_attr_record(
-               write_attr_record_h handle,
-               unsigned char type,
-               unsigned char *value,
-               int count);
-
-/**
- * @brief Sets data value to write attribute status record.
- * @details The attribute data type field shall contain the data type of the attribute in
- * the same attribute report field (see #zb_zcl_data_type_e)
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] value attribute data value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_write_attr_no_rep()
- * @see zb_create_write_attr_record()
- * @see zb_destroy_write_attr_record()
- * @see zb_set_id_to_write_attr_record()
- * @see zb_set_type_to_write_attr_record()
- * @see zb_set_buf_to_write_attr_record()
- */
-int zb_set_value_to_write_attr_record(
-               write_attr_record_h handle,
-               zb_value_h value);
-
-/**
- * @brief Creates write attribute status record.
- * @details This allocates heap for write attribute status record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of write attribute status record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_destroy_write_attr_status()
- * @see zb_get_status_from_write_attr_status()
- * @see zb_get_id_from_write_attr_status()
- */
-int zb_create_write_attr_status(write_attr_status_record_h *handle);
-
-/**
- * @brief Destroys write attribute status record.
- * @details This destroys write attribute status record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_create_write_attr_status()
- * @see zb_get_id_from_discover_attr_info()
- * @see zb_get_type_from_discover_attr_info()
-
- */
-int zb_destroy_write_attr_status(write_attr_status_record_h handle);
-
-/**
- * @brief Gets status from write attribute status record.
- * @details The status field is 8 bits in length and specifies the status of the read
- * operation on this attribute. \n\n This field shall be set to SUCCESS, if the operation
- * was successful, or an error code, as specified in zb_zcl_status_e if the operation was
- * not successful.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[out] status error code @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_get_id_from_write_attr_status()
- */
-int zb_get_status_from_write_attr_status(
-               write_attr_status_record_h handle,
-               unsigned char *status);
-
-/**
- * @brief Sets status to write attribute status record.
- * @details The status field is 8 bits in length and specifies the status of the read
- * operation on this attribute. \n\n This field shall be set to SUCCESS, if the operation
- * was successful, or an error code, as specified in zb_zcl_status_e if the operation was
- * not successful.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of read attribute status record
- * @param[in] status error code @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_get_status_from_write_attr_status()
- * @see zb_get_id_from_write_attr_status()
- * @see zb_set_id_to_write_attr_status()
- */
-int zb_set_status_to_write_attr_status(
-               write_attr_status_record_h handle,
-               unsigned char status);
-
-/**
- * @brief Gets identifier from write attribute status record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that has been write (or of which an element has been write).
- * \n\n This field shall contain the same value that was included in the corresponding a
- * ttribute identifier field of the original write attributes or write attributes
- * structured command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_get_status_from_write_attr_status()
- * @see zb_set_status_to_write_attr_status()
- * @see zb_set_id_to_write_attr_status()
- */
-int zb_get_id_from_write_attr_status(
-               write_attr_status_record_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets identifier to write attribute status record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that has been write (or of which an element has been write).
- * \n\n This field shall contain the same value that was included in the corresponding a
- * ttribute identifier field of the original write attributes or write attributes
- * structured command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- * @see zb_get_status_from_write_attr_status()
- * @see zb_set_status_to_write_attr_status()
- * @see zb_get_id_from_write_attr_status()
- */
-int zb_set_id_to_write_attr_status(
-               write_attr_status_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Creates reporting configuration record.
- * @details Allocate memory for reporting configuration record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of reporting configuration record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_create_report_config_record(
-               report_config_record_h *handle);
-
-/**
- * @brief Destroys reporting configuration record.
- * @details This destroys reporting configuration record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of reporting configuration record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_destroy_report_config_record(
-               report_config_record_h handle);
-
-/**
- * @brief Gets direction from reporting configuration record.
- * @details The direction field specifies whether values of the attribute are be reported,
- * or whether reports of the attribute are to be received. \n\n
- * If this value is set to 0x00, then the attribute data type field, the minimum
- * reporting interval field, the maximum reporting interval field and the reportable
- * change field are included in the payload, and the timeout period field is omitted.
- * The record is sent to a cluster server (or client) to configure how it sends reports to
- * a client (or server) of the same cluster. \n\n
- * If this value is set to 0x01, then the timeout period field is included in the payload,
- * and the attribute data type field, the minimum reporting interval field, the
- * maximum reporting interval field and the reportable change field are omitted. The
- * record is sent to a cluster client (or server) to configure how it should expect
- * reports from a server (or client) of the same cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] dir 00 : The receiver of the Configure Reporting command shall configure
- *                     reporting to send to each destination as resolved by
- *                   the bindings for the cluster hosting the attributes to be reported.\n
- *                 01 : This indicates to the receiver of the Configure Reporting
- *                     command that the sender has configured its reporting
- *                     mechanism to transmit reports and that, based on the current
- *                     state of the sender's bindings, the sender will send reports to the
- *                     receiver.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_dir_from_report_config_record(
-               report_config_record_h handle,
-               unsigned char *dir);
-
-/**
- * @brief Sets direction to reporting configuration record.
- * @details The direction field specifies whether values of the attribute are be reported,
- * or whether reports of the attribute are to be received. \n\n
- * If this value is set to 0x00, then the attribute data type field, the minimum
- * reporting interval field, the maximum reporting interval field and the reportable
- * change field are included in the payload, and the timeout period field is omitted.
- * The record is sent to a cluster server (or client) to configure how it sends reports to
- * a client (or server) of the same cluster. \n\n
- * If this value is set to 0x01, then the timeout period field is included in the payload,
- * and the attribute data type field, the minimum reporting interval field, the
- * maximum reporting interval field and the reportable change field are omitted. The
- * record is sent to a cluster client (or server) to configure how it should expect
- * reports from a server (or client) of the same cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] dir 00 : The receiver of the Configure Reporting command shall configure
- *                     reporting to send to each destination as resolved by
- *                   the bindings for the cluster hosting the attributes to be reported.\n
- *                01 : This indicates to the receiver of the Configure Reporting
- *                     command that the sender has configured its reporting
- *                     mechanism to transmit reports and that, based on the current
- *                     state of the sender's bindings, the sender will send reports to the
- *                     receiver.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_dir_to_report_config_record(
-               report_config_record_h handle,
-               unsigned char dir);
-
-/**
- * @brief Gets attribute identifier from reporting configuration record.
- * @details If the direction field is 0x00, this field contains the identifier of the
- * attribute that is to be reported. \n\n If instead the direction field is 0x01,
- * the device shall expect reports of values of this attribute.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_id_from_report_config_record(
-               report_config_record_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets attribute identifier to reporting configuration record.
- * @details If the direction field is 0x00, this field contains the identifier of the
- * attribute that is to be reported. \n\n If instead the direction field is 0x01,
- * the device shall expect reports of values of this attribute.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_id_to_report_config_record(
-               report_config_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Gets attribute data type from reporting configuration record.
- * @details The Attribute data type field contains the data type of the attribute that is
- * to be reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_type_from_report_config_record(
-               report_config_record_h handle,
-               unsigned char *type);
-
-/**
- * @brief Sets attribute data type to reporting configuration record.
- * @details The Attribute data type field contains the data type of the attribute that is
- * to be reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_type_to_report_config_record(
-               report_config_record_h handle,
-               unsigned char type);
-
-/**
- * @brief Gets minimum interval from reporting configuration record.
- * @details The minimum reporting interval field is 16 bits in length and shall contain
- * the minimum interval, in seconds, between issuing reports of the specified attribute.
- * \n\n
- * If this value is set to 0x0000, then there is no minimum limit, unless one is
- * imposed by the specification of the cluster using this reporting mechanism or by
- * the applicable profile.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] min_i minimum interval time
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_min_i_from_report_config_record(
-               report_config_record_h handle,
-               unsigned short *min_i);
-
-/**
- * @brief Sets minimum interval to reporting configuration record.
- * @details The minimum reporting interval field is 16 bits in length and shall contain
- * the minimum interval, in seconds, between issuing reports of the specified attribute.
- * \n\n
- * If this value is set to 0x0000, then there is no minimum limit, unless one is
- * imposed by the specification of the cluster using this reporting mechanism or by
- * the applicable profile.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] min_i minimum interval time
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_min_i_to_report_config_record(
-               report_config_record_h handle,
-               unsigned short min_i);
-
-/**
- * @brief Gets maximum interval from reporting configuration record.
- * @details The maximum reporting interval field is 16 bits in length and shall contain
- * the maximum interval, in seconds, between issuing reports of the specified attribute.
- * \n\n
- * If this value is set to 0xffff, then the device shall not issue reports for the
- * specified attribute, and the configuration information for that attribute need not be
- * maintained. \n\n (Note: in an implementation using dynamic memory allocation, the
- * memory space for that information may then be reclaimed).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] max_i maximum interval time
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_max_i_from_report_config_record(
-               report_config_record_h handle,
-               unsigned short *max_i);
-
-/**
- * @brief Sets maximum interval to reporting configuration record.
- * @details The maximum reporting interval field is 16 bits in length and shall contain
- * the maximum interval, in seconds, between issuing reports of the specified attribute.
- * \n\n
- * If this value is set to 0xffff, then the device shall not issue reports for the
- * specified attribute, and the configuration information for that attribute need not be
- * maintained. \n\n (Note: in an implementation using dynamic memory allocation, the
- * memory space for that information may then be reclaimed).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] max_i maximum interval time
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_max_i_to_report_config_record(
-               report_config_record_h handle,
-               unsigned short max_i);
-
-/**
- * @brief Gets timeout from reporting configuration record.
- * @details The timeout period field is 16 bits in length and shall contain the maximum
- * expected time, in seconds, between received reports for the attribute specified in
- * the attribute identifier field. If more time than this elapses between reports, this
- * may be an indication that there is a problem with reporting. \n\n
- * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
- * Note that, for a server/client connection to work properly using automatic
- * reporting, the timeout value set for attribute reports to be received by the client (or
- * server) cluster must be set somewhat higher than the maximum reporting interval
- * set for the attribute on the server (or client) cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] timeout timeout
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_timeout_from_report_config_record(
-               report_config_record_h handle,
-               unsigned short *timeout);
-
-/**
- * @brief Sets timeout to reporting configuration record.
- * @details The timeout period field is 16 bits in length and shall contain the maximum
- * expected time, in seconds, between received reports for the attribute specified in
- * the attribute identifier field. If more time than this elapses between reports, this
- * may be an indication that there is a problem with reporting. \n\n
- * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
- * Note that, for a server/client connection to work properly using automatic
- * reporting, the timeout value set for attribute reports to be received by the client (or
- * server) cluster must be set somewhat higher than the maximum reporting interval
- * set for the attribute on the server (or client) cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] timeout timeout
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_timeout_to_report_config_record(
-               report_config_record_h handle,
-               unsigned short timeout);
-
-/**
- * @brief Gets change from reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n
- * The sign (if any) of the reportable change field is ignored.\n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] value data (only analog data type is allowed)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_change_from_report_config_record1(
-               report_config_record_h handle,
-               zb_value_h value);
-
-/**
- * @brief Sets change to reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n
- * The sign (if any) of the reportable change field is ignored. \n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] value data (only analog data type is allowed)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_change_to_report_config_record1(
-               report_config_record_h handle,
-               zb_value_h value);
-
-/**
- * @brief Gets change from reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n The sign (if any) of the
- * reportable change field is ignored. \n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @remarks value : generated from library you MUST free it
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute type
- * @param[out] value attribute data which is allocated in library (only analog data type is allowed)
- * @param[out] size attribute data size
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_change_from_report_config_record2(
-               report_config_record_h handle,
-               unsigned char *type,
-               unsigned char **value,
-               int *size);
-
-/**
- * @brief Sets change to reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n
- * The sign (if any) of the reportable change field is ignored. \n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] type attribute type
- * @param[in] value attribute data (only analog data type is allowed)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_set_change_to_report_config_record2(
-               report_config_record_h handle,
-               unsigned char type,
-               unsigned char *value);
-
-/**
- * @brief Gets change from reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n
- * The sign (if any) of the reportable change field is ignored.\n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute type
- * @param[out] value attribute data (only analog data type is allowed)
- * @param[out] size attribute data size
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_change_from_report_config_record2(
-               report_config_record_h handle,
-               unsigned char *type,
-               unsigned char **value,
-               int *size);
-
-/**
- * @brief Gets change from reporting configuration record.
- * @details The reportable change field shall contain the minimum change to the attribute
- * that will result in a report being issued. This field is of variable length. \n\n
- * For attributes with 'analog' data type (see #zb_zcl_data_type_e)
- * the field has the same data type as the attribute. \n\n
- * The sign (if any) of the reportable change field is ignored. \n
- * For attributes of 'discrete' data type (see #zb_zcl_data_type_e)
- * this field is omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute type
- * @param[out] value attribute data (only analog data type is allowed)
- * @param[out] size attribute data size
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_read_report_config_rsp()
- * @see zb_create_report_config_record()
- * @see zb_destroy_report_config_record()
- * @see zb_get_id_from_report_config_record()
- * @see zb_set_id_to_report_config_record()
- * @see zb_get_dir_from_report_config_record()
- * @see zb_set_dir_to_report_config_record()
- * @see zb_get_type_from_report_config_record()
- * @see zb_set_type_to_report_config_record()
- * @see zb_get_min_i_from_report_config_record()
- * @see zb_set_min_i_to_report_config_record()
- * @see zb_get_max_i_from_report_config_record()
- * @see zb_set_max_i_to_report_config_record()
- * @see zb_get_change_from_report_config_record1()
- * @see zb_set_change_to_report_config_record1()
- * @see zb_get_change_from_report_config_record2()
- * @see zb_set_change_to_report_config_record2()
- * @see zb_get_change_from_report_config_record3()
- * @see zb_get_timeout_from_report_config_record()
- * @see zb_set_timeout_to_report_config_record()
- */
-int zb_get_change_from_report_config_record3(
-               report_config_record_h handle,
-               unsigned char *type,
-               unsigned char *value,
-               int *size);
-
-/**
- * @brief Creates read reporting configuration record.
- * @details Allocate memory for read reporting configuration record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of read configuration record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_create_read_report_config_record(
-               read_report_config_record_h *handle);
-
-/**
- * @brief Destroys read reporting configuration record.
- * @details Remove allocated memory for read reporting configuration record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_destroy_read_report_config_record(
-               read_report_config_record_h handle);
-
-/**
- * @brief Gets direction from read reporting configuration record.
- * @details The direction field specifies whether values of the attribute are reported
- * (0x00), or whether reports of the attribute are received (0x01). \n\n
- * All other values of this field are reserved.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] dir direction
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_get_dir_from_read_report_config_record(
-               read_report_config_record_h handle,
-               unsigned char *dir);
-
-/**
- * @brief Sets direction to read reporting configuration record.
- * @details The direction field specifies whether values of the attribute are reported
- * (0x00), or whether reports of the attribute are received (0x01). \n\n
- * All other values of this field are reserved.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] dir direction
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_set_dir_to_read_report_config_record(
-               read_report_config_record_h handle,
-               unsigned char dir);
-
-/**
- * @brief Gets attribute identifier from read reporting configuration record.
- * @details The attribute identifier field shall contain the identifier of the attribute
- * whose reporting configuration details are to be read.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_get_id_from_read_report_config_record(
-               read_report_config_record_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets attribute identifier from read reporting configuration record.
- * @details The attribute identifier field shall contain the identifier of the attribute
- * whose reporting configuration details are to be read.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create_read_report_config_record()
- * @see zb_destroy_read_report_config_record()
- * @see zb_get_id_from_read_report_config_record()
- * @see zb_set_id_to_read_report_config_record()
- * @see zb_get_dir_from_read_report_config_record()
- * @see zb_set_dir_to_read_report_config_record()
- */
-int zb_set_id_to_read_report_config_record(
-               read_report_config_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Creates reporting configuration response record.
- * @details Allocate memory for reporting configuration response record
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of reporting configuration response record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_create_report_config_response_record(
-               report_config_response_record_h *handle);
-
-/**
- * @brief Destroys reporting configuration response record.
- * @details This destroys reporting configuration response record
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of reporting configuration response record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_destroy_report_config_response_record(
-               report_config_response_record_h handle);
-
-/**
- * @brief Gets status from reporting configuration response record.
- * @details If the attribute is not implemented on the sender or receiver of the command,
- * whichever is relevant (depending on direction), this field shall be set to
- * UNSUPPORTED_ATTRIBUTE. \n If the attribute is supported, but is not capable of
- * being reported, this field shall be set to UNREPORTABLE_ATTRIBUTE. \n
- * Otherwise, this field shall be set to SUCCESS. \n
- * If the status field is not set to SUCCESS, all fields except the direction and
- * attribute identifier fields shall be omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] status status @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_get_status_from_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned char *status);
-
-/**
- * @brief Sets status to reporting configuration response record.
- * @details If the attribute is not implemented on the sender or receiver of the command,
- * whichever is relevant (depending on direction), this field shall be set to
- * UNSUPPORTED_ATTRIBUTE. \n If the attribute is supported, but is not capable of
- * being reported, this field shall be set to UNREPORTABLE_ATTRIBUTE. \n
- * Otherwise, this field shall be set to SUCCESS. \n
- * If the status field is not set to SUCCESS, all fields except the direction and
- * attribute identifier fields shall be omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] status status @see #zb_zcl_status_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_set_status_to_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned char status);
-
-/**
- * @brief Gets direction from reporting configuration response record.
- * @details The direction field specifies whether values of the attribute are reported
- * (0x00), or whether reports of the attribute are received (0x01). \n\n
- * If this value is set to 0x00, then the attribute data type field, the minimum
- * reporting interval field, the maximum reporting interval field and the reportable
- * change field are included in the payload, and the timeout period field is omitted. If
- * this value is set to 0x01, then the timeout period field is included in the payload,
- * and the attribute data type field, the minimum reporting interval field, the
- * maximum reporting interval field and the reportable change field are omitted. \n\n
- * All other values of this field are reserved.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] dir direction 00 : Client-to-Server \n
- *                           01 : server-to-Client \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_get_dir_from_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned char *dir);
-
-/**
- * @brief Sets direction to reporting configuration response record.
- * @details The direction field specifies whether values of the attribute are reported
- * (0x00), or whether reports of the attribute are received (0x01). \n\n
- * If this value is set to 0x00, then the attribute data type field, the minimum
- * reporting interval field, the maximum reporting interval field and the reportable
- * change field are included in the payload, and the timeout period field is omitted. If
- * this value is set to 0x01, then the timeout period field is included in the payload,
- * and the attribute data type field, the minimum reporting interval field, the
- * maximum reporting interval field and the reportable change field are omitted. \n\n
- * All other values of this field are reserved.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] dir direction 00 : Client-to-Server \n
- *                          01 : server-to-Client \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_set_dir_to_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned char dir);
-
-/**
- * @brief Gets attribute identifier from reporting configuration response record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that the reporting configuration details apply to.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_get_id_from_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets attribute identifier to reporting configuration response record.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that the reporting configuration details apply to.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_config_report_rsp()
- * @see zb_create_report_config_response_record()
- * @see zb_destroy_report_config_response_record()
- * @see zb_get_status_from_report_config_response_record()
- * @see zb_set_status_to_report_config_response_record()
- * @see zb_get_dir_from_report_config_response_record()
- * @see zb_set_dir_to_report_config_response_record()
- * @see zb_get_id_from_report_config_response_record()
- * @see zb_set_id_to_report_config_response_record()
- */
-int zb_set_id_to_report_config_response_record(
-               report_config_response_record_h handle,
-               unsigned short id);
-
-/**
- * @brief Creates reporting attribute.
- * @details Allocate memory for reporting attribute
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of reporting attribute
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_create_attr_report(
-               attr_report_h *handle);
-
-/**
- * @brief Destroys reporting attribute.
- * @details This destroys reporting attribute
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of reporting attribute
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_destroy_attr_report(
-               attr_report_h handle);
-
-/**
- * @brief Gets attribute identifier from reporting attribute.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that the reporting configuration details apply to.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_get_id_from_attr_report(
-               attr_report_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets attribute identifier to reporting attribute.
- * @details The attribute identifier field is 16 bits in length and shall contain the
- * identifier of the attribute that the reporting configuration details apply to.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_set_id_to_attr_report(
-               attr_report_h handle,
-               unsigned short id);
-
-/**
- * @brief Gets attribute type from reporting attribute.
- * @details The attribute data type field contains the data type of the attribute that is
- * being reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_get_type_from_attr_report(
-               attr_report_h handle,
-               unsigned char *type);
-
-/**
- * @brief Sets attribute type to reporting attribute.
- * @details The attribute data type field contains the data type of the attribute that is
- * being reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_set_type_to_attr_report(
-               attr_report_h handle,
-               unsigned char type);
-
-/**
- * @brief Gets attribute data from reporting attribute.
- * @details The attribute data field is variable in length and shall contain the actual
- * value of the attribute being reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] value attribute value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_get_value_from_attr_report(
-               attr_report_h handle,
-               zb_value_h value);
-
-/**
- * @brief Sets attribute data to reporting attribute.
- * @details The attribute data field is variable in length and shall contain the actual
- * value of the attribute being reported.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] value attribute value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_event_get_attr_report()
- * @see zb_create_attr_report()
- * @see zb_destroy_attr_report()
- * @see zb_get_id_from_attr_report()
- * @see zb_set_id_to_attr_report()
- * @see zb_get_type_from_attr_report()
- * @see zb_set_type_to_attr_report()
- * @see zb_get_value_from_attr_report()
- * @see zb_set_value_to_attr_report()
- */
-int zb_set_value_to_attr_report(
-               attr_report_h handle,
-               zb_value_h value);
-
-/**
- * @brief Creates extended attribute information.
- * @details Allocate memory for extended attribute information
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of extended attribute information
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_create_extended_attr_info(
-               extended_attr_info_h *handle);
-
-/**
- * @brief Destroys extended attribute information.
- * @details This destroys extended attribute information
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of extended attribute information
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_destroy_extended_attr_info(
-               extended_attr_info_h handle);
-
-/**
- * @brief Gets attribute identifier from extended attribute information.
- * @details The attribute identifier field shall contain the identifier of a discovered
- * attribute. \n
- * Attributes shall be included in ascending order, starting with the lowest attribute
- * identifier that is greater than or equal to the start attribute identifier field of the
- * received discover attributes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_get_id_from_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned short *id);
-
-/**
- * @brief Sets attribute identifier to extended attribute information.
- * @details The attribute identifier field shall contain the identifier of a discovered
- * attribute. \n
- * Attributes shall be included in ascending order, starting with the lowest attribute
- * identifier that is greater than or equal to the start attribute identifier field of the
- * received discover attributes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] id attribute identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_set_id_to_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned short id);
-
-/**
- * @brief Gets attribute identifier type from extended attribute information.
- * @details The attribute data type field shall contain the data type of the attribute in
- * the same attribute report field
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_get_type_from_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned char *type);
-
-/**
- * @brief Sets attribute identifier type to extended attribute information.
- * @details The attribute data type field shall contain the data type of the attribute in
- * the same attribute report field
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] type attribute data type @see #zb_zcl_data_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_set_type_to_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned char type);
-
-/**
- * @brief Gets access control field from extended attribute information.
- * @details The attribute access control field shall indicate whether the attribute is
- * readable, writable, and/or reportable. This is an 8-bit bitmask field. \n
- * The bits are in little endian order (bit 0 is listed first).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[out] acl ZB_ZCL_WRITABLE : Bit-0., Writable \n
- *                 ZB_ZCL_REPORTABLE Bit-1 : Reportable \n See #zb_zcl_acl_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_get_acl_from_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned char *acl);
-
-/**
- * @brief Sets attribute access control field to extended attribute information.
- * @details The attribute access control field shall indicate whether the attribute is
- * readable, writable, and/or reportable. This is an 8-bit bitmask field. \n
- * The bits are in little endian order (bit 0 is listed first).
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of write attribute status record
- * @param[in] acl ZB_ZCL_WRITABLE : Bit-0., Writable \n
- *                ZB_ZCL_REPORTABLE Bit-1 : Reportable \n See #zb_zcl_acl_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- * @see zb_create_extended_attr_report()
- * @see zb_destroy_extended_attr_report()
- * @see zb_get_id_from_extended_attr_info()
- * @see zb_set_id_to_extended_attr_info()
- * @see zb_get_type_from_extended_attr_info()
- * @see zb_set_type_to_extended_attr_info()
- * @see zb_get_acl_from_extended_attr_info()
- * @see zb_set_acl_to_extended_attr_info()
- */
-int zb_set_acl_to_extended_attr_info(
-               extended_attr_info_h handle,
-               unsigned char acl);
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_H__ */
diff --git a/include/zb_zdo.h b/include/zb_zdo.h
deleted file mode 100755 (executable)
index 43a953f..0000000
+++ /dev/null
@@ -1,2365 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_H__
-
-/**
- * @file zb_zdo.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE Zigbee Device Object
- *
- * @brief Zigbee provides API for ZDO access.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_OVERVIEW Overview
- * The ZigBee Device Object (ZDO) is simply the application running
- * on endpoint 0 in every ZigBee device. (Remember, application endpoints are numbered
- * 1 through 240.)\n\n
- *
- * This application, ZDO, keeps track of the state of the ZigBee device on and off the
- * network, and provides an interface to the ZigBee Device Profile (ZDP), a specialized
- * Application Profile (with profile ID 0x0000) for discovering, configuring, and
- * maintaining ZigBee devices and services on the network.\n\n
- *
- * ZDO not only interacts with APS, but also interacts directly with the network layer.
- * ZDO controls the network layer, telling it when to form or join a network,
- * and when to leave, and provides the application interface to network
- * layer management services. For example, ZDO can be configured to continue attempting
- * to join a network until it is successful, or until a user-specified number-of-retries has
- * occurred before giving up, and informing the application of the join failure.\n\n
- *
- * The over-the-air Application Profile supported by ZDO, called the ZigBee Device Profile
- * (ZDP), is no different than any other, and in most stacks is handled just like any other
- * application object on an endpoint. ZDP services are separated into client and server.
- * Client side services (also called requests), are always optional in ZigBee, but many of the
- * server side ZDP services (also called responses), are mandatory.
- * Nearly every service follows the same pattern when used. A client device (the node which
- * is doing the asking) first makes a request. The server device then sends the response back
- * to the client device. The cluster number for the response is exactly the same as the cluster
- * number for the request, but with the high bit set. For example, the ZDP command IEEE_
- * addr_req(@ref zb_zdo_ieee_addr_req) is cluster 0x0001,
- * and IEEE_addr_rsp (@ref zb_zdo_addr_rsp) is cluster 0x8001.\n\n
- *
- * It doesn't matter how many hops the nodes are from each other. The nodes A and B could
- * be 10 hops away from each other, and the ZDP request/response mechanism will work
- * in exactly the same way, just as it does for applications sending data on an application
- * endpoint.\n\n
- *
- * For sleeping devices, the parents of the device keep track of the IEEE and short address
- * of the child, and will respond for them. However, all other information about the sleeping
- * device, such as the list of active endpoints, are not recorded by the parent and must be
- * retrieved directly from the devices themselves.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.zigbee\n
- *
- * It is recommended to design applications with regard to features, for reliability.\n
- *
- * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on using features in your application can be found in the <a href="https://developer.tizen.org/development/getting-started/native-application/understanding-tizen-programming/application-filtering"><b>Feature List</b>.</a>
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-#include <zdo/zb_zdo_type.h>
-#include <zdo/zb_zdo_nwk_mgr.h>
-#include <zdo/zb_zdo_dev_disc.h>
-#include <zdo/zb_zdo_dev_disc.h>
-#include <zdo/zb_zdo_bind_mgr.h>
-
-/**
- * @brief Returns readable ZDO error code.
- * @details Returns ZDO error code string
- *
- * @since_tizen 4.0
- *
- * @param[in] id ZDO id
- *
- * @return pointer of error message id string
- *
- */
-const char* zb_zdo_get_error_message(int id);
-
-/**
- * @brief Returns readable Zigbee profile id.
- * @details Returns Zigbee profile id
- *
- * @since_tizen 4.0
- *
- * @param[in] profile_id ZigBee profile id
- *
- * @return pointer of profile id string
- *
- */
-const char* zb_get_profile_id_string(int profile_id);
-
-/**
- * @brief Returns readable Zigbee device id.
- * @details Returns Zigbee device id
- *
- * @since_tizen 4.0
- *
- * @param[in] device_id ZigBee device id
- *
- * @return pointer of device id string
- *
- */
-const char* zb_get_device_id_string(int device_id);
-
-/**
- * @brief Creates simple descriptor.
- * @details Creates simple descriptor handle
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of simple descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_copy()
- * @see zb_simple_desc_destroy()
- */
-int zb_simple_desc_create(
-               zb_zdo_simple_desc_h *handle);
-
-/**
- * @brief Copies simple descriptor.
- * @details Copies simple descriptor handle to another
- *
- * @since_tizen 4.0
- *
- * @param[in] src handle of source simple descriptor
- * @param[in] dst handle of destination simple descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_copy()
- * @see zb_simple_desc_destroy()
- */
-int zb_simple_desc_copy(
-               zb_zdo_simple_desc_h src,
-               zb_zdo_simple_desc_h dst);
-
-/**
- * @brief Destroys simple descriptor handle.
- * @details Destroys simple descriptor allocated memory
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_copy()
- * @see zb_simple_desc_destroy()
- */
-int zb_simple_desc_destroy(
-               zb_zdo_simple_desc_h handle);
-
-/**
- * @brief Gets active endpoint number from simple descriptor handle.
- * @details Gets active endpoint number from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] ep endpoint number
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_ep()
- */
-int zb_simple_desc_get_ep(
-               zb_zdo_simple_desc_h handle,
-               unsigned char *ep);
-
-/**
- * @brief Sets active endpoint number to simple descriptor handle.
- * @details Sets active endpoint number to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] ep endpoint number
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_ep()
- */
-int zb_simple_desc_set_ep(
-               zb_zdo_simple_desc_h handle,
-               unsigned char ep);
-
-/**
- * @brief Gets profile id from simple descriptor handle.
- * @details Gets profile id from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] profile_id profile id
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_profile_id()
- */
-int zb_simple_desc_get_profile_id(
-               zb_zdo_simple_desc_h handle,
-               unsigned short *profile_id);
-
-/**
- * @brief Sets profile id to simple descriptor handle.
- * @details Sets profile id to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] profile_id profile id
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_device_id()
- */
-int zb_simple_desc_set_profile_id(
-               zb_zdo_simple_desc_h handle,
-               unsigned short profile_id);
-
-/**
- * @brief Gets device id from simple descriptor handle.
- * @details Gets device id from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] device_id 16-bit device identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_device_id()
- */
-int zb_simple_desc_get_device_id(
-               zb_zdo_simple_desc_h handle,
-               unsigned short *device_id);
-
-/**
- * @brief Sets device id to simple descriptor handle.
- * @details Sets device id to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] device_id 16-bit device identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_device_ver()
- */
-int zb_simple_desc_set_device_id(
-               zb_zdo_simple_desc_h handle,
-               unsigned short device_id);
-
-/**
- * @brief Gets device version from simple descriptor handle.
- * @details Gets device version from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] device_ver device version
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_device_ver()
- */
-int zb_simple_desc_get_device_ver(
-               zb_zdo_simple_desc_h handle,
-               unsigned short *device_ver);
-
-/**
- * @brief Sets device version to simple descriptor handle.
- * @details Sets device version to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] device_ver device version
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_device_ver()
- */
-int zb_simple_desc_set_device_ver(
-               zb_zdo_simple_desc_h handle,
-               unsigned short device_ver);
-
-/**
- * @brief Gets number of input clusters from simple descriptor handle.
- * @details Gets number of input clusters from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] num_of_in_clusters number of input clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_num_of_in_clusters()
- */
-int zb_simple_desc_get_num_of_in_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned char *num_of_in_clusters);
-
-/**
- * @brief Sets number of input clusters to simple descriptor handle.
- * @details Sets number of input clusters to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] num_of_in_clusters number of input clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_num_of_in_clusters()
- */
-int zb_simple_desc_set_num_of_in_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned char num_of_in_clusters);
-
-/**
- * @brief Gets number of output clusters from simple descriptor handle.
- * @details Gets number of output clusters from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] num_of_out_clusters number of output clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_num_of_out_clusters()
- */
-int zb_simple_desc_get_num_of_out_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned char *num_of_out_clusters);
-
-/**
- * @brief Sets number of output clusters to simple descriptor handle.
- * @details Sets number of output clusters to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] num_of_out_clusters number of output clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_num_of_out_clusters()
- */
-int zb_simple_desc_set_num_of_out_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned char num_of_out_clusters);
-
-/**
- * @brief Gets input cluster list from simple descriptor handle.
- * @details Gets input cluster list from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] in_clusters input clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_set_in_clusters()
- */
-int zb_simple_desc_get_in_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned short **in_clusters);
-
-/**
- * @brief Sets input cluster list to simple descriptor handle.
- * @details Sets input cluster list to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] in_clusters input clusters
- * @param[in] num number of input clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_in_clusters()
- */
-int zb_simple_desc_set_in_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned short *in_clusters,
-               int num);
-
-/**
- * @brief Gets output cluster list from simple descriptor handle.
- * @details Gets output cluster list from simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[out] out_clusters output clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_in_clusters()
- */
-int zb_simple_desc_get_out_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned short **out_clusters);
-
-/**
- * @brief Sets output cluster list to simple descriptor handle.
- * @details Sets output cluster list to simple descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of simple descriptor
- * @param[in] out_clusters output clusters
- * @param[in] num number of output clusters
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_simple_desc_get_in_clusters()
- */
-int zb_simple_desc_set_out_clusters(
-               zb_zdo_simple_desc_h handle,
-               unsigned short *out_clusters,
-               int num);
-
-/**
- * @brief Creates node power descriptor.
- * @details Creates node power descriptor handle
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of node power descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_copy()
- * @see zb_node_power_desc_destroy()
- */
-int zb_node_power_desc_create(
-               zb_zdo_node_power_descriptor_h *handle);
-
-/**
- * @brief Copies node power descriptor.
- * @details Copies node power descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] src handle of source node power descriptor
- * @param[in] dst handle of destination node power descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_create()
- * @see zb_node_power_desc_destroy()
- */
-int zb_node_power_desc_copy(
-       zb_zdo_node_power_descriptor_h src,
-       zb_zdo_node_power_descriptor_h dst);
-
-/**
- * @brief Destroys node power descriptor.
- * @details Destroys node power descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_copy()
- * @see zb_node_power_desc_destroy()
- */
-int zb_node_power_desc_destroy(
-               zb_zdo_node_power_descriptor_h handle);
-
-/**
- * @brief Gets current power mode from node power descriptor.
- * @details The current power mode field of the node power descriptor is four bits in length
- * and specifies the current sleep/power-saving mode of the node. \n\n The current power
- * mode field shall be set to one of the non-reserved values
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[out] current_power_mode 0b0000 : Receiver synchronized with the receiver on when
- *                                         idle sub-field of the node descriptor \n
- *                                0b0001 : Receiver comes on periodically as defined by the
- *                                         node power descriptor \n
- *                                0b0010 : Receiver comes on when stimulated, e.g. by a
- *                                         user pressing a button
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_set_current_power_mode()
- */
-int zb_node_power_desc_get_current_power_mode(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char* current_power_mode);
-
-/**
- * @brief Sets current power mode from node power descriptor.
- * @details The current power mode field of the node power descriptor is four bits in length
- * and specifies the current sleep/power-saving mode of the node. \n\n The current power
- * mode field shall be set to one of the non-reserved values
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[in] current_power_mode  0b0000 : Receiver synchronized with the receiver on when
- *                                         idle sub-field of the node descriptor \n
- *                                0b0001 : Receiver comes on periodically as defined by the
- *                                         node power descriptor \n
- *                                0b0010 : Receiver comes on when stimulated, e.g. by a
- *                                         user pressing a button
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_get_current_power_mode()
- */
-int zb_node_power_desc_set_current_power_mode(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char current_power_mode);
-
-/**
- * @brief Gets available power mode from node power descriptor.
- * @details The available power sources field of the node power descriptor is four bits in
- * length and specifies the power sources available on this node. \n\n For each power
- * source supported on this node, the corresponding bit of the available power sources
- * field, shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[out] available_power_sources  0b0001 : Constant (mains) power \n
- *                                      0b0010 : Rechargeable battery \n
- *                                      0b0100 : Disposable battery \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_set_available_power_sources()
- */
-int zb_node_power_desc_get_available_power_sources(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char* available_power_sources);
-
-/**
- * @brief Sets available power mode from node power descriptor.
- * @details The available power sources field of the node power descriptor is four bits in
- * length and specifies the power sources available on this node. \n\n For each power
- * source supported on this node, the corresponding bit of the available power sources
- * field, shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[in] available_power_sources  0b0001 : Constant (mains) power \n
- *                                     0b0010 : Rechargeable battery \n
- *                                     0b0100 : Disposable battery \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_get_available_power_sources()
- */
-int zb_node_power_desc_set_available_power_sources(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char available_power_sources);
-
-/**
- * @brief Gets current power source from node power descriptor.
- * @details The current power source field of the node power descriptor is four bits in
- * length and specifies the current power source being utilized by the node. \n]n
- * For the current power source selected, the corresponding bit of the current power \n\n
- * source field, shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[out] current_power_source  0b0001 : Constant (mains) power \n
- *                                  0b0010 : Rechargeable battery \n
- *                                  0b0100 : Disposable battery \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_set_current_power_source()
- */
-int zb_node_power_desc_get_current_power_source(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char* current_power_source);
-
-/**
- * @brief Sets current power source from node power descriptor.
- * @details The current power source field of the node power descriptor is four bits in
- * length and specifies the current power source being utilized by the node. \n]n
- * For the current power source selected, the corresponding bit of the current power \n\n
- * source field, shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[in] current_power_source  0b0001 : Constant (mains) power \n
- *                                  0b0010 : Rechargeable battery \n
- *                                  0b0100 : Disposable battery \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_get_current_power_source()
- */
-int zb_node_power_desc_set_current_power_source(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char current_power_source);
-
-/**
- * @brief Gets current power source level from node power descriptor.
- * @details The current power source level field of the node power descriptor is four bits
- * in length and specifies the level of charge of the power source. \n\n The current power
- * source level field shall be set to one of the non-reserved values
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[out] current_power_source_level  0b0000 : Critical \n
- *                                        0b0100 : 33% \n
- *                                        0b1000 : 66% \n
- *                                        0b1100 : 100% \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_set_current_power_source_level()
- */
-int zb_node_power_desc_get_current_power_source_level(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char* current_power_source_level);
-
-/**
- * @brief Sets current power source level from node power descriptor.
- * @details The current power source level field of the node power descriptor is four bits
- * in length and specifies the level of charge of the power source. \n\n The current power
- * source level field shall be set to one of the non-reserved values
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node power descriptor
- * @param[in] current_power_source_level  0b0000 : Critical \n
- *                                        0b0100 : 33% \n
- *                                        0b1000 : 66% \n
- *                                        0b1100 : 100% \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_power_desc_get_current_power_source_level()
- */
-int zb_node_power_desc_set_current_power_source_level(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char current_power_source_level);
-
-/**
- * @brief Creates node descriptor.
- * @details Creates node descriptor handle
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[out] handle handle of node descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_copy()
- * @see zb_node_desc_destroy()
- */
-int zb_node_desc_create(
-               zb_zdo_node_descriptor_h *handle);
-
-/**
- * @brief Copies node descriptor.
- * @details Copies node descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] src handle of source node descriptor
- * @param[in] dst handle of destination node descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_create()
- * @see zb_node_desc_destroy()
- */
-int zb_node_desc_copy(
-       zb_zdo_node_descriptor_h src,
-       zb_zdo_node_descriptor_h dst);
-
-/**
- * @brief Destroys node descriptor.
- * @details Destroys node descriptor handle
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_create()
- * @see zb_node_desc_copy()
- */
-int zb_node_desc_destroy(
-               zb_zdo_node_descriptor_h handle);
-
-/**
- * @brief Gets logical type from node descriptor.
- * @details The logical type field of the node descriptor is three bits in length and
- * specifies the device type of the ZigBee node. \n\n The logical type field shall be set
- *  to one of the non-reserved values.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] logical_type  0b000 : ZigBee coordinator \n
- *                          0b001 : ZigBee router \n
- *                          0b010 : ZigBee end device \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_logical_type()
- */
-int zb_node_desc_get_logical_type(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* logical_type);
-
-/**
- * @brief Sets logical type from to descriptor.
- * @details The logical type field of the node descriptor is three bits in length and
- * specifies the device type of the ZigBee node. \n\n The logical type field shall be set
- *  to one of the non-reserved values.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] logical_type  0b000 : ZigBee coordinator \n
- *                          0b001 : ZigBee router \n
- *                          0b010 : ZigBee end device \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_logical_type()
- */
-int zb_node_desc_set_logical_type(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char logical_type);
-
-/**
- * @brief Gets complex descriptor available from node descriptor.
- * @details The complex descriptor available field of the node descriptor is one bit in
- * length and specifies whether a complex descriptor is available on this device. \n\n
- * If this field is set to 1, a complex descriptor is available. \n\n
- * If this field is set to 0, a complex descriptor is not available.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] complex_desciptor_available  1 : a complex descriptor is available \n
- *                                          0 : a complex descriptor is not available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_complex_descriptor_available()
- */
-int zb_node_desc_get_complex_desciptor_available(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* complex_desciptor_available);
-
-/**
- * @brief Sets complex descriptor available to node descriptor.
- * @details The complex descriptor available field of the node descriptor is one bit in
- * length and specifies whether a complex descriptor is available on this device. \n\n
- * If this field is set to 1, a complex descriptor is available. \n\n
- * If this field is set to 0, a complex descriptor is not available.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] complex_desciptor_available  1 : a complex descriptor is available \n
- *                                         0 : a complex descriptor is not available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_complex_desciptor_available()
- */
-int zb_node_desc_set_complex_descriptor_available(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char complex_desciptor_available);
-
-/**
- * @brief Gets user descriptor available from node descriptor.
- * @details The user descriptor available field of the node descriptor is one bit in
- * length and specifies whether a user descriptor is available on this device. \n\n
- * If this field is set to 1, a user descriptor is available.
- * If this field is set to 0, a user descriptor is not available.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] user_descriptor_available  1 : a user descriptor is available \n
- *                                       0 : a user descriptor is not available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_user_descriptor_available()
- */
-int zb_node_desc_get_user_descriptor_available(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* user_descriptor_available);
-
-/**
- * @brief Sets user descriptor available to node descriptor.
- * @details The user descriptor available field of the node descriptor is one bit in
- * length and specifies whether a user descriptor is available on this device. \n\n
- * If this field is set to 1, a user descriptor is available.
- * If this field is set to 0, a user descriptor is not available.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] user_descriptor_available  1 : a user descriptor is available \n
- *                                       0 : a user descriptor is not available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_user_descriptor_available()
- */
-int zb_node_desc_set_user_descriptor_available(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char user_descriptor_available);
-
-/**
- * @brief Gets APS flags available from node descriptor.
- * @details The APS flags field of the node descriptor is three bits in length and
- * specifies the application support sub-layer capabilities of the node. \n\n
- * This field is currently not supported and shall be set to zero.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] aps_flags 0 : APS flags \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_aps_flags()
- */
-int zb_node_desc_get_aps_flags(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* aps_flags);
-/**
- * @brief Sets APS flags available to node descriptor.
- * @details The APS flags field of the node descriptor is three bits in length and
- * specifies the application support sub-layer capabilities of the node. \n\n
- * This field is currently not supported and shall be set to zero.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] aps_flags 0 : APS flags \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_aps_flags()
- */
-int zb_node_desc_set_aps_flags(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char aps_flags);
-
-/**
- * @brief Gets frequency band from node descriptor.
- * @details The frequency band field of the node descriptor is five bits in length and
- * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
- * utilized by the node. \n\n For each frequency band supported by the underlying IEEE
- * 802.15.4 radio, the corresponding bit of the frequency band field. \n\n
- * shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] frequency_band 0b00001 : 868-868,6MHz \n
- *                            0b00010 : Reserved \n
- *                            0b00100 : 902-928MHz \n
- *                            0b01000 : 2400-2483.5MHz
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_frequency_band()
- */
-int zb_node_desc_get_frequency_band(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* frequency_band);
-
-/**
- * @brief Sets frequency band to node descriptor.
- * @details The frequency band field of the node descriptor is five bits in length and
- * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
- * utilized by the node. \n\n For each frequency band supported by the underlying IEEE
- * 802.15.4 radio, the corresponding bit of the frequency band field. \n\n
- * shall be set to 1. All other bits shall be set to 0.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] frequency_band 0b00001 : 868-868,6MHz \n
- *                           0b00010 : Reserved \n
- *                           0b00100 : 902-928MHz \n
- *                           0b01000 : 2400-2483.5MHz
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_frequency_band()
- */
-int zb_node_desc_set_frequency_band(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char frequency_band);
-
-/**
- * @brief Gets MAC capability from node descriptor.
- * @details The MAC capability flags field is eight bits in length and specifies the node
- * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer. \n\n The
- * MAC capability flags field shall be formatted as illustrated in below table. \n\n
- *
- * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
- * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
- * PAN coordinator sub-field shall be set to 0. \n\n
- *
- * The device type sub-field is one bit in length and shall be set to 1 if this node is a
- * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
- * indicating a reduced function device (RFD). \n\n
- *
- * The power source sub-field is one bit in length and shall be set to 1 if the current
- * power source is mains power. Otherwise, the power source sub-field shall be set to
- * 0. This information is derived from the node current power source field of the
- * node power descriptor.\n\n
- *
- * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
- * device does not disable its receiver to conserve power during idle periods.
- * Otherwise, the receiver on when idle sub-field shall be set to 0 \n\n
- *
- * The security capability sub-field is one bit in length and shall be set to 1 if the
- * device is capable of sending and receiving frames secured using the security suite
- * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
- * The allocate address sub-field is one bit in length and shall be set to 0 or 1. \n\n
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
- *                                 Bit 1 : Device Type \n
- *                                 Bit 2 : Power source \n
- *                                 Bit 3 : Receiver on when idle \n
- *                                 Bit 4-5 : Reserved \n
- *                                 Bit 6 : Security capability \n
- *                                 Bit 7 : Allocated address \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_mac_capability_flags()
- */
-int zb_node_desc_get_mac_capability_flags(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* mac_capability_flags);
-
-/**
- * @brief Sets MAC capability to node descriptor.
- * @details The MAC capability flags field is eight bits in length and specifies the node
- * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer. \n\n The
- * MAC capability flags field shall be formatted as illustrated in below table.\n\n
- *
- * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
- * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
- * PAN coordinator sub-field shall be set to 0. \n\n
- *
- * The device type sub-field is one bit in length and shall be set to 1 if this node is a
- * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
- * indicating a reduced function device (RFD). \n\n
- *
- * The power source sub-field is one bit in length and shall be set to 1 if the current
- * power source is mains power. Otherwise, the power source sub-field shall be set to
- * 0. This information is derived from the node current power source field of the
- * node power descriptor.\n\n
- *
- * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
- * device does not disable its receiver to conserve power during idle periods.
- * Otherwise, the receiver on when idle sub-field shall be set to 0 \n\n
- *
- * The security capability sub-field is one bit in length and shall be set to 1 if the
- * device is capable of sending and receiving frames secured using the security suite
- * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
- * The allocate address sub-field is one bit in length and shall be set to 0 or 1. \n\n
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
- *                                  Bit 1 : Device Type \n
- *                                  Bit 2 : Power source \n
- *                                  Bit 3 : Receiver on when idle \n
- *                                  Bit 4-5 : Reserved \n
- *                                  Bit 6 : Security capability \n
- *                                  Bit 7 : Allocated address \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_mac_capability_flags()
- */
-int zb_node_desc_set_mac_capability_flags(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char mac_capability_flags);
-
-/**
- * @brief Gets manufacturer code from node descriptor.
- * @details The manufacturer code field of the node descriptor is sixteen bits in length
- *  and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
- * the manufacturer to the device.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] manufacturer_code manufacturer code
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_manufacturer_code()
- */
-int zb_node_desc_get_manufacturer_code(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short* manufacturer_code);
-
-/**
- * @brief Sets manufacturer code to node descriptor.
- * @details The manufacturer code field of the node descriptor is sixteen bits in length
- *  and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
- * the manufacturer to the device.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] manufacturer_code manufacturer code
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_frequency_band()
- */
-int zb_node_desc_set_manufacturer_code(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short manufacturer_code);
-
-/**
- * @brief Gets maximum buffer size from node descriptor.
- * @details The maximum buffer size field of the node descriptor is eight bits in length,
- * with a valid range of 0x00-0x7f. \n\n This field specifies the maximum size, in octets,
- * of the network sub-layer data unit (NSDU) for this node. This is the maximum size of
- *  data or commands passed to or from the application by the application support
- * sub-layer, before any fragmentation or re-assembly. \n\n
- * This field can be used as a high-level indication for network management.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] maximum_buffer_size 0x00~0x7f
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_maximum_buffer_size()
- */
-int zb_node_desc_get_maximum_buffer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char* maximum_buffer_size);
-
-/**
- * @brief Sets maximum buffer size to node descriptor.
- * @details The maximum buffer size field of the node descriptor is eight bits in length,
- *  with a valid range of 0x00-0x7f. \n\n This field specifies the maximum size, in octets,
- * of the network sub-layer data unit (NSDU) for this node. This is the maximum size of
- *  data or commands passed to or from the application by the application support
- * sub-layer, before any fragmentation or re-assembly. \n\n
- * This field can be used as a high-level indication for network management.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] maximum_buffer_size 0x00~0x7f
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_maximum_buffer_size()
- */
-int zb_node_desc_set_maximum_buffer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned char maximum_buffer_size);
-
-/**
- * @brief Gets maximum incoming transfer size from node descriptor.
- * @details The maximum transfer size field of the node descriptor is sixteen bits in
- *  length, with a valid range of 0x0000-0x7fff. \n\n This field specifies the maximum
- * size, in octets, of the application sub-layer data unit (ASDU) that can be transferred
- * to this node in one single message transfer. \n\n This value can exceed the value of
- * the node maximum buffer size field through the use of fragmentation.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] maximum_incoming_transfer_size 0x0000~0x7fff
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_maximum_buffer_size()
- */
-int zb_node_desc_get_maximum_incoming_transfer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short* maximum_incoming_transfer_size);
-
-/**
- * @brief Sets maximum incoming transfer size to node descriptor.
- * @details The maximum transfer size field of the node descriptor is sixteen bits in
- *  length, with a valid range of 0x0000-0x7fff. \n\n This field specifies the maximum
- * size, in octets, of the application sub-layer data unit (ASDU) that can be transferred
- * to this node in one single message transfer. \n\n This value can exceed the value of
- * the node maximum buffer size field through the use of fragmentation.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] maximum_incoming_transfer_size 0x0000~0x7fff
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_maximum_buffer_size()
- */
-int zb_node_desc_set_maximum_incoming_transfer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short maximum_incoming_transfer_size);
-
-/**
- * @brief Gets server mask from node descriptor.
- * @details The server mask field of the node descriptor is sixteen bits in length,
- * with bit settings signifying the system server capabilities of this node. \n\n
- * It is used to facilitate discovery of particular system servers by other nodes on the
- *  system. \n\n The bit settings are defined in below table.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] server_mask Bit 0 : Primary Trust Center \n
- *                         Bit 1 : Backup Trust Center \n
- *                         Bit 2 : Primary Binding Table Cache \n
- *                         Bit 3 : Backup Binding Table Cache \n
- *                         Bit 4 : Primary Discovery Cache \n
- *                         Bit 5 : Backup Discovery Cache \n
- *                         Bit 6 : Network Manager \n
- *                         Bit 7~15 : Reserved
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_server_mask()
- */
-int zb_node_desc_get_server_mask(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short* server_mask);
-
-/**
- * @brief Sets server mask to node descriptor.
- * @details The server mask field of the node descriptor is sixteen bits in length,
- * with bit settings signifying the system server capabilities of this node. \n\n
- * It is used to facilitate discovery of particular system servers by other nodes on the
- *  system. \n\n The bit settings are defined in below table.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] server_mask Bit 0 : Primary Trust Center \n
- *                         Bit 1 : Backup Trust Center \n
- *                         Bit 2 : Primary Binding Table Cache \n
- *                         Bit 3 : Backup Binding Table Cache \n
- *                         Bit 4 : Primary Discovery Cache \n
- *                         Bit 5 : Backup Discovery Cache \n
- *                         Bit 6 : Network Manager \n
- *                         Bit 7~15 : Reserved
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_server_mask()
- */
-int zb_node_desc_set_server_mask(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short server_mask);
-
-/**
- * @brief Gets maximum outgoing transfer size from node descriptor.
- * @details The maximum transfer size field of the node descriptor is sixteen bits in,
- * length with a valid range of 0x0000-0x7fff. \n\n This field specifies the maximum size,
- * in octets, of the application sub-layer data unit (ASDU) that can be transferred from
- * this node in one single message transfer. \n\n This value can exceed the value of the
- * node maximum buffer size field through the use of fragmentation.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] maximum_outgoing_transfer_size 0x0000~0x7ffff
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_server_mask()
- */
-int zb_node_desc_get_maximum_outgoing_transfer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short* maximum_outgoing_transfer_size);
-
-/**
- * @brief Sets maximum outgoing transfer size to node descriptor.
- * @details The maximum transfer size field of the node descriptor is sixteen bits in,
- * length with a valid range of 0x0000-0x7fff. \n\n This field specifies the maximum size,
- * in octets, of the application sub-layer data unit (ASDU) that can be transferred from
- * this node in one single message transfer. \n\n This value can exceed the value of the
- * node maximum buffer size field through the use of fragmentation.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] maximum_outgoing_transfer_size 0x0000~0x7ffff
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_server_mask()
- */
-int zb_node_desc_set_maximum_outgoing_transfer_size(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short maximum_outgoing_transfer_size);
-
-/**
- * @brief Gets descriptor capability from node descriptor.
- * @details The descriptor capability field of the node descriptor is eight bits in length
- * , with bit settings signifying the descriptor capabilities of this node. \n\n
- * It is used to facilitate discovery of particular features of the descriptor fields by
- * other nodes on the system. The bit settings are defined in Table.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
- *                                         Bit 1 : Extended Simple Descriptor List Available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_set_descriptor_capability_field()
- */
-int zb_node_desc_get_descriptor_capability_field(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short* descriptor_capability_field);
-
-/**
- * @brief Sets descriptor capability to node descriptor.
- * @details The descriptor capability field of the node descriptor is eight bits in length
- * , with bit settings signifying the descriptor capabilities of this node. \n\n
- * It is used to facilitate discovery of particular features of the descriptor fields by
- * other nodes on the system. The bit settings are defined in Table.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[in] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
- *                                        Bit 1 : Extended Simple Descriptor List Available \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_node_desc_get_descriptor_capability_field()
- */
-int zb_node_desc_set_descriptor_capability_field(
-               zb_zdo_node_descriptor_h handle,
-               unsigned short descriptor_capability_field);
-
-/**
- * @brief Gets extended pan id from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] extended_pan_id The 64-bit extended PAN identifier of the discovered
- *                             network.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_extended_pan_id(
-               zb_zdo_network_list_record_h handle,
-               ieee_addr extended_pan_id);
-
-/**
- * @brief Gets logical channel number from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has multiple network_list_record.
- * \n\n Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] logical_channel The current logical channel occupied by the network. \n
- *                             Selected from the available logical channels supported by
- *                             the PHY.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_logical_channel(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* logical_channel);
-
-/**
- * @brief Gets ZigBee version from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] zigbee_version 0x0~0xf : The version of the ZigBee protocol in use
- *                             in the discovered network.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_zigbee_version(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* zigbee_version);
-
-/**
- * @brief Gets stack profile from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] stack_profile 0x0~0xf : A ZigBee stack profile identifier indicating
- *                             the stack profile in use in the discovered network.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_stack_profile(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* stack_profile);
-
-/**
- * @brief Gets beacon order from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] beacon_order 0x0~0xf : This specifies how often the MAC sub-layer
- * beacon is to be transmitted by a given device on the network. \n\n For a discussion of
- * MAC sub-layer beacon order
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_beacon_order(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* beacon_order);
-
-/**
- * @brief Gets superframe order from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] superframe_order 0x0~0xf : For beacon-oriented networks, i.e., beacon
- * order < 15, this specifies the length of the active period of the superframe. \n\n
- * For a discussion of MAC sub-layer superframe order.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_superframe_order(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* superframe_order);
-
-/**
- * @brief Gets permit joining from network list record.
- * @details When received zb_zdo_mgmt_nwk_disc_rsp callback (originally, ZigBee
- * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record. \n\n
- * Therefore this function can help parsing parameter in network_list_record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] permit_joining 0 or 1 : A value of TRUE indicates that at least one
- * ZigBee router on the network currently permits joining, i.e., its NWK has been
- * issued an NLME-PERMIT-JOINING primitive and the time limit, if given, has
- * not yet expired.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_network_list_record_get_permit_joining(
-               zb_zdo_network_list_record_h handle,
-               unsigned char* permit_joining);
-
-/**
- * @brief Gets destination address from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] dst_addr The destination address for the binding entry
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
-               nwk_addr* dst_addr);
-
-/**
- * @brief Gets status bits (3bit) from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] status 0x0=ACTIVE. \n
- *                    0x1=DISCOVERY_UNDERWAY. \n
- *                    0x2=DISCOVERY_FAILED. \n
- *                    0x3=INACTIVE. \n
- *                    0x4=VALIDATION_UNDERWAY \n
- *                    0x5-0x7=RESERVED. \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
-               unsigned char* status);
-
-/**
- * @brief Gets memory constrained (1bit) from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] memory_constrained A flag indicating whether the device is a memory
- *                                constrained concentrator.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_memory_constrained(
-               zb_zdo_routing_table_h handle, unsigned char* memory_constrained);
-
-/**
- * @brief Gets many-to-one (1bit) from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] many_to_one A flag indicating that the destination is a concentrator that
- *                         issued a many-to-one request.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
-               unsigned char* many_to_one);
-
-/**
- * @brief Gets routing record required (1bit) from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] route_record_required A flag indicating that a route record command frame
- *                                   should be sent to the destination prior to the next
- *                                   data packet.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_route_record_required(
-               zb_zdo_routing_table_h handle, unsigned char* route_record_required);
-
-/**
- * @brief Gets next hop address from routing table record.
- * @details When received zb_zdo_mgmt_rtg_rsp callback (originally, The Mgmt_Rtg_rsp
- * command (ClusterID=0x8032) ), it has a routing table record. \n\n
- * Therefore this function can help parsing parameter in routing table records.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] next_hop_addr Next-hop address.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- * @see zb_routing_table_get_dst_addr()
- * @see zb_routing_table_get_dst_status()
- * @see zb_routing_table_get_memory_constrained()
- * @see zb_routing_table_get_many_to_one()
- * @see zb_routing_table_get_route_record_required()
- * @see zb_routing_table_get_next_hop_addr()
- */
-int zb_routing_table_get_next_hop_addr(
-               zb_zdo_routing_table_h handle, nwk_addr* next_hop_addr);
-
-/**
- * @brief Gets extended pan id from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] extended_pan_id The 64-bit extended PAN id of the neighboring device
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_extended_pan_id(
-               zb_zdo_neighbor_table_desc_h handle,
-               ieee_addr extended_pan_id);
-
-/**
- * @brief Gets IEEE address from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr64 64-bit IEEE address that is unique to every device. \n
- * If this value is unknown at the time of the request, this field shall be set to
- * 0xffffffffffffffff.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_ieee_addr(
-               zb_zdo_neighbor_table_desc_h handle,
-               ieee_addr addr64);
-
-/**
- * @brief Gets network address from neighbor table list record..
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr16 16-bit network address that is unique to every device. \n
- * If this value is unknown at the time of the request, this field shall be set to
- * 0xffffffffffffffff.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_nwk_addr(
-               zb_zdo_neighbor_table_desc_h handle,
-               nwk_addr* addr16);
-
-/**
- * @brief Gets device type from neighbor table list record..
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] device_type The type of the neighbor device: \n
- *                         0x0 = ZigBee coordinator \n
- *                         0x1 = ZigBee router \n
- *                         0x2 = ZigBee end device \n
- *                         0x3 = Unknown \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_device_type(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* device_type);
-
-/**
- * @brief Gets RxOnWhenIdle value from neighbor table list record..
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] rx_on_when_idle Indicates if neighbor's receiver is
- *                             enabled during idle portions of the \n
- *                             CAP: \n
- *                             0x0 = Receiver is off \n
- *                             0x1 = Receiver is on \n
- *                             0x2 = unknown
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_rx_on_when_idle(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* rx_on_when_idle);
-
-/**
- * @brief Gets Relationship value from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] relationship The relationship between the
- *                           neighbor and the current device: \n
- *                           0x0 = neighbor is the parent \n
- *                           0x1 = neighbor is a child \n
- *                           0x2 = neighbor is a sibling \n
- *                           0x3 = None of the above \n
- *                           0x4 = previous child
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_relationship(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* relationship);
-
-/**
- * @brief Gets Permit joining value from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] permit_joining An indication of whether the
- *                            neighbor device is accepting join requests: \n
- *                            0x0 = neighbor is not accepting join requests \n
- *                            0x1 = neighbor is accepting join requests \n
- *                            0x2 = unknown
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_permit_joining(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* permit_joining);
-
-/**
- * @brief Gets Depth value from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] depth The 0x00~nwkcMaxDepth (See. Zigbee Spec.) \n
- *                   tree depth of the neighbor device. \n
- *                   A value of 0x00 indicates that the device is the ZigBee
- *                   coordinator for the network.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_depth(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* depth);
-
-/**
- * @brief Gets LQI (Link-Quality Indicator) value from neighbor table list record.
- * @details When received zb_zdo_mgmt_lqi_rsp callback (originally, ZigBee
- * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list. \n\n
- * Therefore this function can help parsing parameter in neigbor_table_list.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] lqi The estimated link quality for RF transmissions from this device. \n
- *                 See ZigBee specification for discussion of how this is calculated.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- * @see zb_neighbor_table_desc_get_extended_pan_id()
- * @see zb_neighbor_table_desc_get_ieee_addr()
- * @see zb_neighbor_table_desc_get_nwk_addr()
- * @see zb_neighbor_table_desc_get_device_type()
- * @see zb_neighbor_table_desc_get_rx_on_when_idle()
- * @see zb_neighbor_table_desc_get_relationship()
- * @see zb_neighbor_table_desc_get_permit_joining()
- * @see zb_neighbor_table_desc_get_depth()
- * @see zb_neighbor_table_desc_get_lqi()
- */
-int zb_neighbor_table_desc_get_lqi(
-               zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* lqi);
-
-/**
- * @brief Gets source MAC address from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] src_addr The source IEEE address for the binding entry.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_src_addr(
-               zb_zdo_binding_table_h handle,
-               ieee_addr src_addr);
-
-/**
- * @brief Gets SrcEndpoint from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] src_ep The source endpoint for the binding entry.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_src_ep(
-               zb_zdo_binding_table_h handle,
-               unsigned char *src_ep);
-
-/**
- * @brief Gets ClusterId from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] cluster_id The identifier of the cluster on the source device that is bound
- *                        to the destination device.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_cluster_id(
-               zb_zdo_binding_table_h handle,
-               unsigned short *cluster_id);
-
-/**
- * @brief Gets DstAddrMode from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] dst_addr_mode The addressing mode for the destination address. \n\n
- *                       This field can take one of the non-reserved values
- *                       from the following list: \n\n
- *                       0x00 = reserved \n
- *                       0x01 = 16-bit group address for DstAddr and DstEndpoint not
- *                              present \n
- *                       0x02 = reserved \n
- *                       0x03 = 64-bit extended address for DstAddr and DstEndp present \n
- *                       0x04 ? 0xff = reserved \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_dst_addr_mode(
-               zb_zdo_binding_table_h handle,
-               unsigned char *dst_addr_mode);
-
-/**
- * @brief Gets nwk DstAddr from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr16 The destination address for the binding entry. \n
- *                    As specified by the DstAddrMode field.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No network address
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_dst_addr16(
-               zb_zdo_binding_table_h handle,
-               nwk_addr *addr16);
-
-/**
- * @brief Gets ieee DstAddr from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr64 The destination address for the binding entry. \n
- *                    As specified by the DstAddrMode field.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No IEEE address
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_dst_addr64(
-               zb_zdo_binding_table_h handle,
-               ieee_addr addr64);
-
-/**
- * @brief Gets DstEndPoint from binding table record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in binding_table structure.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] dst_ep 0x01~0xff : This field shall be present only if the DstAddrMode
- *                    field has a value of 0x03 and, if present, shall be the destination
- *                    endpoint for the binding entry.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_binding_table_get_dst_ep(
-               zb_zdo_binding_table_h handle,
-               unsigned char *dst_ep);
-
-/**
- * @brief Gets ExtendedAddress from discovery cache record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in discovery cache list record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr64 64-bit IEEE Address of the cached device.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_cache_rsp()
- */
-int zb_discovery_cache_get_ieee_addr(
-               zb_zdo_discovery_cache_h handle,
-               ieee_addr addr64);
-
-/**
- * @brief Gets NetworkAddress from discovery cache record.
- * @details When received zb_zdo_mgmt_bind_rsp callback (originally, ZigBee
- * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table. \n\n
- * Therefore this function can help parsing parameter in discovery cache list record.
- *
- * @since_tizen 4.0
- *
- * @param[in] handle handle of node descriptor
- * @param[out] addr16 16-bit network Address of the cached device.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_cache_rsp()
- */
-int zb_discovery_cache_get_nwk_addr(
-               zb_zdo_discovery_cache_h handle,
-               nwk_addr *addr16);
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_H__ */
diff --git a/include/zcl/zb_zcl_alarm_cluster.h b/include/zcl/zb_zcl_alarm_cluster.h
deleted file mode 100755 (executable)
index 873a320..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ALARM_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ALARM_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_alarm_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE Alarm Cluster
- *
- * @brief Zigbee alarm cluster commands
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE_OVERVIEW Overview
- * Attributes and commands for sending alarm notifications and configuring alarm
- * functionality.\n\n
- * Alarm conditions and their respective alarm codes are described in individual
- * clusters, along with an alarm mask field. Where not masked, alarm notifications
- * are reported to subscribed targets using binding.\n\n
- * Where an alarm table is implemented, all alarms, masked or otherwise, are
- * recorded and may be retrieved on demand.\n\n
- * Alarms may either reset automatically when the conditions that cause are no
- * longer active, or may need to be explicitly reset.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 3.57 Generated Command IDs for the Alarms Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Alarm                                |     M      |
- * |             0x01               | Get alarm response                   |     O      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Called after 'get alarm' command.
- * @details The get alarm response command returns the results of a request to retrieve
- * information from the alarm log, along with a time stamp indicating when the
- * alarm situation was detected.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Destination endpoint
- * @param[in] status Status code \n
- *                    #ZB_ZCL_SUCCESS \n
- *                    #ZB_ZCL_NOT_FOUND
- * @param[in] alarm_code Alarm code (8bit enumeration)
- * @                      Identifying code for the cause of the alarm,
- * @                      as given in the specification of the cluster
- * @                      whose attribute generated this alarm.
- * @param[in] cluster_id Custer identifier
- * @param[in] time_stamp Unsigned 32bit time stamp
- * @param[in] user_data User data
- *
- * @see zb_zcl_alarm_get_alarm()
- */
-typedef void (*zb_zcl_alarm_get_alarm_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned char alarm_code,
-               unsigned short cluster_id,
-               unsigned int time_stamp,
-               void *user_data);
-
-/* Table 3.56 Received Command IDs for the Alarms Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Reset Alarm                          |     M      |
- * |             0x01               | Reset all alarms                     |     M      |
- * |             0x02               | Get Alarm                            |     O      |
- * |             0x03               | Reset alarm log                      |     O      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'reset alarm' command.
- * @details This command resets a specific alarm. This is needed for some alarms that do
- * not reset automatically. If the alarm condition being reset was in fact still active
- * then a new notification will be generated and, where implemented, a new record added
- * to the alarm log.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Destination endpoint
- * @param[in] alarm_code Alarm code (8bit enumeration)
- * @                     Identifying code for the cause of the alarm,
- * @                     as given in the specification of the cluster
- * @                     whose attribute generated this alarm.
- * @param[in] cluster_id Custer identifier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- */
-int zb_zcl_alarm_reset_alarm(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char alarm_code,
-               unsigned short cluster_id);
-
-/**
- * @brief Sends 'reset all alarm' command.
- * @details This command resets all alarms. Any alarm conditions that were in fact still
- * active will cause a new notification to be generated and, where implemented, a new
- * record added to the alarm log.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Destination endpoint
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- */
-int zb_zcl_alarm_reset_all_alarm(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @brief Sends 'get alarm' coommand.
- * @details This command causes the alarm with the earliest timestamp in the alarm table
- * to be reported in a get alarm response command 3.11.2.5.2. This command enables
- * the reading of logged alarm conditions from the alarm table. Once an alarm
- * condition has been reported the corresponding entry in the table is removed.
- * This command does not have a payload.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Destination endpoint
- * @param[in] cb Response callback function pointer
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_alarm_get_alarm_rsp()
- */
-int zb_zcl_alarm_get_alarm(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               zb_zcl_alarm_get_alarm_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'reset all alarm log' command.
- * @details This command causes the alarm table to be cleared, and does not have a payload.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Destination endpoint
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- */
-int zb_zcl_alarm_reset_all_alarm_log(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ALARM_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_attribute_ids.h b/include/zcl/zb_zcl_attribute_ids.h
deleted file mode 100755 (executable)
index 09a192b..0000000
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_IDS_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_IDS_H__
-
-/**
- * @file zb_zcl_attribute_ids.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- *
- * @{
- */
-
-/**
- * @brief Attribute types for cluster: Basic.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_VERSION_ATTRIBUTE_ID = 0x0000, /**< Version */
-       ZB_ZCL_APPLICATION_VERSION_ATTRIBUTE_ID = 0x0001, /**< Application version */
-       ZB_ZCL_STACK_VERSION_ATTRIBUTE_ID = 0x0002, /**< Stack version */
-       ZB_ZCL_HW_VERSION_ATTRIBUTE_ID = 0x0003, /**< HW version */
-       ZB_ZCL_MANUFACTURER_NAME_ATTRIBUTE_ID = 0x0004, /**< Manufacturer name  */
-       ZB_ZCL_MODEL_IDENTIFIER_ATTRIBUTE_ID = 0x0005, /**< Model identifier */
-       ZB_ZCL_DATE_CODE_ATTRIBUTE_ID = 0x0006, /**< Date code */
-       ZB_ZCL_POWER_SOURCE_ATTRIBUTE_ID = 0x0007, /**< Power source */
-       ZB_ZCL_APPLICATION_PROFILE_VERSION_ATTRIBUTE_ID = 0x0008, /**< Application profile version */
-       ZB_ZCL_LOCATION_DESCRIPTION_ATTRIBUTE_ID = 0x0010, /**< Location description */
-       ZB_ZCL_PHYSICAL_ENVIRONMENT_ATTRIBUTE_ID = 0x0011, /**< Physical environment */
-       ZB_ZCL_DEVICE_ENABLED_ATTRIBUTE_ID = 0x0012, /**< Device enabled */
-       ZB_ZCL_ALARM_MASK_ATTRIBUTE_ID = 0x0013, /**< Alarm mask */
-       ZB_ZCL_DISABLE_LOCAL_CONFIG_ATTRIBUTE_ID = 0x0014, /**< Disable local config */
-       ZB_ZCL_SW_BUILD_ID_ATTRIBUTE_ID = 0x4000, /**< SW build id ((since zll-1.0-11-0037-10)) */
-} zb_zcl_basic_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Power Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_MAINS_VOLTAGE_ATTRIBUTE_ID = 0x0000, /**< Mains voltage */
-       ZB_ZCL_MAINS_FREQUENCY_ATTRIBUTE_ID = 0x0001, /**< Mains frequency */
-       ZB_ZCL_MAINS_ALARM_MASK_ATTRIBUTE_ID = 0x0010, /**< Mains alarm mask */
-       ZB_ZCL_MAINS_VOLTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x0011, /**< Mains voltage min. threshold */
-       ZB_ZCL_MAINS_VOLTAGE_MAX_THRESHOLD_ATTRIBUTE_ID = 0x0012, /**< Mains voltage max. threshold  */
-       ZB_ZCL_MAINS_VOLTAGE_DWELL_TRIP_POINT_ATTRIBUTE_ID = 0x0013, /**< Mains voltage dwell trip point  */
-       ZB_ZCL_BATTERY_VOLTAGE_ATTRIBUTE_ID = 0x0020, /**< Battery voltage */
-       ZB_ZCL_BATTERY_PERCENTAGE_REMAINING_ATTRIBUTE_ID = 0x0021, /**< Battery percentage remaining (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_MANUFACTURER_ATTRIBUTE_ID = 0x0030, /**< Battery manufacturer id  */
-       ZB_ZCL_BATTERY_SIZE_ATTRIBUTE_ID = 0x0031, /**< Battery size */
-       ZB_ZCL_BATTERY_AHR_RATING_ATTRIBUTE_ID = 0x0032, /**< Battery Ampere/Hr rating */
-       ZB_ZCL_BATTERY_QUANTITY_ATTRIBUTE_ID = 0x0033, /**< Battery quantity */
-       ZB_ZCL_BATTERY_RATED_VOLTAGE_ATTRIBUTE_ID = 0x0034, /**< Battery rated voltage */
-       ZB_ZCL_BATTERY_ALARM_MASK_ATTRIBUTE_ID = 0x0035, /**< Battery alarm mask */
-       ZB_ZCL_BATTERY_VOLTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x0036, /**< Battery voltage min. threshold */
-       ZB_ZCL_BATTERY_VOLTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x0037, /**< Battery voltage threshold 1 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_VOLTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x0038, /**< Battery voltage threshold 2 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_VOLTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x0039, /**< Battery voltage threshold 3 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_PERCENTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x003A, /**< Battery percentage min. threshold (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_PERCENTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x003B, /**< Battery percentage threshold 1 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_PERCENTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x003C, /**< Battery percentage threshold 2 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_PERCENTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x003D, /**< Battery percentage threshold 3 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_ALARM_STATE_ATTRIBUTE_ID = 0x003E, /**< Battery alarm state (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_VOLTAGE_ATTRIBUTE_ID = 0x0040, /**< Battery 2 voltage (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_PERCENTAGE_REMAINING_ATTRIBUTE_ID = 0x0041, /**< Battery 2 percentage remaining (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_MANUFACTURER_ATTRIBUTE_ID = 0x0050, /**< Battery 2 manufacturer (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_SIZE_ATTRIBUTE_ID = 0x0051, /**< Battery 2 size  (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_AHR_RATING_ATTRIBUTE_ID = 0x0052, /**< Battery 2 Ampere/Hr rating (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_QUANTITY_ATTRIBUTE_ID = 0x0053, /**< Battery 2 quantity (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_RATED_VOLTAGE_ATTRIBUTE_ID = 0x0054, /**< Battery 2 rated voltage (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_ALARM_MASK_ATTRIBUTE_ID = 0x0055, /**< Battery 2 alarm mask (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_VOLTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x0056, /**< Battery 2 voltage min. threshold (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_VOLTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x0057, /**< Battery 2 voltage threshold 1 (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_VOLTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x0058, /**< Battery 2 voltage threshold 2 (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_VOLTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x0059, /**< Battery 2 voltage threshold 3 (since ha-1.2-05-3520-29 */
-       ZB_ZCL_BATTERY_2_PERCENTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x005A, /**< Battery 2 percentage min. threshold (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_PERCENTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x005B, /**< Battery 2 percentage threshold 1 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_PERCENTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x005C, /**< Battery 2 percentage threshold 2 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_PERCENTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x005D, /**< Battery 2 percentage threshold 3 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_2_ALARM_STATE_ATTRIBUTE_ID = 0x005E, /**< Battery 2 alarm state (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_VOLTAGE_ATTRIBUTE_ID = 0x0060, /**< Battery 3 voltage (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_PERCENTAGE_REMAINING_ATTRIBUTE_ID = 0x0061, /**< Battery 3 percentage remaining (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_MANUFACTURER_ATTRIBUTE_ID = 0x0070, /**< Battery 3 manufacturer (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_SIZE_ATTRIBUTE_ID = 0x0071, /**< Battery 3 size (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_AHR_RATING_ATTRIBUTE_ID = 0x0072, /**< Battery 3 Ampere/Hr rating (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_QUANTITY_ATTRIBUTE_ID = 0x0073, /**< Battery 3 quantity (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_RATED_VOLTAGE_ATTRIBUTE_ID = 0x0074, /**< Battery 3 rated voltage (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_ALARM_MASK_ATTRIBUTE_ID = 0x0075, /**< Battery 3 alarm mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_VOLTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x0076, /**< Battery 3 voltage min. threshold (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_VOLTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x0077, /**< Battery 3 voltage threshold 1 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_VOLTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x0078, /**< Battery 3 voltage threshold 2 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_VOLTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x0079, /**< Battery 3 voltage threshold 3 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_PERCENTAGE_MIN_THRESHOLD_ATTRIBUTE_ID = 0x007A, /**< Battery 3 percentage min. threshold (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_PERCENTAGE_THRESHOLD_1_ATTRIBUTE_ID = 0x007B, /**< Battery 3 percentage threshold 1 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_PERCENTAGE_THRESHOLD_2_ATTRIBUTE_ID = 0x007C, /**< Battery 3 percentage threshold 2 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_PERCENTAGE_THRESHOLD_3_ATTRIBUTE_ID = 0x007D, /**< Battery 3 percentage threshold 3 (since ha-1.2-05-3520-29) */
-       ZB_ZCL_BATTERY_3_ALARM_STATE_ATTRIBUTE_ID = 0x007E, /**< Battery 3 alarm state (since ha-1.2-05-3520-29) */
-} zb_zcl_power_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Device Temperature Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_CURRENT_TEMPERATURE_ATTRIBUTE_ID = 0x0000, /**< Current temperature */
-       ZB_ZCL_MIN_TEMP_EXPERIENCED_ATTRIBUTE_ID = 0x0001, /**< Min. temp. experienced */
-       ZB_ZCL_MAX_TEMP_EXPERIENCED_ATTRIBUTE_ID = 0x0002, /**< Max. temp. experienced */
-       ZB_ZCL_OVER_TEMP_TOTAL_DWELL_ATTRIBUTE_ID = 0x0003, /**< Over temp. total dwell mask */
-       ZB_ZCL_DEVICE_TEMP_ALARM_MASK_ATTRIBUTE_ID = 0x0010, /**< Device temp. alarm mask */
-       ZB_ZCL_LOW_TEMP_THRESHOLD_ATTRIBUTE_ID = 0x0011, /**< Low temp. threshold */
-       ZB_ZCL_HIGH_TEMP_THRESHOLD_ATTRIBUTE_ID = 0x0012, /**< High temp. threshold */
-       ZB_ZCL_LOW_TEMP_DWELL_TRIP_POINT_ATTRIBUTE_ID = 0x0013, /**< Low temp. dwell trip point */
-       ZB_ZCL_HIGH_TEMP_DWELL_TRIP_POINT_ATTRIBUTE_ID = 0x0014, /**< HIgh temp. dwell trip point */
-} zb_zcl_device_temperature_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Identify.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID = 0x0000, /**< Identity time */
-       ZB_ZCL_COMMISSION_STATE_ATTRIBUTE_ID = 0x0001, /**< Commission state */
-} zb_zcl_identify_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Groups.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_GROUP_NAME_SUPPORT_ATTRIBUTE_ID = 0x0000, /**< Group name support */
-} zb_zcl_group_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Scenes.
- * @details Cluster specification level: zcl-1.0-07-5123-03\n
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_SCENE_COUNT_ATTRIBUTE_ID = 0x0000, /**< Scene count */
-       ZB_ZCL_CURRENT_SCENE_ATTRIBUTE_ID = 0x0001, /**< Current scene */
-       ZB_ZCL_CURRENT_GROUP_ATTRIBUTE_ID = 0x0002, /**< Current group */
-       ZB_ZCL_SCENE_VALID_ATTRIBUTE_ID = 0x0003, /**< Scene valid */
-       ZB_ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID = 0x0004, /**< Scene name support */
-       ZB_ZCL_LAST_CONFIGURED_BY_ATTRIBUTE_ID = 0x0005, /**< Last configured by */
-} zb_zcl_scenes_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: On/off.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ON_OFF_ATTRIBUTE_ID = 0x0000, /**< On/off */
-       ZB_ZCL_SAMPLE_MFG_SPECIFIC_TRANSITION_TIME_ATTRIBUTE_ID = 0x0000, /**< Sample manufacturer specific transition time */
-       ZB_ZCL_GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID = 0x4000, /**< Global scene control (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ON_TIME_ATTRIBUTE_ID = 0x4001, /**< On time (since zll-1.0-11-0037-10) */
-       ZB_ZCL_OFF_WAIT_TIME_ATTRIBUTE_ID = 0x4002, /**< Off wait time (since zll-1.0-11-0037-10) */
-} zb_zcl_on_off_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: On/off Switch Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_SWITCH_TYPE_ATTRIBUTE_ID = 0x0000, /**< Switch type */
-       ZB_ZCL_SWITCH_ACTIONS_ATTRIBUTE_ID = 0x0010, /**< Switch action */
-} zb_zcl_on_off_switc_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Level Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_CURRENT_LEVEL_ATTRIBUTE_ID = 0x0000, /**< Current level */
-       ZB_ZCL_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE_ID = 0x0001, /**< Level control remaining */
-       ZB_ZCL_ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID = 0x0010, /**< On/off transition time */
-       ZB_ZCL_ON_LEVEL_ATTRIBUTE_ID = 0x0011, /**< On level */
-       ZB_ZCL_ON_TRANSITION_TIME_ATTRIBUTE_ID = 0x0012, /**< On transition time (since ha-1.2-05-3520-29) */
-       ZB_ZCL_OFF_TRANSITION_TIME_ATTRIBUTE_ID = 0x0013, /**< Off transition time (since ha-1.2-05-3520-29) */
-       ZB_ZCL_DEFAULT_MOVE_RATE_ATTRIBUTE_ID = 0x0014, /**< Default move rate (since ha-1.2-05-3520-29) */
-} zb_zcl_level_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Alarms.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ALARM_COUNT_ATTRIBUTE_ID = 0x0000, /**< alarm count */
-} zb_zcl_alarms_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Time.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_TIME_ATTRIBUTE_ID = 0x0000, /**< Time */
-       ZB_ZCL_TIME_STATUS_ATTRIBUTE_ID = 0x0001, /**< Time status */
-       ZB_ZCL_TIME_ZONE_ATTRIBUTE_ID = 0x0002, /**< Time zone */
-       ZB_ZCL_DST_START_ATTRIBUTE_ID = 0x0003, /**< Destination start */
-       ZB_ZCL_DST_END_ATTRIBUTE_ID = 0x0004, /**< Destination end */
-       ZB_ZCL_DST_SHIFT_ATTRIBUTE_ID = 0x0005, /**< Destination shift */
-       ZB_ZCL_STANDARD_TIME_ATTRIBUTE_ID = 0x0006, /**< Standard time */
-       ZB_ZCL_LOCAL_TIME_ATTRIBUTE_ID = 0x0007, /**< Local time */
-       ZB_ZCL_LAST_SET_TIME_ATTRIBUTE_ID = 0x0008, /**< Last set time */
-       ZB_ZCL_VALID_UNTIL_TIME_ATTRIBUTE_ID = 0x0009, /**< Valid until time */
-} zb_zcl_time_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: RSSI Location.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_LOCATION_TYPE_ATTRIBUTE_ID = 0x0000, /**< Location type */
-       ZB_ZCL_LOCATION_METHOD_ATTRIBUTE_ID = 0x0001, /**< Location method */
-       ZB_ZCL_LOCATION_AGE_ATTRIBUTE_ID = 0x0002, /**< Location age */
-       ZB_ZCL_QUALITY_MEASURE_ATTRIBUTE_ID = 0x0003, /**< Quality measure */
-       ZB_ZCL_NUMBER_OF_DEVICES_ATTRIBUTE_ID = 0x0004, /**< Number of devices */
-       ZB_ZCL_COORDINATE1_ATTRIBUTE_ID = 0x0010, /**< Coordinate 1 */
-       ZB_ZCL_COORDINATE2_ATTRIBUTE_ID = 0x0011, /**< Coordinate 2 */
-       ZB_ZCL_COORDINATE3_ATTRIBUTE_ID = 0x0012, /**< Coordinate 3 */
-       ZB_ZCL_POWER_ATTRIBUTE_ID = 0x0013, /**< Power */
-       ZB_ZCL_PATH_LOSS_EXPONENT_ATTRIBUTE_ID = 0x0014, /**< Path loss exponent */
-       ZB_ZCL_REPORTING_PERIOD_ATTRIBUTE_ID = 0x0015, /**< Reporting period */
-       ZB_ZCL_CALCULATION_PERIOD_ATTRIBUTE_ID = 0x0016, /**< Calculation period */
-       ZB_ZCL_NUMBER_RSSI_MEASUREMENTS_ATTRIBUTE_ID = 0x0017, /**< Number RSSI measurements */
-} zb_zcl_rssi_location_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Binary Input (Basic).
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ACTIVE_TEXT_ATTRIBUTE_ID = 0x0004, /**< Active text */
-       ZB_ZCL_DESCRIPTION_ATTRIBUTE_ID = 0x001C, /**< Description */
-       ZB_ZCL_INACTIVE_TEXT_ATTRIBUTE_ID = 0x002E, /**< Inactive text */
-       ZB_ZCL_OUT_OF_SERVICE_ATTRIBUTE_ID = 0x0051, /**< Out of service */
-       ZB_ZCL_POLARITY_ATTRIBUTE_ID = 0x0054, /**< Polarity */
-       ZB_ZCL_PRESENT_VALUE_ATTRIBUTE_ID = 0x0055, /**< Present value */
-       ZB_ZCL_RELIABILITY_ATTRIBUTE_ID = 0x0067, /**< Reliability */
-       ZB_ZCL_STATUS_FLAGS_ATTRIBUTE_ID = 0x006F, /**< Status flag */
-       ZB_ZCL_APPLICATION_TYPE_ATTRIBUTE_ID = 0x0100, /**< Application type */
-} zb_zcl_binary_input_basic_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Commissioning.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_SHORT_ADDRESS_ATTRIBUTE_ID = 0x0000, /**< Short address */
-       ZB_ZCL_EXTENDED_PAN_ID_ATTRIBUTE_ID = 0x0001, /**< Extended PAN ID */
-       ZB_ZCL_PAN_ID_ATTRIBUTE_ID = 0x0002, /**< PAN ID */
-       ZB_ZCL_CHANNEL_MASK_ATTRIBUTE_ID = 0x0003, /**< Channel mask */
-       ZB_ZCL_PROTOCOL_VERSION_ATTRIBUTE_ID = 0x0004, /**< Protocol version */
-       ZB_ZCL_STACK_PROFILE_ATTRIBUTE_ID = 0x0005, /**< Stack profile */
-       ZB_ZCL_STARTUP_CONTROL_ATTRIBUTE_ID = 0x0006, /**< Startup control */
-       ZB_ZCL_TRUST_CENTER_ADDRESS_ATTRIBUTE_ID = 0x0010, /**< Trust center address */
-       ZB_ZCL_TRUST_CENTER_MASTER_KEY_ATTRIBUTE_ID = 0x0011, /**< Trust center master key */
-       ZB_ZCL_NETWORK_KEY_ATTRIBUTE_ID = 0x0012, /**< Network key */
-       ZB_ZCL_USE_INSECURE_JOIN_ATTRIBUTE_ID = 0x0013, /**< Use insecure join */
-       ZB_ZCL_PRECONFIGURED_LINK_KEY_ATTRIBUTE_ID = 0x0014, /**< Preconfigured link key */
-       ZB_ZCL_NETWORK_KEY_SEQUENCE_NUMBER_ATTRIBUTE_ID = 0x0015, /**< Network key sequence number */
-       ZB_ZCL_NETWORK_KEY_TYPE_ATTRIBUTE_ID = 0x0016, /**< Network key type */
-       ZB_ZCL_NETWORK_MANAGER_ADDRESS_ATTRIBUTE_ID = 0x0017, /**< Network manager address */
-       ZB_ZCL_SCAN_ATTEMPTS_ATTRIBUTE_ID = 0x0020, /**< Scan attempts */
-       ZB_ZCL_TIME_BETWEEN_SCANS_ATTRIBUTE_ID = 0x0021, /**< Time between scans */
-       ZB_ZCL_REJOIN_INTERVAL_ATTRIBUTE_ID = 0x0022, /**< Re-join interval */
-       ZB_ZCL_MAX_REJOIN_INTERVAL_ATTRIBUTE_ID = 0x0023, /**< Max re-join interval */
-       ZB_ZCL_INDIRECT_POLL_RATE_ATTRIBUTE_ID = 0x0030, /**< Indirect poll rate */
-       ZB_ZCL_PARENT_RETRY_THRESHOLD_ATTRIBUTE_ID = 0x0031, /**< Parent retry threshold */
-       ZB_ZCL_CONCENTRATOR_FLAG_ATTRIBUTE_ID = 0x0040, /**< Concentrator flag */
-       ZB_ZCL_CONCENTRATOR_RADIUS_ATTRIBUTE_ID = 0x0041, /**< Concentrator radius */
-       ZB_ZCL_CONCENTRATOR_DISCOVERY_TIME_ATTRIBUTE_ID = 0x0042, /**< Concentrator discovery time */
-} zb_zcl_commissioning_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Partition.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_PARTITION_MAXIMUM_INCOMING_TRANSFER_SIZE_ATTRIBUTE_ID = 0x0000, /**< Partition maximum incoming transfer size */
-       ZB_ZCL_PARTITION_MAXIMUM_OUTGOING_TRANSFER_SIZE_ATTRIBUTE_ID = 0x0001, /**< Partition maximum outgoing transfer size */
-       ZB_ZCL_PARTIONED_FRAME_SIZE_ATTRIBUTE_ID = 0x0002, /**< Partioned frame size */
-       ZB_ZCL_LARGE_FRAME_SIZE_ATTRIBUTE_ID = 0x0003, /**< Large frame size */
-       ZB_ZCL_NUMBER_OF_ACK_FRAME_ATTRIBUTE_ID = 0x0004, /**< Number of ACK frame */
-       ZB_ZCL_NACK_TIMEOUT_ATTRIBUTE_ID = 0x0005, /**< NACK timeout */
-       ZB_ZCL_INTERFRAME_DELAY_ATTRIBUTE_ID = 0x0006, /**< Interframe delay */
-       ZB_ZCL_NUMBER_OF_SEND_RETRIES_ATTRIBUTE_ID = 0x0007, /**< Number of send retries */
-       ZB_ZCL_SENDER_TIMEOUT_ATTRIBUTE_ID = 0x0008, /**< Sender timeout */
-       ZB_ZCL_RECEIVER_TIMEOUT_ATTRIBUTE_ID = 0x0009, /**< Receiver timeout */
-} zb_zcl_partition_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Over the Air Bootloading.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_UPGRADE_SERVER_ID_ATTRIBUTE_ID = 0x0000, /**< Upgrade server ID */
-       ZB_ZCL_FILE_OFFSET_ATTRIBUTE_ID = 0x0001, /**< File offset */
-       ZB_ZCL_CURRENT_FILE_VERSION_ATTRIBUTE_ID = 0x0002, /**< Current file version */
-       ZB_ZCL_CURRENT_ZIGBEE_STACK_VERSION_ATTRIBUTE_ID = 0x0003, /**< Current Zigbee stack version */
-       ZB_ZCL_DOWNLOADED_FILE_VERSION_ATTRIBUTE_ID = 0x0004, /**< Download file version */
-       ZB_ZCL_DOWNLOADED_ZIGBEE_STACK_VERSION_ATTRIBUTE_ID = 0x0005, /**< Download Zigbee stack version */
-       ZB_ZCL_IMAGE_UPGRADE_STATUS_ATTRIBUTE_ID = 0x0006, /**< Image upgrade status */
-       ZB_ZCL_MANUFACTURER_ID_ATTRIBUTE_ID = 0x0007, /**< Manufacturer ID */
-       ZB_ZCL_IMAGE_TYPE_ID_ATTRIBUTE_ID = 0x0008, /**< Image type ID */
-       ZB_ZCL_MINIMUM_BLOCK_REQUEST_PERIOD_ATTRIBUTE_ID = 0x0009, /**< Minimum block request period (since ha-1.2-05-3520-29) */
-       ZB_ZCL_IMAGE_STAMP_ATTRIBUTE_ID = 0x000A, /**< Image stamp (since ha-1.2-05-3520-29) */
-} zb_zcl_over_the_air_bootloading_client_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Power Profile.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_TOTAL_PROFILE_NUM_ATTRIBUTE_ID = 0x0000, /**< Total profile number */
-       ZB_ZCL_MULTIPLE_SCHEDULING_ATTRIBUTE_ID = 0x0001, /**< Multiple scheduling */
-       ZB_ZCL_ENERGY_FORMATTING_ATTRIBUTE_ID = 0x0002, /**< Energy formatting */
-       ZB_ZCL_ENERGY_REMOTE_ATTRIBUTE_ID = 0x0003, /**< Energy remote */
-       ZB_ZCL_SCHEDULE_MODE_ATTRIBUTE_ID = 0x0004, /**< Schedule mode */
-} zb_zcl_power_profile_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Appliance Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_START_TIME_ATTRIBUTE_ID = 0x0000, /**< Start time */
-       ZB_ZCL_FINISH_TIME_ATTRIBUTE_ID = 0x0001, /**< Finish time */
-       ZB_ZCL_REMAINING_TIME_ATTRIBUTE_ID = 0x0002, /**< Remaining time */
-} zb_zcl_appliance_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Poll Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_CHECK_IN_INTERVAL_ATTRIBUTE_ID = 0x0000, /**< Check-in interval */
-       ZB_ZCL_LONG_POLL_INTERVAL_ATTRIBUTE_ID = 0x0001, /**< Long poll interval */
-       ZB_ZCL_SHORT_POLL_INTERVAL_ATTRIBUTE_ID = 0x0002, /**< Short poll interval */
-       ZB_ZCL_FAST_POLL_TIMEOUT_ATTRIBUTE_ID = 0x0003, /**< Fast poll interval */
-       ZB_ZCL_CHECK_IN_INTERVAL_MIN_ATTRIBUTE_ID = 0x0004, /**< Check-in interval min. */
-       ZB_ZCL_LONG_POLL_INTERVAL_MIN_ATTRIBUTE_ID = 0x0005, /**< Long poll interval min. */
-       ZB_ZCL_FAST_POLL_TIMEOUT_MAX_ATTRIBUTE_ID = 0x0006, /**< Fast poll interval min. */
-} zb_zcl_poll_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Shade Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_SHADE_CONFIG_PHYSICAL_CLOSED_LIMIT_ATTRIBUTE_ID = 0x0000, /**< Shade config physical close limit */
-       ZB_ZCL_SHADE_CONFIG_MOTOR_STEP_SIZE_ATTRIBUTE_ID = 0x0001, /**< Shade config motor step size */
-       ZB_ZCL_SHADE_CONFIG_STATUS_ATTRIBUTE_ID = 0x0002, /**< Shade config status */
-       ZB_ZCL_SHADE_CONFIG_CLOSED_LIMIT_ATTRIBUTE_ID = 0x0010, /**< Shade config close limit */
-       ZB_ZCL_SHADE_CONFIG_MODE_ATTRIBUTE_ID = 0x0011, /**< Shade config mode */
-} zb_zcl_shade_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Door Lock.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_LOCK_STATE_ATTRIBUTE_ID = 0x0000, /**< Lock state */
-       ZB_ZCL_LOCK_TYPE_ATTRIBUTE_ID = 0x0001, /**< Lock type */
-       ZB_ZCL_ACTUATOR_ENABLED_ATTRIBUTE_ID = 0x0002, /**< Actuator enabled */
-       ZB_ZCL_DOOR_STATE_ATTRIBUTE_ID = 0x0003, /**< Door state */
-       ZB_ZCL_DOOR_OPEN_EVENTS_ATTRIBUTE_ID = 0x0004, /**< Door open event */
-       ZB_ZCL_DOOR_CLOSED_EVENTS_ATTRIBUTE_ID = 0x0005, /**< Door closed event */
-       ZB_ZCL_OPEN_PERIOD_ATTRIBUTE_ID = 0x0006, /**< Open period */
-       ZB_ZCL_NUM_LOCK_RECORDS_SUPPORTED_ATTRIBUTE_ID = 0x0010, /**< Number of lock records supported (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_TOTAL_USERS_SUPPORTED_ATTRIBUTE_ID = 0x0011, /**< Number of total users supported (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_PIN_USERS_SUPPORTED_ATTRIBUTE_ID = 0x0012, /**< Number of PIN users supported (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_RFID_USERS_SUPPORTED_ATTRIBUTE_ID = 0x0013, /**< Number of RFID users supported (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_WEEKDAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 0x0014, /**< Number of weekday schedules supported per user (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_YEARDAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 0x0015, /**< Number of yearday schedules supported per user (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUM_HOLIDAY_SCHEDULES_SUPPORTED_PER_USER_ATTRIBUTE_ID = 0x0016, /**< Number of holiday schedules supported per user (since ha-1.2-05-3520-29) */
-       ZB_ZCL_MAX_PIN_LENGTH_ATTRIBUTE_ID = 0x0017, /**< Max. PIN length (since ha-1.2-05-3520-29) */
-       ZB_ZCL_MIN_PIN_LENGTH_ATTRIBUTE_ID = 0x0018, /**< Min. PIN length (since ha-1.2-05-3520-29) */
-       ZB_ZCL_MAX_RFID_CODE_LENGTH_ATTRIBUTE_ID = 0x0019, /**< Max. RFID code length (since ha-1.2-05-3520-29) */
-       ZB_ZCL_MIN_RFID_CODE_LENGTH_ATTRIBUTE_ID = 0x001A, /**< Min. RFID code length (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ENABLE_LOGGING_ATTRIBUTE_ID = 0x0020, /**< Enable logging (since ha-1.2-05-3520-29) */
-       ZB_ZCL_LANGUAGE_ATTRIBUTE_ID = 0x0021, /**< Language (since ha-1.2-05-3520-29) */
-       ZB_ZCL_LED_SETTINGS_ATTRIBUTE_ID = 0x0022, /**< LED settings (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AUTO_RELOCK_TIME_ATTRIBUTE_ID = 0x0023, /**< Auto relock time (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SOUND_VOLUME_ATTRIBUTE_ID = 0x0024, /**< Sound volume (since ha-1.2-05-3520-29) */
-       ZB_ZCL_OPERATING_MODE_ATTRIBUTE_ID = 0x0025, /**< Operating mode (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_ID = 0x0026, /**< Supported operating modes (since ha-1.2-05-3520-29) */
-       ZB_ZCL_DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_ID = 0x0027, /**< Default configuration register (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ENABLE_LOCAL_PROGRAMMING_ATTRIBUTE_ID = 0x0028, /**< Enable local programming (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ENABLE_ONE_TOUCH_LOCKING_ATTRIBUTE_ID = 0x0029, /**< Enable one touch locking (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ENABLE_INSIDE_STATUS_LED_ATTRIBUTE_ID = 0x002A, /**< Enable inside status LED (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ENABLE_PRIVACY_MODE_BUTTON_ATTRIBUTE_ID = 0x002B, /**< Enable privacy mode button (since ha-1.2-05-3520-29) */
-       ZB_ZCL_WRONG_CODE_ENTRY_LIMIT_ATTRIBUTE_ID = 0x0030, /**< Wrong code entry limit (since ha-1.2-05-3520-29) */
-       ZB_ZCL_USER_CODE_TEMPORARY_DISABLE_TIME_ATTRIBUTE_ID = 0x0031, /**< User code temporary disable time (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SEND_PIN_OVER_THE_AIR_ATTRIBUTE_ID = 0x0032, /**< Send PIN Over-The-Air (since ha-1.2-05-3520-29) */
-       ZB_ZCL_REQUIRE_PIN_FOR_RF_OPERATION_ATTRIBUTE_ID = 0x0033, /**< Require PIN for RF operation (since ha-1.2-05-3520-29) */
-       ZB_ZCL_ZIGBEE_SECURITY_LEVEL_ATTRIBUTE_ID = 0x0034, /**< Zigbee security level (since ha-1.2-05-3520-29) */
-       ZB_ZCL_DOOR_LOCK_ALARM_MASK_ATTRIBUTE_ID = 0x0040, /**< Door lock alarm mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_KEYPAD_OPERATION_EVENT_MASK_ATTRIBUTE_ID = 0x0041, /**< Keypad operation event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_RF_OPERATION_EVENT_MASK_ATTRIBUTE_ID = 0x0042, /**< RF operation event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_MANUAL_OPERATION_EVENT_MASK_ATTRIBUTE_ID = 0x0043, /**< Manual operation event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_RFID_OPERATION_EVENT_MASK_ATTRIBUTE_ID = 0x0044, /**< RFID operation event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_KEYPAD_PROGRAMMING_EVENT_MASK_ATTRIBUTE_ID = 0x0045, /**< Keypad programming event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_RF_PROGRAMMING_EVENT_MASK_ATTRIBUTE_ID = 0x0046, /**< RF programming event mask (since ha-1.2-05-3520-29) */
-       ZB_ZCL_RFID_PROGRAMMING_EVENT_MASK_ATTRIBUTE_ID = 0x0047, /**< RFID programming event mask (since ha-1.2-05-3520-29) */
-} zb_zcl_door_lock_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Window Covering.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_COVERING_TYPE_ATTRIBUTE_ID = 0x0000, /**< Covering type */
-       ZB_ZCL_LIMIT_LIFT_ATTRIBUTE_ID = 0x0001, /**< Limit lift */
-       ZB_ZCL_LIMIT_TILT_ATTRIBUTE_ID = 0x0002, /**< Limit tilt */
-       ZB_ZCL_CURRENT_LIFT_ATTRIBUTE_ID = 0x0003, /**< Current lift */
-       ZB_ZCL_CURRENT_TILT_ATTRIBUTE_ID = 0x0004, /**< Current tilt */
-       ZB_ZCL_NUMBER_LIFT_ATTRIBUTE_ID = 0x0005, /**< Number lift */
-       ZB_ZCL_NUMBER_TILT_ATTRIBUTE_ID = 0x0006, /**< Number tilt */
-       ZB_ZCL_CONFIG_STATUS_ATTRIBUTE_ID = 0x0007, /**< Config status */
-       ZB_ZCL_CURRENT_LIFT_PERCENTAGE_ATTRIBUTE_ID = 0x0008, /**< Current lift percentage */
-       ZB_ZCL_CURRENT_TILT_PERCENTAGE_ATTRIBUTE_ID = 0x0009, /**< Current tilt percentage */
-       ZB_ZCL_OPEN_LIMIT_LIFT_ATTRIBUTE_ID = 0x0010, /**< Open limit lift */
-       ZB_ZCL_CLOSED_LIMIT_LIFT_ATTRIBUTE_ID = 0x0011, /**< Closed limit lift */
-       ZB_ZCL_OPEN_LIMIT_TILT_ATTRIBUTE_ID = 0x0012, /**< Open limit tilt */
-       ZB_ZCL_CLOSED_LIMIT_TILT_ATTRIBUTE_ID = 0x0013, /**< Closed limit tilt */
-       ZB_ZCL_VELOCITY_LIFT_ATTRIBUTE_ID = 0x0014, /**< Velocity lift */
-       ZB_ZCL_ACCELERATION_LIFT_ATTRIBUTE_ID = 0x0015, /**< Acceleration lift */
-       ZB_ZCL_DECELERATION_LIFT_ATTRIBUTE_ID = 0x0016, /**< Deceleration lift */
-       ZB_ZCL_MODE_ATTRIBUTE_ID = 0x0017, /**< Mode */
-       ZB_ZCL_SETPOINTS_LIFT_ATTRIBUTE_ID = 0x0018, /**< Setpoints lift */
-       ZB_ZCL_SETPOINTS_TILT_ATTRIBUTE_ID = 0x0019, /**< Setpoints tilt */
-} zb_zcl_window_covering_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Pump Configuration and Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_MAX_PRESSURE_ATTRIBUTE_ID = 0x0000, /**< Max. pressure */
-       ZB_ZCL_MAX_SPEED_ATTRIBUTE_ID = 0x0001, /**< Max. speed */
-       ZB_ZCL_MAX_FLOW_ATTRIBUTE_ID = 0x0002, /**< Max. flow */
-       ZB_ZCL_MIN_CONST_PRESSURE_ATTRIBUTE_ID = 0x0003, /**< Min. const. pressure */
-       ZB_ZCL_MAX_CONST_PRESSURE_ATTRIBUTE_ID = 0x0004, /**< Max. const. pressure */
-       ZB_ZCL_MIN_COMP_PRESSURE_ATTRIBUTE_ID = 0x0005, /**< Min. comp pressure */
-       ZB_ZCL_MAX_COMP_PRESSURE_ATTRIBUTE_ID = 0x0006, /**< Max. comp pressure */
-       ZB_ZCL_MIN_CONST_SPEED_ATTRIBUTE_ID = 0x0007, /**< Min. const. speed */
-       ZB_ZCL_MAX_CONST_SPEED_ATTRIBUTE_ID = 0x0008, /**< Max. const. speed */
-       ZB_ZCL_MIN_CONST_FLOW_ATTRIBUTE_ID = 0x0009, /**< Min. const. flow */
-       ZB_ZCL_MAX_CONST_FLOW_ATTRIBUTE_ID = 0x000A, /**< Max const. flow */
-       ZB_ZCL_MIN_CONST_TEMP_ATTRIBUTE_ID = 0x000B, /**< Min. const. temperature */
-       ZB_ZCL_MAX_CONST_TEMP_ATTRIBUTE_ID = 0x000C, /**< Max. const. temperature */
-       ZB_ZCL_PUMP_STATUS_ATTRIBUTE_ID = 0x0010, /**< Pump status */
-       ZB_ZCL_EFFECTIVE_OPERATION_MODE_ATTRIBUTE_ID = 0x0011, /**< Effective operation mode */
-       ZB_ZCL_EFFECTIVE_CONTROL_MODE_ATTRIBUTE_ID = 0x0012, /**< Effective control mode */
-       ZB_ZCL_CAPACITY_ATTRIBUTE_ID = 0x0013, /**< Capacity */
-       ZB_ZCL_SPEED_ATTRIBUTE_ID = 0x0014, /**< Speed */
-       ZB_ZCL_LIFETIME_RUNNING_HOURS_ATTRIBUTE_ID = 0x0015, /**< Lifetime running hours */
-       ZB_ZCL_PUMP_POWER_ATTRIBUTE_ID = 0x0016, /**< Pump power */
-       ZB_ZCL_LIFETIME_ENERGY_CONSUMED_ATTRIBUTE_ID = 0x0017, /**< Lifetime energy consumed */
-       ZB_ZCL_OPERATION_MODE_ATTRIBUTE_ID = 0x0020, /**< Operation mode */
-       ZB_ZCL_CONTROL_MODE_ATTRIBUTE_ID = 0x0021, /**< Control mode */
-       ZB_ZCL_PUMP_ALARM_MASK_ATTRIBUTE_ID = 0x0022, /**< Pump alarm mask */
-} zb_zcl_pump_configuration_and_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Thermostat.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_LOCAL_TEMPERATURE_ATTRIBUTE_ID = 0x0000, /**< Local temperature */
-       ZB_ZCL_OUTDOOR_TEMPERATURE_ATTRIBUTE_ID = 0x0001, /**< Outdoor temperature */
-       ZB_ZCL_THERMOSTAT_OCCUPANCY_ATTRIBUTE_ID = 0x0002, /**< Thermostat occupancy */
-       ZB_ZCL_ABS_MIN_HEAT_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0003, /**< Abs. min. heat setpoint limit */
-       ZB_ZCL_ABS_MAX_HEAT_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0004, /**< Abs. max. heat setpoint limit */
-       ZB_ZCL_ABS_MIN_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0005, /**< Abs. min. cool setpoint limit */
-       ZB_ZCL_ABS_MAX_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0006, /**< Abs. max. cool setpoint limit */
-       ZB_ZCL_PI_COOLING_DEMAND_ATTRIBUTE_ID = 0x0007, /**< PI cooling demand */
-       ZB_ZCL_PI_HEATING_DEMAND_ATTRIBUTE_ID = 0x0008, /**< PI heating demand */
-       ZB_ZCL_HVAC_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID = 0x0009, /**< HVAC system type configuration (since ha-1.2-05-3520-29) */
-       ZB_ZCL_LOCAL_TEMPERATURE_CALIBRATION_ATTRIBUTE_ID = 0x0010, /**< Local temperature calibration */
-       ZB_ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID = 0x0011, /**< Occupied cooling setpoint */
-       ZB_ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID = 0x0012, /**< Occupied heating setpoint */
-       ZB_ZCL_UNOCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID = 0x0013, /**< Unoccupied cooling setpoint */
-       ZB_ZCL_UNOCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID = 0x0014, /**< Unoccupied heating setpoint */
-       ZB_ZCL_MIN_HEAT_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0015, /**< Min. heat setpoint limit */
-       ZB_ZCL_MAX_HEAT_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0016, /**< Max. heat setpoint limit */
-       ZB_ZCL_MIN_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0017, /**< Min. cool setpoint limit */
-       ZB_ZCL_MAX_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 0x0018, /**< Max. cool setpoint limit */
-       ZB_ZCL_MIN_SETPOINT_DEAD_BAND_ATTRIBUTE_ID = 0x0019, /**< Min. setpoint dead band */
-       ZB_ZCL_REMOTE_SENSING_ATTRIBUTE_ID = 0x001A, /**< Remote sensing */
-       ZB_ZCL_CONTROL_SEQUENCE_OF_OPERATION_ATTRIBUTE_ID = 0x001B, /**< Control sequence of operation */
-       ZB_ZCL_SYSTEM_MODE_ATTRIBUTE_ID = 0x001C, /**< System mode */
-       ZB_ZCL_THERMOSTAT_ALARM_MASK_ATTRIBUTE_ID = 0x001D, /**< Thermostat alarm mask */
-       ZB_ZCL_THERMOSTAT_RUNNING_MODE_ATTRIBUTE_ID = 0x001E, /**< Thermostat running mode (since ha-1.2-05-3520-29) */
-       ZB_ZCL_START_OF_WEEK_ATTRIBUTE_ID = 0x0020, /**< Smart of week (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUMBER_OF_WEEKLY_TRANSITIONS_ATTRIBUTE_ID = 0x0021, /**< Number of weekly transitions (since ha-1.2-05-3520-29) */
-       ZB_ZCL_NUMBER_OF_DAILY_TRANSITIONS_ATTRIBUTE_ID = 0x0022, /**< Number of daily transition (since ha-1.2-05-3520-29) */
-       ZB_ZCL_TEMPERATURE_SETPOINT_HOLD_ATTRIBUTE_ID = 0x0023, /**< Temperature setpoint hold (since ha-1.2-05-3520-29) */
-       ZB_ZCL_TEMPERATURE_SETPOINT_HOLD_DURATION_ATTRIBUTE_ID = 0x0024, /**< Temperature setpoint hold duration mode (since ha-1.2-05-3520-29) */
-       ZB_ZCL_THERMOSTAT_PROGRAMMING_OPERATION_MODE_ATTRIBUTE_ID = 0x0025, /**< Thermostat programming operation mode (since ha-1.2-05-3520-29) */
-       ZB_ZCL_THERMOSTAT_RUNNING_STATE_ATTRIBUTE_ID = 0x0029, /**< Thermostat running state (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SETPOINT_CHANGE_SOURCE_ATTRIBUTE_ID = 0x0030, /**< Setpoint change source (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SETPOINT_CHANGE_AMOUNT_ATTRIBUTE_ID = 0x0031, /**< Setpoint change amount (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SETPOINT_CHANGE_SOURCE_TIMESTAMP_ATTRIBUTE_ID = 0x0032, /**< Setpoint change source timestamp (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_TYPE_ATTRIBUTE_ID = 0x0040, /**< AC type (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_CAPACITY_ATTRIBUTE_ID = 0x0041, /**< AC capacity (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_REFRIGERANT_TYPE_ATTRIBUTE_ID = 0x0042, /**< AC refrigerant type (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_COMPRESSOR_ATTRIBUTE_ID = 0x0043, /**< AC compressor (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_ERROR_CODE_ATTRIBUTE_ID = 0x0044, /**< AC error mode (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_LOUVER_POSITION_ATTRIBUTE_ID = 0x0045, /**< AC louver position (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_COIL_TEMPERATURE_ATTRIBUTE_ID = 0x0046, /**< AC coil temperature (since ha-1.2-05-3520-29) */
-       ZB_ZCL_AC_CAPACITY_FORMAT_ATTRIBUTE_ID = 0x0047, /**< AC capacity format (since ha-1.2-05-3520-29) */
-} zb_zcl_thermostat_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Fan Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_FAN_CONTROL_FAN_MODE_ATTRIBUTE_ID = 0x0000, /**< Fan mode */
-       ZB_ZCL_FAN_CONTROL_FAN_MODE_SEQUENCE_ATTRIBUTE_ID = 0x0001, /**< Fan mode sequence */
-} zb_zcl_fan_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Dehumidification Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_RELATIVE_HUMIDITY_ATTRIBUTE_ID = 0x0000, /**< Relative humidity */
-       ZB_ZCL_DEHUMIDIFICATION_COOLING_ATTRIBUTE_ID = 0x0001, /**< Dehumidification cooling */
-       ZB_ZCL_RH_DEHUMIDIFICATION_SETPOINT_ATTRIBUTE_ID = 0x0010, /**< RH dehumidification setpoint */
-       ZB_ZCL_RELATIVE_HUMIDITY_MODE_ATTRIBUTE_ID = 0x0011, /**< Relative humidity mode */
-       ZB_ZCL_DEHUMIDIFICATION_LOCKOUT_ATTRIBUTE_ID = 0x0012, /**< Dehumidification lockout */
-       ZB_ZCL_DEHUMIDIFICATION_HYSTERESIS_ATTRIBUTE_ID = 0x0013, /**< Dehumidification hysteresis */
-       ZB_ZCL_DEHUMIDIFICATION_MAX_COOL_ATTRIBUTE_ID = 0x0014, /**< Dehumidification max. cool */
-       ZB_ZCL_RELATIVE_HUMIDITY_DISPLAY_ATTRIBUTE_ID = 0x0015, /**< Relative humidity display */
-} zb_zcl_dehumidification_control_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Thermostat User Interface Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_TEMPERATURE_DISPLAY_MODE_ATTRIBUTE_ID = 0x0000, /**< Temperature display mode */
-       ZB_ZCL_KEYPAD_LOCKOUT_ATTRIBUTE_ID = 0x0001, /**< Keypad lockout */
-       ZB_ZCL_SCHEDULE_PROGRAMMING_VISIBILITY_ATTRIBUTE_ID = 0x0002, /**< Schedule programming visibility (since ha-1.2-05-3520-29) */
-} zb_zcl_thermostat_user_interface_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Color Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID = 0x0000, /**< Current hue */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID = 0x0001, /**< Current saturation */
-       ZB_ZCL_COLOR_CONTROL_REMAINING_TIME_ATTRIBUTE_ID = 0x0002, /**< Remaining time */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_ID = 0x0003, /**< Current x */
-       ZB_ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_ID = 0x0004, /**< Current y */
-       ZB_ZCL_COLOR_CONTROL_DRIFT_COMPENSATION_ATTRIBUTE_ID = 0x0005, /**< Drift compensation */
-       ZB_ZCL_COLOR_CONTROL_COMPENSATION_TEXT_ATTRIBUTE_ID = 0x0006, /**< Compensation text */
-       ZB_ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_ATTRIBUTE_ID = 0x0007, /**< Color temperature */
-       ZB_ZCL_COLOR_CONTROL_COLOR_MODE_ATTRIBUTE_ID = 0x0008, /**< Color mode */
-       ZB_ZCL_COLOR_CONTROL_NUMBER_OF_PRIMARIES_ATTRIBUTE_ID = 0x0010, /**< Number of primaries */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_1_X_ATTRIBUTE_ID = 0x0011, /**< Primary 1 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_1_Y_ATTRIBUTE_ID = 0x0012, /**< Primary 1 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_1_INTENSITY_ATTRIBUTE_ID = 0x0013, /**< Primary 1 intensity */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_2_X_ATTRIBUTE_ID = 0x0015, /**< Primary 2 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_2_Y_ATTRIBUTE_ID = 0x0016, /**< Primary 2 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_2_INTENSITY_ATTRIBUTE_ID = 0x0017, /**< Primary 2 intensity */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_3_X_ATTRIBUTE_ID = 0x0019, /**< Primary 3 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_3_Y_ATTRIBUTE_ID = 0x001A, /**< Primary 3 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_3_INTENSITY_ATTRIBUTE_ID = 0x001B, /**< Primary 3 intensity */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_4_X_ATTRIBUTE_ID = 0x0020, /**< Primary 4 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_4_Y_ATTRIBUTE_ID = 0x0021, /**< Primary 4 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_4_INTENSITY_ATTRIBUTE_ID = 0x0022, /**< Primary 4 intensity */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_5_X_ATTRIBUTE_ID = 0x0024, /**< Primary 5 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_5_Y_ATTRIBUTE_ID = 0x0025, /**< Primary 5 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_5_INTENSITY_ATTRIBUTE_ID = 0x0026, /**< Primary 5 intensity */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_6_X_ATTRIBUTE_ID = 0x0028, /**< Primary 6 x */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_6_Y_ATTRIBUTE_ID = 0x0029, /**< Primary 6 y */
-       ZB_ZCL_COLOR_CONTROL_PRIMARY_6_INTENSITY_ATTRIBUTE_ID = 0x002A, /**< Primary 6 intensity */
-       ZB_ZCL_COLOR_CONTROL_WHITE_POINT_X_ATTRIBUTE_ID = 0x0030, /**< White point x */
-       ZB_ZCL_COLOR_CONTROL_WHITE_POINT_Y_ATTRIBUTE_ID = 0x0031, /**< White point y */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_R_X_ATTRIBUTE_ID = 0x0032, /**< Color point R x */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_R_Y_ATTRIBUTE_ID = 0x0033, /**< Color point R y */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_R_INTENSITY_ATTRIBUTE_ID = 0x0034, /**< Color point R intensity */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_G_X_ATTRIBUTE_ID = 0x0036, /**< Color point G x */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_G_Y_ATTRIBUTE_ID = 0x0037, /**< Color point G y */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_G_INTENSITY_ATTRIBUTE_ID = 0x0038, /**< Color point G intensity */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_B_X_ATTRIBUTE_ID = 0x003A, /**< Color point B x */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_B_Y_ATTRIBUTE_ID = 0x003B, /**< Color point B y */
-       ZB_ZCL_COLOR_CONTROL_COLOR_POINT_B_INTENSITY_ATTRIBUTE_ID = 0x003C, /**< Color point B intensity */
-       ZB_ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ATTRIBUTE_ID = 0x4000, /**< Enhanced current hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_ATTRIBUTE_ID = 0x4001, /**< Enhanced color mode (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ATTRIBUTE_ID = 0x4002, /**< Color loop active (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ATTRIBUTE_ID = 0x4003, /**< Color loop direction (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_ATTRIBUTE_ID = 0x4004, /**< Color loop time (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE_ATTRIBUTE_ID = 0x4005, /**< Color start enhanced hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE_ATTRIBUTE_ID = 0x4006, /**< Color loop stored enhanced hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_CAPABILITIES_ATTRIBUTE_ID = 0x400A, /**< Color capabilities (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN_ATTRIBUTE_ID = 0x400B, /**< Color temp. physical min. (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX_ATTRIBUTE_ID = 0x400C, /**< Color temp. physical max. (since zll-1.0-11-0037-10) */
-} zb_zcl_color_control_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Ballast Configuration.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_PHYSICAL_MIN_LEVEL_ATTRIBUTE_ID = 0x0000, /**< Physical min. level */
-       ZB_ZCL_PHYSICAL_MAX_LEVEL_ATTRIBUTE_ID = 0x0001, /**< Physical max. level */
-       ZB_ZCL_BALLAST_STATUS_ATTRIBUTE_ID = 0x0002, /**< Ballast status */
-       ZB_ZCL_MIN_LEVEL_ATTRIBUTE_ID = 0x0010, /**< Min. level */
-       ZB_ZCL_MAX_LEVEL_ATTRIBUTE_ID = 0x0011, /**< Max. level */
-       ZB_ZCL_POWER_ON_LEVEL_ATTRIBUTE_ID = 0x0012, /**< Power on level */
-       ZB_ZCL_POWER_ON_FADE_TIME_ATTRIBUTE_ID = 0x0013, /**< Power on fade time */
-       ZB_ZCL_INTRINSIC_BALLAST_FACTOR_ATTRIBUTE_ID = 0x0014, /**< Intrinsic ballast factor */
-       ZB_ZCL_BALLAST_FACTOR_ADJUSTMENT_ATTRIBUTE_ID = 0x0015, /**< Ballast factor adjustment */
-       ZB_ZCL_LAMP_QUALITY_ATTRIBUTE_ID = 0x0020, /**< Lamp quality */
-       ZB_ZCL_LAMP_TYPE_ATTRIBUTE_ID = 0x0030, /**< Lamp type */
-       ZB_ZCL_LAMP_MANUFACTURER_ATTRIBUTE_ID = 0x0031, /**< Lamp manufacturer */
-       ZB_ZCL_LAMP_RATED_HOURS_ATTRIBUTE_ID = 0x0032, /**< Lamp rated hours */
-       ZB_ZCL_LAMP_BURN_HOURS_ATTRIBUTE_ID = 0x0033, /**< Lamp burn hours */
-       ZB_ZCL_LAMP_ALARM_MODE_ATTRIBUTE_ID = 0x0034, /**< Lamp alarm mode */
-       ZB_ZCL_LAMP_BURN_HOURS_TRIP_POINT_ATTRIBUTE_ID = 0x0035, /**< Lamp burn hours */
-} zb_zcl_ballast_configuration_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Illuminance Measurement.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ILLUM_MEASURED_VALUE_ATTRIBUTE_ID = 0x0000, /**< Illuminance measured value */
-       ZB_ZCL_ILLUM_MIN_MEASURED_VALUE_ATTRIBUTE_ID = 0x0001, /**< Illuminance Min. measured value */
-       ZB_ZCL_ILLUM_MAX_MEASURED_VALUE_ATTRIBUTE_ID = 0x0002, /**< Illuminance Max. measured value */
-       ZB_ZCL_ILLUM_TOLERANCE_ATTRIBUTE_ID = 0x0003, /**< Illuminance Tolerance */
-       ZB_ZCL_MEASUREMENT_LIGHT_SENSOR_TYPE_ATTRIBUTE_ID = 0x0004, /**< Measurement light sensor type */
-} zb_zcl_illuminance_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Illuminance Level Sensing.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ILLUS_LEVEL_STATUS_ATTRIBUTE_ID = 0x0000, /**< Illuminance level status */
-       ZB_ZCL_ILLUS_SENSING_LIGHT_SENSOR_TYPE_ATTRIBUTE_ID = 0x0001, /**< Illuminance sensing light sensor type */
-       ZB_ZCL_ILLUMINANCE_TARGET_LEVEL_ATTRIBUTE_ID = 0x0010, /**< Illuminance target level */
-} zb_zcl_illuminance_level_sensing_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Temperature Measurement.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_TEMP_MEASURED_VALUE_ATTRIBUTE_ID = 0x0000, /**< Measured value */
-       ZB_ZCL_TEMP_MIN_MEASURED_VALUE_ATTRIBUTE_ID = 0x0001, /**< Min. measured value */
-       ZB_ZCL_TEMP_MAX_MEASURED_VALUE_ATTRIBUTE_ID = 0x0002, /**< Max. measured value */
-       ZB_ZCL_TEMP_TOLERANCE_ATTRIBUTE_ID = 0x0003, /**< Tolerance */
-} zb_zcl_temperature_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Pressure Measurement.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_PRESSURE_MEASURED_VALUE_ATTRIBUTE_ID = 0x0000, /**< Measured value */
-       ZB_ZCL_PRESSURE_MIN_MEASURED_VALUE_ATTRIBUTE_ID = 0x0001, /**< Min. measured value */
-       ZB_ZCL_PRESSURE_MAX_MEASURED_VALUE_ATTRIBUTE_ID = 0x0002, /**< Max. measured value */
-       ZB_ZCL_PRESSURE_TOLERANCE_ATTRIBUTE_ID = 0x0003, /**< Tolerance */
-       ZB_ZCL_PRESSURE_SCALED_VALUE_ATTRIBUTE_ID = 0x0010, /**< Scaled value */
-       ZB_ZCL_PRESSURE_MIN_SCALED_VALUE_ATTRIBUTE_ID = 0x0011, /**< Min. scaled value */
-       ZB_ZCL_PRESSURE_MAX_SCALED_VALUE_ATTRIBUTE_ID = 0x0012, /**< Max. scaled value */
-       ZB_ZCL_PRESSURE_SCALED_TOLERANCE_ATTRIBUTE_ID = 0x0013, /**< Scaled tolerance */
-       ZB_ZCL_PRESSURE_SCALE_ATTRIBUTE_ID = 0x0014, /**< Scale */
-} zb_zcl_pressure_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Flow Measurement.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_FLOW_MEASURED_VALUE_ATTRIBUTE_ID = 0x0000, /**< Measured value */
-       ZB_ZCL_FLOW_MIN_MEASURED_VALUE_ATTRIBUTE_ID = 0x0001, /**< Min. measured value */
-       ZB_ZCL_FLOW_MAX_MEASURED_VALUE_ATTRIBUTE_ID = 0x0002, /**< Max. measured value */
-       ZB_ZCL_FLOW_TOLERANCE_ATTRIBUTE_ID = 0x0003, /**< Tolerance */
-} zb_zcl_flow_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Relative Humidity Measurement.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_RELATIVE_HUMIDITY_MEASURED_VALUE_ATTRIBUTE_ID = 0x0000, /**< Measured value */
-       ZB_ZCL_RELATIVE_HUMIDITY_MIN_MEASURED_VALUE_ATTRIBUTE_ID = 0x0001, /**< Min. measured value */
-       ZB_ZCL_RELATIVE_HUMIDITY_MAX_MEASURED_VALUE_ATTRIBUTE_ID = 0x0002, /**< Max. measured value */
-       ZB_ZCL_RELATIVE_HUMIDITY_TOLERANCE_ATTRIBUTE_ID = 0x0003, /**< Tolerance */
-} zb_zcl_relative_humidity_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Occupancy Sensing.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_OCCUPANCY_ATTRIBUTE_ID = 0x0000, /**< Occupancy */
-       ZB_ZCL_OCCUPANCY_SENSOR_TYPE_ATTRIBUTE_ID = 0x0001, /**< Occupancy sensor type */
-       ZB_ZCL_PIR_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 0x0010, /**< PIR occupied to unoccupied delay */
-       ZB_ZCL_PIR_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 0x0011, /**< PIR unoccupied to occupied delay */
-       ZB_ZCL_PIR_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 0x0012, /**< PIR unoccupied to occupied threshold */
-       ZB_ZCL_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ATTRIBUTE_ID = 0x0020, /**< Ultrasonic occupied to unoccupied delay */
-       ZB_ZCL_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ATTRIBUTE_ID = 0x0021, /**< Ultrasonic unoccupied to occupied delay */
-       ZB_ZCL_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ATTRIBUTE_ID = 0x0022, /**< Ultrasonic unoccupied to occupied threshold */
-} zb_zcl_occupancy_sensing_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: IAS Zone.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_ZONE_STATE_ATTRIBUTE_ID = 0x0000, /**< Zone state */
-       ZB_ZCL_ZONE_TYPE_ATTRIBUTE_ID = 0x0001, /**< Zone type */
-       ZB_ZCL_ZONE_STATUS_ATTRIBUTE_ID = 0x0002, /**< Zone status */
-       ZB_ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID = 0x0010, /**< IAS CIE address */
-       ZB_ZCL_ZONE_ID_ATTRIBUTE_ID = 0x0011, /**< Zone ID */
-       ZB_ZCL_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED_ATTRIBUTE_ID = 0x0012, /**< Number of zone sensitivity levels supported */
-       ZB_ZCL_CURRENT_ZONE_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0x0013, /**< Current zone sensitivity level */
-} zb_zcl_ias_zone_server_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: IAS WD.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_MAX_DURATION_ATTRIBUTE_ID = 0x0000, /**< Max. duration */
-} zb_zcl_ias_wd_server_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Electrical Measurement.
- * @details Cluster specification level: UNKNOWN
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_MEASUREMENT_TYPE_ATTRIBUTE_ID = 0x0000, /**< Measurement type */
-       ZB_ZCL_DC_VOLTAGE_ATTRIBUTE_ID = 0x0100, /**< DC voltage */
-       ZB_ZCL_DC_VOLTAGE_MIN_ATTRIBUTE_ID = 0x0101, /**< DC voltage min. */
-       ZB_ZCL_DC_VOLTAGE_MAX_ATTRIBUTE_ID = 0x0102, /**< DC voltage max. */
-       ZB_ZCL_DC_CURRENT_ATTRIBUTE_ID = 0x0103, /**< DC current */
-       ZB_ZCL_DC_CURRENT_MIN_ATTRIBUTE_ID = 0x0104, /**< DC current min. */
-       ZB_ZCL_DC_CURRENT_MAX_ATTRIBUTE_ID = 0x0105, /**< DC current max. */
-       ZB_ZCL_DC_POWER_ATTRIBUTE_ID = 0x0106, /**< DC power */
-       ZB_ZCL_DC_POWER_MIN_ATTRIBUTE_ID = 0x0107, /**< DC power min. */
-       ZB_ZCL_DC_POWER_MAX_ATTRIBUTE_ID = 0x0108, /**< DC Power max. */
-       ZB_ZCL_DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID = 0x0200, /**< DC voltage multiplier */
-       ZB_ZCL_DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID = 0x0201, /**< DC voltage divisor */
-       ZB_ZCL_DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 0x0202, /**< DC current multiplier */
-       ZB_ZCL_DC_CURRENT_DIVISOR_ATTRIBUTE_ID = 0x0203, /**< DC current divisor */
-       ZB_ZCL_DC_POWER_MULTIPLIER_ATTRIBUTE_ID = 0x0204, /**< DC power multiplier */
-       ZB_ZCL_DC_POWER_DIVISOR_ATTRIBUTE_ID = 0x0205, /**< DC power divisor */
-       ZB_ZCL_AC_FREQUENCY_ATTRIBUTE_ID = 0x0300, /**< AC frequency */
-       ZB_ZCL_AC_FREQUENCY_MIN_ATTRIBUTE_ID = 0x0301, /**< AC frequency min. */
-       ZB_ZCL_AC_FREQUENCY_MAX_ATTRIBUTE_ID = 0x0302, /**< AC frequency max. */
-       ZB_ZCL_NEUTRAL_CURRENT_ATTRIBUTE_ID = 0x0303, /**< Neutral current */
-       ZB_ZCL_TOTAL_ACTIVE_POWER_ATTRIBUTE_ID = 0x0304, /**< Total active power */
-       ZB_ZCL_TOTAL_REACTIVE_POWER_ATTRIBUTE_ID = 0x0305, /**< Total reactive power */
-       ZB_ZCL_TOTAL_APPARENT_POWER_ATTRIBUTE_ID = 0x0306, /**< Total apparent power */
-       ZB_ZCL_MEASURED_1ST_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0307, /**< Measured 1st harmonic current */
-       ZB_ZCL_MEASURED_3RD_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0308, /**< Measured 3rd harmonic current */
-       ZB_ZCL_MEASURED_5TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0309, /**< Measured 5th harmonic current */
-       ZB_ZCL_MEASURED_7TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030A, /**< Measured 7th harmonic current */
-       ZB_ZCL_MEASURED_9TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030B, /**< Measured 9th harmonic current */
-       ZB_ZCL_MEASURED_11TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030C, /**< Measured 11th harmonic current */
-       ZB_ZCL_MEASURED_PHASE_1ST_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030D, /**< Measured phase 1st harmonic current */
-       ZB_ZCL_MEASURED_PHASE_3RD_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030E, /**< Measured phase 3rd harmonic current */
-       ZB_ZCL_MEASURED_PHASE_5TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x030F, /**< Measured phase 5th harmonic current */
-       ZB_ZCL_MEASURED_PHASE_7TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0310, /**< Measured phase 7th harmonic current */
-       ZB_ZCL_MEASURED_PHASE_9TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0311, /**< Measured phase 9th harmonic current */
-       ZB_ZCL_MEASURED_PHASE_11TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 0x0312, /**< Measured phase 11th harmonic current */
-       ZB_ZCL_AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID = 0x0400, /**< AC frequency multiplier */
-       ZB_ZCL_AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID = 0x0401, /**< AC frequency divisor */
-       ZB_ZCL_POWER_MULTIPLIER_ATTRIBUTE_ID = 0x0402, /**< Power multiplier */
-       ZB_ZCL_POWER_DIVISOR_ATTRIBUTE_ID = 0x0403, /**< Power divisor */
-       ZB_ZCL_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 0x0404, /**< Harmonic current multiplier */
-       ZB_ZCL_PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 0x0405, /**< Phase harmonic current multiplier */
-       ZB_ZCL_INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID = 0x0500, /**< Instantaneous voltage */
-       ZB_ZCL_INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID = 0x0501, /**< Instantaneous line current */
-       ZB_ZCL_INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID = 0x0502, /**< Instantaneous active current */
-       ZB_ZCL_INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID = 0x0503, /**< Instantaneous reactive current */
-       ZB_ZCL_INSTANTANEOUS_POWER_ATTRIBUTE_ID = 0x0504, /**< Instantaneous power */
-       ZB_ZCL_RMS_VOLTAGE_ATTRIBUTE_ID = 0x0505, /**< RMS voltage */
-       ZB_ZCL_RMS_VOLTAGE_MIN_ATTRIBUTE_ID = 0x0506, /**< RMS voltage min. */
-       ZB_ZCL_RMS_VOLTAGE_MAX_ATTRIBUTE_ID = 0x0507, /**< RMS voltage max. */
-       ZB_ZCL_RMS_CURRENT_ATTRIBUTE_ID = 0x0508, /**< RMS current  */
-       ZB_ZCL_RMS_CURRENT_MIN_ATTRIBUTE_ID = 0x0509, /**< RMS current min. */
-       ZB_ZCL_RMS_CURRENT_MAX_ATTRIBUTE_ID = 0x050A, /**< RMS current max. */
-       ZB_ZCL_ACTIVE_POWER_ATTRIBUTE_ID = 0x050B, /**< Active power */
-       ZB_ZCL_ACTIVE_POWER_MIN_ATTRIBUTE_ID = 0x050C, /**< Active power min. */
-       ZB_ZCL_ACTIVE_POWER_MAX_ATTRIBUTE_ID = 0x050D, /**< Active power max. */
-       ZB_ZCL_REACTIVE_POWER_ATTRIBUTE_ID = 0x050E, /**< Reactive power */
-       ZB_ZCL_APPARENT_POWER_ATTRIBUTE_ID = 0x050F, /**< Apparent power */
-       ZB_ZCL_AC_POWER_FACTOR_ATTRIBUTE_ID = 0x0510, /**< AC power factor */
-       ZB_ZCL_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID = 0x0511, /**< Average RMS voltage measurement period */
-       ZB_ZCL_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID = 0x0513, /**< Average RMS under voltage counter */
-       ZB_ZCL_RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID = 0x0514, /**< RMS extreme over voltage period */
-       ZB_ZCL_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID = 0x0515, /**< RMS extreme under voltage period */
-       ZB_ZCL_RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID = 0x0516, /**< RMS voltage sag period */
-       ZB_ZCL_RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID = 0x0517, /**< RMS voltage swell period */
-       ZB_ZCL_AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID = 0x0600, /**< AC voltage multiplier */
-       ZB_ZCL_AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID = 0x0601, /**< AC voltage divisor */
-       ZB_ZCL_AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 0x0602, /**< AC current multiplier */
-       ZB_ZCL_AC_CURRENT_DIVISOR_ATTRIBUTE_ID = 0x0603, /**< AC current divisor */
-       ZB_ZCL_AC_POWER_MULTIPLIER_ATTRIBUTE_ID = 0x0604, /**< AC power multiplier */
-       ZB_ZCL_AC_POWER_DIVISOR_ATTRIBUTE_ID = 0x0605, /**< AC power divisor */
-       ZB_ZCL_DC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID = 0x0700, /**< DC overload alarms mask */
-       ZB_ZCL_DC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID = 0x0701, /**< DC voltage overload */
-       ZB_ZCL_DC_CURRENT_OVERLOAD_ATTRIBUTE_ID = 0x0702, /**< DC current overload */
-       ZB_ZCL_AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID = 0x0800, /**< Overload alarms mask */
-       ZB_ZCL_AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID = 0x0801, /**< AC voltage overload */
-       ZB_ZCL_AC_CURRENT_OVERLOAD_ATTRIBUTE_ID = 0x0802, /**< AC current overload */
-       ZB_ZCL_AC_POWER_OVERLOAD_ATTRIBUTE_ID = 0x0803, /**< AC power overload */
-       ZB_ZCL_AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID = 0x0804, /**< AC reactive power overload */
-       ZB_ZCL_AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID = 0x0805, /**< Average RMS over voltage */
-       ZB_ZCL_AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID = 0x0806, /**< Average RMS under voltage */
-       ZB_ZCL_RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID = 0x0807, /**< RMS extreme over voltage */
-       ZB_ZCL_RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID = 0x0808, /**< RMS extreme under voltage */
-       ZB_ZCL_RMS_VOLTAGE_SAG_ATTRIBUTE_ID = 0x0809, /**< RMS voltage sag */
-       ZB_ZCL_RMS_VOLTAGE_SWELL_ATTRIBUTE_ID = 0x080A, /**< RMS voltage swell */
-       ZB_ZCL_LINE_CURRENT_PHASE_B_ATTRIBUTE_ID = 0x0901, /**< Line current phase B */
-       ZB_ZCL_ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID = 0x0902, /**< Active current phase B */
-       ZB_ZCL_REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID = 0x0903, /**< Reactive current phase B */
-       ZB_ZCL_RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID = 0x0905, /**< RMS voltage phase B */
-       ZB_ZCL_RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID = 0x0906, /**< RMS voltage min. phase B */
-       ZB_ZCL_RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID = 0x0907, /**< RMS voltage max. phase B */
-       ZB_ZCL_RMS_CURRENT_PHASE_B_ATTRIBUTE_ID = 0x0908, /**< RMS current phase B */
-       ZB_ZCL_RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID = 0x0909, /**< RMS current min. phase B */
-       ZB_ZCL_RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID = 0x090A, /**< RMS current max. phase B */
-       ZB_ZCL_ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID = 0x090B, /**< Active power phase B */
-       ZB_ZCL_ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID = 0x090C, /**< Active power min. phase B */
-       ZB_ZCL_ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID = 0x090D, /**< Active power max. B */
-       ZB_ZCL_REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID = 0x090E, /**< Reactive power phase B */
-       ZB_ZCL_APPARENT_POWER_PHASE_B_ATTRIBUTE_ID = 0x090F, /**< Apparent power phase B */
-       ZB_ZCL_POWER_FACTOR_PHASE_B_ATTRIBUTE_ID = 0x0910, /**< Power factor phase B */
-       ZB_ZCL_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID = 0x0911, /**< Average RMS voltage measurement period phase B */
-       ZB_ZCL_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID = 0x0912, /**< RMS over voltage counter phase B */
-       ZB_ZCL_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID = 0x0913, /**< Average RMS under voltage counter phase B */
-       ZB_ZCL_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID = 0x0914, /**< RMS extreme over voltage period phase B */
-       ZB_ZCL_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID = 0x0915, /**< RMS extreme under voltage period phase B */
-       ZB_ZCL_RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID = 0x0916, /**< RMS voltage sag period phase B */
-       ZB_ZCL_RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID = 0x0917, /**< RMS voltage swell period phase B */
-       ZB_ZCL_LINE_CURRENT_PHASE_C_ATTRIBUTE_ID = 0x0A01, /**< Line current phase C */
-       ZB_ZCL_ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID = 0x0A02, /**< Active current phase C */
-       ZB_ZCL_REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID = 0x0A03, /**< Reactive current phase C */
-       ZB_ZCL_RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID = 0x0A05, /**< RMS voltage phase C */
-       ZB_ZCL_RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID = 0x0A06, /**< RMS voltage min. phase C */
-       ZB_ZCL_RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID = 0x0A07, /**< RMS voltage max. phase C */
-       ZB_ZCL_RMS_CURRENT_PHASE_C_ATTRIBUTE_ID = 0x0A08, /**< RMS current phase C */
-       ZB_ZCL_RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID = 0x0A09, /**< RMS current min. phase C */
-       ZB_ZCL_RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID = 0x0A0A, /**< RMS current max. phase C */
-       ZB_ZCL_ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID = 0x0A0B, /**< Active power phase C */
-       ZB_ZCL_ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID = 0x0A0C, /**< Active power min. phase C */
-       ZB_ZCL_ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID = 0x0A0D, /**< Active power max. phase C */
-       ZB_ZCL_REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID = 0x0A0E, /**< Reactive power phase C */
-       ZB_ZCL_APPARENT_POWER_PHASE_C_ATTRIBUTE_ID = 0x0A0F, /**< Reactive power phase C */
-       ZB_ZCL_POWER_FACTOR_PHASE_C_ATTRIBUTE_ID = 0x0A10, /**< Power factor phase C */
-       ZB_ZCL_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID = 0x0A11, /**< Average RMS voltage measurement period phase C */
-       ZB_ZCL_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID = 0x0A12, /**< Average RMS over voltage counter phase C */
-       ZB_ZCL_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID = 0x0A13, /**< Average RMS under voltage counter phase C */
-       ZB_ZCL_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID = 0x0A14, /**< RMS extreme over voltage period phase C */
-       ZB_ZCL_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID = 0x0A15, /**< RMS extreme under voltage period phase C */
-       ZB_ZCL_RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID = 0x0A16, /**< RMS voltage sag period phase C */
-       ZB_ZCL_RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID = 0x0A17, /**< RMS voltage swell period phase C */
-} zb_zcl_electrical_measurement_server_attributes_e;
-
-/**
- * @brief Attribute types for cluster: Diagnostics.
- * @details Cluster specification level: UNKNOWN
- * @since_tizen 4.0
- * @pre Server attributes
- *
- */
-typedef enum {
-       ZB_ZCL_NUMBER_OF_RESETS_ATTRIBUTE_ID = 0x0000, /**< Number of resets */
-       ZB_ZCL_PERSISTENT_MEMORY_WRITES_ATTRIBUTE_ID = 0x0001, /**< Persistent memory write  */
-       ZB_ZCL_MAC_RX_BCAST_ATTRIBUTE_ID = 0x0100, /**< MAC Rx broadcast count */
-       ZB_ZCL_MAC_TX_BCAST_ATTRIBUTE_ID = 0x0101, /**< MAC Tx broadcast count t */
-       ZB_ZCL_MAC_RX_UCAST_ATTRIBUTE_ID = 0x0102, /**< MAC Rx unicast */
-       ZB_ZCL_MAC_TX_UCAST_ATTRIBUTE_ID = 0x0103, /**< MAC Tx unicast */
-       ZB_ZCL_MAC_TX_UCAST_RETRY_ATTRIBUTE_ID = 0x0104, /**< MAC Tx unicast retry count */
-       ZB_ZCL_MAC_TX_UCAST_FAIL_ATTRIBUTE_ID = 0x0105, /**< MAC Tx unicast fail count */
-       ZB_ZCL_APS_RX_BCAST_ATTRIBUTE_ID = 0x0106, /**< APS Tx broadcast count */
-       ZB_ZCL_APS_TX_BCAST_ATTRIBUTE_ID = 0x0107, /**< APS Tx broadcast count */
-       ZB_ZCL_APS_RX_UCAST_ATTRIBUTE_ID = 0x0108, /**< APX Rx unicast count */
-       ZB_ZCL_APS_UCAST_SUCCESS_ATTRIBUTE_ID = 0x0109, /**< APS unicast success count */
-       ZB_ZCL_APS_TX_UCAST_RETRY_ATTRIBUTE_ID = 0x010A, /**< APS Tx unicast retry count */
-       ZB_ZCL_APS_TX_UCAST_FAIL_ATTRIBUTE_ID = 0x010B, /**< APS Tx unicast fail count */
-       ZB_ZCL_ROUTE_DISC_INITIATED_ATTRIBUTE_ID = 0x010C, /**< Number of Route discovery initiated */
-       ZB_ZCL_NEIGHBOR_ADDED_ATTRIBUTE_ID = 0x010D, /**< Number of Neighbor added */
-       ZB_ZCL_NEIGHBOR_REMOVED_ATTRIBUTE_ID = 0x010E, /**< Number of Neighbor removed */
-       ZB_ZCL_NEIGHBOR_STALE_ATTRIBUTE_ID = 0x010F, /**< Number of Neighbor stale */
-       ZB_ZCL_JOIN_INDICATION_ATTRIBUTE_ID = 0x0110, /**< Join indication count */
-       ZB_ZCL_CHILD_MOVED_ATTRIBUTE_ID = 0x0111, /**< Number of Child moved */
-       ZB_ZCL_NWK_FC_FAILURE_ATTRIBUTE_ID = 0x0112, /**< Network layer flow-control failure count */
-       ZB_ZCL_APS_FC_FAILURE_ATTRIBUTE_ID = 0x0113, /**< APS layer flow-control failure count */
-       ZB_ZCL_APS_UNAUTHORIZED_KEY_ATTRIBUTE_ID = 0x0114, /**< APS layer unauthorized key */
-       ZB_ZCL_NWK_DECRYPT_FAILURE_ATTRIBUTE_ID = 0x0115, /**< Network layer decrypt failure count */
-       ZB_ZCL_APS_DECRYPT_FAILURE_ATTRIBUTE_ID = 0x0116, /**< AOS layer decrypt failure count  */
-       ZB_ZCL_PACKET_BUFFER_ALLOC_FAILURES_ATTRIBUTE_ID = 0x0117, /**< Packet buffer allocation failure count */
-       ZB_ZCL_RELAYED_UNICAST_ATTRIBUTE_ID = 0x0118, /**< Relayed unicast count */
-       ZB_ZCL_PHY_TO_MAC_QUEUE_LIMIT_REACHED_ATTRIBUTE_ID = 0x0119, /**< PHY to MAC queue limit reached  */
-       ZB_ZCL_PACKET_VALIDATE_DROP_COUNT_ATTRIBUTE_ID = 0x011A, /**< Packet validate drop count */
-       ZB_ZCL_AVERAGE_MAC_RETRY_PER_APS_MSG_SENT_ATTRIBUTE_ID = 0x011B, /**< Average MAC retry per APS message sent */
-       ZB_ZCL_LAST_MESSAGE_LQI_ATTRIBUTE_ID = 0x011C, /**< Last message LQI */
-       ZB_ZCL_LAST_MESSAGE_RSSI_ATTRIBUTE_ID = 0x011D, /**<  Last message RSSI */
-} zb_zcl_diagnostics_server_attributes_e;
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_IDS_H__ */
diff --git a/include/zcl/zb_zcl_attribute_type.h b/include/zcl/zb_zcl_attribute_type.h
deleted file mode 100755 (executable)
index 0ba316a..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_TYPE_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_TYPE_H__
-
-/**
- * @file zb_zcl_attribute_type.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- *
- * @{
- */
-
-/**
- * @brief ZCL attribute types (See Table 2.16 Data type of the Zigbee Cluster Library).
- * @details ZigBee devices, such as thermostats, lamps, etc., are defined in terms of the
- * attributes they contain, which can be written, read or reported using the
- * commands defined in clause 2.4. Table 2.16 details the data types and formats that
- * can be used for these attributes. Note that individual clusters, which may use
- * different or new types, show valid values, ranges, and units for the attributes they
- * represent. \n\n
- *
- * Each data type is allocated an 8-bit data type ID. The most significant 5 bits of this
- * ID is used to divide the types into 32 type classes, and the least significant 3 bits
- * specify a specific data type within this class. \n\n
- *
- * Table 2.16 also indicates for each data type whether it is considered to be 'analog'
- * or 'discrete'. Values of analog types may be added to or subtracted from other
- * values of the same type, and are typically used to measure the value of properties
- * in the real world that vary continuously over a range. Values of discrete data types
- * only have meaning as individual values, and may not be added or subtracted.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_NO_DATA_ATTRIBUTE_TYPE = 0x00, /**< No data */
-       ZB_ZCL_8_BIT_DATA = 0x08, /**< 8-bit data, 1-byte */
-       ZB_ZCL_16_BIT_DATA = 0x09, /**< 16-bit data, 2-byte */
-       ZB_ZCL_24_BIT_DATA = 0x0a, /**< 24-bit data, 3-byte */
-       ZB_ZCL_32_BIT_DATA = 0x0b, /**< 32-bit data, 4-byte */
-       ZB_ZCL_40_BIT_DATA = 0x0c, /**< 40-bit data, 5-byte */
-       ZB_ZCL_48_BIT_DATA = 0x0d, /**< 48-bit data, 6-byte */
-       ZB_ZCL_56_BIT_DATA = 0x0e, /**< 56-bit data, 7-byte */
-       ZB_ZCL_64_BIT_DATA = 0x0f, /**< 64-bit data, 8-byte */
-       ZB_ZCL_BOOLEAN = 0x10, /**< Boolean, 1-byte */
-       ZB_ZCL_8_BIT_BITMAP = 0x18, /**< 8-bit bitmap, 1-byte */
-       ZB_ZCL_16_BIT_BITMAP = 0x19, /**< 16-bit bitmap, 2-byte */
-       ZB_ZCL_24_BIT_BITMAP = 0x1a, /**< 24-bit bitmap, 3-byte */
-       ZB_ZCL_32_BIT_BITMAP = 0x1b, /**< 32-bit bitmap, 4-byte */
-       ZB_ZCL_40_BIT_BITMAP = 0x1c, /**< 40-bit bitmap, 5-byte */
-       ZB_ZCL_48_BIT_BITMAP = 0x1d, /**< 48-bit bitmap, 6-byte */
-       ZB_ZCL_56_BIT_BITMAP = 0x1e, /**< 56-bit bitmap, 7-byte */
-       ZB_ZCL_64_BIT_BITMAP = 0x1f, /**< 64-bit bitmap, 8-byte */
-       ZB_ZCL_UNSIGNED_8_BIT_INTEGER = 0x20, /**< unsigned 8-bit integer, 1-byte */
-       ZB_ZCL_UNSIGNED_16_BIT_INTEGER = 0x21, /**< unsigned 16-bit integer, 2-byte */
-       ZB_ZCL_UNSIGNED_24_BIT_INTEGER = 0x22, /**< unsigned 24-bit integer, 3-byte */
-       ZB_ZCL_UNSIGNED_32_BIT_INTEGER = 0x23, /**< unsigned 32-bit integer, 4-byte */
-       ZB_ZCL_UNSIGNED_40_BIT_INTEGER = 0x24, /**< unsigned 40-bit integer, 5-byte */
-       ZB_ZCL_UNSIGNED_48_BIT_INTEGER = 0x25, /**< unsigned 48-bit integer, 6-byte */
-       ZB_ZCL_UNSIGNED_56_BIT_INTEGER = 0x26, /**< unsigned 56-bit integer, 7-byte */
-       ZB_ZCL_UNSIGNED_64_BIT_INTEGER = 0x27, /**< unsigned 64-bit integer, 8-byte */
-       ZB_ZCL_SIGNED_8_BIT_INTEGER = 0x28, /**< signed 8-bit integer, 1-byte */
-       ZB_ZCL_SIGNED_16_BIT_INTEGER = 0x29, /**< signed 16-bit integer, 2-byte */
-       ZB_ZCL_SIGNED_24_BIT_INTEGER = 0x2a, /**< signed 24-bit integer, 3-byte */
-       ZB_ZCL_SIGNED_32_BIT_INTEGER = 0x2b, /**< signed 32-bit integer, 4-byte */
-       ZB_ZCL_SIGNED_40_BIT_INTEGER = 0x2c, /**< signed 40-bit integer, 5-byte */
-       ZB_ZCL_SIGNED_48_BIT_INTEGER = 0x2d, /**< signed 48-bit integer, 6-byte */
-       ZB_ZCL_SIGNED_56_BIT_INTEGER = 0x2e, /**< signed 56-bit integer, 7-byte */
-       ZB_ZCL_SIGNED_64_BIT_INTEGER = 0x2f, /**< signed 64-bit integer, 8-byte */
-       ZB_ZCL_8_BIT_ENUMERATION = 0x30, /**< 8-bit enumeration, 1-byte */
-       ZB_ZCL_16_BIT_ENUMERATION = 0x31, /**< 16-bit enumeration, 2-byte */
-       ZB_ZCL_SEMI_PRECISION = 0x38, /**< floating point, 2-byte */
-       ZB_ZCL_SINGLE_PRECISION = 0x39, /**< floating point, 4-byte */
-       ZB_ZCL_DOUBLE_PRECISION = 0x3a, /**< floating point, 8-byte */
-       ZB_ZCL_OCTAT_STRING = 0x41, /**< Octat string, Defined in first two octat */
-       ZB_ZCL_CHRACTER_STRING = 0x42, /**< Character string, Defined in first two octat */
-       ZB_ZCL_LONG_OCTAT_STRING = 0x43, /**< Long octat string, Defined in first two octat */
-       ZB_ZCL_LONG_CHRACTER_STRING = 0x44, /**< Long character string, Defined in first 2-byte */
-       ZB_ZCL_ARRAY = 0x48, /**< Array 2(0xffff)+Sum of lengths of contents, but we ignore 2-byte prefix */
-       ZB_ZCL_STRUCTURE = 0x4c, /**< Structure 2(0xffff)+Sum of lengths of contents, but we ignore 2-byte prefix */
-       ZB_ZCL_SET = 0x50, /**< Set, Sum of lengths of contents */
-       ZB_ZCL_BAG = 0x51, /**< Bag, Sum of lengths of contents */
-       ZB_ZCL_TIME_OF_DAY = 0xe0, /**< Time of day, 4-byte */
-       ZB_ZCL_DATE = 0xe1, /**< Date, 4 byte */
-       ZB_ZCL_UTC_TIME = 0xe2, /**< UTC Time, 4-byte */
-       ZB_ZCL_CLUSTER_ID = 0xe8, /**< Cluster ID, 2-byte */
-       ZB_ZCL_ATTRIBUTE_ID = 0xe9, /**< Attribute ID, 2-byte */
-       ZB_ZCL_BACNET_OID = 0xea, /**< BACnet OID 4 byte */
-       ZB_ZCL_IEEE_ADDRESS = 0xf0, /**< IEEE address, 8-byte */
-       ZB_ZCL_128_BIT_SECURITY_KEY = 0xf1, /**< 128-bit security key, 16-byte */
-} zb_zcl_data_type_e;
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ATTRIBUTE_TYPE_H__ */
diff --git a/include/zcl/zb_zcl_basic_cluster.h b/include/zcl/zb_zcl_basic_cluster.h
deleted file mode 100755 (executable)
index 2f7896d..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_BASIC_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_BASIC_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_basic_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE Basic Cluster
- *
- * @brief Zigbee basic cluster commands
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE_OVERVIEW Overview
- * Attributes and commands for determining basic information about a device,
- * setting user device information such as location, enabling a device and resetting it
- * to factory defaults. \n\n
- * Note: Where a physical ZigBee node supports multiple endpoints it will often be
- * the case that many of these settings will apply to the whole node, that is they are
- * the same for every endpoint on the device. In such cases they can be implemented
- * once for the node, and mapped to each endpoint.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @brief Sends 'reset factory default' command.
- * @details This function is aim to reset end-device as factory default settings.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep target endpoint
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- */
-int zb_zcl_basic_reset_factory_default(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_BASIC_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_cluster_ids.h b/include/zcl/zb_zcl_cluster_ids.h
deleted file mode 100755 (executable)
index 7dfa3f8..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_CLUSTER_IDS_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_CLUSTER_IDS_H__
-
-/**
- * @file zb_zcl_cluster_ids.h
- */
-
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Zigbee Cluster IDs for reference.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_BASIC_CLUSTER_ID = 0x0000, /**< Basic Cluster */
-       ZB_ZCL_POWER_CONFIG_CLUSTER_ID = 0x0001, /**< Power Configuration Cluster */
-       ZB_ZCL_DEVICE_TEMP_CLUSTER_ID = 0x0002, /**< Device Temperature Cluster */
-       ZB_ZCL_IDENTIFY_CLUSTER_ID = 0x0003, /**< Identify Cluster */
-       ZB_ZCL_GROUPS_CLUSTER_ID = 0x0004, /**< Group Cluster */
-       ZB_ZCL_SCENES_CLUSTER_ID = 0x0005, /**< Scene Cluster */
-       ZB_ZCL_ON_OFF_CLUSTER_ID = 0x0006, /**< On/Off Cluster */
-       ZB_ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID  = 0x0007, /**< On/Off Switch Cluster */
-       ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008, /**< Level Control Cluster */
-       ZB_ZCL_ALARM_CLUSTER_ID = 0x0009, /**< Alarm Cluster */
-       ZB_ZCL_TIME_CLUSTER_ID = 0x000A, /**< Time Cluster */
-       ZB_ZCL_RSSI_LOCATION_CLUSTER_ID = 0x000B, /**< RSSI Location Cluster */
-       ZB_ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F, /**< Binary Input Basic Cluster */
-       ZB_ZCL_COMMISSIONING_CLUSTER_ID = 0x0015, /**< Commissioning Cluster */
-       ZB_ZCL_PARTITION_CLUSTER_ID = 0x0016, /**< Partition Cluster */
-       ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID = 0x0019, /**< OTA Bootload Cluster */
-       ZB_ZCL_POWER_PROFILE_CLUSTER_ID = 0x001A, /**< Power Profile Cluster */
-       ZB_ZCL_APPLIANCE_CONTROL_CLUSTER_ID = 0x001B, /**< Application Control Cluster */
-       ZB_ZCL_POLL_CONTROL_CLUSTER_ID = 0x0020, /**< Poll Control Cluster */
-       ZB_ZCL_SHADE_CONFIG_CLUSTER_ID = 0x0100, /**< Shade Config Cluster */
-       ZB_ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101, /**< Door Lock Cluster */
-       ZB_ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102, /**< Window Covering Cluster */
-       ZB_ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID = 0x0200, /**< Pump Configuration Cluster */
-       ZB_ZCL_THERMOSTAT_CLUSTER_ID = 0x0201, /**< Thermostat Cluster */
-       ZB_ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202, /**< Fan Control Cluster */
-       ZB_ZCL_DEHUMID_CONTROL_CLUSTER_ID = 0x0203, /**< Dehumid Control Cluster */
-       ZB_ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID = 0x0204, /**< Thermostat UI Cluster */
-       ZB_ZCL_COLOR_CONTROL_CLUSTER_ID = 0x0300, /**< Color Control Cluster */
-       ZB_ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 0x0301, /**< Ballast Configuration Cluster */
-       ZB_ZCL_ILLUM_MEASUREMENT_CLUSTER_ID = 0x0400, /**< Illuminance Measurement Cluster */
-       ZB_ZCL_ILLUM_LEVEL_SENSING_CLUSTER_ID = 0x0401, /**< Illuminance Level Sensing Cluster */
-       ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID = 0x0402, /**< Temperature Measurement Cluster */
-       ZB_ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 0x0403, /**< Pressure Measurement Cluster */
-       ZB_ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 0x0404, /**< Flow Measurement Cluster */
-       ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 0x0405, /**< Relative Humidity Measurement Cluster */
-       ZB_ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 0x0406, /**< Occupancy Sensing Cluster */
-       ZB_ZCL_IAS_ZONE_CLUSTER_ID = 0x0500, /**< IAS Zone Cluster */
-       ZB_ZCL_IAS_ACE_CLUSTER_ID = 0x0501, /**< IAS Ace Cluster */
-       ZB_ZCL_IAS_WD_CLUSTER_ID = 0x0502, /**< IAS WD Cluster */
-       ZB_ZCL_GENERIC_TUNNEL_CLUSTER_ID = 0x0600, /**< Generic Tunnel Cluster */
-       ZB_ZCL_BACNET_PROTOCOL_TUNNEL_CLUSTER_ID = 0x0601, /**< Bacnet Protocol Tunnel Cluster */
-       ZB_ZCL_11073_PROTOCOL_TUNNEL_CLUSTER_ID = 0x0614, /**< 11073 Protocol Tunnel Cluster */
-       ZB_ZCL_ISO7816_PROTOCOL_TUNNEL_CLUSTER_ID = 0x0615, /**< ISO7816 Protocol Tunnel Cluster */
-       ZB_ZCL_PRICE_CLUSTER_ID = 0x0700, /**< Price Cluster */
-       ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_ID = 0x0701, /**< Demand Response Load Control Cluster */
-       ZB_ZCL_SIMPLE_METERING_CLUSTER_ID = 0x0702, /**< Simple Metering Cluster */
-       ZB_ZCL_MESSAGING_CLUSTER_ID = 0x0703, /**< Messaging Cluster */
-       ZB_ZCL_TUNNELING_CLUSTER_ID = 0x0704, /**< Tunneling Cluster */
-       ZB_ZCL_PREPAYMENT_CLUSTER_ID = 0x0705, /**< Prepayment Cluster */
-       ZB_ZCL_ENERGY_MANAGEMENT_CLUSTER_ID = 0x0706, /**< Energy Management Cluster */
-       ZB_ZCL_TOU_CALENDAR_CLUSTER_ID = 0x0707, /**< Calendar Cluster */
-       ZB_ZCL_DEVICE_MANAGEMENT_CLUSTER_ID = 0x0708, /**< Device Management Cluster */
-       ZB_ZCL_EVENTS_CLUSTER_ID = 0x0709, /**< Events Cluster */
-       ZB_ZCL_MDU_PAIRING_CLUSTER_ID = 0x070A, /**< MDU Paring Cluster */
-       ZB_ZCL_KEY_ESTABLISHMENT_CLUSTER_ID = 0x0800, /**< Key Establishment Cluster */
-       ZB_ZCL_INFORMATION_CLUSTER_ID = 0x0900, /**< Information Cluster */
-       ZB_ZCL_DATA_SHARING_CLUSTER_ID = 0x0901, /**< Data Sharing Cluster */
-       ZB_ZCL_GAMING_CLUSTER_ID = 0x0902, /**< Gaming Cluster */
-       ZB_ZCL_DATA_RATE_CONTROL_CLUSTER_ID = 0x0903, /**< Data Rate Control Cluster */
-       ZB_ZCL_VOICE_OVER_ZIGBEE_CLUSTER_ID = 0x0904, /**< Voice Over Zigbee Cluster */
-       ZB_ZCL_CHATTING_CLUSTER_ID = 0x0905, /**< Chatting Cluster */
-       ZB_ZCL_PAYMENT_CLUSTER_ID = 0x0A01, /**< Payment Cluster */
-       ZB_ZCL_BILLING_CLUSTER_ID = 0x0A02, /**< Billing Cluster */
-       ZB_ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID = 0x0B00, /**< Appliance Identification Cluster */
-       ZB_ZCL_METER_IDENTIFICATION_CLUSTER_ID = 0x0B01, /**< Meter Identification Cluster */
-       ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID = 0x0B02, /**< Appliance Events and Alert Cluster */
-       ZB_ZCL_APPLIANCE_STATISTICS_CLUSTER_ID = 0x0B03, /**< Appliance Statistics Cluster */
-       ZB_ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04, /**< Electrical Measurement Cluster */
-       ZB_ZCL_DIAGNOSTICS_CLUSTER_ID = 0x0B05, /**< Diagnostics Cluster */
-       ZB_ZCL_ZLL_COMMISSIONING_CLUSTER_ID = 0x1000, /**< ZLL Commissioning Cluster */
-} zb_zcl_cluster_ids_e;
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_CLUSTER_IDS_H__ */
diff --git a/include/zcl/zb_zcl_color_control_cluster.h b/include/zcl/zb_zcl_color_control_cluster.h
deleted file mode 100755 (executable)
index f909a88..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COLOR_CONTROL_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COLOR_CONTROL_CLUSTER_H__
-
-#include <zb_type.h>
-
-/**
- * @file zb_zcl_color_control_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE Color Control Cluster
- *
- * @brief Zigbee color control cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
- * This cluster provides an interface for changing the color of a light. Color is
- * specified according to the Commission Internationale de l'Eclairage (CIE)
- * specification CIE 1931 Color Space, Color control is carried out in terms of
- * x,y values, as defined by this specification.\n\n
- * Additionally, color may optionally be controlled in terms of color temperature, or
- * as hue and saturation values based on optionally variable RGB and W color
- * points. It is recommended that the hue and saturation are interpreted according to
- * the HSV (aka HSB) color model.\n\n
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 5.9 Command IDs for the Color Control Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Move to Hue                          |     O      |
- * |             0x01               | Move Hue                             |     O      |
- * |             0x02               | Step Hue                             |     O      |
- * |             0x03               | Move to Saturation                   |     O      |
- * |             0x04               | Move Saturation                      |     O      |
- * |             0x05               | Step Saturation                      |     O      |
- * |             0x06               | Move to Hue and Saturation           |     O      |
- * |             0x07               | Move to Color                        |     M      |
- * |             0x08               | Move Color                           |     M      |
- * |             0x09               | Step Color                           |     M      |
- * |             0x0a               | Move to Color Temperature            |     O      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'move to hue' command.
- * @details On receipt of this command, a device shall also set the ColorMode attribute to the
- * value 0x00 and then shall move from its current hue to the value given in the Hue
- * field. \n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new hue shall be equal to the Transition time field.\n\n
- * As hue is effectively measured on a circle, the new hue may be moved to in either
- * direction. The direction of hue change is given by the Direction field. If Direction
- * is 'Shortest distance', the direction is taken that involves the shortest path round
- * the circle. This case corresponds to expected normal usage. If Direction is
- * 'Longest distance', the direction is taken that involves the longest path round the
- * circle. This case can be used for 'rainbow effects'. In both cases, if both distances
- * are the same, the Up direction shall be taken.\n\n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out, and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] hue The Hue field specifies the hue to be moved to.
- * @param[in] direction The direction field shall be one of the non-reserved values\n
- *                      0x00 : Shortest distance\n
- *                      0x01 : Longest distance\n
- *                      0x02 : Up\n
- *                      0x03 : Down\n
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to move to the new hue
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_to_hue(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char hue,
-               unsigned char direction,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move hue' command.
- * @details On receipt of this command, a device shall set the ColorMode attribute to the
- * value 0x00 and shall then move from its current hue in an up or down direction in
- * a continuous fashion.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
- *                      0x00 : Stop\n
- *                      0x01 : Up\n
- *                      0x02 : Reserved\n
- *                      0x03 : Down\n
- * @param[in] rate The Rate field specifies the rate of movement in steps per second.\n
- *                 A step is a change in the device's hue of one unit.
- *                 If the Rate field has a value of zero, the command has no effect and
- *                 a default response command is sent in response, with the status code
- *                 set to INVALID_FIELD.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_hue(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char move_mode,
-               unsigned char rate);
-
-/**
- * @brief Sends 'step hue' command.
- * @details On receipt of this command, a device shall set the ColorMode attribute to the
- * value 0x00 and shall then move from its current hue in an up or down direction by
- * one step.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
- *                      0x00 : Reserved\n
- *                      0x01 : Up\n
- *                      0x02 : Reserved\n
- *                      0x03 : Down\n
- * @param[in] step_size The change to be added to (or subtracted from) the current value \n
- *                      of the device's hue.
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *                            A step is a change in the device's hue of 'Step size' units.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_step_hue(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char step_mode,
-               unsigned char step_size,
-               unsigned char transition_time);
-
-/**
- * @brief Sends 'move to saturation' command.
- * @details On receipt of this command, a device set the ColorMode attribute to the value
- * 0x00 and shall then move from its current saturation to the value given in the
- * Saturation field.\n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new saturation shall be equal to the Transition time field, in 1/10ths of
- * a second.n\n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] saturation The target saturation value
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *                            A step is a change in the device's hue of 'Step size' units.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_to_saturation(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char saturation,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move saturation' command.
- * @details On receipt of this command, a device shall set the ColorMode attribute to the
- * value 0x00 and shall then move from its current saturation in an up or down
- * direction in a continuous fashion.\n]n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
- *                      0x00 : Stop\n
- *                      0x01 : Up\n
- *                      0x02 : Reserved\n
- *                      0x03 : Down\n
- * @param[in] rate The Rate field specifies the rate of movement in steps per second.\n
- *                 A step is a change in the device's hue of one unit.
- *                 If the Rate field has a value of zero, the command has no effect and
- *                 a default response command is sent in response, with the status code
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_saturation(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char move_mode,
-               unsigned char rate);
-
-/**
- * @brief Sends 'step saturation' command.
- * @details On receipt of this command, a device shall set the ColorMode attribute to the
- * value 0x00 and shall then move from its current saturation in an up or down
- * direction in a continuous fashion.\n]n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
- *                      0x00 : Reserved\n
- *                      0x01 : Up\n
- *                      0x02 : Reserved\n
- *                      0x03 : Down\n
- * @param[in] step_size The change to be added to (or subtracted from) the current value \n
- *                      of the device's hue.
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_step_saturation(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char step_mode,
-               unsigned char step_size,
-               unsigned char transition_time);
-
-/**
- * @brief Sends 'move to hue and saturation' command.
- * @details On receipt of this command, a device shall set the ColorMode attribute to the
- * value 0x00 and shall then move from its current hue and saturation to the values
- * given in the Hue and Saturation fields.\n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new color shall be equal to the Transition time field, in 1/10ths of a
- * second.\n\n
- * The path through color space taken during the transition is not specified, but it is
- * recommended that the shortest path is taken though hue/saturation space, i.e.
- * movement is 'in a straight line' across the hue/saturation disk.\n\n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] hue The Hue field specifies the hue to be moved to.
- * @param[in] saturation The target saturation value
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *                            A step is a change in the device's hue of 'Step size' units.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_to_hue_and_saturation(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char hue,
-               unsigned char saturation,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move to color' command.
- * @details On receipt of this command, a device shall set the value of the ColorMode
- * attribute, where implemented, to 0x01, and shall then move from its current color
- * to the color given in the ColorX and ColorY fields.\n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new color shall be equal to the Transition time field, in 1/10ths of a
- * second.\n\n
- * The path through color space taken during the transition is not specified, but it is
- * recommended that the shortest path is taken though color space, i.e. movement is
- * 'in a straight line' across the CIE xyY Color Space.\n\n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out, and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE\n\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] color_x Target color position x
- * @param[in] color_y Target color position y
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *                            A step is a change in the device's hue of 'Step size' units.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_to_color(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short color_x,
-               unsigned short color_y,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move color' commmand.
- * @details On receipt of this command, a device shall set the value of the ColorMode
- * attribute, where implemented, to 0x01, and shall then move from its current color
- * in a continuous fashion according to the rates specified. This movement shall
- * continue until the target color for the next step cannot be implemented on this
- * device.\n\n
- * If both the RateX and RateY fields contain a value of zero, no movement shall be
- * carried out, and the command execution shall have no effect other than stopping
- * the operation of any previously received command of this cluster. This command
- * can thus be used to stop the operation of any other command of this cluster.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] rate_x The RateX field specifies the rate of movement in steps per second.
- *                   A step is a change in the device's CurrentX attribute of one unit.
- * @param[in] rate_y The RateY field specifies the rate of movement in steps per second.
- *                   A step is a change in the device's CurrentY attribute of one unit.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_color(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short rate_x,
-               unsigned short rate_y);
-
-/**
- * @brief Sends 'step color' command.
- * @details On receipt of this command, a device shall set the value of the ColorMode
- * attribute, where implemented, to 0x01, and shall then move from its current color
- * by the color step indicated.\n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new color shall be equal to the Transition time field, in 1/10ths of a
- * second.\n\n
- * The path through color space taken during the transition is not specified, but it is
- * recommended that the shortest path is taken though color space, i.e. movement is
- * 'in a straight line' across the CIE xyY Color Space.\n\n
- * Note that if the target color specified is not achievable by this hardware then
- * command shall not be carried out, and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE\n\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] step_x The StepX and StepY fields specify the change to be added to the device's
- *                   CurrentX attribute and CurrentY attribute respectively.
- * @param[in] step_y The StepX and StepY fields specify the change to be added to the device's
- *                   CurrentX attribute and CurrentY attribute respectively.
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_step_color(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short step_x,
-               unsigned short step_y,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move to color temperature' command.
- * @details On receipt of this command, a device shall set the value of the ColorMode
- * attribute, where implemented, to 0x02, and shall then move from its current color
- * to the color given by the Color Temperature field.\n\n
- * The movement shall be continuous, i.e. not a step function, and the time taken to
- * move to the new color shall be equal to the Transition time field, in 1/10ths of a
- * second.\n\n
- * By definition of this color mode, the path through color space taken during the
- * transition is along the 'Black Body Line'.\n\n
- * Note that if the target color specified is not achievable by the hardware then the
- * command shall not be carried out, and a ZCL default response command shall be
- * generated, where not disabled, with status code equal to INVALID_VALUE.\n\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] color_temperature The target color temperature value
- * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
- *                            the time that shall be taken to perform the step.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_ccontrol_move_to_color_temperature(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short color_temperature,
-               unsigned short transition_time);
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COLOR_CONTROL_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_commands.h b/include/zcl/zb_zcl_commands.h
deleted file mode 100755 (executable)
index 06c5d25..0000000
+++ /dev/null
@@ -1,762 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COMMANDS_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COMMANDS_H__
-
-/**
- * @file zb_zcl_commands.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Global commands (Either direction).
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_READ_ATTRIBUTES_COMMAND_ID = 0x00, /**< Read attributes */
-       ZB_ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID = 0x01, /**< Read attributes response */
-       ZB_ZCL_WRITE_ATTRIBUTES_COMMAND_ID = 0x02, /**< Write attributes */
-       ZB_ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID = 0x03, /**< Write attributes undivided */
-       ZB_ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID = 0x04, /**< Write attributes response */
-       ZB_ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID = 0x05, /**< Write attributes no response */
-       ZB_ZCL_CONFIGURE_REPORTING_COMMAND_ID = 0x06, /**< Configure reporting */
-       ZB_ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID = 0x07, /**< Configure reporting response */
-       ZB_ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID = 0x08, /**< Read reporting configuration */
-       ZB_ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID = 0x09, /**< Read reporting configuration response */
-       ZB_ZCL_REPORT_ATTRIBUTES_COMMAND_ID = 0x0A, /**< Report attributes  */
-       ZB_ZCL_DEFAULT_RESPONSE_COMMAND_ID = 0x0B, /**< Default response */
-       ZB_ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID = 0x0C, /**< Discover attributes */
-       ZB_ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID = 0x0D, /**< Discover attributes response */
-       ZB_ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID = 0x0E, /**< Read attributes structured */
-       ZB_ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID = 0x0F, /**< Write attributes structured */
-       ZB_ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID = 0x10, /**< Write attributes structured response */
-       ZB_ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID = 0x11, /**< Discover commands received */
-       ZB_ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID = 0x12, /**< Discover commands received */
-       ZB_ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID = 0x13, /**< Discover commands generated */
-       ZB_ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID = 0x14, /**< Discover commands generated response */
-       ZB_ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID = 0x15, /**< Discover attributes extended */
-       ZB_ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID = 0x16, /**< Discover attributes extended response */
-} zb_zcl_global_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Basic.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to server
- *
- */
-typedef enum {
-       ZB_ZCL_RESET_TO_FACTORY_DEFAULTS_COMMAND_ID = 0x00, /**< Reset to factory default mode */
-} zb_zcl_basic_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Identify.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to client
- *
- */
-typedef enum {
-       ZB_ZCL_IDENTIFY_QUERY_RESPONSE_COMMAND_ID = 0x00, /**< Identify query response */
-} zb_zcl_identify_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Identify.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to server
- *
- */
-typedef enum {
-       ZB_ZCL_IDENTIFY_COMMAND_ID  = 0x00, /**< Identify */
-       ZB_ZCL_IDENTIFY_QUERY_COMMAND_ID  = 0x01, /**< Identify query */
-       ZB_ZCL_E_Z_MODE_INVOKE_COMMAND_ID  = 0x02, /**< EZ mode invoke */
-       ZB_ZCL_UPDATE_COMMISSION_STATE_COMMAND_ID  = 0x03, /**< Update commission state */
-       ZB_ZCL_TRIGGER_EFFECT_COMMAND_ID = 0x40, /**< Trigger effect (since zll-1.0-11-0037-10) */
-} zb_zcl_identify_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Groups.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_ADD_GROUP_RESPONSE_COMMAND_ID  = 0x00, /**< Add group response */
-       ZB_ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID  = 0x01, /**< View group response */
-       ZB_ZCL_GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_ID  = 0x02, /**< Get group membership response */
-       ZB_ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID  = 0x03, /**< Remove group response */
-} zb_zcl_group_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Groups.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to server
- *
- */
-typedef enum {
-       ZB_ZCL_ADD_GROUP_COMMAND_ID  = 0x00, /**< Add group */
-       ZB_ZCL_VIEW_GROUP_COMMAND_ID  = 0x01, /**< View group */
-       ZB_ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID  = 0x02, /**< Get group membership */
-       ZB_ZCL_REMOVE_GROUP_COMMAND_ID  = 0x03, /**< Remove group */
-       ZB_ZCL_REMOVE_ALL_GROUPS_COMMAND_ID  = 0x04, /**< Remove all groups */
-       ZB_ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID  = 0x05, /**< Add group if identifying */
-} zb_zcl_group_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Scenes.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_ADD_SCENE_RESPONSE_COMMAND_ID  = 0x00, /**< Add scene response */
-       ZB_ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID  = 0x01, /**< View scene response */
-       ZB_ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID  = 0x02, /**< Remove scene response */
-       ZB_ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID  = 0x03, /**< Remove all scenes response */
-       ZB_ZCL_STORE_SCENE_RESPONSE_COMMAND_ID  = 0x04, /**< Store scenes response */
-       ZB_ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID  = 0x06, /**< Get scene membership response */
-       ZB_ZCL_ENHANCED_ADD_SCENE_RESPONSE_COMMAND_ID = 0x40, /**< Enhanced add scene response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENHANCED_VIEW_SCENE_RESPONSE_COMMAND_ID = 0x41, /**< Enhanced view scene response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COPY_SCENE_RESPONSE_COMMAND_ID = 0x42, /**< Copy scene response (since zll-1.0-11-0037-10) */
-} zb_zcl_scenes_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Scenes.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_ADD_SCENE_COMMAND_ID  = 0x00, /**< Add scene */
-       ZB_ZCL_VIEW_SCENE_COMMAND_ID  = 0x01, /**< View scene */
-       ZB_ZCL_REMOVE_SCENE_COMMAND_ID  = 0x02, /**< Remove scene */
-       ZB_ZCL_REMOVE_ALL_SCENES_COMMAND_ID  = 0x03, /**< Remove all scenes */
-       ZB_ZCL_STORE_SCENE_COMMAND_ID  = 0x04, /**< Store scene */
-       ZB_ZCL_RECALL_SCENE_COMMAND_ID  = 0x05, /**< Recall scene */
-       ZB_ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID  = 0x06, /**< Get scene membership */
-       ZB_ZCL_ENHANCED_ADD_SCENE_COMMAND_ID = 0x40, /**< Enhanced add scene (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENHANCED_VIEW_SCENE_COMMAND_ID = 0x41, /**< Enhanced view scene (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COPY_SCENE_COMMAND_ID = 0x42, /**< Copy scene (since zll-1.0-11-0037-10) */
-} zb_zcl_scenes_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: On/off.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_OFF_COMMAND_ID = 0x00, /**< Off */
-       ZB_ZCL_ON_COMMAND_ID = 0x01, /**< On  */
-       ZB_ZCL_TOGGLE_COMMAND_ID = 0x02, /**< Toggle */
-       ZB_ZCL_OFF_WITH_EFFECT_COMMAND_ID = 0x40, /**< Off with effect (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ON_WITH_RECALL_GLOBAL_SCENE_COMMAND_ID = 0x41, /**< On with recall global scene (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ON_WITH_TIMED_OFF_COMMAND_ID = 0x42, /**< on with timed off (since zll-1.0-11-0037-10) */
-} zb_zcl_on_off_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Level Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_MOVE_TO_LEVEL_COMMAND_ID  = 0x00, /**< Move to level */
-       ZB_ZCL_MOVE_COMMAND_ID = 0x01, /**< Move */
-       ZB_ZCL_STEP_COMMAND_ID = 0x02, /**< Step */
-       ZB_ZCL_STOP_COMMAND_ID = 0x03, /**< Stop */
-       ZB_ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID = 0x04, /**< Move to level with on/off */
-       ZB_ZCL_MOVE_WITH_ON_OFF_COMMAND_ID = 0x05, /**< Move with on/off */
-       ZB_ZCL_STEP_WITH_ON_OFF_COMMAND_ID = 0x06, /**< Step with on/off */
-       ZB_ZCL_STOP_WITH_ON_OFF_COMMAND_ID = 0x07, /**< Stop with on/off */
-} zb_zcl_level_control_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Alarms Server side.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_ALARM_COMMAND_ID = 0x00, /**< Alarm */
-       ZB_ZCL_GET_ALARM_RESPONSE_COMMAND_ID = 0x01, /**< Alarm response */
-} zb_zcl_alarms_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Alarms Client side.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_RESET_ALARM_COMMAND_ID = 0x00, /**< Reset alarm */
-       ZB_ZCL_RESET_ALL_ALARMS_COMMAND_ID = 0x01, /**< Reset all alarms */
-       ZB_ZCL_GET_ALARM_COMMAND_ID  = 0x02, /**< Get alarm */
-       ZB_ZCL_RESET_ALARM_LOG_COMMAND_ID = 0x03, /**< Reset alarm log */
-} zb_zcl_alarms_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: RSSI Location Server side.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_DEVICE_CONFIGURATION_RESPONSE_COMMAND_ID  = 0x00, /**< Device configuration response */
-       ZB_ZCL_LOCATION_DATA_RESPONSE_COMMAND_ID  = 0x01, /**< Location data response */
-       ZB_ZCL_LOCATION_DATA_NOTIFICATION_COMMAND_ID  = 0x02, /**< Location data notification */
-       ZB_ZCL_COMPACT_LOCATION_DATA_NOTIFICATION_COMMAND_ID  = 0x03, /**< Compact location data notification */
-       ZB_ZCL_RSSI_PING_COMMAND_ID  = 0x04, /**< RSSI ping */
-       ZB_ZCL_RSSI_REQUEST_COMMAND_ID  = 0x05, /**< RSSI request */
-       ZB_ZCL_REPORT_RSSI_MEASUREMENTS_COMMAND_ID  = 0x06, /**< Report RSSI measurements */
-       ZB_ZCL_REQUEST_OWN_LOCATION_COMMAND_ID  = 0x07, /**< Request own location */
-} zb_zcl_rssi_location_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: RSSI Location Client side.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_SET_ABSOLUTE_LOCATION_COMMAND_ID  = 0x00, /**< Set absolute location */
-       ZB_ZCL_SET_DEVICE_CONFIGURATION_COMMAND_ID  = 0x01, /**< Set device configuration */
-       ZB_ZCL_GET_DEVICE_CONFIGURATION_COMMAND_ID  = 0x02, /**< Get device configuration */
-       ZB_ZCL_GET_LOCATION_DATA_COMMAND_ID  = 0x03, /**< Get location data */
-       ZB_ZCL_RSSI_RESPONSE_COMMAND_ID  = 0x04, /**< RSSI response */
-       ZB_ZCL_SEND_PINGS_COMMAND_ID  = 0x05, /**< Send ping */
-       ZB_ZCL_ANCHOR_NODE_ANNOUNCE_COMMAND_ID  = 0x06, /**< Anchor node announce */
-} zb_zcl_rssi_location_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Commissioning.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_RESTART_DEVICE_RESPONSE_COMMAND_ID = 0x00, /**< Restart device response */
-       ZB_ZCL_SAVE_STARTUP_PARAMETERS_RESPONSE_COMMAND_ID = 0x01, /**< Save startup parameters response */
-       ZB_ZCL_RESTORE_STARTUP_PARAMETERS_RESPONSE_COMMAND_ID = 0x02, /**< Restore startup parameters response */
-       ZB_ZCL_RESET_STARTUP_PARAMETERS_RESPONSE_COMMAND_ID = 0x03, /**< Reset startup parameters response */
-} zb_zcl_commissioning_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Commissioning.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_RESTART_DEVICE_COMMAND_ID = 0x00, /**< Restart device */
-       ZB_ZCL_SAVE_STARTUP_PARAMETERS_COMMAND_ID = 0x01, /**< Save startup parameters */
-       ZB_ZCL_RESTORE_STARTUP_PARAMETERS_COMMAND_ID = 0x02, /**< Restore startup parameters */
-       ZB_ZCL_RESET_STARTUP_PARAMETERS_COMMAND_ID = 0x03, /**< Reset startup parameters */
-} zb_zcl_commissioning_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Partition.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_MULTIPLE_ACK_COMMAND_ID = 0x00, /**< Multiple ACK */
-       ZB_ZCL_READ_HANDSHAKE_PARAM_RESPONSE_COMMAND_ID = 0x01, /**< Read handshake parameters response */
-} zb_zcl_partition_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Partition.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_TRANSFER_PARTITIONED_FRAME_COMMAND_ID = 0x00, /**< Transfer partitioned frame */
-       ZB_ZCL_READ_HANDSHAKE_PARAM_COMMAND_ID = 0x01, /**< Read handshake parameters */
-       ZB_ZCL_WRITE_HANDSHAKE_PARAM_COMMAND_ID = 0x02, /**< Write handshake parameters */
-} zb_zcl_partition_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Over the Air Bootloading.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_IMAGE_NOTIFY_COMMAND_ID = 0x00, /**< Image notify */
-       ZB_ZCL_QUERY_NEXT_IMAGE_RESPONSE_COMMAND_ID = 0x02, /**< Query next image response */
-       ZB_ZCL_IMAGE_BLOCK_RESPONSE_COMMAND_ID = 0x05, /**< Image block response */
-       ZB_ZCL_UPGRADE_END_RESPONSE_COMMAND_ID = 0x07, /**< Upgrade end response */
-       ZB_ZCL_QUERY_SPECIFIC_FILE_RESPONSE_COMMAND_ID = 0x09, /**< Query specific file response */
-} zb_zcl_over_the_air_bootloading_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Over the Air Bootloading.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_QUERY_NEXT_IMAGE_REQUEST_COMMAND_ID = 0x01, /**< Query next image request */
-       ZB_ZCL_IMAGE_BLOCK_REQUEST_COMMAND_ID = 0x03, /**< Image block request */
-       ZB_ZCL_IMAGE_PAGE_REQUEST_COMMAND_ID = 0x04, /**< Image page request */
-       ZB_ZCL_UPGRADE_END_REQUEST_COMMAND_ID = 0x06, /**< Upgrade end request */
-       ZB_ZCL_QUERY_SPECIFIC_FILE_REQUEST_COMMAND_ID = 0x08, /**< Query specific file request */
-} zb_zcl_over_the_air_bootloading_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Power Profile.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_POWER_PROFILE_NOTIFICATION_COMMAND_ID = 0x00, /**< Power profile notification */
-       ZB_ZCL_POWER_PROFILE_RESPONSE_COMMAND_ID = 0x01, /**< Power profile response */
-       ZB_ZCL_POWER_PROFILE_STATE_RESPONSE_COMMAND_ID = 0x02, /**< Power profile state response */
-       ZB_ZCL_GET_POWER_PROFILE_PRICE_COMMAND_ID = 0x03, /**< Get power profile price */
-       ZB_ZCL_POWER_PROFILES_STATE_NOTIFICATION_COMMAND_ID = 0x04, /**< Power profiles state notification */
-       ZB_ZCL_GET_OVERALL_SCHEDULE_PRICE_COMMAND_ID = 0x05, /**< Get overall schedule price */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_REQUEST_COMMAND_ID = 0x06, /**< Energy phases schedule request */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_STATE_RESPONSE_COMMAND_ID = 0x07, /**< Energy phrase schedule state response */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_STATE_NOTIFICATION_COMMAND_ID = 0x08, /**< Energy phrase schedule state notification */
-       ZB_ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_NOTIFICATION_COMMAND_ID = 0x09, /**< Power profile schedule constraints notification */
-       ZB_ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_RESPONSE_COMMAND_ID = 0x0A, /**< Power profile schedule constraints response */
-       ZB_ZCL_GET_POWER_PROFILE_PRICE_EXTENDED_COMMAND_ID = 0x0B, /**< Get power profile price extended */
-} zb_zcl_power_profile_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Power Profile.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_POWER_PROFILE_REQUEST_COMMAND_ID = 0x00, /**< Power profile request */
-       ZB_ZCL_POWER_PROFILE_STATE_REQUEST_COMMAND_ID = 0x01, /**< Power profile state request */
-       ZB_ZCL_GET_POWER_PROFILE_PRICE_RESPONSE_COMMAND_ID = 0x02, /**< Get power profile price response */
-       ZB_ZCL_GET_OVERALL_SCHEDULE_PRICE_RESPONSE_COMMAND_ID = 0x03, /**< Get overall schedule price response */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_NOTIFICATION_COMMAND_ID = 0x04, /**< Energy phrases schedules notification */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_RESPONSE_COMMAND_ID = 0x05, /**< Energy phrases schedules response */
-       ZB_ZCL_POWER_PROFILE_SCHEDULE_CONSTRAINTS_REQUEST_COMMAND_ID = 0x06, /**< Power profile schedule constraints request */
-       ZB_ZCL_ENERGY_PHASES_SCHEDULE_STATE_REQUEST_COMMAND_ID = 0x07, /**< Energy phrases schedules state request */
-       ZB_ZCL_GET_POWER_PROFILE_PRICE_EXTENDED_RESPONSE_COMMAND_ID = 0x08, /**< Get power profile price extended response */
-} zb_zcl_power_profile_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Appliance Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_SIGNAL_STATE_RESPONSE_COMMAND_ID = 0x00, /**< Signal state response */
-       ZB_ZCL_SIGNAL_STATE_NOTIFICATION_COMMAND_ID = 0x01, /**< Signal state notification */
-} zb_zcl_appliance_control_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Appliance Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_EXECUTION_OF_A_COMMAND_COMMAND_ID = 0x00, /**< Execution of a command */
-       ZB_ZCL_SIGNAL_STATE_COMMAND_ID = 0x01, /**< Signal state */
-       ZB_ZCL_WRITE_FUNCTIONS_COMMAND_ID = 0x02, /**< Write functions */
-       ZB_ZCL_OVERLOAD_PAUSE_RESUME_COMMAND_ID = 0x03, /**< Overload pause/resume */
-       ZB_ZCL_OVERLOAD_PAUSE_COMMAND_ID = 0x04, /**< Overload pause */
-       ZB_ZCL_OVERLOAD_WARNING_COMMAND_ID = 0x05, /**< Overload warning */
-} zb_zcl_appliance_control_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Poll Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_CHECK_IN_COMMAND_ID = 0x00, /**< Check-in */
-} zb_zcl_poll_control_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Poll Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_CHECK_IN_RESPONSE_COMMAND_ID = 0x00, /**< Check-in response */
-       ZB_ZCL_FAST_POLL_STOP_COMMAND_ID = 0x01, /**< Fast poll stop */
-       ZB_ZCL_SET_LONG_POLL_INTERVAL_COMMAND_ID = 0x02, /**< Set long poll interval */
-       ZB_ZCL_SET_SHORT_POLL_INTERVAL_COMMAND_ID = 0x03, /**< Set short poll interval */
-} zb_zcl_poll_control_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Door Lock.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_LOCK_DOOR_RESPONSE_COMMAND_ID = 0x00, /**< Lock door response */
-       ZB_ZCL_UNLOCK_DOOR_RESPONSE_COMMAND_ID = 0x01, /**< Unlock door response */
-       ZB_ZCL_TOGGLE_RESPONSE_COMMAND_ID = 0x02, /**< Toggle response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_UNLOCK_WITH_TIMEOUT_RESPONSE_COMMAND_ID = 0x03, /**< Unlock with timeout response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_LOG_RECORD_RESPONSE_COMMAND_ID = 0x04, /**< Get log record response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_PIN_RESPONSE_COMMAND_ID = 0x05, /**< Set PIN response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_PIN_RESPONSE_COMMAND_ID = 0x06, /**< Get PIN response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_PIN_RESPONSE_COMMAND_ID = 0x07, /**< Clear PIN response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_ALL_PINS_RESPONSE_COMMAND_ID = 0x08, /**< Clear all PINs response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_USER_STATUS_RESPONSE_COMMAND_ID = 0x09, /**< Set user status response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_USER_STATUS_RESPONSE_COMMAND_ID = 0x0A, /**< Get user status response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x0B, /**< Set weekday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x0C, /**< Get weekday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x0D, /**< Clear weekday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x0E, /**< Set yearday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x0F, /**< Get yearday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x10, /**< Clear yearday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x11, /**< Set holiday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x12, /**< Get holiday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID = 0x13, /**< Clear holiday schedule response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_USER_TYPE_RESPONSE_COMMAND_ID = 0x14, /**< Set user type response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_USER_TYPE_RESPONSE_COMMAND_ID = 0x15, /**< Get user type response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_RFID_RESPONSE_COMMAND_ID = 0x16, /**< Set RFID response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_RFID_RESPONSE_COMMAND_ID = 0x17, /**< Get RFID response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_RFID_RESPONSE_COMMAND_ID = 0x18, /**< Clear RFID response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_ALL_RFIDS_RESPONSE_COMMAND_ID = 0x19, /**< CLear ALL RFIDs response (since ha-1.2-05-3520-29) */
-       ZB_ZCL_OPERATION_EVENT_NOTIFICATION_COMMAND_ID = 0x20, /**< Operation event notification (since ha-1.2-05-3520-29) */
-       ZB_ZCL_PROGRAMMING_EVENT_NOTIFICATION_COMMAND_ID = 0x21, /**< Programming event notification (since ha-1.2-05-3520-29) */
-} zb_zcl_door_lock_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Door Lock.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_LOCK_DOOR_COMMAND_ID = 0x00, /**< Lock door */
-       ZB_ZCL_UNLOCK_DOOR_COMMAND_ID = 0x01, /**< Unlock door */
-       ZB_ZCL_DOOR_TOGGLE_COMMAND_ID = 0x02, /**< Door toggle (since ha-1.2-05-3520-29) */
-       ZB_ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID = 0x03, /**< Unlock with timeout (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_LOG_RECORD_COMMAND_ID  = 0x04, /**< Get log record (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_PIN_COMMAND_ID = 0x05, /**< Set PIN  (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_PIN_COMMAND_ID = 0x06, /**< Get PIN (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_PIN_COMMAND_ID = 0x07, /**< Clear PIN (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_ALL_PINS_COMMAND_ID = 0x08, /**< Clear all PINs (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_USER_STATUS_COMMAND_ID = 0x09, /**< Set user status (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_USER_STATUS_COMMAND_ID = 0x0A, /**< Get user status (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID = 0x0B, /**< Set weekday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID = 0x0C, /**< Get weekday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID = 0x0D, /**< Clear weekday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID = 0x0E, /**< Set yearday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID = 0x0F, /**< Get yearday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID = 0x10, /**< Clear yearday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID = 0x11, /**< Set holiday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID = 0x12, /**< Get holiday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID = 0x13, /**< Clear holiday schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_USER_TYPE_COMMAND_ID = 0x14, /**< Set user type (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_USER_TYPE_COMMAND_ID = 0x15, /**< Get user type (since ha-1.2-05-3520-29) */
-       ZB_ZCL_SET_RFID_COMMAND_ID = 0x16, /**< Set RFID (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_RFID_COMMAND_ID = 0x17, /**< Get RFID (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_RFID_COMMAND_ID = 0x18, /**< Clear RFID (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_ALL_RFIDS_COMMAND_ID = 0x19, /**< Clear all RFIDs (since ha-1.2-05-3520-29) */
-} zb_zcl_door_lock_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Window Covering.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_WINDOW_COVERING_UP_OPEN_COMMAND_ID = 0x00, /**< Window covering up (open) */
-       ZB_ZCL_WINDOW_COVERING_DOWN_CLOSE_COMMAND_ID = 0x01, /**< Window covering down (close) */
-       ZB_ZCL_WINDOW_COVERING_STOP_COMMAND_ID = 0x02, /**< Window covering stop */
-       ZB_ZCL_WINDOW_COVERING_GO_TO_LIFT_VALUE_COMMAND_ID = 0x04, /**< Window covering go to lift value */
-       ZB_ZCL_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE_COMMAND_ID = 0x05, /**< Window covering go to lift percentage */
-       ZB_ZCL_WINDOW_COVERING_GO_TO_TILT_VALUE_COMMAND_ID = 0x07, /**< Window covering go to tilt value */
-       ZB_ZCL_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE_COMMAND_ID = 0x08, /**< Window covering go to tilt percentage */
-} zb_zcl_window_covering_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Thermostat.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_CURRENT_WEEKLY_SCHEDULE_COMMAND_ID = 0x00, /**< Current weekly schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_RELAY_STATUS_LOG_COMMAND_ID = 0x01, /**< Relay status log (since ha-1.2-05-3520-29) */
-} zb_zcl_thermostat_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Thermostat.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_SETPOINT_RAISE_LOWER_COMMAND_ID = 0x00, /**< Setpoint raise or lower */
-       ZB_ZCL_SET_WEEKLY_SCHEDULE_COMMAND_ID = 0x01, /**< Set weekly schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_WEEKLY_SCHEDULE_COMMAND_ID = 0x02, /**< Get weekly schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_CLEAR_WEEKLY_SCHEDULE_COMMAND_ID = 0x03, /**< Clear weekly schedule (since ha-1.2-05-3520-29) */
-       ZB_ZCL_GET_RELAY_STATUS_LOG_COMMAND_ID = 0x04, /**< Get relay status log (since ha-1.2-05-3520-29) */
-} zb_zcl_thermostat_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Color Control.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_MOVE_TO_HUE_COMMAND_ID = 0x00, /**< Move to hue */
-       ZB_ZCL_MOVE_HUE_COMMAND_ID = 0x01, /**< Move hue */
-       ZB_ZCL_STEP_HUE_COMMAND_ID = 0x02, /**< Step hue */
-       ZB_ZCL_MOVE_TO_SATURATION_COMMAND_ID = 0x03, /**< Move to saturation */
-       ZB_ZCL_MOVE_SATURATION_COMMAND_ID = 0x04, /**< Move saturation */
-       ZB_ZCL_STEP_SATURATION_COMMAND_ID = 0x05, /**< Step saturation */
-       ZB_ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID = 0x06, /**< Move to hue and saturation */
-       ZB_ZCL_MOVE_TO_COLOR_COMMAND_ID = 0x07, /**< Move to color */
-       ZB_ZCL_MOVE_COLOR_COMMAND_ID = 0x08, /**< Move color */
-       ZB_ZCL_STEP_COLOR_COMMAND_ID = 0x09, /**< Step color */
-       ZB_ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID = 0x0A, /**< Move to color temperature */
-       ZB_ZCL_ENHANCED_MOVE_TO_HUE_COMMAND_ID = 0x40, /**< Enhanced move to hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENHANCED_MOVE_HUE_COMMAND_ID = 0x41, /**< Enhanced move hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENHANCED_STEP_HUE_COMMAND_ID = 0x42, /**< Enhanced step hue (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENHANCED_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID = 0x43, /**< Enhanced move to hue and saturation (since zll-1.0-11-0037-10) */
-       ZB_ZCL_COLOR_LOOP_SET_COMMAND_ID = 0x44, /**< Color loop set (since zll-1.0-11-0037-10) */
-       ZB_ZCL_STOP_MOVE_STEP_COMMAND_ID = 0x47, /**< Stop move step (since zll-1.0-11-0037-10) */
-       ZB_ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID = 0x4B, /**< Move color temperature (since zll-1.0-11-0037-10) */
-       ZB_ZCL_STEP_COLOR_TEMPERATUE_COMMAND_ID = 0x4C, /**< Step color temperature (since zll-1.0-11-0037-10) */
-} zb_zcl_color_control_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: IAS Zone.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_ID = 0x00, /**< Zone status change notification */
-       ZB_ZCL_ZONE_ENROLL_REQUEST_COMMAND_ID = 0x01, /**< Zone enroll request */
-       ZB_ZCL_INITIATE_NORMAL_OPERATION_MODE_RESPONSE_COMMAND_ID = 0x02, /**< Initiate normal operation mode response */
-       ZB_ZCL_INITIATE_TEST_MODE_RESPONSE_COMMAND_ID = 0x03, /**< Initiate test mode response */
-} zb_zcl_ias_zone_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: IAS Zone.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID = 0x00, /**< Zone enroll response */
-       ZB_ZCL_INITIATE_NORMAL_OPERATION_MODE_COMMAND_ID = 0x01, /**< Initiate normal operation mode */
-       ZB_ZCL_INITIATE_TEST_MODE_COMMAND_ID = 0x02, /**< Initiate test mode */
-} zb_zcl_ias_zone_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: IAS ACE.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_ARM_RESPONSE_COMMAND_ID = 0x00, /**< Arm response */
-       ZB_ZCL_GET_ZONE_ID_MAP_RESPONSE_COMMAND_ID = 0x01, /**< Get zone id map response */
-       ZB_ZCL_GET_ZONE_INFORMATION_RESPONSE_COMMAND_ID = 0x02, /**< Get zone information response */
-       ZB_ZCL_ZONE_STATUS_CHANGED_COMMAND_ID = 0x03, /**< Zone status change */
-       ZB_ZCL_PANEL_STATUS_CHANGED_COMMAND_ID = 0x04, /**< Panel status change */
-       ZB_ZCL_GET_PANEL_STATUS_RESPONSE_COMMAND_ID = 0x05, /**< Get panel status response (since ha-1.2.1-05-3520-30) */
-       ZB_ZCL_SET_BYPASSED_ZONE_LIST_COMMAND_ID = 0x06, /**< Set bypass zone list (since ha-1.2.1-05-3520-30) */
-       ZB_ZCL_BYPASS_RESPONSE_COMMAND_ID = 0x07, /**< Bypass response (since ha-1.2.1-05-3520-30) */
-       ZB_ZCL_GET_ZONE_STATUS_RESPONSE_COMMAND_ID = 0x08, /**< Get zone status response (since ha-1.2.1-05-3520-30) */
-} zb_zcl_ias_ace_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: IAS ACE.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_ARM_COMMAND_ID = 0x00, /**< Arm */
-       ZB_ZCL_BYPASS_COMMAND_ID = 0x01, /**< Bypass  */
-       ZB_ZCL_EMERGENCY_COMMAND_ID = 0x02, /**< Emergency */
-       ZB_ZCL_FIRE_COMMAND_ID = 0x03, /**< Fire */
-       ZB_ZCL_PANIC_COMMAND_ID = 0x04, /**< Panic */
-       ZB_ZCL_GET_ZONE_ID_MAP_COMMAND_ID = 0x05, /**< Get zone id map */
-       ZB_ZCL_GET_ZONE_INFORMATION_COMMAND_ID = 0x06, /**< Get zone information */
-       ZB_ZCL_GET_PANEL_STATUS_COMMAND_ID = 0x07, /**< Get panel status (since ha-1.2.1-05-3520-30) */
-       ZB_ZCL_GET_BYPASSED_ZONE_LIST_COMMAND_ID = 0x08, /**< Bypassed zone lise (since ha-1.2.1-05-3520-30) */
-       ZB_ZCL_GET_ZONE_STATUS_COMMAND_ID = 0x09, /**< Get zone status (since ha-1.2.1-05-3520-30) */
-} zb_zcl_ias_ace_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: IAS WD.
- * @details Cluster specification level: zcl-1.0-07-5123-03
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_START_WARNING_COMMAND_ID = 0x00, /**< Start warning */
-       ZB_ZCL_SQUAWK_COMMAND_ID = 0x01, /**< Squawk */
-} zb_zcl_ias_wd_client_commands_e;
-
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Electrical Measurement.
- * @details Cluster specification level: UNKNOWN
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_GET_PROFILE_INFO_RESPONSE_COMMAND_COMMAND_ID = 0x00, /**< Get profile info. response command */
-       ZB_ZCL_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND_COMMAND_ID = 0x01, /**< Get measurement profile response command */
-} zb_zcl_electrical_measurement_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: Electrical Measurement.
- * @details Cluster specification level: UNKNOWN
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_GET_PROFILE_INFO_COMMAND_COMMAND_ID = 0x00, /**< Get profile info. command */
-       ZB_ZCL_GET_MEASUREMENT_PROFILE_COMMAND_COMMAND_ID = 0x01, /**< Get measurement profile command */
-} zb_zcl_electrical_measurement_client_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: ZLL Commissioning.
- * @details Cluster specification level: zll-1.0-11-0037-10
- * @since_tizen 4.0
- * @remarks Direction : Server to Client
- *
- */
-typedef enum {
-       ZB_ZCL_SCAN_RESPONSE_COMMAND_ID = 0x01, /**< Scan response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_DEVICE_INFORMATION_RESPONSE_COMMAND_ID = 0x03, /**< Device information response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_START_RESPONSE_COMMAND_ID = 0x11, /**< Network start response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_JOIN_ROUTER_RESPONSE_COMMAND_ID = 0x13, /**< Network join router response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_JOIN_END_DEVICE_RESPONSE_COMMAND_ID  = 0x15, /**< Network join end device response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_ENDPOINT_INFORMATION_COMMAND_ID = 0x40, /**< Endpoint information (since zll-1.0-11-0037-10) */
-       ZB_ZCL_GET_GROUP_IDENTIFIERS_RESPONSE_COMMAND_ID = 0x41, /**< Get group identifiers response (since zll-1.0-11-0037-10) */
-       ZB_ZCL_GET_ENDPOINT_LIST_RESPONSE_COMMAND_ID = 0x42, /**< Get endpoint list response (since zll-1.0-11-0037-10) */
-} zb_zcl_zll_commissioning_server_commands_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Command types for cluster: ZLL Commissioning.
- * @details Cluster specification level: zll-1.0-11-0037-10
- * @since_tizen 4.0
- * @remarks Direction : Client to Server
- *
- */
-typedef enum {
-       ZB_ZCL_SCAN_REQUEST_COMMAND_ID = 0x00, /**< Scan request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_DEVICE_INFORMATION_REQUEST_COMMAND_ID = 0x02, /**< Device information (since zll-1.0-11-0037-10) */
-       ZB_ZCL_IDENTIFY_REQUEST_COMMAND_ID = 0x06, /**< Identify request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_RESET_TO_FACTORY_NEW_REQUEST_COMMAND_ID = 0x07, /**< Reset to factory new request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_START_REQUEST_COMMAND_ID = 0x10, /**< Network start request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_JOIN_ROUTER_REQUEST_COMMAND_ID = 0x12, /**< Network join router request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_JOIN_END_DEVICE_REQUEST_COMMAND_ID = 0x14, /**< Network join end device request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_NETWORK_UPDATE_REQUEST_COMMAND_ID  = 0x16, /**< Network update request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_GET_GROUP_IDENTIFIERS_REQUEST_COMMAND_ID = 0x41, /**< Get group identifiers request (since zll-1.0-11-0037-10) */
-       ZB_ZCL_GET_ENDPOINT_LIST_REQUEST_COMMAND_ID = 0x42, /**< Get end-point list request (since zll-1.0-11-0037-10) */
-} zb_zcl_zll_commissioning_client_commands_e;
-
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_COMMANDS_H__ */
diff --git a/include/zcl/zb_zcl_global_commands.h b/include/zcl/zb_zcl_global_commands.h
deleted file mode 100755 (executable)
index 5491d9a..0000000
+++ /dev/null
@@ -1,732 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GLOBAL_COMMANDS_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GLOBAL_COMMANDS_H__
-
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_global_commands.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE Global Commands
- *
- * @brief Zigbee global commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE_HEADER Requied Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE_OVERVIEW Overview
- * Global command frames are used for manipulating attributes and other general
- * tasks that are not specific to an individual cluster.
- * The command frames defined in this section. \n\n
- * Each command frame shall be constructed with the frame type sub-field of the frame
- * control field set to 0b00.\n
- * All clusters (server and client) shall support generation, reception and execution
- * of the Default response command.\n\n
- * Each cluster (server or client) that implements attributes shall support reception
- * of, execution of, and response to all commands to discover, read, and write these
- * attributes. However, if no attributes with structured types are supported, it is not
- * required to support the structured read and write commands.\n\n
- * Implementation of commands to report, configure reporting of, and read reporting
- * configuration of attributes is only mandatory if the cluster has attributes whose
- * reportability is mandatory.\n\n
- * Generation of these commands is application dependent\n
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @brief Called when receiving general response.
- * @details This function is used for global response corresponding.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 source network address
- * @param[in] ep where is sent from (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records Response record
- * @param[in] records_len Length of attribute status record
- * @param[in] user_data User data
- *
- * @see zb_zcl_global_read_attr()
- * @see zb_zcl_global_write_attr()
- * @see zb_zcl_global_write_attr_undivided()
- * @see zb_zcl_global_config_report()
- * @see zb_zcl_global_read_config_report()
- * @see zb_zcl_global_read_attr_structured()
- * @see zb_zcl_global_write_attr_structured()
- */
-typedef void (*zb_zcl_global_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short cluster_id,
-               zb_global_record_data_s *records,
-               int records_len,
-               void *user_data);
-
-/**
- * @brief Sends 'reads attributes' commands.
- * @details This function to read attributes in devices.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] attribute_ids Attributes_ids-list
- * @param[in] attribute_ids_len Length of attribte_ids-list
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @post This function invokes zb_zcl_global_rsp() for each application context.
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_read_attr(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               unsigned short *attribute_ids,
-               int attribute_ids_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'write Attributes' command.
- * @details This function to write attributes to other devices.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records structure for write_attribute_record_s
- * @param[in] records_len Length of attribte_ids-list
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_write_attr(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               write_attr_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'write attributes undivided' command.
- * @details This function to write attributes without fragmentation to other devices.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records structure for write_attribute_record_s
- * @param[in] records_len Length of attribte_ids-list
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_write_attr_undivided(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               write_attr_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'write Attributes' command.
- * @details This function to write attributes to other devices without any response.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records structure for write_attribute_record_s
- * @param[in] records_len Length of attribte_ids-list
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_global_write_attr_no_rsp(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               write_attr_record_h *records,
-               int records_len);
-
-/**
- * @brief Sends 'setting configure reporting' command.
- * @details This function to set configuration about attribute status changing reporting.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records structure for report_config_records
- * @param[in] records_len Length of report_config_records structure
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_config_report(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               report_config_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'reading configure reporting' command.
- * @details This function to read configuration about attribute status changing reporting.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records structure for report_config_records
- * @param[in] records_len Length of report_config_records structure
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_read_config_report(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               read_report_config_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'discover attribute' command.
- * @details The discover attributes response command is generated in response to a discover
- * attributes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 source network address
- * @param[in] ep where is sent from (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] discovery_complete Discovery complete
- * @param[in] records Discover attribute information record
- * @param[in] records_len Length of Discover attribute information record
- * @param[in] user_data User data
- *
- * @see zb_zcl_global_discover_attr()
- */
-typedef void (*zb_zcl_global_discover_attr_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short cluster_id,
-               unsigned char discovery_complete,
-               discover_attr_info_record_h *records,
-               int records_len,
-               void *user_data);
-
-/**
- * @brief Sends 'discovering attributes' command.
- * @details The discover attributes command is generated when a remote device wishes to
- * discover the identifiers and types of the attributes on a device which are supported
- * within the cluster to which this command is directed.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] start_id The value of the identifier at which to begin the attribute discovery.
- * @param[in] max_attribute_ids The maximum number of attribute identifiers
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_discover_attr(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               unsigned short start_id,
-               unsigned char max_attribute_ids,
-               zb_zcl_global_discover_attr_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after zb_zcl_global_discover_commands_received() and
- *        zb_zcl_global_discover_cmds_generated().
- * @details The ZCL provides the facility to discover the commands that a cluster
- * instance on a remote device can receive and generate. This is useful since an
- * individual cluster instance may not be able to receive or generate all of the commands
- * that are theoretically supported by the cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 source network address
- * @param[in] ep where is sent from (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] discovery_complete which indicates whether the Command Discovery is
- *             complete, i.e. whether there are any commands remaining to be discovered:\n
- *             - TRUE - all commands have been discovered\n
- *             - FALSE - there are further commands to be discovered\n
- * @param[in] command_ids Discovered commands list
- * @param[in] command_ids_len The number of discovered commands reported in this response
- * @param[in] user_data User data
- *
- * @see zb_zcl_global_discover_cmd_received()
- */
-typedef void (*zb_zcl_global_discover_cmds_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short cluster_id,
-               unsigned char discovery_complete,
-               unsigned char *command_ids,
-               int command_ids_len,
-               void *user_data);
-
-/**
- * @brief Sends 'discover command recevied' command.
- * @details This function to know remote cluster on remote device can handle specific commands.
- * The ZCL provides the facility to discover the commands that a cluster
- * instance on a remote device can receive and generate. This is useful since an
- * individual cluster instance may not be able to receive or generate all of the commands
- *  that are theoretically supported by the cluster.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] start_command_id Start command id .
- * @param[in] max_command_ids Last command id
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_cmd_received_rsp()
- */
-int zb_zcl_global_discover_cmds_received(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-           unsigned char start_command_id,
-           unsigned char max_command_ids,
-           zb_zcl_global_discover_cmds_rsp cb,
-           void *user_data);
-
-/**
- * @brief Sends 'discover command generated' command.
- * @details The ZCL provides the facility to discover the commands that a cluster
- * instance on a remote device can receive and generate. This is useful since an
- * individual cluster instance may not be able to receive or generate all of the commands
- *  that are theoretically supported by the cluster.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] start_command_id Start command id .
- * @param[in] max_command_ids Last command id
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_cmds_rsp()
- */
-int zb_zcl_global_discover_cmds_generated(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               unsigned char start_command_id,
-               unsigned char max_command_ids,
-               zb_zcl_global_discover_cmds_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after zb_zcl_global_discover_attr_extended().
- * @details The ZCL provides the facility to discover the commands that a cluster
- * instance on a remote device can receive and generate. This is useful since an
- * individual cluster instance may not be able to receive or generate all of the commands
- *  that are theoretically supported by the cluster.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 source network address
- * @param[in] ep where is sent from (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] discovery_complete which indicates whether the Command Discovery is
- *             complete, i.e. whether there are any commands remaining to be discovered:\n
- *             - TRUE - all commands have been discovered\n
- *             - FALSE - there are further commands to be discovered\n
- * @param[in] records Discovered attribute information list
- * @param[in] records_len Len The number of discovered information\n
- *                             reported in this response
- * @param[in] user_data User data
- *
- * @see zb_zcl_global_discover_attr_extended()
- */
-typedef void (*zb_zcl_global_discover_attr_extended_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short cluster_id,
-               unsigned char discovery_complete,
-               extended_attr_info_h *records,
-               unsigned short records_len,
-               void *user_data);
-
-/**
- * @brief Sends 'discover attributes extended' command.
- * @details This function to know remote cluster on remote device has extended commands.
- * The ZCL provides the facility to discover the commands that a cluster
- * instance on a remote device can receive and generate. This is useful since an
- * individual cluster instance may not be able to receive or generate all of the commands
- *  that are theoretically supported by the cluster.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] start_id Start id .
- * @param[in] max_attribute_ids Last command id
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_discover_attr_extended_rsp()
- */
-int zb_zcl_global_discover_attr_extended(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               unsigned short start_id,
-               unsigned char max_attribute_ids,
-               zb_zcl_global_discover_attr_extended_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GLOBAL_COMMANDS_H__ */
diff --git a/include/zcl/zb_zcl_groups_cluster.h b/include/zcl/zb_zcl_groups_cluster.h
deleted file mode 100755 (executable)
index 947e83a..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GROUPS_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GROUPS_CLUSTER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_groups_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE Group Cluster
- *
- * @brief Zigbee group cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE_OVERVIEW Overview
- * The ZigBee specification provides the capability for group addressing. That is,
- * any endpoint on any device may be assigned to one or more groups, each labeled
- * with a 16-bit identifier (0x0001 . 0xfff7), which acts for all intents and purposes
- * like a network address. Once a group is established, frames, sent having a DstAddrMode
- * of 0x01, denoting group addressing, will be delivered to every endpoint assigned to
- * the group address named in the DstAddr parameter of the outgoing send request
- * on every device in the network for which there are such endpoints.\n\n
- * Management of group membership on each device and endpoint is implemented
- * by the APS, but the over-the-air messages that allow for remote management and
- * commissioning of groups are defined here in the cluster library on the theory that,
- * while the basic group addressing facilities are integral to the operation of the
- * stack, not every device will need or want to implement this management cluster.\n\n
- * Furthermore, the placement of the management commands here allows developers
- * of proprietary profiles to avoid implementing the library cluster but still exploit
- * group addressing.\n
- * Commands are defined here for discovering the group membership of a device,
- * adding a group, removing a group and removing all groups.\n\n
- * Finally, the group cluster allows application entities to store a name string for each
- * group to which they are assigned and to report that name string in response to a
- * client request.\n\n
- * Note that configuration of group addresses for outgoing commands is achieved
- * using the APS binding mechanisms, and is not part of this cluster.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 3.33 Generated Command IDs for the Groups Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Add group response                   |     M      |
- * |             0x01               | View group response                  |     M      |
- * |             0x02               | Get group membership response        |     M      |
- * |             0x03               | Remove group response                |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Called after 'add group' command.
- * @details The add group response is sent by the groups cluster server in response to an\n
- *  add group command.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_DUPLICATE_EXISTS \n
- *             #ZB_ZCL_INSUFFICIENT_SPACE
- * @param[in] group_id Group id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_add_group()
- */
-typedef void (*zb_zcl_group_add_group_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               void *user_data);
-
-/**
- * @brief Called after 'view group' command.
- * @details The view group response command is sent by the groups cluster server in\n
- * response to a view group command.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_NOT_FOUND
- * @param[in] group_id Group id
- * @param[in] group_name Group name
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_view_group()
- */
-typedef void (*zb_zcl_group_view_group_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               const char *group_name,
-               void *user_data);
-
-/**
- * @brief Called after 'view group membership' command.
- * @details The get group membership response command is sent by the groups cluster server\n
- * in response to a get group membership command.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] capacity How many we can add to this group
- * @param[in] group_count The number of groups contained in the group_list
- * @param[in] group_list the identifiers either of all the groups in the group table
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_view_group_membership()
- */
-typedef void (*zb_zcl_group_get_group_membership_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char capacity,
-               unsigned char group_count,
-               unsigned short *group_list,
-               void *user_data);
-
-/**
- * @brief Called after 'remove group' command.
- * @details The add group response is sent by the groups cluster server in response to an\n
- *  remove group command.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_NOT_FOUND
- * @param[in] group_id Group id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_add_group()
- */
-typedef void (*zb_zcl_group_remove_group_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               void *user_data);
-
-/* Table 3.32 Received Command IDs for the Groups Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Add group                            |     M      |
- * |             0x01               | View group                           |     M      |
- * |             0x02               | Get group membership                 |     M      |
- * |             0x03               | Remove group                         |     M      |
- * |             0x04               | Remove all group                     |     M      |
- * |             0x05               | Add group if identifying             |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'add groups' command.
- * @details The add group command allows the sending device to add group membership in a\n
- * particular group for one or more endpoints on the receiving device.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- * @param[in] group_id Group ID
- * @param[in] group_name Group name
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_group_add_group_rsp()
- */
-int zb_zcl_group_add_group(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               char *group_name,
-               zb_zcl_group_add_group_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'view group' command.
- * @details The view group command allows the sending device to request that the receiving\n
- * entity or entities respond with a view group response command containing the\n
- * application name string for a particular group.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- * @param[in] group_id Group ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_group_view_group_rsp()
- */
-int zb_zcl_group_view_group(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               zb_zcl_group_view_group_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'get group membership' command.
- * @details The get group membership command allows the sending device to inquire about\n
- * the group membership of the receiving device and endpoint in a number of ways.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- * @param[in] group_count Group count
- * @param[in] group_list Group list
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_group_get_group_membership_rsp()
- */
-int zb_zcl_group_get_group_membership(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char group_count,
-               unsigned short *group_list,
-               zb_zcl_group_get_group_membership_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'remove group' command.
- * @details The remove group command allows the sender to request that the receiving entity\n
- * or entities remove their membership, if any, in a particular group.\n
- * Note that if a group is removed the scenes associated with that group should be\n
- * removed.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- * @param[in] group_id Group ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_group_remove_group_rsp()
- */
-int zb_zcl_group_remove_group(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               zb_zcl_group_remove_group_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'remove group' command.
- * @details The remove all groups command allows the sending device to direct the receiving\n
- * entity or entities to remove all group associations.\n
- * \n
- * Note that removing all groups necessitates the removal of all associated scenes as\n
- * well. (Note: scenes not associated with a group need not be removed).\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_group_remove_all_group(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @brief Sends 'remove group if identifying' command.
- * @details The add group if identifying command allows the sending device to add group\n
- * membership in a particular group for one or more endpoints on the receiving\n
- * device, on condition that it is identifying itself. Identifying functionality is\n
- * controlled using the identify cluster.\n
- * This command might be used to assist configuring group membership in the\n
- * absence of a commissioning tool.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Target endpoint
- * @param[in] group_id Group ID
- * @param[in] group_name Group name
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_group_add_group_if_identifying(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               const char *group_name);
-
-/**
- * @}
- */
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_GROUPS_CLUSTER_H__ */
-
diff --git a/include/zcl/zb_zcl_ias_zone_cluster.h b/include/zcl/zb_zcl_ias_zone_cluster.h
deleted file mode 100755 (executable)
index dda88ba..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IAS_ZONE_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IAS_ZONE_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_ias_zone_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE IAS zone Cluster
- *
- * @brief Zigbee IAS zone cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE_OVERVIEW Overview
- * The IAS Zone cluster defines an interface to the functionality of an IAS security
- * zone device. IAS Zone supports up to two alarm types per zone, low battery
- * reports and supervision of the IAS network.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 8.10 Generated Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Zone Status Change Notification      |     M      |
- * |             0x01               | Zone Enroll Request                  |     M      |
- * |             0x11               | Zone Status Change Notification (Ext)|     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-
-/* Table 8.8 Received Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Zone Enroll Respnse                  |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Table 8.9 Values of the Enroll Response Code in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS = 0x00, /**< Success */
-       ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORT = 0x01, /**< This specific Zone type is not known
-                                                                                               to the CIE and is not supported */
-       ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMIT = 0x02, /**< CIE does not permit new zones to
-                                                                                                       enroll at this time. */
-       ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONE = 0x03, /**< CIE reached its limit of number of
-                                                                                                       enrolled zones */
-} zb_ias_zone_enroll_response_e;
-
-/**
- * @brief Sends 'zone enroll response' command.
- * @details On receipt, the device embodying the Zone server is notified that it is now
- * enrolled as an active alarm device.\n
- * The device embodying the Zone server must authenticate received messages by
- * checking the address of their sender against IAS_CIE_Address. This is to ensure
- * that only messages from the correct CIE are accepted.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] enroll_response_code #ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS
- *                                 #ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORT
- *                                 #ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMIT
- *                                 #ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONE
- * @param[in] zone_id The Zone ID field is the index into the zone table of the CIE. This
- *                    field is only relevant if the response code is success.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_zone_enroll_response(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char enroll_response_code,
-               unsigned char zone_id);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IAS_ZONE_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_identify_cluster.h b/include/zcl/zb_zcl_identify_cluster.h
deleted file mode 100755 (executable)
index ad71584..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IDENTIFY_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IDENTIFY_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_identify_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE Identity Cluster
- *
- * @brief Zigbee identity cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE_OVERVIEW Overview
- *
- * Attributes and commands to put a device into an Identification mode (e.g. flashing
- * a light), that indicates to an observer . e.g. an installer - which of several devices
- * it is, also to request any device that is identifying itself to respond to the initiator.\n\n
- * Note that this cluster cannot be disabled, and remains functional regardless of the
- * setting of the DeviceEnable attribute in the Basic cluster.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @brief Makes devices as Identify mode within specific time.
- * @details The identify command starts or stops the receiving device identifying itself.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep endpoint number
- * @param[in] identify_time Identify time
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_identify(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short identify_time);
-
-/**
- * @brief Called after receiving identify query command.
- * @details The identify query command allows the sending device to request the target or
- * targets to respond if they are currently identifying themselves.\n
- * This command has no payload.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] identify_time Identify time
- * @param[in] user_data user data
- *
- * @see zb_zcl_identify_query()
- */
-typedef void (*zb_zcl_identify_query_cb)(
-               nwk_addr addr16,
-               unsigned short identify_time,
-               void *user_data);
-
-/**
- * @brief Finds devices which sustains identify mode.
- * @details The identify query command allows the sending device to request the target or
- * targets to respond if they are currently identifying themselves.\n
- * This command has no payload.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep endpoint number
- * @param[in] cb response callback function
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_write_attr_rsp()
- */
-int zb_zcl_identify_query(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               zb_zcl_identify_query_cb cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_IDENTIFY_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_level_control_cluster.h b/include/zcl/zb_zcl_level_control_cluster.h
deleted file mode 100755 (executable)
index 4a859ae..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_LEVEL_CONTROL_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_LEVEL_CONTROL_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_on_off_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE Level Control Cluster
- *
- * @brief Zigbee level control cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
- * This cluster provides an interface for controlling a characteristic of a device that
- * can be set to a level, for example the brightness of a light, the degree of closure of
- * a door, or the power output of a heater.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 3.48 Command IDs for the Level Control Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Move to Level                        |     M      |
- * |             0x01               | Move                                 |     M      |
- * |             0x02               | Step                                 |     M      |
- * |             0x03               | Stop                                 |     M      |
- * |             0x04               | Move to Level (with On/Off)          |     M      |
- * |             0x05               | Move (with On/Off)                   |     M      |
- * |             0x06               | Step (with On/Off)                   |     M      |
- * |             0x07               | Stop                                 |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'move to level' command.
- * @details On receipt of this command, a device shall move from its current level to the
- * value given in the Level field. The meaning of 'level' is device dependent ? e.g.
- * for a light it may mean brightness level.\n\n
- * The movement shall be as continuous as technically practical, i.e. not a step
- * function, and the time taken to move to the new level shall be equal to the value of
- * the Transition time field, in tenths of a second, or as close to this as the device is
- * able.\n\n
- * If the Transition time field takes the value 0xffff then the time taken to move to
- * the new level shall instead be determined by the OnOffTransitionTime attribute. If
- * OnOffTransitionTime , which is an optional attribute, is not present, the device
- * shall move to its new level as fast as it is able.\n\n
- * If the device is not able to move at a variable rate, the Transition time field may be
- * disregarded.\n\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] level Brightness level
- * @param[in] transition_time The Transition time field, in tenths of a second, \n
- *                            or as close to this as the device is able
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_move_to_level(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char level,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move' command.
- * @details On receipt of this command, a device shall move from its current level in an
- * up or down direction in a continuous fashion
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
- *                      0x00 : Up\n
- *                      0x01 : Down\n
- * @param[in] rate The Rate field specifies the rate of movement in units per second. \n
- *                 The actual rate of movement should be as close to this rate as the device is able.\n
- *                 If the Rate field is 0xff the device should move as fast as it is able.\n
- *                 If the device is not able to move at a variable rate, this field may be disregarded.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_move(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char move_mode,
-               unsigned char rate);
-
-/**
- * @brief Sends 'step' command.
- * @details On receipt of this command, a device shall move from its current level in an
- * up or down direction in a continuous fashion
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
- *                      0x00 : Up\n
- *                      0x01 : Down\n
- * @param[in] step_size Step size
- * @param[in] transition_time The Transition time field specifies the time that shall be taken to perform the step,\n
- *                            in tenths of a second. A step is a change in the CurrentLevel of 'Step size' units.\n
- *                            The actual time taken should be as close to this as the device is able. If the\n
- *                            Transition time field is 0xffff the device should move as fast as it is able.\n
- *                            If the device is not able to move at a variable rate, the Transition time field may be\n
- *                            disregarded.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_step(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char step_mode,
-               unsigned char step_size,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'stop' command.
- * @details This command has no payload. Upon receipt of this command, any Move to
- * Level, Move or Step command (and their 'with On/Off' variants) currently in
- * process shall be terminated. The value of CurrentLevel shall be left at its value
- * upon receipt of the Stop command, and RemainingTime shall be set to zero.
- * This command has two entries in Table 3.1, one for the Move to Level, Move and
- * Set commands, and one for their 'with On/Off' counterparts. This is solely for
- * symmetry, to allow easy choice of one or other set of commands ? the Stop
- * commands are identical.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_stop(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @brief Sends 'move to level with on/off' command.
- * @details On receipt of this command, a device shall move from its current level to the
- * value given in the Level field. The meaning of 'level' is device dependent ? e.g.
- * for a light it may mean brightness level.\n\n
- * The movement shall be as continuous as technically practical, i.e. not a step
- * function, and the time taken to move to the new level shall be equal to the value of
- * the Transition time field, in tenths of a second, or as close to this as the device is
- * able.\n\n
- * If the Transition time field takes the value 0xffff then the time taken to move to
- * the new level shall instead be determined by the OnOffTransitionTime attribute. If
- * OnOffTransitionTime , which is an optional attribute, is not present, the device
- * shall move to its new level as fast as it is able.\n\n
- * If the device is not able to move at a variable rate, the Transition time field may be
- * disregarded.\n\n
- * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
- * commands have identical payloads to the Move to Level, Move and Step
- * commands respectively. The also have the same effects, except for the following
- * additions.
- * * Before commencing any command that has the effect of increasing
- * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
- * implemented, shall be set to On.
- * * If any command that decreases CurrentLevel reduces it to the minimum level
- * allowed by the device, the OnOff attribute of the On/Off cluster on the same
- * endpoint, if implemented, shall be set to Off.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] level Brightness level
- * @param[in] transition_time The Transition time field, in tenths of a second, \n
- *                             or as close to this as the device is able
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_move_to_level_with_on_off(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char level,
-               unsigned short transition_time);
-
-/**
- * @brief Sends 'move with on/off' command.
- * @details On receipt of this command, a device shall move from its current level in an
- * up or down direction in a continuous fashion.\n
- * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
- * commands have identical payloads to the Move to Level, Move and Step
- * commands respectively. The also have the same effects, except for the following
- * additions.
- * * Before commencing any command that has the effect of increasing
- * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
- * implemented, shall be set to On.
- * * If any command that decreases CurrentLevel reduces it to the minimum level
- * allowed by the device, the OnOff attribute of the On/Off cluster on the same
- * endpoint, if implemented, shall be set to Off.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
- *                      0x00 : Up\n
- *                      0x01 : Down\n
- * @param[in] rate The Rate field specifies the rate of movement in units per second. \n
- *  The actual rate of movement should be as close to this rate as the device is able.\n
- *  If the Rate field is 0xff the device should move as fast as it is able.\n
- *  If the device is not able to move at a variable rate, this field may be disregarded.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_move_with_on_off(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char move_mode,
-               unsigned char rate);
-
-/**
- * @brief Sends 'step with on/off' command.
- * @details On receipt of this command, a device shall move from its current level in an
- * up or down direction in a continuous fashion. \n\n
- * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
- * commands have identical payloads to the Move to Level, Move and Step
- * commands respectively. The also have the same effects, except for the following
- * additions. \n\n
- * * Before commencing any command that has the effect of increasing
- * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
- * implemented, shall be set to On. \n\n
- * * If any command that decreases CurrentLevel reduces it to the minimum level
- * allowed by the device, the OnOff attribute of the On/Off cluster on the same
- * endpoint, if implemented, shall be set to Off.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] step_mode The Step mode field shall be one of the non-reserved values\n
- *                      0x00 : Up\n
- *                      0x01 : Down\n
- * @param[in] step_size Step size
- * @param[in] transition_time The Transition time field specifies the time that shall be
- *  taken to perform the step, in tenths of a second. A step is a change in the
- *  CurrentLevel of 'Step size' units.\n\n
- *  The actual time taken should be as close to this as the device is able. If the
- *  Transition time field is 0xffff the device should move as fast as it is able. \n\n
- *  If the device is not able to move at a variable rate, the Transition time field may be
- *  disregarded.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_levelctrl_step_with_on_off(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char step_mode,
-               unsigned char step_size,
-               unsigned short transition_time);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_LEVEL_CONTROL_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_on_off_cluster.h b/include/zcl/zb_zcl_on_off_cluster.h
deleted file mode 100755 (executable)
index 2036e09..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ON_OFF_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ON_OFF_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_on_off_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE On/Off Cluster
- *
- * @brief Zigbee on/off cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE_OVERVIEW
- * Attributes and commands for switching devices between 'On' and 'Off' states.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 3.40 Command IDs for the On/Off Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Off                                  |     M      |
- * |             0x01               | On                                   |     M      |
- * |             0x02               | Toggle                               |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief On/Off value.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_OFF = 0x00, /**< Off */
-       ZB_ZCL_ON = 0x01, /**< On */
-       ZB_ZCL_TOGGLE = 0x02, /**< Toggle */
-} zb_zcl_onoff_e;
-
-/**
- * @brief Sends 'on/off/toogle' command.
- * @details On receipt of 'on' command, a device shall enter its 'Off' state.
- * This state is device dependent, but it is recommended that it is used for power off or\n
- * similar functions.\n
- * On receipt of 'off' command, a device shall enter its 'On' state. This state is\n
- * device dependent, but it is recommended that it is used for power on or similar
- * functions.\n
- * On receipt of this command, if a device is in its 'Off' state it shall enter\n
- * its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] on_off_type #ZB_ZCL_OFF \n
- *                        #ZB_ZCL_ON \n
- *                        #ZB_ZCL_TOGGLE \n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_onoff_control(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               zb_zcl_onoff_e on_off_type);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_ON_OFF_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_poll_control_cluster.h b/include/zcl/zb_zcl_poll_control_cluster.h
deleted file mode 100755 (executable)
index 386bd2d..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_POLL_CONTROL_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_POLL_CONTROL_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_poll_control_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE Poll Control Cluster
- *
- * @brief Zigbee poll control cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
- * This cluster provides a mechanism for the management of an end device's MAC
- * Data Request rate. For the purposes of this cluster, the term "poll" always refers to
- * the sending of a MAC Data Request from the end device to the end device's parent.
- * This cluster can be used for instance by a configuration device to make an end
- * device responsive for a certain period of time so that the device can be managed
- * by the controller.\n\n
- * This cluster is composed of a client and server. The end device implements the
- * server side of this cluster. The server side contains several attributes related to the
- * MAC Data Request rate for the device. The client side implements commands
- * used to manage the poll rate for the device.\n\n
- * The end device which implements the server side of this cluster sends a query to
- * the client on a predetermined interval to see if the client would like to manage the
- * poll period of the end device in question. When the client side of the cluster hears
- * from the server it has the opportunity to respond with configuration data to either
- * put the end device in a short poll mode or let the end device continue to function
- * normally.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-
-/* Table 9.28 Commands Generated by the Poll Control Server
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Check-in                             |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Called after receiving 'check-in' event.
- * @details The Poll Control Cluster server sends out a Check-in command to the devices to
- * which it is paired based on the server's Check-inInterval attribute. It does this to
- * find out if any of the Poll Control Cluster Clients with which it is paired are
- * interested in having it enter fast poll mode so that it can be managed. This request
- * is sent out based on either the Check-inInterval, or the next Check-in value in the
- * Fast Poll Stop Request generated by the Poll Control Cluster Client.\n
- * The Check-in command expects a Check-in Response command to be sent back
- * from the Poll Control Client. If the Poll Control Server does not receive a Check-
- * in response back from the Poll Control Client up to7.68 seconds it is free to return
- * to polling according to the LongPollInterval.\n
- * \n
- * The Poll Control Cluster is used on end devices that may be battery powered. In
- * order to conserve battery life, it is important that the Poll Control Server maintain
- * certain boundaries for the setting of the Check-inInterval, LongPollInterval and
- * the ShortPollInterval. Therefore, while these attributes are all Read/Write, it is
- * possible that a battery-powered device might maintain its own boundary for the
- * min and max of each of these attributes. The end device implementing the Poll
- * Control Cluster Server may define its own boundaries for these attributes in order
- * to protect itself against a power drain due to improper configuration.
- * For instance a battery powered device may not allow another device to set its
- * Check-inInterval to too short a value or its FastPollTimeout to too long an interval
- * because it might cause the device to send too frequent check-in messages on the
- * network and stay in fast poll mode for too long a time resulting in a drain on the
- * battery.\n
- * The Check-inInterval, LongPollInterval and ShortPollInterval should be set such
- * that:\n
- * \n
- * - Check-in Interval >= Long Poll Interval >= Short Poll Interval\n
- * - The default values chosen for this cluster are:\n
- * - Check-in Interval = 1 hour = 0x3840 quarterseconds.\n
- * - Long Poll Interval = 5 seconds = 0x14 quarterseconds.\n
- * - Short Poll Interval = 2 quarterseconds = 0x02 quarterseconds.\n
- * - Fast Poll Timeout = 10 seconds = 0x28 quarterseconds.\n
- * \n
- * It should be noted that for the Check-in Interval, 0 is a special value and does not\n
- * apply to this equation.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] user_data user data
- *
- * @see zb_zcl_pollctrl_set_long_poll_interval()
- * @see zb_zcl_pollctrl_set_short_poll_interval()
- */
-typedef void (*zb_zcl_pollctrl_check_in)(
-               nwk_addr addr16,
-               unsigned char ep,
-               void *user_data);
-
-/* Table 9.29 Commands Generated by the Poll Control Client in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Check-in Response                    |     M      |
- * |             0x00               | Fast Poll Stop                       |     M      |
- * |             0x00               | Set Long Poll Interval               |     O      |
- * |             0x00               | Set Short Poll Interval              |     O      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'check-in response'.
- * @details The Check-in Response is sent in response to the receipt of a Check-in command.\n
- * The Check-in Response is used by the Poll Control Client to indicate whether it
- * would like the device implementing the Poll Control Cluster Server to go into a
- * fast poll mode and for how long. If the Poll Control Cluster Client indicates that it
- * would like the device to go into a fast poll mode, it is responsible for telling the
- * device to stop fast polling when it is done sending messages to the fast polling
- * device.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] start_fast_polling This Boolean value indicates whether or not the Poll
- *                               Control Server device should begin fast polling or not.\n
- *                               If the Start Fast Polling value is true, the server device
- *                               is expected to begin fast polling until the Fast Poll
- *                               Timeout has expired. If the Start Fast Polling argument
- *                               is false, the Poll Control Server may continue in normal
- *                               operation and is not required to go into fast poll mode.\n
- * @param[in] fast_poll_timeout The Fast Poll Timeout value indicates the number of
- *                              quarterseconds during which the device should continue
- *                              fast polling. If the Fast Poll Timeout value is 0, the
- *                              device is expected to continue fast polling until the
- *                              amount of time indicated it the FastPollTimeout attribute
- *                              has elapsed or it receives a Fast Poll Stop command\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_pollctrl_check_in_response(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char start_fast_polling,
-               unsigned short fast_poll_timeout);
-
-/**
- * @brief Sends 'fast poll stop' command.
- * @details The Fast Poll Stop command is used to stop the fast poll mode initiated by the\n
- * Check-in response. The Fast Poll Stop command has no payload.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_pollctrl_fast_poll_stop(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep);
-
-/**
- * @brief Sends 'set long poll interval' command.
- * @details The Set Long Poll Interval command is used to set the read only LongPollInterval
- * attribute.\n
- * When the Poll Control Server receives the Set Long Poll Interval Command, it
- * should check its internal minimal limit and the attributes relationship defined in
- * 9.6.4.2 if the new Long Poll Interval is acceptable. If the new value is acceptable,
- * the new value shall be saved to the LongPollInterval attribute.If the new value is
- * not acceptable, the Poll Control Server shall send a default response of
- * INVALID_VALUE (0x87) and the LongPollInterval attribute value is not updated.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] new_long_poll_interval long poll interval
- * @param[in] cb Resopnse callback function
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_pollctrl_check_in()
- *
- */
-int zb_zcl_pollctrl_set_long_poll_interval(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned int new_long_poll_interval,
-               zb_zcl_pollctrl_check_in cb,
-               void *user_data);
-
-/**
- * @brief Sends 'set short poll interval' command.
- * @details The Set Short Poll Interval command is used to set the read only
- * ShortPollInterval attribute.\n
- * When the Poll Control Server receives the Set Short Poll Interval Command, it
- * should check its internal minimal limit and the attributes relationship defined in
- * 9.6.4.2 if the new Short Poll Interval is acceptable. If the new value is acceptable,
- * the new value shall be saved to the ShortPollInterval attribute. If the new value is
- * not acceptable, the Poll Control Server shall send a default response of
- * INVALID_VALUE (0x87) and the ShortPollInterval attribute value is not updated.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] new_short_poll_interval long poll interval
- * @param[in] cb Resopnse callback function
- * @param[in] user_data user_data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_pollctrl_check_in()
- */
-int zb_zcl_pollctrl_set_short_poll_interval(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned int new_short_poll_interval,
-               zb_zcl_pollctrl_check_in cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_POLL_CONTROL_CLUSTER_H__ */
diff --git a/include/zcl/zb_zcl_scenes_cluster.h b/include/zcl/zb_zcl_scenes_cluster.h
deleted file mode 100755 (executable)
index a82579e..0000000
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_SCENES_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_SCENES_CLUSTER_H__
-
-#include <zb_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zcl_scenes_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE Scene Cluster
- *
- * @brief Zigbee scene cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE_OVERVIEW Overview
- * The scenes cluster provides attributes and commands for setting up and recalling
- * scenes. Each scene corresponds to a set of stored values of specified attributes for
- * one or more clusters on the same end point as the scenes cluster.\n\n
- * In most cases scenes are associated with a particular group ID. Scenes may also
- * exist without a group, in which case the value 0x0000 replaces the group ID. Note
- * that extra care is required in these cases to avoid a scene ID collision, and that
- * commands related to scenes without a group may only be unicast, i.e.: they may
- *not be multicast or broadcast.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 3.38 Generated Command IDs for the Scenes Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Add scene response                   |     M      |
- * |             0x01               | View scene response                  |     M      |
- * |             0x02               | Remove scene response                |     M      |
- * |             0x03               | Remove all scene response            |     M      |
- * |             0x04               | Store scene response                 |     M      |
- * |             0x05               | Reserved                             |     -      |
- * |             0x06               | Get scene membership response        |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Called after 'add scene' command.
- * @details This command is generated in response to a received Add Scene command.
- * The Status field is set to SUCCESS, INSUFFICIENT_SPACE or
- * INVALID_FIELD (the group is not present in the Group Table) as appropriate.
- * The Group ID and Scene ID fields are set to the corresponding fields of the
- * received Add Scene command.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_NOT_FOUND \n
- *             #ZB_ZCL_INVALID_FIELD
- * @param[in] group_id Group id
- * @param[in] scene_id Scene id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_add_scene()
- */
-typedef void (*zb_zcl_scene_add_scene_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               unsigned char scene_id,
-               void *user_data);
-
-/**
- * @brief Called after 'view scene' command.
- * @details This command is generated in response to a received View Scene command
- * The entry in the Scene Table with Scene ID and Group ID given in the received
- * View Scene command is located (if possible). The Status field is set to SUCCESS,
- * NOT_FOUND (the scene is not present in the Scene Table) or INVALID_FIELD
- * (the group is not present in the Group Table) as appropriate. The Group ID and
- * Scene ID fields are set to the corresponding fields in the received View Scene
- * command.
- * If the status is SUCCESS, the Transition time, Scene Name and Extension field
- * fields are copied from the corresponding fields in the table entry, otherwise they
- * are omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_NOT_FOUND \n
- *             #ZB_ZCL_INVALID_FIELD
- * @param[in] group_id Group id
- * @param[in] scene_id Scene id
- * @param[in] transition_time Transition time
- * @param[in] scene_name Scene name
- * @param[in] extension_field_set Extension field sets, one per cluster\n
- *                                  Extension field sets =\n
- *                                  {{ClusterID 1, length 1, {extension field set 1}},\n
- *                                   {ClusterID 2, length 2, {extension field set 2}}, ... }.
- * @param[in] ext_len length of extension fields set
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_view_scene()
- */
-typedef void (*zb_zcl_scene_view_scene_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               unsigned char scene_id,
-               unsigned short transition_time,
-               const char *scene_name,
-               const char *extension_field_set,
-               unsigned short ext_len,
-               void *user_data);
-
-/**
- * @brief Called after 'remove scene' command.
- * @details This command is generated in response to a received Remove Scene command.
- * The Status field is set to SUCCESS, NOT_FOUND (the scene is not
- * present in the Scene Table) or INVALID_FIELD (the group is not present in the
- * Group Table) as appropriate. The Group ID and Scene ID fields are set to the
- * corresponding fields of the received Remove Scene command.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_INVALID_FIELD \n
- * @param[in] group_id Group id
- * @param[in] scene_id Scene id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_remove_scene()
- */
-typedef void (*zb_zcl_scene_remove_scene_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               unsigned char scene_id,
-               void *user_data);
-
-/**
- * @brief Called after 'remove all scene' command.
- * @details This command is generated in response to a received Remove All Scenes
- * command. The Status field is set to SUCCESS or INVALID_FIELD
- * (the group is not present in the Group Table) as appropriate. The Group ID field is
- * set to the corresponding field of the received Remove All Scenes command.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_INVALID_FIELD \n
- * @param[in] group_id Group id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_remove_all_scene()
- */
-typedef void (*zb_zcl_scene_remove_all_scene_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               void *user_data);
-
-/**
- * @brief Called after 'store scene' command.
- * @details This command is generated in response to a received Store Scene command.
- * The Status field is set to SUCCESS, INSUFFICIENT_SPACE or
- * INVALID_FIELD (the group is not present in the Group Table) as appropriate.
- * The Group ID and Scene ID fields are set to the corresponding fields of the
- * received Store Scene command.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_INVALID_FIELD \n
- *             #ZB_ZCL_INSUFFICIENT_SPACE
- * @param[in] group_id Group id
- * @param[in] scene_id Scene id
- * @param[in] user_data user data
- *
- * @see zb_zcl_group_store_scene()
- */
-typedef void (*zb_zcl_scene_store_scene_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned short group_id,
-               unsigned char scene_id,
-               void *user_data);
-
-/**
- * @brief Called after 'get all scene membership' command.
- * @details This command is generated in response to a received Get Scene Membership
- * command
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint number
- * @param[in] status Status code see zb_zcl_type.h\n
- *             #ZB_ZCL_SUCCESS \n
- *             #ZB_ZCL_INVALID_FIELD \n
- * @param[in] capacity The Capacity field shall contain the remaining capacity of the \n
- *                      scene table of the device. (for all groups). The following values\n
- *                      apply:\n
- *                      0 : No further scenes may be added.\n
- *                      0 < Capacity < 0xfeCapacity holds the number of scenes that may be added\n
- *                      0xfe : At least 1 further scene may be added (exact number is unknown)\n
- *                      0xff : It is unknown if any further scenes may be added\n
- * @param[in] group_id Group id
- * @param[in] scene_count The Scene count field shall contain the number of scenes \n
- *                         contained in the Scene list field.
- * @param[in] scene_list The Scene list field shall contain the identifiers of all the \n
- *                        scenes in the scene table with the corresponding Group ID.
- * @param[in] user_data user data
- *
- * @see zb_zcl_scene_get_scene_membership()
- */
-typedef void (*zb_zcl_scene_get_scene_membership_rsp)(
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char status,
-               unsigned char capacity,
-               unsigned short group_id,
-               unsigned char scene_count,
-               unsigned char *scene_list,
-               void *user_data);
-
-/* Table 3.37 Received Command IDs for the Scenes Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Add scene                            |     M      |
- * |             0x01               | View scene                           |     M      |
- * |             0x02               | Remove scene                         |     M      |
- * |             0x03               | Remove all scene                     |     M      |
- * |             0x04               | Store scene                          |     M      |
- * |             0x05               | Recall scene                         |     M      |
- * |             0x06               | Get scene membership                 |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/* Reference : Extension field sets =
- *  {{ClusterID 1, length 1, {extension field set 1}}, {ClusterID 2, length 2,
- *  {extension field set 2}}, ... }.
- */
-
-/**
- * @brief Sends 'add scenes' command.
- * @details The Add Scene command shall be addressed to a single device (not a group)
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] scene_id Scene ID
- * @param[in] transition_time Transition time
- * @param[in] scene_name Scene name
- * @param[in] ext_field_len length of extension fields sets
- * @param[in] extension_field_sets Extension field sets, one per cluster\n
- *                                 Extension field sets = \n
- *                                 {{ClusterID 1, length 1, {extension field set 1}}, \n
- *                                  {ClusterID 2, length 2, {extension field set 2}}, ... }.
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_add_scene_rsp()
- */
-int zb_zcl_scene_add_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               unsigned char scene_id,
-               unsigned short transition_time,
-               const char *scene_name,
-               unsigned short ext_field_len,
-               const char *extension_field_sets,
-               zb_zcl_scene_add_scene_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'view scene' command.
- * @details The View Scene command shall be addressed to a single device (not a group)
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] scene_id Scene ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_view_scene_rsp()
- */
-int zb_zcl_scene_view_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               unsigned char scene_id,
-               zb_zcl_scene_view_scene_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'remove scene' command.
- * @details The Remove Scene command may be addressed to a single device or to a group.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] scene_id Scene ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_view_scene_rsp()
- */
-int zb_zcl_scene_remove_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               unsigned char scene_id,
-               zb_zcl_scene_remove_scene_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'remove all scenes' command.
- * @details The Remove All Scenes may be addressed to a single device or to a group.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_remove_all_scene_rsp()
- */
-int zb_zcl_scene_remove_all_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               zb_zcl_scene_remove_all_scene_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'store scene' command.
- * @details The Store Scene command may be addressed to a single device or to a group.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] scene_id Scene ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_store_scene_rsp()
- */
-int zb_zcl_scene_store_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               unsigned char scene_id,
-               zb_zcl_scene_store_scene_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'recall scene' command.
- * @details The Recall Scene command may be addressed to a single device or to a group.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] scene_id Scene ID
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- */
-int zb_zcl_scene_recall_scene(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               unsigned char scene_id);
-
-/**
- * @brief Sends 'get scenes membership' command.
- * @details The Get Scene Membership command can be used to find an unused scene
- * number within the group when no commissioning tool is in the network, or for a
- * commissioning tool to get used scenes for a group on a single device or on all
- * devices in the group.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] group_id Group ID
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_scene_store_scene_rsp()
- */
-int zb_zcl_scene_get_scene_membership(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned short group_id,
-               zb_zcl_scene_get_scene_membership_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_SCENES_CLUSTER_H__ */
-
diff --git a/include/zcl/zb_zcl_thermostat_cluster.h b/include/zcl/zb_zcl_thermostat_cluster.h
deleted file mode 100755 (executable)
index 55492f4..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_THERMOSTAT_CLUSTER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_THERMOSTAT_CLUSTER_H__
-
-#include <zb_type.h>
-
-/**
- * @file zb_zcl_thermostat_cluster.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE Thermostat Cluster
- *
- * @brief Zigbee thermostat cluster commands.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE_OVERVIEW Overview
- * This cluster provides an interface to the functionality of a thermostat.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/* Table 6.18 Command IDs for the Thermostat Cluster in Zigbee Cluster Library
- * +--------------------------------+--------------------------------------+------------+
- * |Command Identifier Field Value  |              Description             | Mandatory/ |
- * |                                |                                      | Optional   |
- * +--------------------------------+--------------------------------------+------------+
- * |             0x00               | Setpoint Raise/Lower                 |     M      |
- * +--------------------------------+--------------------------------------+------------+
- */
-
-/**
- * @brief Sends 'setpoint raise/lower' command.
- * @details The attributes for the indicated setpoint(s) shall be increased by the amount
- * specified in the Amount field.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address
- * @param[in] ep Endpoint ID
- * @param[in] mode The mode field shall be set to one of the non-reserved values in below. It
- *                 specifies which setpoint is to be configured. If it is set to auto, then both setpoints
- *                 shall be adjusted.\n
- *                 0x00 : Heat (adjust Heat setpoint)\n
- *                 0x01 : Cool (adjust Cool setpoint)\n
- *                 0x02 : Both (adjust Heat and Cool setpoint)\n
- * @param[in] amount The amount field is a signed 8-bit integer that specifies the amount the setpoint(s)
- *                   are to be a increased (or decreased) by, in steps of 0.1C
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_zcl_thermostat_adjust_setpoint(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char mode,
-               unsigned char amount);
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_THERMOSTAT_CLUSTER_H__ */
-
diff --git a/include/zcl/zb_zcl_type.h b/include/zcl/zb_zcl_type.h
deleted file mode 100755 (executable)
index 946a47f..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_TYPE_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_TYPE_H__
-
-#include <wchar.h>
-#include <zb_type.h>
-
-/**
- * @file zb_zcl_type.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief ACL type.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_WRITABLE = 1, /**< Writable */
-       ZB_ZCL_REPORTABLE = 2, /**< Reportable */
-} zb_zcl_acl_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Data measuring type.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       DATA_TYPE_NONE = 0, /**< Data type none */
-       DATA_TYPE_DISCRETE = 1, /**< Discrete data type */
-       DATA_TYPE_ANALOG = 2 /**< Analog data type */
-} zb_zcl_data_category_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief ZCL Enumerations Description in Zigbee Cluster Library.
- * @since_tizen 4.0
- *
- */
-typedef enum {
-       ZB_ZCL_SUCCESS = 0x00, /**< Operation was successful */
-       ZB_ZCL_FAILURE = 0x01, /**< Operation was not successful. */
-       ZB_ZCL_NOT_AUTHORIZED = 0x7E,   /**< The sender of the command does not have authorization to carry out this command. */
-       ZB_ZCL_RESERVED_FIELD_NOT_ZERO = 0x7F,  /**< Reserved field/subfield/bit contains a non-zero value. */
-       ZB_ZCL_MALFORMED_COMMAND = 0x80,        /**< The command appears to contain the wrong fields, as
-               detected either by the presence of one or more invalid
-               field entries or by there being missing fields. Command
-               not carried out. Implementer has discretion as to
-               whether to return this error or INVALID_FIELD. */
-       ZB_ZCL_UNSUP_CLUSTER_COMMAND = 0x81, /**< The specified cluster command is not supported on the device. */
-       ZB_ZCL_UNSUP_GENERAL_COMMAND = 0x82, /**< The specified general ZCL command is not supported on the device. */
-       ZB_ZCL_UNSUP_MANUF_CLUSTER_COMMAND = 0x83, /**< A manufacturer specific unicast, cluster specific
-                       command was received with an unknown manufacturer
-                       code, or the manufacturer code was recognized but the
-                       command is not supported. */
-       ZB_ZCL_UNSUP_MANUF_GENERAL_COMMAND = 0x84, /**< A manufacturer specific unicast, ZCL specific command
-               was received with an unknown manufacturer code, or
-               the manufacturer code was recognized but the command
-               is not supported. */
-       ZB_ZCL_INVALID_FIELD = 0x85, /**< At least one field of the command contains an incorrect
-               value, according to the specification the device is
-               implemented to. */
-       ZB_ZCL_UNSUPPORTED_ATTRIBUTE = 0x86, /**< The specified attribute does not exist on the device. */
-       ZB_ZCL_INVALID_VALUE = 0x87, /**< Out of range error, or set to a reserved value. Attribute
-                       keeps its old value.
-                       Note that an attribute value may be out of range if an
-                       attribute is related to another, e.g. with minimum and
-                       maximum attributes. See the individual attribute
-                       descriptions for specific details. */
-       ZB_ZCL_READ_ONLY = 0x88, /**< Attempt to write a read only attribute. */
-       ZB_ZCL_INSUFFICIENT_SPACE = 0x89, /**< An operation (e.g. an attempt to create an entry in a
-                       table) failed due to an insufficient amount of free space
-                       available. */
-       ZB_ZCL_DUPLICATE_EXISTS = 0x8A, /**< An attempt to create an entry in a table failed due to a
-               duplicate entry already being present in the table. */
-       ZB_ZCL_NOT_FOUND = 0x8B, /**< The requested information (e.g. table entry) could not be found. */
-       ZB_ZCL_UNREPORTABLE_ATTRIBUTE = 0x8C, /**< Periodic reports cannot be issued for this attribute. */
-       ZB_ZCL_INVALID_DATA_TYPE = 0x8D, /**< The data type given for an attribute is incorrect.
-                       Command not carried out. */
-       ZB_ZCL_INVALID_SELECTOR = 0x8E, /**< The selector for an attribute is incorrect. */
-       ZB_ZCL_WRITE_ONLY = 0x8F, /**< A request has been made to read an attribute that the
-                       requester is not authorized to read. No action taken. */
-       ZB_ZCL_INCONSISTENT_STARTUP_STATE = 0x90, /**< Setting the requested values would put the device in an
-                       inconsistent state on startup. No action taken. */
-       ZB_ZCL_DEFINED_OUT_OF_BAND = 0x91, /**< An attempt has been made to write an attribute that is
-                       present but is defined using an out-of-band method and
-                       not over the air. */
-       ZB_ZCL_INCONSISTENT = 0x92, /**< The supplied values (e.g. contents of table cells) are
-                       inconsistent. */
-       ZB_ZCL_ACTION_DENIED = 0x93, /**< The credentials presented by the device sending the
-               command are not sufficient to perform this action. */
-       ZB_ZCL_TIMEOUT = 0x94, /**< The exchange was aborted due to excessive response time. */
-       ZB_ZCL_ABORT = 0x95, /**< Failed case when a client or a server decides to abort the
-                       upgrade process. */
-       ZB_ZCL_INVALID_IMAGE = 0x96, /**< Invalid OTA upgrade image (ex. failed signature
-               validation or signer information check or CRC check). */
-       ZB_ZCL_WAIT_FOR_DATA = 0x97, /**< Server does not have data block available yet. */
-       ZB_ZCL_NO_IMAGE_AVAILABLE = 0x98, /**< No OTA upgrade image available for a particular client. */
-       ZB_ZCL_REQUIRE_MORE_IMAGE = 0x99, /**< The client still requires more OTA upgrade image files
-               in order to successfully upgrade. */
-} zb_zcl_status_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Discover Attribute Info Record in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* discover_attr_info_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Structure for Read Structured Attribute Record in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* read_structured_attr_record_h;
-
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Attribute Status Record in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* read_attr_status_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Write Attributes Data Structure in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* write_attr_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Write Attribute Status Record Field in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* write_attr_status_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Write Attribute Record Field in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* write_attr_structured_status_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Write Attribute Record Field in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* write_attr_structured_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Attribute Report Fields in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* attr_report_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of Reporting Configuration Record Structure in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* report_config_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of Read Reporting Configuration Record in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* read_report_config_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Attribute Status Record Field in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* report_config_response_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of the Extended Attribute Information Fields in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* extended_attr_info_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief simple data type in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* zb_value_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Format of Attribute Value Field for an array, Set or Bag in Zigbee Cluster Library.
- *
- * @since_tizen 4.0
- */
-typedef void* attribute_array_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
- * @brief Global record type.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_GLOBAL_READ_ATTR = 0, /**< Read attributes type */
-       ZB_GLOBAL_WRITE_ATTR, /**< Write attributes type */
-       ZB_GLOBAL_CONFIG_REPORT, /**< Configure reporting type */
-       ZB_GLOBAL_READ_REPORT_CONFIG, /**< Read reporting config type */
-       ZB_GLOBAL_WRITE_ATTR_STRUCTURED/**< Write attributes structured type */
-} zb_zcl_global_record_e;
-
-/**
- * @brief The structure type for record data of zigbee global request.
- * @details This structure contains record data of zigbee global request.
- *   ex) Read/Write attributes response, Configure reporting response.
- *
- * @since_tizen 4.0
- */
-typedef struct {
-       zb_zcl_global_record_e type;
-       union {
-               read_attr_status_record_h *read_attr; /**< Attribute Reporting Configuration Record */
-               write_attr_status_record_h *write_attr; /**< For write attribute response command */
-               report_config_response_record_h *report_config_rsp; /**< Attribute Status Record Field */
-               report_config_record_h *report_config; /**< Reporting configuration record structure */
-               write_attr_structured_record_h *write_attr_structured; /**< Write Attribute Record Field */
-       } record;
-       int records_len; /**< The number of records */
-} zb_global_record_data_s;
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZCL_TYPE_H__ */
diff --git a/include/zdo/zb_zdo_bind_mgr.h b/include/zdo/zb_zdo_bind_mgr.h
deleted file mode 100755 (executable)
index 3531cc1..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_BIND_MANAGER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_BIND_MANAGER_H__
-
-#include <zdo/zb_zdo_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zdo_bind_mgr.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE Binding Manager
- *
- * @brief Zigbee provides API for Binding.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_OVERVIEW Overview
- * Binding provides a mechanism for attaching an endpoint on one node to one or more
- * endpoints on another node. Binding can even be destined for groups of nodes. Then,
- * when using APSDE-DATA.request, simply use the "indirect" addressing mode, and the
- * request will be sent to each endpoint or group listed in the local binding table.\n\n
- * The binding table is smart, and keeps track of both the short (16-bit NwkAddr) and long
- * (IEEE) address of a node. If a destination device has changed its short address (either
- * due to a ZigBee End-Device moving from one parent to another in ZigBee stack profile
- * 0x01, or due to a address conflict in ZigBee Pro), the binding table entry is updated
- * automatically to point to that new address.\n\n
- *
- * @{
- */
-
-/**
- * @brief Called after 'bind' command.
- * @details The Bind_rsp is generated in response to a Bind_req. If the Bind_req is
- * processed and the Binding Table entry committed on the Remote Device, a Status of
- * SUCCESS is returned.\n\n If the Remote Device is not a Primary binding table cache
- * or the SrcAddress, a Status of NOT_SUPPORTED is returned.\n\n The supplied
- * endpoint shall be checked to determine whether it falls within the specified range.
- * If it does not, a Status of INVALID_EP shall be returned.\n\n If the Remote Device is
- * the Primary binding table cache or SrcAddress but does not have Binding Table
- * resources for the request, a Status of TABLE_FULL is returned.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_INVALID_EP \n
- *                    #ZB_ZDP_TABLE_FULL \n
- *                    #ZB_ZDP_NOT_AUTHORIZED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_bind_req()
- *
- */
-typedef void (*zb_zdo_bind_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @brief Sends 'bind' command.
- * @details Binding request when destination address present but not endpoint present.
- * The Bind_req is generated from a Local Device wishing to create a Binding
- * Table entry for the source and destination addresses contained as parameters.\n\n The
- * destination addressing on this command shall be unicast only, and the destination
- * address shall be that of a Primary binding table cache or to the SrcAddress itself.
- * The Binding Manager is optionally supported on the source device (unless that
- * device is also the ZigBee Coordinator) so that device shall issue a
- * NOT_SUPPORTED status to the Bind_req if not supported.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] dst_addr16 The Network address of destination
- * @param[in] src_addr64 The IEEE address of source
- * @param[in] src_ep The source endpoint for the binding entry
- * @param[in] cluster_id The identifier of the cluster on the source device that is bound
- *                       to the destination.
- * @param[in] dst_addr64 The IEEE address of destination
- * @param[in] type ZB_UNICAST_BINDING : A unicast binding whose 64-bit identifier is the
- *     destination ieee_addr. \n
- *     ZB_MANY_TO_ONE_BINDING : A unicast binding whose 64-bit identifier is
- *                                          the many-to-one destination ieee_addr.
- *                                          A Route discovery should be disabled when
- *                                          sending unicast via may-to-one binding \n
- *                 ZB_MULTICAST_BINDING : A multicast binding whose 64-bit identifier is
- *                                        the group address. A multicast binding can be
- *                                        used to send messages to the group and to
- *                                        receive message sent to the group
- * @param[in] group_addr The destination address for the binding entry
- * @param[in] dst_ep The destination endpoint for the binding entry.
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_bind_rsp()
- */
-int zb_zdo_bind_req(
-               zigbee_h handle,
-               nwk_addr dst_addr16,
-               ieee_addr src_addr64,
-               unsigned char src_ep,
-               unsigned short cluster_id,
-               ieee_addr dst_addr64,
-               unsigned char type,
-               nwk_addr group_addr,
-               unsigned char dst_ep,
-               zb_zdo_bind_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'unbind' command.
- * @details The Unbind_rsp is generated in response to an Unbind_req. If the Unbind_req is
- * processed and the corresponding Binding Table entry is removed from the Remote
- * Device, a Status of SUCCESS is returned. If the Remote Device is not the ZigBee
- * Coordinator or the SrcAddress, a Status of NOT_SUPPORTED is returned.\n\n The
- * supplied endpoint shall be checked to determine whether it falls within the
- * specified range. If it does not, a Status of INVALID_EP shall be returned If the
- * Remote Device is the ZigBee Coordinator or SrcAddress but does not have a
- * Binding Table entry corresponding to the parameters received in the request, a
- * Status of NO_ENTRY is returned.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_INVALID_EP \n
- *                    #ZB_ZDP_NO_ENTRY \n
- *                    #ZB_ZDP_NOT_AUTHORIZED
- * @param[in] user_data user data
- *
- * @see zb_zdo_unbind_req_addr()
- *
- */
-typedef void (*zb_zdo_unbind_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @brief Sends 'Unbind' command.
- * @details Binding request when destination address present but not endpoint present
- * The Unbind_req is generated from a Local Device wishing to remove a Binding
- * Table entry for the source and destination addresses contained as parameters.\n\n The
- * destination addressing on this command shall be unicast only and the destination
- * address must be that of the a Primary binding table cache or the SrcAddress.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] dst_addr16 The Network address of destination
- * @param[in] src_addr64 The IEEE address of source
- * @param[in] src_ep The source endpoint for the binding entry
- * @param[in] cluster_id The identifier of the cluster on the source device that is bound
- *                       to the destination.
- * @param[in] dst_addr64 The IEEE address of destination
- * @param[in] type #ZB_UNICAST_BINDING : A unicast binding whose 64-bit identifier is the
- *                                                                     destination ieee_addr. \n
- *                    #ZB_MANY_TO_ONE_BINDING : A unicast binding whose 64-bit identifier is
- *                                          the many-to-one destination ieee_addr.
- *                                          A Route discovery should be disabled when
- *                                          sending unicast via may-to-one binding \n
- *                 #ZB_MULTICAST_BINDING : A multicast binding whose 64-bit identifier is
- *                                        the group address. A multicast binding can be
- *                                        used to send messages to the group and to
- *                                        receive message sent to the group
- * @param[in] group_addr The destination address for the binding entry
- * @param[in] dst_ep The destination endpoint for the binding entry.
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_unbind_rsp()
- *
- */
-int zb_zdo_unbind_req(
-               zigbee_h handle,
-               nwk_addr dst_addr16,
-               ieee_addr src_addr64,
-               unsigned char src_ep,
-               unsigned short cluster_id,
-               ieee_addr dst_addr64,
-               unsigned char type,
-               nwk_addr group_addr,
-               unsigned char dst_ep,
-               zb_zdo_unbind_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_BIND_MANAGER_H__ */
diff --git a/include/zdo/zb_zdo_dev_disc.h b/include/zdo/zb_zdo_dev_disc.h
deleted file mode 100755 (executable)
index 8a068a9..0000000
+++ /dev/null
@@ -1,1041 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_DEV_DISC_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_DEV_DISC_H__
-
-#include <zdo/zb_zdo_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zdo_dev_disc.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE Device Discovery
- *
- * @brief Zigbee provides API for Device Discovery.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_OVERVIEW Overview
- * The ZigBee Device Profile (ZDP) contains a set of commands for discovering various
- * aspects about nodes in the network. The ZigBee specification calls these "device
- * discovery services," which can be confusing because endpoints contain device IDs which
- * really describe individual ZigBee applications running in that node. So, when you see
- * ZDP Device Discovery, think node-wide (not application/endpoint specific) services.\n\n
- *
- * Device discovery services have a few things in common:\n\n
- *
- * - They provide additional information about a node.
- * - They are all optional from the client side, but some server side processing is
- * mandatory (a common subset among all ZigBee devices).
- * - They are node-wide, and do not represent any particular application, or
- * Application Profile residing on an endpoint in the node.\n\n
- *
- * The ZDP device discovery services are listed below in thi section. Notice that all the
- * ZDP services on the client side are optional. ZigBee does not require that a node be able
- * to send NWK_addr_req , for example. But on the server side of this equation (a node
- * receiving a NWK_addr_req and responding to it), the ZDP service is mandatory.
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-
-/**
- * @brief Called after Network / IEEE address request.
- * @details The NWK_addr_rsp is generated by a Remote Device in response to a\n
- * NWK_addr_req or IEEE_addr_req command inquiring as to the NWK address of the Remote
- * Device or the NWK address of an address held in a local discovery cache.\n
- * The destination addressing on this command is unicast.\n
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND
- * @param[in] remote_dev_addr64 64-bit address for the remote device
- * @param[in] remote_dev_addr16 16-bit address for the remote device
- * @param[in] num_of_assoc_dev Count of the number of 16-bit short addresses to follow.
- *                              If the RequestType in the request is Extended Response
- *                              and there are no associated devices on the Remote Device,
- *                              this field shall be set to 0.
- *                              If an error occurs or the RequestType in the request is
- *                              for a Single Device Response, this field shall not
- *                              be included in the frame.
- * @param[in] start_idx Starting index into the list of associated devices for this
- *                       report. If the RequestType in the request is Extended Response
- *                       and there are no associated devices on the Remote Device,
- *                       this field shall not be included in the frame.
- *                       If an error occurs or the RequestType in the request is
- *                       for a Single Device Response, this field shall not
- *                       be included in the frame.
- * @param[in] assoc_dev_addr_list A list of 16-bit addresses, one corresponding to each
- *                               associated device to Remote Device; The number of 16-bit
- *                               network addresses contained in this field is specified
- *                               in the NumAssocDev field.
- *                               If the RequestType in the request is Extended Response
- *                               and there are no associated devices on the Remote Device,
- *                               this field shall not be included in the frame.
- *                               If an error occurs or the RequestType in the request is
- *                               for a Single Device Response, this field shall not
- *                               be included in the frame.
- * @param[in] user_data user data
- *
- * @see zb_zdo_nwk_addr_req()
- */
-typedef void (*zb_zdo_addr_rsp)(
-       unsigned char status,
-       ieee_addr remote_dev_addr64,
-       nwk_addr remote_dev_addr16,
-       unsigned char num_of_assoc_dev,
-       unsigned char start_idx,
-       unsigned short *assoc_dev_addr_list,
-       void *user_data);
-
-/**
- * @brief Sends 'Network address request' command.
- * @details The NWK_addr_req is generated from a Local Device wishing to inquire as to the\n
- * 16-bit address of the Remote Device based on its known IEEE address. The\n
- * destination addressing on this command shall be unicast or broadcast to all\n
- * devices for which macRxOnWhenIdle = TRUE.\n
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] request_type \n
- *            0x00 - Single device response \n
- *            0x01 - Extended response \n
- * @param[in] start_idx If the Request type for this command is Extended response,
- *                      is StartIndex provides the starting index for the requested
- *                      elements of the associated devices list
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_nwk_addr_rsp()
- */
-int zb_zdo_nwk_addr_req(
-       zigbee_h handle,
-       ieee_addr addr64,
-       unsigned char request_type,
-       unsigned char start_idx,
-       zb_zdo_addr_rsp cb,
-       void *user_data);
-
-/**
- * @brief Sends 'IEEE address request' command.
- * @details The IEEE_addr_req is generated from a Local Device wishing to inquire as to
- * the 64-bit IEEE address of the Remote Device based on their known 16-bit address.
- * The destination addressing on this command shall be unicast.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_ieee_addr_rsp()
- */
-int zb_zdo_ieee_addr_req(
-       zigbee_h handle,
-       nwk_addr addr16,
-       zb_zdo_addr_rsp cb,
-       void *user_data);
-
-/**
- * @brief Called after active endpoint request command.
- * @details The Active_EP_rsp is generated by a remote device in response to an
- * Active_EP_req directed to the remote device. This command shall be unicast to
- * the originator of the Active_EP_req command.\n\n
- * The remote device shall generate the Active_EP_rsp command using the format
- * illustrated param list. The NWKAddrOfInterest field shall match that specified
- * in the original Active_EP_req command. If the NWKAddrOfInterest field
- * matches the network address of the remote device, it shall set the Status field to
- * SUCCESS, set the ActiveEPCount field to the number of active endpoints on that
- * device and include an ascending list of all the identifiers of the active endpoints on
- * that device in the ActiveEPList field.\n\n
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE, set the ActiveEPCount field to 0, and not include the
- * ActiveEPList field.\n\n If the NWKAddrOfInterest field does not match the network
- * address of the remote device and it is the coordinator or a router, it shall determine
- * whether the NWKAddrOfInterest field matches the network address of a device it
- * holds in a discovery cache. \n\n If the NWKAddrOfInterest field does not match the
- * network address of a device it holds in a discovery cache, it shall set the Status
- * field to DEVICE_NOT_FOUND, set the ActiveEPCount field to 0, and not
- * include the ActiveEPList field.\n\n If the NWKAddrOfInterest matches the network
- * address of a device held in a discovery cache on the remote device, it shall
- * determine whether that device has any active endpoints. If the discovery
- * information corresponding to the ActiveEP request has not yet been uploaded to
- * the discovery cache, the remote device shall set the Status field to
- * NO_DESCRIPTOR, set the ActiveEPCount field to 0 and not include the
- * ActiveEPList field.\n\n If the cached device has no active endpoints, the remote
- * device shall set the Status field to SUCCESS, set the ActiveEPCount field to 0,
- * and not include the ActiveEPList field.\n\n If the cached device has active endpoints,
- * the remote device shall set the Status field to SUCCESS, set the ActiveEPCount
- * field to the number of active endpoints on that device, and include an ascending
- * list of all the identifiers of the active endpoints on that device in the ActiveEPList
- * field .
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_NO_DESCRIPTOR \n
- * @param[in] addr16 Network address for the request
- * @param[in] count The count of active endpoint on the remote device
- * @param[in] ep_list List of bytes each of which represents an 8-bit endpoint
- * @param[in] user_data user data
- *
- * @see zb_zdo_active_ep()
- */
-typedef void (*zb_zdo_active_ep_rsp)(
-       unsigned char status,
-       nwk_addr addr16,
-       unsigned char count,
-       unsigned char *ep_list,
-       void *user_data);
-
-/**
- * @brief Sends 'active end-point request' command.
- * @details The Active_EP_req command is generated from a local device wishing to acquire
- * the list of endpoints on a remote device with simple descriptors. This command
- * shall be unicast either to the remote device itself or to an alternative device that
- * contains the discovery information of the remote device.\n\n
- * The local device shall generate the Active_EP_req command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the active endpoint list is required.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_active_ep_rsp()
- */
-int zb_zdo_active_ep(
-       zigbee_h handle,
-       nwk_addr addr16,
-       zb_zdo_active_ep_rsp cb,
-       void *user_data);
-
-/**
- * @brief Called after 'simple descriptor request' command.
- * @details The Simple_Desc_rsp is generated by a remote device in response to a
- * Simple_Desc_req directed to the remote device. This command shall be unicast to
- * the originator of the Simple_Desc_req command.
- * The remote device shall generate the Simple_Desc_rsp command using the format
- * illustrated in Table 2.94 in Zigbee Specification. The NWKAddrOfInterest field shall
- * match that specified in the original Simple_Desc_req command.
- * If the endpoint field specified in the original Simple_Desc_req command does not fall
- * within the correct range specified in param list, the remote device shall set the Status
- * field to INVALID_EP, set the Length field to 0 and not include the SimpleDescriptor
- * field.\n\n
- * If the NWKAddrOfInterest field matches the network address of the remote
- * device, it shall determine whether the endpoint field specifies the identifier of an
- * active endpoint on the device. If the endpoint field corresponds to an active
- * endpoint, the remote device shall set the Status field to SUCCESS, set the Length
- * field to the length of the simple descriptor on that endpoint, and include the simple
- * descriptor for that endpoint in the SimpleDescriptor field.
- * If the endpoint field does not correspond to an active endpoint, the remote device
- * shall set the Status field to NOT_ACTIVE, set the Length field to 0, and not
- * include the SimpleDescriptor field.\n\n
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE, set the Length field to 0, and not include the
- * SimpleDescriptor field. If the NWKAddrOfInterest field does not match the
- * network address of the remote device and it is the coordinator or a router, it shall
- * determine whether the NWKAddrOfInterest field matches the network address of
- * one of its children. If the NWKAddrOfInterest field does not match the network
- * address of one of the children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND, set the Length field to 0, and not include the
- * SimpleDescriptor field.\n\n
- * If the NWKAddrOfInterest matches the network address of one of the children of
- * the remote device, it shall determine whether a simple descriptor for that device
- * and on the requested endpoint is available. If a simple descriptor is not available
- * on the requested endpoint of the child indicated by the NWKAddrOfInterest field,
- * the remote device shall set the Status field to NO_DESCRIPTOR, set the Length
- * field to 0, and not include the SimpleDescriptor field. If a simple descriptor is
- * available on the requested endpoint of the child indicated by the
- * NWKAddrOfInterest field, the remote device shall set the Status field to
- * SUCCESS, set the Length field to the length of the simple descriptor on that
- * endpoint, and include the simple descriptor for that
- * endpoint of the matching child device in the SimpleDescriptor field.
- *
- * @since_tizen 4.0
- *
- * @param[in] addr16 Network address for the request
- * @param[in] len Length in bytes of the simple descriptor to follow
- * @param[in] handle Simple descriptor structure this filed shall only be included
- *                    in the frame if the status field is equal to ZB_ZDP_SUCCESS
- * @param[in] user_data user data
- *
- * @see zb_zdo_simple_desc_req()
- */
-typedef void (*zb_zdo_simple_desc_rsp)(
-               nwk_addr addr16,
-               unsigned char len,
-               const zb_zdo_simple_desc_h handle,
-               void *user_data);
-
-/**
- * @brief Sends 'simple descriptor request' command.
- * @details The Simple_Desc_req command is generated from a local device wishing to
- * inquire as to the simple descriptor of a remote device on a specified endpoint. This
- * command shall be unicast either to the remote device itself or to an alternative
- * device that contains the discovery information of the remote device.\n\n
- * The local device shall generate the Simple_Desc_req command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the simple descriptor is required and the
- * endpoint field shall contain the endpoint identifier from which to obtain the
- * required simple descriptor.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] ep The endpoint on the destination
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_simple_desc_rsp()
- */
-int zb_zdo_simple_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char ep,
-               zb_zdo_simple_desc_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'matching descriptor request' command.
- * @details The Match_Desc_rsp is generated by a remote device in response to a
- * Match_Desc_req either broadcast or directed to the remote device. This command
- * shall be unicast to the originator of the Match_Desc_req command.
- * The remote device shall generate the Match_Desc_rsp command using the format
- * illustrated in Table 2.96 in Zigbee Specification.
- * If the NWKAddrOfInterest field of the original
- * Match_Desc_req was equal to the broadcast network address for all devices for
- * which macRxOnWhenIdle = TRUE (0xfffd), the remote device shall apply the
- * match criterion, as described below, that was specified in the original
- * Match_Desc_req command to each of its simple descriptors. If the remote device
- * is the coordinator or a router, it shall also apply the match criterion, as described
- * below, to each simple descriptor that it may have obtained from each of its
- * children.
- * \n\n
- * If the NWKAddrOfInterest field of the original Match_Desc_req was not equal to
- * the broadcast network address for all devices for which macRxOnWhenIdle =
- * TRUE (0xfffd), the remote device shall set the NWKAddrOfInterest field to the
- * same network address that was specified in the original Match_Desc_req
- * command.
- * \n\n
- * If the NWKAddrOfInterest field matches the network address of the remote
- * device, it shall apply the match criterion, as described below, that was specified in
- * the original Match_Desc_req command to each of its simple descriptors.
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE, set the MatchLength field to 0, and not include the
- * MatchList field. If the NWKAddrOfInterest field does not match the network
- * address of the remote device and it is the coordinator or a router, it shall determine
- * whether the NWKAddrOfInterest field matches the network address of one of its
- * children. If the NWKAddrOfInterest field does not match the network address of
- * one of the children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND, set the MatchLength field to 0, and not include the
- * MatchList field.
- * \n\n
- * If the NWKAddrOfInterest matches the network address of one of the children of
- * the remote device, it shall determine whether any simple descriptors for that
- * device are available. If no simple descriptors are available for the child indicated
- * by the NWKAddrOfInterest field, the remote device shall set the Status field to
- * NO_DESCRIPTOR, set the MatchLength field to 0, and not include the
- * MatchList field. If any simple descriptors are available for the child indicated by
- * the NWKAddrOfInterest field, the remote device shall apply the match criterion,
- * as described below, that was specified in the original Match_Desc_req command
- * to each of these simple descriptors.
- * \n\n
- * The remote device shall apply the match criteria to each simple descriptor as follows.
- * The remote device shall first check if the ProfileID
- * field matches exactly the application profile identifier field of the simple
- * descriptor. If the profileID field does not match exactly the remote device shall
- * check if the Profile ID of the Match_desc_req matches the wildcard profile
- * (0xFFFF) and the Profile ID of the Simple Descriptor is within the Standard range
- * (a public profile) as dictated by document [B25]. 14 If the profile identifiers do not
- * match, the remote device shall assume the match to be unsuccessful and perform
- * no further matching.
- * \n\n
- * If the profile identifiers match, the remote device shall determine whether the
- * match criteria contains a list of input clusters (the NumInClusters field is not equal
- * to 0). If the match criteria contains a list of input clusters, the remote device shall
- * check that at least one of the cluster identifiers listed in the InClusterList field
- * matches one of the cluster identifiers in the application input cluster list field of
- * the simple descriptor. If at least one matching input cluster is found, the remote
- * device shall assume the match to be successful, note the identifier of the endpoint
- * to which this simple descriptor refers and perform no further matching.
- * If the remote device is unable to find any matching input clusters, it shall
- * determine whether the match criterion contains a list of output clusters (the
- * NumOutClusters field is not equal to 0). If the match criterion contains a list of
- * output clusters, the remote device shall check that at least one of the cluster
- * identifiers listed in the OutClusterList field matches one of the cluster identifiers
- * in the application output cluster list field of the simple descriptor. If at least one
- * matching output cluster is found, the remote device shall assume the match to be
- * successful and note the identifier of the endpoint to which this simple descriptor
- * refers. If the remote device is unable to find any output matching clusters, it shall
- * assume the match to be unsuccessful.
- * \n\n
- * If the above procedure produces one or more matches, the remote device shall
- * construct a separate Match_Desc_rsp command for each matching device
- * (including itself). For each response, the Status field shall be set to SUCCESS, the
- * NWKAddrOfInterest field shall be set to the address of the appropriate matching
- * device, the MatchLength field shall be set to the number of simple descriptors that
- * matched the criteria for the appropriate matching device, and the MatchList field
- * shall contain an ascending list of the endpoints on which a simple descriptor
- * matched the criteria for the appropriate matching device.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] match_length The count of endpoint on the remote device that match
- *                          the request criteria
- * @param[in] match_list List of bytes each of which represents an 8-bit endpoint
- * @param[in] user_data user data
- *
- * @see zb_zdo_match_desc_req()
- */
-typedef void (*zb_zdo_match_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               unsigned char match_length,
-               unsigned char *match_list,
-               void *user_data);
-
-/**
- * @brief Sends 'matching descriptor request' command.
- * @details The Match_Desc_req command is generated from a local device wishing to find
- * remote devices supporting a specific simple descriptor match criterion. This
- * command shall either be broadcast to all devices for which macRxOnWhenIdle =
- * TRUE, or unicast. If the command is unicast, it shall be directed either to the
- * remote device itself or to an alternative device that contains the discovery
- * information of the remote device.
- * \n\n
- * The local device shall generate the Match_Desc_req command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address indicating a broadcast to all devices for which macRxOnWhenIdle =
- * TRUE (0xfffd) if the command is to be broadcast, or the network address of the
- * remote device for which the match is required.
- * The remaining fields shall contain the required criterion for which the simple
- * descriptor match is requested. The ProfileID field shall contain the identifier of
- * the profile for which the match is being sought or the wildcard profile ID of
- * 0xFFFF.
- * \n\n
- * The NumInClusters field shall contain the number of elements in the InClusterList
- * field. If the value of this field is 0, the InClusterList field shall not be included. If
- * the value of the NumInClusters field is not equal to 0, the InClusterList field shall
- * contain the list of input cluster identifiers for which the match is being sought.
- * The NumOutClusters field shall contain the number of elements in the
- * OutClusterList field. If the value of this field is 0, the OutClusterList field shall
- * not be included. If the value of the NumOutClusters field is not equal to 0, the
- * OutClusterList field shall contain the list of output cluster identifiers for which the
- * match is being sought.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] profile_id Profile ID to be matched at the destination
- * @param[in] num_in_clusters The number of input clusters provided for matching within
- *                            the in_cluster_list
- * @param[in] in_cluster_list List of input cluster ids to b used for matching
- * @param[in] num_out_clusters The number of output clusters provided for matching within
- *                             the out_cluster_list
- * @param[in] out_cluster_list List of output cluster ids to b used for matching
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_match_desc_rsp()
- */
-int zb_zdo_match_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned short profile_id,
-               unsigned char num_in_clusters,
-               unsigned short *in_cluster_list,
-               unsigned char num_out_clusters,
-               unsigned short *out_cluster_list,
-               zb_zdo_match_desc_rsp cb,
-               void *user_data);
-
-/**
- * @brief called after 'node descriptor request' command.
- * @details The Node_Desc_rsp is generated by a remote device in response to a
- * Node_Desc_req directed to the remote device. This command shall be unicast to
- * the originator of the Node_Desc_req command.
- * \n\n
- * The remote device shall generate the Node_Desc_rsp command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall match that specified
- * in the original Node_Desc_req command. If the NWKAddrOfInterest field
- * matches the network address of the remote device, it shall set the Status field to
- * SUCCESS and include its node descriptor in the NodeDescriptor field.
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE and not include the NodeDescriptor field.\n\n If the
- * NWKAddrOfInterest field does not match the network address of the remote
- * device and it is the coordinator or a router, it shall determine whether the
- * NWKAddrOfInterest field matches the network address of one of its children. If
- * the NWKAddrOfInterest field does not match the network address of one of the
- * children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND and not include the NodeDescriptor field.\n\n If the
- * NWKAddrOfInterest matches the network address of one of the children of the
- * remote device, it shall determine whether a node descriptor for that device is
- * available. If a node descriptor is not available for the child indicated by the
- * NWKAddrOfInterest field, the remote device shall set the Status field to
- * NO_DESCRIPTOR and not include the NodeDescriptor field.\n\n If a node descriptor
- * is available for the child indicated by the NWKAddrOfInterest field, the remote
- * device shall set the Status field to SUCCESS and include the node descriptor
- * of the matching child device in the NodeDescriptor field.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] node_desc This field shall only be included in the frame if the
- *                       status field is equal to ZB_ZDP_SUCCESS.
- * @param[in] user_data user data
- *
- * @see zb_zdo_node_desc_req()
- */
-typedef void (*zb_zdo_node_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               const zb_zdo_node_descriptor_h node_desc,
-               void *user_data);
-
-/**
- * @brief Sends 'node descriptor request' command.
- * @details The Node_Desc_req command is generated from a local device wishing to inquire
- * as to the node descriptor of a remote device. This command shall be unicast either
- * to the remote device itself or to an alternative device that contains the discovery
- * information of the remote device.
- * \n\n
- * The local device shall generate the Node_Desc_req command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the node descriptor is required.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_node_desc_rsp()
- */
-int zb_zdo_node_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               zb_zdo_node_desc_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'power descriptor request' command.
- * @details The Power_Desc_rsp is generated by a remote device in response to a
- * Power_Desc_req directed to the remote device. This command shall be unicast to
- * the originator of the Power_Desc_req command.\n
- * \n
- * The remote device shall generate the Power_Desc_rsp command using the format
- * illustrated in Table 2.93 in Zigbee Specification.
- * The NWKAddrOfInterest field shall match that specified
- * in the original Power_Desc_req command. If the NWKAddrOfInterest field
- * matches the network address of the remote device, it shall set the Status field to
- * SUCCESS and include its power descriptor in the PowerDescriptor field.
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE and not include the PowerDescriptor field. If the
- * NWKAddrOfInterest field does not match the network address of the remote
- * device and it is the coordinator or a router, it shall determine whether the
- * NWKAddrOfInterest field matches the network address of one of its children. If
- * the NWKAddrOfInterest field does not match the network address of one of the
- * children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND and not include the PowerDescriptor field.\n\n If the
- * NWKAddrOfInterest matches the network address of one of the children of the
- * remote device, it shall determine whether a power descriptor for that device is
- * available. If a power descriptor is not available for the child indicated by the
- * NWKAddrOfInterest field, the remote device shall set the Status field to
- * NO_DESCRIPTOR and not include the PowerDescriptor field.\n\n If a power
- * descriptor is available for the child indicated by the NWKAddrOfInterest field,
- * the remote device shall set the Status field to SUCCESS and include the power
- * descriptor of the matching child device in the PowerDescriptor field.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] power_desc This field shall only be included in the frame if the
- * @                     status field is equal to ZB_ZDP_SUCCESS.
- * @param[in] user_data user data
- *
- * @see zb_zdo_power_desc_req()
- */
-typedef void (*zb_zdo_power_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               const zb_zdo_node_power_descriptor_h power_desc,
-               void *user_data);
-
-/**
- * @brief Sends 'power descriptor request' command.
- * @details The Power_Desc_req command is generated from a local device wishing to
- * inquire as to the power descriptor of a remote device. This command shall be
- * unicast either to the remote device itself or to an alternative device that contains
- * the discovery information of the remote device.
- * \n\n
- * The local device shall generate the Power_Desc_req command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the power descriptor is required.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_power_desc_rsp()
- */
-int zb_zdo_power_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               zb_zdo_power_desc_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'complex descriptor request' command.
- * @details The Complex_Desc_rsp is generated by a remote device in response to a
- * Complex_Desc_req directed to the remote device. This command shall be unicast
- * to the originator of the Complex_Desc_req command.
- * The remote device shall generate the Complex_Desc_rsp command using the
- * format illustrated in param list. The NWKAddrOfInterest field shall match that
- * specified in the original Complex_Desc_req command. If the
- * NWKAddrOfInterest field matches the network address of the remote device but a
- * complex descriptor does not exist, it shall set the Status field to
- * NOT_SUPPORTED, set the Length field to 0, and not include the
- * ComplexDescriptor field. If the NWKAddrOfInterest field matches the network
- * address of the remote device and a complex descriptor exists, it shall set the Status
- * field to SUCCESS, set the Length field to the length of the complex descriptor,
- * and include its complex descriptor (see sub-clause 2.3.2.6) in the
- * ComplexDescriptor field.\n
- * \n
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE, set the Length field to 0, and not include the
- * ComplexDescriptor field. If the NWKAddrOfInterest field does not match the
- * network address of the remote device and it is the coordinator or a router, it shall
- * determine whether the NWKAddrOfInterest field matches the network address of
- * one of its children. If the NWKAddrOfInterest field does not match the network
- * address of one of the children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND, set the Length field to 0, and not include the
- * ComplexDescriptor field.\n\n If the NWKAddrOfInterest matches the network
- * address of one of the children of the remote device, it shall determine whether a
- * complex descriptor for that device is available. If a complex descriptor is not
- * available for the child indicated by the NWKAddrOfInterest field, the remote
- * device shall set the Status field to NO_DESCRIPTOR, set the Length field to 0,
- * and not include the ComplexDescriptor field.\n\n If a complex descriptor is available
- * for the child indicated by the NWKAddrOfInterest field, the remote device shall
- * set the Status field to SUCCESS, set the Length field to the length of the complex
- * descriptor for that device, and include the complex descriptor of the matching
- * child device in the ComplexDescriptor field.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] length Length in bytes of the complex_desc field
- * @param[in] complex_desc This field shall only be included in the frame if the
- * @                        status field is equal to ZB_ZDP_SUCCESS.
- * @param[in] user_data user data
- *
- * @see zb_zdo_complex_desc_req()
- */
-typedef void (*zb_zdo_complex_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               unsigned char length,
-               unsigned char *complex_desc,
-               void *user_data);
-
-/**
- * @brief Sends 'complex descriptor request' command.
- * @details The Complex_Desc_req command is generated from a local device wishing to
- * inquire as to the complex descriptor of a remote device. This command shall be
- * unicast either to the remote device itself or to an alternative device that contains
- * the discovery information of the remote device.
- * \n
- * The local device shall generate the Complex_Desc_req command using the
- * format illustrated in param list. The NWKAddrOfInterest field shall contain the
- * network address of the remote device for which the complex descriptor is
- * required.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_complex_desc_rsp()
- */
-int zb_zdo_complex_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               zb_zdo_complex_desc_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'user descriptor request' command.
- * @details The User_Desc_rsp is generated by a remote device in response to a
- * User_Desc_req directed to the remote device. This command shall be unicast to
- * the originator of the User_Desc_req command.\n
- * \n
- * The remote device shall generate the User_Desc_rsp command using the format
- * illustrated in Table 2.98 in Zigbee Specification.
- * The NWKAddrOfInterest field shall match that specified
- * in the original User_Desc_req command. If the NWKAddrOfInterest field
- * matches the network address of the remote device but a user descriptor does not
- * exist, it shall set the Status field to NO_DESCRIPTOR, set the Length field to 0,
- * and not include the UserDescriptor field. If the NWKAddrOfInterest field
- * matches the network address of the remote device and a user descriptor exists, it
- * shall set the Status field to SUCCESS, set the Length field to the length of the user
- * descriptor, and include its user descriptor in the UserDescriptor field.
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE, set the Length field to 0, and not include the
- * UserDescriptor field.\n\n If the NWKAddrOfInterest field does not match the network
- * address of the remote device and it is the coordinator or a router, it shall determine
- * whether the NWKAddrOfInterest field matches the network address of one of its
- * children.\n\n If the NWKAddrOfInterest field does not match the network address of
- * one of the children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND, set the Length field to 0, and not include the
- * UserDescriptor field.\n\n If the NWKAddrOfInterest matches the network address of
- * one of the children of the remote device, it shall determine whether a user
- * descriptor for that device is available.\n\n If a user descriptor is not available for the
- * child indicated by the NWKAddrOfInterest field, the remote device shall set the
- * Status field to NO_DESCRIPTOR, set the Length field to 0, and not include the
- * UserDescriptor field.\n\n If a user descriptor is available for the child indicated by the
- * NWKAddrOfInterest field, the remote device shall set the Status field to
- * SUCCESS, set the Length field to the length of the user descriptor for that device,
- * and include the user descriptor of the matching child device in the UserDescriptor
- * field.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] len Length in bytes of the user_desc field
- * @param[in] user_desc This field shall only be included in the frame if the
- *                            status field is equal to ZB_ZDP_SUCCESS.
- * @param[in] user_data user data
- *
- * @see zb_zdo_user_desc_req()
- */
-typedef void (*zb_zdo_user_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               unsigned char len,
-               unsigned char *user_desc,
-               void *user_data);
-
-/**
- * @brief Sends 'User descriptor request' command.
- * @details The User_Desc_req command is generated from a local device wishing to inquire
- * as to the user descriptor of a remote device. This command shall be unicast either
- * to the remote device itself or to an alternative device that contains the discovery
- * information of the remote device.
- * \n
- * The local device shall generate the User_Desc_req command using the format
- * illustrated in Table 2.53 in Zigbee Specification.
- * The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the user descriptor is required.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_complex_desc_rsp()
- */
-int zb_zdo_user_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               zb_zdo_user_desc_rsp cb,
-               void *user_data);
-/**
- * @brief Called after 'user descriptor confirm' request.
- * @details The User_Desc_conf is generated by a remote device in response to a
- * User_Desc_set directed to the remote device. This command shall be unicast to
- * the originator of the User_Desc_set command.
- * \n
- * The remote device shall generate the User_Desc_conf command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall match that
- * specified in the original User_Desc_set command. If the NWKAddrOfInterest
- * field matches the network address of the remote device but a user descriptor does
- * not exist, it shall set the Status field to NOT_SUPPORTED. If the
- * NWKAddrOfInterest field matches the network address of the remote device and
- * a user descriptor exists, it shall set the Status field to SUCCESS and configure the
- * user descriptor with the ASCII character string specified in the original
- * User_Desc_set command.\n
- * \n
- * If the NWKAddrOfInterest field does not match the network address of the
- * remote device and it is an end device, it shall set the Status field to
- * INV_REQUESTTYPE.\n\n If the NWKAddrOfInterest field does not match the
- * network address of the remote device and it is the coordinator or a router, it shall
- * determine whether the NWKAddrOfInterest field matches the network address of
- * one of its children. If the NWKAddrOfInterest field does not match the network
- * address of one of the children of the remote device, it shall set the Status field to
- * DEVICE_NOT_FOUND.\n\n If the NWKAddrOfInterest matches the network
- * address of one of the children of the remote device, it shall determine whether a
- * user descriptor for that device is available. If a user descriptor is not available for
- * the child indicated by the NWKAddrOfInterest field, the remote device shall set
- * the Status field to NO_DESCRIPTOR.\n\n If a user descriptor is available for the
- * child indicated by the NWKAddrOfInterest field, the remote device shall set the
- * Status field to SUCCESS and configure the user descriptor with the ASCII
- * character string specified in the original User_Desc_set command.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    returned value from NLME-GET.confirm primitive \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_user_desc_req()
- */
-typedef void (*zb_zdo_user_desc_conf)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @brief Sends 'user descriptor set request' command.
- * @details The User_Desc_set command is generated from a local device wishing to
- * configure the user descriptor on a remote device. This command shall be unicast
- * either to the remote device itself or to an alternative device that contains the
- * discovery information of the remote device.
- * \n\n
- * The local device shall generate the User_Desc_set command using the format
- * illustrated in param list. The NWKAddrOfInterest field shall contain the network
- * address of the remote device for which the user descriptor is to be configured and
- * the UserDescription field shall contain the ASCII character string that is to be
- * configured in the user descriptor. Characters with ASCII codes numbered 0x00
- * through 0x1f are not permitted to be included in this string.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] len Length of the user_desc filed in bytes
- * @param[in] user_desc Pointer of user description
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_user_desc_conf()
- */
-int zb_zdo_user_desc_set(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char len,
-               unsigned char *user_desc,
-               zb_zdo_user_desc_conf cb,
-               void *user_data);
-
-/**
- * @brief Sends 'device announce request' command.
- * @details The Device_annce is provided to enable ZigBee devices on the network to notify
- * other ZigBee devices that the device has joined or re-joined the network,
- * identifying the device's 64-bit IEEE address and new 16-bit NWK address, and
- * informing the Remote Devices of the capability of the ZigBee device.\n\n This
- * command shall be invoked for all ZigBee end devices upon join or rejoin. This
- * command may also be invoked by ZigBee routers upon join or rejoin as part of
- * NWK address conflict resolution.\n\n The destination addressing on this primitive is
- * broadcast to all devices for which macRxOnWhenIdle = TRUE.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 The IEEE address for device of interest
- * @param[in] capability See zb_zdo_mac_capability_field_e in zb_zdo.h header file
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_user_desc_conf()
- */
-int zb_zdo_device_annce(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               unsigned char capability);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_DEV_DISC_H__ */
diff --git a/include/zdo/zb_zdo_nwk_mgr.h b/include/zdo/zb_zdo_nwk_mgr.h
deleted file mode 100755 (executable)
index 85bf0fd..0000000
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_NETWORK_MANAGER_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_NETWORK_MANAGER_H__
-
-#include <zdo/zb_zdo_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file zb_zdo_nwk_mgr.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
- *
- * @brief Zigbee provides API for Network Management.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_OVERVIEW Overview
- * The Network Management services are really handy optional services used for reading the
- * various tables contained within ZigBee nodes, and to request certain common actions
- *
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @brief Called after 'network management discovery request' command.
- * @details The Mgmt_NWK_Disc_rsp is generated in response to an Mgmt_NWK_Disc_req.
- * If this management command is not supported, a status
- * of NOT_SUPPORTED shall be returned and all parameter fields after the Status
- *  field shall be omitted.\n\n Otherwise, the Remote Device shall implement the
- *  following process.\n\n
- *  Upon receipt of and after support for the Mgmt_NWK_Disc_req has been
- *  verified, the Remote Device shall issue an NLME-NETWORK-
- *  DISCOVERY.request primitive using the ScanChannels and ScanDuration
- *  parameters, supplied in the Mgmt_NWK_Disc_req command.\n\n Upon receipt of the
- *  NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall
- *  report the results, starting with the StartIndex element, via the\
- *  Mgmt_NWK_Disc_rsp command.\n\n The NetworkList field shall contain whole
- *  NetworkList records, formatted as specified in Table 2.125, until the limit on
- *  MSDU size, i.e., aMaxMACFrameSize (see [B1]), is reached.\n\n The number of
- *  results reported shall be set in the NetworkListCount.\n\n
- *
- * @since_tizen 4.0
- *
- * @param[in] status ZB_ZDP_NOT_SUPPORTED or returned value from NLME-NETWORK.DISCOVERY.
- *                    request
- * @param[in] network_count The total number of networks reported by the NLME-NETWORK-
- *                           DISCOVERY.confirm.
- * @param[in] start_idx The starting point in the NetworkList from the NLME-NETWORK-
- *                       DISCOVERY.confirm where reporting begins for this response.
- * @param[in] network_list_count The number of network list descriptors reported within
- *                                this response.
- * @param[in] nwk_list A list of network list descriptors.
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_nwk_disc_req()
- */
-typedef void (*zb_zdo_mgmt_nwk_disc_rsp)(
-               unsigned char status,
-               unsigned char network_count,
-               unsigned char start_idx,
-               unsigned char network_list_count,
-               const zb_zdo_network_list_record_h *nwk_list,
-               void *user_data);
-
-/**
- * @brief Bitmask to scan all 802.15.4 channels.
- * @since_tizen 4.0
- */
-#define ZB_802_15_4_CHANNELS_MASK 0x07FFF800UL
-
-/**
- * @brief Sends 'network discover management request' command.
- * @details The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the
- * Remote Device execute a Scan to report back networks in the vicinity of the Local
- * Device.\n\n The destination addressing on this command shall be unicast.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination address
- * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
- *                          The 27 least significant bits (b0, b1,... b26) indicate
- *                          which channels are to be scanned (1 = scan, 0 = do not scan)
- *                          for each of the 27 valid channels.
- * @param[in] scan_duration A value used to calculate the length of time to spend
- *                          scanning each channel. The time spent scanning each channel is
- *                          (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
- *                          the value of the ScanDuration parameter. For more information
- *                          on MAC sub-layer scanning
- * @param[in] scan_count A number of beacon-request in one scan-duration
- * @param[in] start_idx Starting index
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_disc_rsp()
- */
-int zb_zdo_mgmt_nwk_disc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned int scan_channels,
-               unsigned char scan_duration,
-               unsigned char scan_count,
-               unsigned char start_idx,
-               zb_zdo_mgmt_nwk_disc_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'network management LQI request' command.
- * @details The Recover_Source_Bind_rsp is generated from a backup binding table cache
- * device in response to a Recover_Source_Bind_req from a primary binding table
- * cache and contains the status of the request.\n\n This command shall be unicast to the
- * requesting device. If the responding device is not a backup binding table cache, it
- * shall return a status of NOT_SUPPORTED.\n\n If the originator of the request is not
- * recognized as a primary binding table cache, it shall return a status of
- * INV_REQUESTTYPE. \n\n Otherwise, the backup binding table cache shall prepare a
- * list of binding table entries from its backup beginning with StartIndex. \n\n It will
- * fit in as many entries as possible into a Recover_Source_Bind_rsp command and return
- * a status of SUCCESS.\n\n If StartIndex is more than the number of entries in the
- * Source table, a status of NO_ENTRY is returned.\n\n For a successful response,
- * SourceTableEntries is the total number of entries in the backup source table, and
- * SourceTableListCount is the number of entries which is being returned in the
- * response.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_TABLE_FULL \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- * @param[in] neighbor_table_entries Total number of neighbor table entries in the backup
- *                                  binding cache.
- * @param[in] start_idx Starting index within the neighbor table to begin reporting for
- *                       the neighbor table list.
- * @param[in] neighbor_table_list_count The number of neighbor table entries included
- *                                       within neighbor table list.
- * @param[in] neighbor_table_list A list of neighbor table list.
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_lqi_req()
- */
-typedef void (*zb_zdo_mgmt_lqi_rsp)(
-               unsigned char status,
-               unsigned char neighbor_table_entries,
-               unsigned char start_idx,
-               unsigned char neighbor_table_list_count,
-               const zb_zdo_neighbor_table_desc_h *neighbor_table_list,
-               void *user_data);
-
-/**
- * @brief Sends 'LQI management request' command.
- * @details The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a
- * neighbor list for the Remote Device along with associated LQI values to each
- * neighbor. The destination addressing on this command shall be unicast only and
- * the destination address must be that of a ZigBee Coordinator or ZigBee Router.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination address
- * @param[in] start_idx Starting index for the requested elements of the neighbor table
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_lqi_rsp()
- */
-int zb_zdo_mgmt_lqi_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char start_idx,
-               zb_zdo_mgmt_lqi_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'routing management request' command.
- * @details The Mgmt_Rtg_rsp is generated in response to an Mgmt_Rtg_req. If this
- * management command is not supported, a status of NOT_SUPPORTED shall be
- * returned and all parameter fields after the Status field shall be omitted. Otherwise,
- * the Remote Device shall implement the following processing.
- * Upon receipt of and after support for the Mgmt_Rtg_req has been verified, the
- * Remote Device shall perform an NLME-GET.request (for the nwkRouteTable
- * attribute) and process the resulting NLME-GET.confirm (containing the
- * nwkRouteTable attribute) to create the Mgmt_Rtg_rsp command. The
- * Mgmt_Rtg_rsp command shall contain the same status that was contained in the
- * NLME-GET.confirm primitive and if this was not SUCCESS, all parameter fields
- * after the status field shall be omitted.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    returned value from NLME-GET.confirm  primitive \n
- * @param[in] routing_table_entries Total number of routing table entries within the
- *                                   remote device.
- * @param[in] start_idx Starting index within the Routing Table to begin reporting for
- *                       the RoutingTableList.
- * @param[in] routing_table_list_count The number of routing table entries included
- *                                      within RoutingTableList.
- * @param[in] routing_table_list A list of routing table list.
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_rtg_req()
- */
-typedef void (*zb_zdo_mgmt_rtg_rsp)(
-               unsigned char status,
-               unsigned char routing_table_entries,
-               unsigned char start_idx,
-               unsigned char routing_table_list_count,
-               const zb_zdo_routing_table_h *routing_table_list,
-               void *user_data);
-
-/**
- * @brief Sends 'routing management request' command.
- * @details The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the
- * contents of the Routing Table from the Remote Device. The destination
- * addressing on this command shall be unicast only and the destination address
- * must be that of the ZigBee Router or ZigBee Coordinator.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination network address
- * @param[in] start_idx Starting index for the requested elements of the routing table
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_rtg_rsp()
- */
-int zb_zdo_mgmt_rtg_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char start_idx,
-               zb_zdo_mgmt_rtg_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'binding management request' command.
- * @details The Mgmt_Bind_rsp is generated in response to a Mgmt_Bind_req. If this
- * management command is not supported, a status of NOT_SUPPORTED shall be
- * returned and all parameter fields after the Status field shall be omitted. Otherwise,
- * the Remote Device shall implement the following processing.\n\n
- * Upon receipt of and after support for the Mgmt_Bind_req has been verified, the
- * Remote Device shall perform an APSME-GET.request (for the apsBindingTable
- * attribute) and process the resulting APSME-GET.confirm (containing the
- * apsBindingTable attribute) to create the Mgmt_Bind_rsp command. The
- * Mgmt_Bind_rsp command shall contain the same status that was contained in the
- * APSME-GET.confirm primitive and if this was not SUCCESS, all parameter
- * fields after the status field shall be omitted.\n\n
- * From the apsBindingTable attribute, the binding table shall be accessed, starting
- * with the index specified by StartIndex, and moved to the BindingTableList field of
- * the Mgmt_Bind_rsp command. The entries reported from the binding table shall
- * be those, starting with StartIndex and including whole BindingTableList records
- * until the MSDU size limit, i.e., aMaxMACFrameSize,
- * is reached. Within the Mgmt_Bind_Rsp command, the BindingTableEntries field
- * shall represent the total number of Binding Table entries in the Remote Device.
- * The BindingTableListCount field shall be the number of entries reported in the
- * BindingTableList field of the Mgmt_Bind_req command.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    returned value from NLME-GET.confirm primitive \n
- * @param[in] binding_table_entries Total number of Binding Table entries within the
- *                                  Remote Device.
- * @param[in] start_idx Starting index within the Binding Table to begin reporting for
- *                      the BindingTableList.
- * @param[in] binding_table_list_count The number of binding table entries included
- *                                      within BindingTableList.
- * @param[in] binding_table_list A list of routing table list.
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_bind_req()
- */
-typedef void (*zb_zdo_mgmt_bind_rsp)(
-               unsigned char status,
-               unsigned char binding_table_entries,
-               unsigned char start_idx,
-               unsigned char binding_table_list_count,
-               const zb_zdo_binding_table_h *binding_table_list,
-               void *user_data);
-
-/**
- * @brief Sends 'binding management request' command.
- * @details The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the
- * contents of the Binding Table from the Remote Device.  \n\n The destination
- * addressing on this command shall be unicast only and the destination address
- * must be that of a Primary binding table cache or source device holding its own
- * binding table.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination network address
- * @param[in] start_idx Starting index for the requested elements of the binding table
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_bind_rsp()
- */
-int zb_zdo_mgmt_bind_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char start_idx,
-               zb_zdo_mgmt_bind_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'leave management request' command.
- * @details The Mgmt_Leave_rsp is generated in response to a Mgmt_Leave_req. \n\n If this
- * management command is not supported, a status of NOT_SUPPORTED shall be
- * returned. \n\n Otherwise, the Remote Device shall implement the following
- * processing.
- * Upon receipt of and after support for the Mgmt_Leave_req has been verified, the
- * Remote Device shall execute the NLME-LEAVE.request to disassociate from the
- * currently associated network. The Mgmt_Leave_rsp shall contain the same status
- * that was contained in the NLME-LEAVE.confirm primitive. \n\n
- * Once a device has disassociated, it may execute pre-programmed logic to perform
- * NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_NOT_AUTHORIZED \n
- *                    returned value from NLME-LEAVE.confirm primitive \n
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_leave_req()
- */
-typedef void (*zb_zdo_mgmt_leave_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @brief Sends 'leave device management request' command.
- * @details The Mgmt_Leave_req is generated from a Local Device requesting that a Remote
- * Device leave the network or to request that another device leave the network.
- * The Mgmt_Leave_req is generated by a management application which directs the
- * request to a Remote Device where the NLME-LEAVE.request is to be executed
- * using the parameter supplied by Mgmt_Leave_req.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 The IEEE address for designated device to leave
- * @param[in] remove_children This field has a value of 1 if the device being asked to
- *                            leave the network is also being asked to remove its child
- *                            devices, if any. Otherwise, it has a value of 0.
- * @param[in] rejoin This field has a value of 1 if the device being asked to leave from
- *                   the current parent is requested to rejoin the network. Otherwise,
- *                   it has a value of 0.
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_leave_rsp()
- */
-int zb_zdo_mgmt_leave_req(
-               zigbee_h handle,
-               ieee_addr addr64,
-               bool remove_children,
-               bool rejoin,
-               zb_zdo_mgmt_leave_rsp cb,
-               void *user_data);
-
-/**
- * @brief Called after 'permit joining management request' command.
- * @details The Mgmt_Permit_Joining_rsp is generated in response to a unicast
- * Mgmt_Permit_Joining_req.\n\n In the description which follows, note that no
- * response shall be sent if the Mgmt_Permit_Joining_req was received as a
- * broadcast to all routers.\n\n If this management command is not permitted by the
- * requesting device, a status of INVALID_REQUEST shall be returned.\n\n Upon
- * receipt and after support for Mgmt_Permit_Joining_req has been verified, the
- * Remote Device shall execute the NLME-PERMIT-JOINING.request.\n\n The
- * Mgmt_Permit-Joining_rsp shall contain the same status that was contained in the
- * NLME-PERMIT-JOINING.confirm primitive.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_NOT_AUTHORIZED \n
- *                    returned value from NLME-DIRECT-JOINING.confirm primitive \n
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_direct_join_rsp()
- */
-typedef void (*zb_zdo_mgmt_permit_joining_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @brief Sends 'permit join device management request' command.
- * @details The Mgmt_Permit_Joining_req is generated from a Local Device requesting that
- * a remote device or devices allow or disallow association.\n\n The
- * Mgmt_Permit_Joining_req is generated by a management application or
- * commissioning tool which directs the request to a remote device(s) where the
- * NLME-PERMIT-JOINING.request is executed using the PermitDuration
- * parameter supplied by Mgmt_Permit_Joining_req.\n\n Additionally, if the remote
- * device is the Trust Center and TC_Significance is set to 1, the Trust Center
- * authentication policy will be affected. The addressing may be unicast or
- * 'broadcast to all routers and coordinator'.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination network address
- * @param[in] permit_duration The length of time in seconds during which the ZigBee
- *                            coordinator or router will allow associations. \n
- *                            The value 0x00 and 0xff indicate that permission is
- *                            disabled or enabled, respectively, without a specified time
- *                            limit.
- * @param[in] tc_significance If this is set to 0x01 and the remote device is the Trust Center,
- *                            the command affects the Trust Center authentication policy as
- *                            described in the sub-clauses below; \n \n
- *                            If this is set to 0x00, there is no effect on the Trust Center.
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_permit_joining_rsp()
- */
-int zb_zdo_mgmt_permit_joining_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char permit_duration,
-               unsigned char tc_significance,
-               zb_zdo_mgmt_permit_joining_rsp cb,
-               void *user_data);
-
-/**
- * @brief Sends 'update network management request' command.
- * @details This command is provided to allow updating of network configuration parameters
- * or to request information from devices on network conditions in the local
- * operating environment.\n\n The destination addressing on this primitive shall be
- * unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE.
- *
- * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
- *                         The 27 least significant bits (b0, b1,... b26) indicate
- *                         which channels are to be scanned (1 = scan, 0 = do not scan)
- *                         for each of the 27 valid channels.
- * @param[in] scan_duration A value used to calculate the length of time to spend
- *                         scanning each channel.\n The time spent scanning each channel
- *                         is (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
- *                         the value of the ScanDuration parameter. For more information
- *                         on MAC sub-layer scanning
- * @param[in] scan_count This field represents the number of energy scan to be conducted
- *                      and reported
- * @param[in] nwk_update_id The value of the nwkUpdateId contained in this request.
- *                         This value is set by the Network Channel Manager prior to
- *                         sending the message. \n
- *                         This field shall only be present of the ScanDuration is 0xfe
- *                         or 0xff. If the ScanDuration is 0xff, then the value in the
- *                         nwkUpdateID shall be ignored. \n
- * @param[in] nwk_manager_addr This field shall be present only if the ScanDuration is set
- *                            to 0xff, and, where present, indicates the NWK address for
- *                            the device with the Network Manager bit set in its Node
- *                            Descriptor
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_nwk_update_noti()
- */
-int zb_zdo_mgmt_nwk_update_req(
-               zigbee_h handle,
-               unsigned int scan_channels,
-               unsigned char scan_duration,
-               unsigned char scan_count,
-               unsigned char nwk_update_id,
-               nwk_addr nwk_manager_addr);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_NETWORK_MANAGER_H__ */
diff --git a/include/zdo/zb_zdo_type.h b/include/zdo/zb_zdo_type.h
deleted file mode 100755 (executable)
index 1337dde..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_TYPE_H__
-#define __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_TYPE_H__
-
-#include <zb_type.h>
-
-/**
- * @file zb_zdo_type.h
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.138 ZDP Enumerations Description.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_SUCCESS = 0, /**< Success */
-       ZB_ZDP_INV_REQUESTTYPE = 0x80, /**< Invalid Request Type */
-       ZB_ZDP_DEVICE_NOT_FOUND = 0x81, /**< Device Not Found */
-       ZB_ZDP_INVALID_EP = 0x82, /**< Invalid Endpoint */
-       ZB_ZDP_NOT_ACTIVE = 0x83, /**< Not Active */
-       ZB_ZDP_NOT_SUPPORTED = 0x84, /**< Not Supported */
-       ZB_ZDP_TIMEOUT = 0x85, /**< Timeout */
-       ZB_ZDP_NO_MATCH = 0x86, /**< No Match */
-       ZB_ZDP_NO_ENTRY = 0x88, /**< No Entry */
-       ZB_ZDP_NO_DESCRIPTOR = 0x89, /**< No Descriptor */
-       ZB_ZDP_INSUFFICIENT_SPACE = 0x8A, /**< Insufficient Space */
-       ZB_ZDP_NOT_PERMITED = 0x8B, /**< Not Permitted */
-       ZB_ZDP_TABLE_FULL = 0x8C, /**< Table Full */
-       ZB_ZDP_NOT_AUTHORIZED = 0x8D, /**< Not Authorized */
-       ZB_ZDP_DEVICE_BINDING_TABLE_FULL = 0x8E, /**< Binding Table Full */
-       ZB_ZDP_UNKNOWN = 0xFF /**< Unknown */
-} zb_zdo_status_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief RequestType Enumeration.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_SINGLE_DEVICE_RESPONSE = 0, /**< Single Device Response : 0*/
-       ZB_ZDP_EXTENDED_RESPONSE = 1, /**< Extended Response : 1 */
-} zb_zdo_request_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.30 Values of the Logical Type Field.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_COORDINATOR = 0, /**< Coordinator */
-       ZB_ZDP_ROUTER = 1, /**< Router */
-       ZB_ZDP_END_DEVIEC = 2, /**< End Device */
-} zb_zdo_logical_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.31 Values of the Frequency Band Field.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_868_868_6_MHZ = 0, /**< 868~888.6MHz */
-       ZB_ZDP_902_928_MHA = 2, /**< 902~928MHz */
-       ZB_ZDP_2400_2483_5_MHZ = 3, /**< 2400~2483.5MHz */
-} zb_zdo_frequency_band_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Alternative PAN coordinator bit in MAC capability Flags.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_DO_NOT_SUPPORT_PAN_COORDINATOR = 0, /**< Otherwise */
-       ZB_ZDP_SUPPORT_PAN_COORDINATOR = 1, /**< This node is capable of becoming a PAN
-               coordinator. */
-} zb_zdo_alternative_pan_coordinator_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Device type bit in MAC capability Flags.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_RFD = 0, /**< This node is a reduced function device (RFD) */
-       ZB_ZDP_FFD = 1, /**< This node is a full function device (FFD) */
-} zb_zdo_device_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Power Source bit in MAC capability Flags.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_NO_NODE_POWER_DESCRIPTION = 0, /**< Otherwise */
-       ZB_ZDP_MAIN_POWER = 1, /**< Current power source is main power. This information is
-               derived from the node current power source field of the node power descriptor */
-} zb_zdo_power_source_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Receiver on when idle bit in MAC capability Flags.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_KEEP_POWER_SAVE_MODE = 0, /**< Otherwise */
-       ZB_ZDP_DO_NOT_POWER_SAVE_MODE = 1, /**< The device does not disable its receiver to
-               conserve power during idle periods. */
-} zb_zdo_receiver_on_when_idle_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Security capability bit in MAC capability Flags.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_DO_NOT_SUPPORT_SECURITY_MODE = 0, /**< ZDP does not support security mode */
-       ZB_ZDP_SUPPORT_SECURITY_MODE = 1, /**< ZDP supports security mode */
-} zb_zdo_security_capability_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Format of the MAC Capability Flags Field in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR = (1 << 0), /**< Alternative Pan Coordinator see
-               #zb_zdo_alternative_pan_coordinator_e */
-       ZB_ZDP_DEVICE_TYPE = (1 << 1), /**< Device Type see #zb_zdo_device_type_e */
-       ZB_ZDP_POWER_SOURCE = (1 << 2), /**< Power Source see #zb_zdo_power_source_e */
-       ZB_ZDP_RECEIVER_ON_WHEN_IDLE = (1 << 3), /**< Register on When Idle
-               see #zb_zdo_receiver_on_when_idle_e */
-       ZB_ZDP_SECURITY_CAPABILITY = (1 << 6), /**< Security Capability
-               see #zb_zdo_security_capability_e */
-       ZB_ZDP_ALLOCATE_ADDRESS = (1 << 7), /**< Allocated Address.\n
-               This mean device receive network address from coordinator.\n
-               This field will always have a value of 1 in implementations of IEEE 802.15.4 spec,
-               indicating that the joining device must be issued a 16-bit short address */
-} zb_zdo_mac_capability_field_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.32 Server Mask Bit Assignments.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_PRIMARY_TRUST_CENTER = (1 << 0), /**< Primary Trust Center */
-       ZB_ZDP_BACKUP_TRUST_CENTER = (1 << 1), /**< Backup Trust Center */
-       ZB_ZDP_PRIMARY_BINDING_TABLE_CACHE = (1 << 2), /**< Primary Binding Table Cache */
-       ZB_ZDP_BACKUP_BINDING_TABLE_CACHE = (1 << 3), /**< Backup Binding Table Cache */
-       ZB_ZDP_PRIMARY_DISCOVERY_CACHE = (1 << 4), /**< Primary Discovery Cache */
-       ZB_ZDP_BACKUP_DISCOVERY_CACHE = (1 << 5), /**< Backup Discovery Cache */
-       ZB_ZDP_NETWORK_MANAGER = (1 << 6), /**< Network Manager */
-} zb_zdo_server_mask_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.29 Fields of the Node Descriptor.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- * @details Type and capabilities of the node.
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_node_descriptor_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.35 Values of the Current Power Mode Field in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_RECEVIER_SYNCHRONIZED_WITH_RECEVIER_ON = 0, /**< Register Synchronized with Receiver On */
-       ZB_ZDP_RECEIVER_COMES_ON_PERIODICALLY = (1 << 0), /**< Register Comes on Periodically */
-       ZB_ZDP_RECEIVER_COMES_ON_WHEN_STIMULATED = (1 << 1), /**< Register Comes on When Stimulated */
-} zb_zdo_current_power_mode_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.34 Fields of the Node Power Descriptor.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_CONSTANT_POWER = 0, /**< Constant Power */
-       ZB_ZDP_RECHARGEABLE_BATTERY = 1, /**< Rechargeable Battery */
-       ZB_ZDP_DISPOSABLE_BATTERY = 2, /**< Disposable Battery */
-} zb_zdo_available_power_source_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.36 Values of the Available Power Sources Field in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZDP_CHARGE_LEVEL_CRITICAL = 0, /**< Charge Level Critical */
-       ZB_ZDP_CHARGE_LEVEL_33 = 1, /**< Charge Level 33% */
-       ZB_ZDP_CHARGE_LEVEL_66 = 2, /**< Charge Level 66% */
-       ZB_ZDP_CHARGE_LEVEL_100 = 3, /**< Charge Level 100% */
-} zb_zdo_current_power_source_level_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Binding type.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_UNICAST_BINDING = 0x03, /**< A unicast binding whose 64-bit identifier is the
-                                                               destination ieee_addr. */
-       ZB_MANY_TO_ONE_BINDING = 0x83, /**< A unicast binding whose 64-bit identifier is the
-                                                               many-to-one destination ieee_addr. A Route discovery
-                                                               should be disabled when sending unicast via may-to-one
-                                                               binding */
-       ZB_MULTICAST_BINDING = 0x01, /**< A multicast binding whose 64-bit identifier is the
-                                                               group address. A multicast binding can be used to send
-                                                               messages to the group and to receive message sent to
-                                                               the group */
-} zb_binding_type_e;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.34 Fields of the Node Power Descriptor in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- * @details Node power characteristics.
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_node_power_descriptor_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Cluster counts to handle with.
- *
- * @since_tizen 4.0
- */
-#define MAX_ENDPOINT_CLUSTERS 32
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief The handle of zigbee simple description.
- * @details Device descriptions contained in node.
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_simple_desc_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief The handle of zigbee end-device information.
- * @details A #zb_end_device_info_h is an opaque data structure.\n
- * #zb_end_device_info_h is a data type of network address, IEEE address, endpoint count
- * and endpoint information structure.
- *
- * @since_tizen 4.0
- */
-typedef void* zb_end_device_info_h;
-
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.125 NetworkList Record Format in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_network_list_record_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.127 NeighborTableList Record Format in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_neighbor_table_desc_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.129 RoutingTableList Record Format in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_routing_table_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.131 BindingTableList Record Format in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_binding_table_h;
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @brief Table 2.135 DiscoveryCacheList Record Format in Zigbee Specification.
- * See more http://www.zigbee.org/download/standards-zigbee-specification/
- *
- * @since_tizen 4.0
- */
-typedef void* zb_zdo_discovery_cache_h;
-
-
-/**
- * @}
- */
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_ZB_ZDO_TYPE_H__ */
-
diff --git a/include/zigbee-zcl-type.h b/include/zigbee-zcl-type.h
new file mode 100644 (file)
index 0000000..d58ec54
--- /dev/null
@@ -0,0 +1,2132 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_TYPE_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_TYPE_H__
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief The data type abbreviation : Zigbee APS frame control.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_aps_frame_ctl;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief The data type abbreviation : Zigbee ZCL frame control.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_zcl_frame_ctl;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief APS Delivery Mode.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_APS_DELIVERY_UNICAST = 0, /**< Unicast delivery */
+       ZB_APS_DELIVERY_INDIRECT = 1, /**< Indirect delivery */
+       ZB_APS_DELIVERY_BROADCAST = 2, /**< Broadcast delivery */
+       ZB_APS_DELIVERY_MULTICAST = 3 /**< Multicast delivery */
+} zb_aps_delivery_mode_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief APS ACK Request.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_APS_NO_ACK_REQUEST = (0 << 6), /**< Not request ACK */
+       ZB_APS_ACK_REQUEST = (1 << 6) /**< Request ACK */
+} zb_aps_ack_request_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Frame type at ZCL Header.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_FC_GLOBALLY_USED = (0 << 0), /**< Profile widely used */
+       ZB_APS_FC_CLUSTER_SPECIFIC = (1 << 0) /**< Cluster specific */
+} zb_zcl_fc_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Manufacturer specific or not at ZCL Header.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_FC_NOT_MANUFACTURER = (0 << 2), /**< Manufacturer code not present */
+       ZB_ZCL_FC_MANUFACTURER = (1 << 2) /**< Manufacturer code present */
+} zb_zcl_fc_manufacturer_present_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Request or Response at ZCL Header.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_CLIENT_TO_SERVER = (0 << 3), /**< Request */
+       ZB_ZCL_SERVER_TO_CLIENT = (1 << 3), /**< Response */
+} zb_zcl_fc_direction_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Disable default response or not at ZCL Header.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_DEFAULT_RESPONSE_ENABLED = (0 << 4), /**< Enable default response */
+       ZB_ZCL_DEFAULT_RESPONSE_DISABLED = (1 << 4), /**< Disable default response */
+} zb_zcl_fc_default_response_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Default ZCL frame control at APS Header.
+ *
+ * @since_tizen 4.0
+ */
+#define ZB_ZCL_FC_DEFAULT 0x00 /**< Generally used / Not manufacture / Request / with Default Response */
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Broadcast address type.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_BROADCAST_ADDRESS = 0xFFFC, /**< Broadcast to all routers. */
+       ZB_ZCL_BROADCAST_ADDRESS_RX_ON_WHEN_IDLE = 0xFFFD, /**< Broadcast to all non-sleepy devices. */
+       ZB_ZCL_BROADCAST_ADDRESS_SLEEPY = 0xFFFF /**< Broadcast to all devices, including sleepy end devices. */
+} zb_zcl_broadcast_address_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Uses this value as the return value to stop foreach function.
+ *
+ * @since_tizen 4.0
+ */
+#define ZIGBEE_FUNC_STOP false
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Uses this value as the return value to continue foreach function.
+ *
+ * @since_tizen 4.0
+ */
+#define ZIGBEE_FUNC_CONTINUE true
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief ACL type.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_ACL_TYPE_WRITABLE = 1, /**< Writable */
+       ZB_ZCL_ACL_TYPE_REPORTABLE = 2, /**< Reportable */
+} zb_zcl_acl_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Data measuring type.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_DATA_TYPE_NONE = 0, /**< Data type none */
+       ZB_ZCL_DATA_TYPE_DISCRETE = 1, /**< Discrete data type */
+       ZB_ZCL_DATA_TYPE_ANALOG = 2 /**< Analog data type */
+} zb_zcl_data_category_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief ZCL Enumerations Description in Zigbee Cluster Library.
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_STATUS_SUCCESS = 0x00, /**< Operation was successful */
+       ZB_ZCL_STATUS_FAILURE = 0x01, /**< Operation was not successful. */
+       ZB_ZCL_STATUS_NOT_AUTHORIZED = 0x7E, /**< The sender of the command does not have authorization to carry out this command. */
+       ZB_ZCL_STATUS_RESERVED_FIELD_NOT_ZERO = 0x7F, /**< Reserved field/subfield/bit contains a non-zero value. */
+       ZB_ZCL_STATUS_MALFORMED_COMMAND = 0x80, /**< The command appears to contain the wrong fields, as detected either by the presence of one or more invalid field entries or by there being missing fields. Command not carried out. Implementer has discretion as to whether to return this error or INVALID_FIELD. */
+       ZB_ZCL_STATUS_UNSUP_CLUSTER_COMMAND = 0x81, /**< The specified cluster command is not supported on the device. */
+       ZB_ZCL_STATUS_UNSUP_GENERAL_COMMAND = 0x82, /**< The specified general ZCL command is not supported on the device. */
+       ZB_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND = 0x83, /**< A manufacturer specific unicast, cluster specific command was received with an unknown manufacturer code, or the manufacturer code was recognized but the command is not supported. */
+       ZB_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND = 0x84, /**< A manufacturer specific unicast, ZCL specific command was received with an unknown manufacturer code, or the manufacturer code was recognized but the command is not supported. */
+       ZB_ZCL_STATUS_INVALID_FIELD = 0x85, /**< At least one field of the command contains an incorrect value, according to the specification the device is implemented to. */
+       ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE = 0x86, /**< The specified attribute does not exist on the device. */
+       ZB_ZCL_STATUS_INVALID_VALUE = 0x87, /**< Out of range error, or set to a reserved value. Attribute keeps its old value. Note that an attribute value may be out of range if an attribute is related to another, e.g. with minimum and maximum attributes. See the individual attribute descriptions for specific details. */
+       ZB_ZCL_STATUS_READ_ONLY = 0x88, /**< Attempt to write a read only attribute. */
+       ZB_ZCL_STATUS_INSUFFICIENT_SPACE = 0x89, /**< An operation (e.g. an attempt to create an entry in a table) failed due to an insufficient amount of free space available. */
+       ZB_ZCL_STATUS_DUPLICATE_EXISTS = 0x8A, /**< An attempt to create an entry in a table failed due to a duplicate entry already being present in the table. */
+       ZB_ZCL_STATUS_NOT_FOUND = 0x8B, /**< The requested information (e.g. table entry) could not be found. */
+       ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE = 0x8C, /**< Periodic reports cannot be issued for this attribute. */
+       ZB_ZCL_STATUS_INVALID_DATA_TYPE = 0x8D, /**< The data type given for an attribute is incorrect. Command not carried out. */
+       ZB_ZCL_STATUS_INVALID_SELECTOR = 0x8E, /**< The selector for an attribute is incorrect. */
+       ZB_ZCL_STATUS_WRITE_ONLY = 0x8F, /**< A request has been made to read an attribute that the requester is not authorized to read. No action taken. */
+       ZB_ZCL_STATUS_INCONSISTENT_STARTUP_STATE = 0x90, /**< Setting the requested values would put the device in an inconsistent state on startup. No action taken. */
+       ZB_ZCL_STATUS_DEFINED_OUT_OF_BAND = 0x91, /**< An attempt has been made to write an attribute that is present but is defined using an out-of-band method and not over the air. */
+       ZB_ZCL_STATUS_INCONSISTENT = 0x92, /**< The supplied values (e.g. contents of table cells) are inconsistent. */
+       ZB_ZCL_STATUS_ACTION_DENIED = 0x93, /**< The credentials presented by the device sending the command are not sufficient to perform this action. */
+       ZB_ZCL_STATUS_TIMEOUT = 0x94, /**< The exchange was aborted due to excessive response time. */
+       ZB_ZCL_STATUS_ABORT = 0x95, /**< Failed case when a client or a server decides to abort the upgrade process. */
+       ZB_ZCL_STATUS_INVALID_IMAGE = 0x96, /**< Invalid OTA upgrade image (ex. failed signature validation or signer information check or CRC check). */
+       ZB_ZCL_STATUS_WAIT_FOR_DATA = 0x97, /**< Server does not have data block available yet. */
+       ZB_ZCL_STATUS_NO_IMAGE_AVAILABLE = 0x98, /**< No OTA upgrade image available for a particular client. */
+       ZB_ZCL_STATUS_REQUIRE_MORE_IMAGE = 0x99, /**< The client still requires more OTA upgrade image files in order to successfully upgrade. */
+} zb_zcl_status_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of the Attribute Status Record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_read_attr_status_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of the Write Attributes Data Structure in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_write_attr_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of the write attribute status record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_write_attr_status_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of Reporting Configuration Record Structure in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_reporting_config_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of Read Reporting Configuration Record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_read_report_config_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief Format of the Attribute Status Record Field in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_report_config_response_record_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @brief ZCL attribute types (See #zb_zcl_data_type_e).
+ * @details ZigBee devices, such as thermostats, lamps, etc., are defined in terms of the
+ * attributes they contain, which can be written, read or reported using the
+ * commands defined in #zb_zcl_data_type_e details the data types and formats that
+ * can be used for these attributes. Note that individual clusters, which may use
+ * different or new types, show valid values, ranges, and units for the attributes they
+ * represent.
+ *
+ * Each data type is allocated an 8-bit data type ID. The most significant 5 bits of this
+ * ID is used to divide the types into 32 type classes, and the least significant 3 bits
+ * specify a specific data type within this class.
+ *
+ * #zb_zcl_data_type_e also indicates for each data type whether it is considered to be
+ * 'analog' or 'discrete'. Values of analog types may be added to or subtracted from other
+ * values of the same type, and are typically used to measure the value of properties
+ * in the real world that vary continuously over a range. Values of discrete data types
+ * only have meaning as individual values, and may not be added or subtracted.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_NO_DATA_ATTRIBUTE_TYPE = 0x00, /**< No data */
+       ZB_ZCL_8_BIT_DATA = 0x08, /**< 8-bit data, 1-byte (Digital) */
+       ZB_ZCL_16_BIT_DATA = 0x09, /**< 16-bit data, 2-byte (Digital) */
+       ZB_ZCL_24_BIT_DATA = 0x0a, /**< 24-bit data, 3-byte (Digital) */
+       ZB_ZCL_32_BIT_DATA = 0x0b, /**< 32-bit data, 4-byte (Digital) */
+       ZB_ZCL_40_BIT_DATA = 0x0c, /**< 40-bit data, 5-byte (Digital) */
+       ZB_ZCL_48_BIT_DATA = 0x0d, /**< 48-bit data, 6-byte (Digital) */
+       ZB_ZCL_56_BIT_DATA = 0x0e, /**< 56-bit data, 7-byte (Digital) */
+       ZB_ZCL_64_BIT_DATA = 0x0f, /**< 64-bit data, 8-byte (Digital) */
+       ZB_ZCL_BOOLEAN = 0x10, /**< Boolean, 1-byte */
+       ZB_ZCL_8_BIT_BITMAP = 0x18, /**< 8-bit bitmap, 1-byte (Digital) */
+       ZB_ZCL_16_BIT_BITMAP = 0x19, /**< 16-bit bitmap, 2-byte (Digital) */
+       ZB_ZCL_24_BIT_BITMAP = 0x1a, /**< 24-bit bitmap, 3-byte (Digital) */
+       ZB_ZCL_32_BIT_BITMAP = 0x1b, /**< 32-bit bitmap, 4-byte (Digital) */
+       ZB_ZCL_40_BIT_BITMAP = 0x1c, /**< 40-bit bitmap, 5-byte (Digital) */
+       ZB_ZCL_48_BIT_BITMAP = 0x1d, /**< 48-bit bitmap, 6-byte (Digital) */
+       ZB_ZCL_56_BIT_BITMAP = 0x1e, /**< 56-bit bitmap, 7-byte (Digital) */
+       ZB_ZCL_64_BIT_BITMAP = 0x1f, /**< 64-bit bitmap, 8-byte (Digital) */
+       ZB_ZCL_UNSIGNED_8_BIT_INTEGER = 0x20, /**< unsigned 8-bit integer, 1-byte (Analog) */
+       ZB_ZCL_UNSIGNED_16_BIT_INTEGER = 0x21, /**< unsigned 16-bit integer, 2-byte (Analog) */
+       ZB_ZCL_UNSIGNED_24_BIT_INTEGER = 0x22, /**< unsigned 24-bit integer, 3-byte (Analog) */
+       ZB_ZCL_UNSIGNED_32_BIT_INTEGER = 0x23, /**< unsigned 32-bit integer, 4-byte (Analog) */
+       ZB_ZCL_UNSIGNED_40_BIT_INTEGER = 0x24, /**< unsigned 40-bit integer, 5-byte (Analog) */
+       ZB_ZCL_UNSIGNED_48_BIT_INTEGER = 0x25, /**< unsigned 48-bit integer, 6-byte (Analog) */
+       ZB_ZCL_UNSIGNED_56_BIT_INTEGER = 0x26, /**< unsigned 56-bit integer, 7-byte (Analog) */
+       ZB_ZCL_UNSIGNED_64_BIT_INTEGER = 0x27, /**< unsigned 64-bit integer, 8-byte (Analog) */
+       ZB_ZCL_SIGNED_8_BIT_INTEGER = 0x28, /**< signed 8-bit integer, 1-byte (Analog) */
+       ZB_ZCL_SIGNED_16_BIT_INTEGER = 0x29, /**< signed 16-bit integer, 2-byte (Analog) */
+       ZB_ZCL_SIGNED_24_BIT_INTEGER = 0x2a, /**< signed 24-bit integer, 3-byte (Analog) */
+       ZB_ZCL_SIGNED_32_BIT_INTEGER = 0x2b, /**< signed 32-bit integer, 4-byte (Analog) */
+       ZB_ZCL_SIGNED_40_BIT_INTEGER = 0x2c, /**< signed 40-bit integer, 5-byte (Analog) */
+       ZB_ZCL_SIGNED_48_BIT_INTEGER = 0x2d, /**< signed 48-bit integer, 6-byte (Analog) */
+       ZB_ZCL_SIGNED_56_BIT_INTEGER = 0x2e, /**< signed 56-bit integer, 7-byte (Analog) */
+       ZB_ZCL_SIGNED_64_BIT_INTEGER = 0x2f, /**< signed 64-bit integer, 8-byte (Analog) */
+       ZB_ZCL_8_BIT_ENUMERATION = 0x30, /**< 8-bit enumeration, 1-byte (Digital) */
+       ZB_ZCL_16_BIT_ENUMERATION = 0x31, /**< 16-bit enumeration, 2-byte (Digital) */
+       ZB_ZCL_SEMI_PRECISION = 0x38, /**< floating point, 2-byte (Analog) */
+       ZB_ZCL_SINGLE_PRECISION = 0x39, /**< floating point, 4-byte (Analog) */
+       ZB_ZCL_DOUBLE_PRECISION = 0x3a, /**< floating point, 8-byte (Analog) */
+       ZB_ZCL_OCTET_STRING = 0x41, /**< Octet string, Defined in first two octets (Digital) */
+       ZB_ZCL_CHARACTER_STRING = 0x42, /**< Character string, defined in first two octets (Digital) */
+       ZB_ZCL_LONG_OCTET_STRING = 0x43, /**< Long octet string, defined in first two octets (Digital) */
+       ZB_ZCL_LONG_CHARACTER_STRING = 0x44, /**< Long character string, defined in first 2 bytes (Digital) */
+       ZB_ZCL_ARRAY = 0x48, /**< Array 2(0xffff)+Sum of lengths of contents, but we ignore 2-byte prefix (Digital) (NOT SUPPORTED) */
+       ZB_ZCL_STRUCTURE = 0x4c, /**< Structure 2(0xffff)+Sum of lengths of contents, but we ignore 2-byte prefix (Digital) (NOT SUPPORTED) */
+       ZB_ZCL_SET = 0x50, /**< Set, Sum of lengths of contents (Digital) (NOT SUPPORTED) */
+       ZB_ZCL_BAG = 0x51, /**< Bag, Sum of lengths of contents (Digital) (NOT SUPPORTED) */
+       ZB_ZCL_TIME_OF_DAY = 0xe0, /**< Time of day, 4-byte (Analog) */
+       ZB_ZCL_DATE = 0xe1, /**< Date, 4 byte (Digital) */
+       ZB_ZCL_UTC_TIME = 0xe2, /**< UTC Time, 4-byte(Digital)  */
+       ZB_ZCL_CLUSTER_ID = 0xe8, /**< Cluster ID, 2-byte (Digital) */
+       ZB_ZCL_ATTRIBUTE_ID = 0xe9, /**< Attribute ID, 2-byte (Digital) */
+       ZB_ZCL_BACNET_OID = 0xea, /**< BACnet OID 4 byte (Digital) */
+       ZB_ZCL_IEEE_ADDRESS = 0xf0, /**< IEEE address, 8-byte (Digital) */
+       ZB_ZCL_128_BIT_SECURITY_KEY = 0xf1, /**< 128-bit security key, 16-byte (Digital) */
+} zb_zcl_data_type_e;
+
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @{
+ */
+
+/**
+ * @brief Zigbee Cluster IDs for reference.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_CLUSTER_BASIC = 0x0000, /**< Basic Cluster */
+       ZB_ZCL_CLUSTER_POWER_CONFIG = 0x0001, /**< Power Configuration Cluster */
+       ZB_ZCL_CLUSTER_DEVICE_TEMP = 0x0002, /**< Device Temperature Cluster */
+       ZB_ZCL_CLUSTER_IDENTIFY = 0x0003, /**< Identify Cluster */
+       ZB_ZCL_CLUSTER_GROUPS = 0x0004, /**< Group Cluster */
+       ZB_ZCL_CLUSTER_SCENES = 0x0005, /**< Scene Cluster */
+       ZB_ZCL_CLUSTER_ON_OFF = 0x0006, /**< On/Off Cluster */
+       ZB_ZCL_CLUSTER_ON_OFF_SWITCH_CONFIG  = 0x0007, /**< On/Off Switch Cluster */
+       ZB_ZCL_CLUSTER_LEVEL_CONTROL = 0x0008, /**< Level Control Cluster */
+       ZB_ZCL_CLUSTER_ALARM = 0x0009, /**< Alarm Cluster */
+       ZB_ZCL_CLUSTER_TIME = 0x000A, /**< Time Cluster */
+       ZB_ZCL_CLUSTER_RSSI_LOCATION = 0x000B, /**< RSSI Location Cluster */
+       ZB_ZCL_CLUSTER_BINARY_INPUT_BASIC = 0x000F, /**< Binary Input Basic Cluster */
+       ZB_ZCL_CLUSTER_COMMISSIONING = 0x0015, /**< Commissioning Cluster */
+       ZB_ZCL_CLUSTER_PARTITION = 0x0016, /**< Partition Cluster */
+       ZB_ZCL_CLUSTER_OTA_BOOTLOAD = 0x0019, /**< OTA Bootload Cluster */
+       ZB_ZCL_CLUSTER_POWER_PROFILE = 0x001A, /**< Power Profile Cluster */
+       ZB_ZCL_CLUSTER_APPLIANCE_CONTROL = 0x001B, /**< Application Control Cluster */
+       ZB_ZCL_CLUSTER_POLL_CONTROL = 0x0020, /**< Poll Control Cluster */
+       ZB_ZCL_CLUSTER_SHADE_CONFIG = 0x0100, /**< Shade Config Cluster */
+       ZB_ZCL_CLUSTER_DOOR_LOCK = 0x0101, /**< Door Lock Cluster */
+       ZB_ZCL_CLUSTER_WINDOW_COVERING = 0x0102, /**< Window Covering Cluster */
+       ZB_ZCL_CLUSTER_PUMP_CONFIG_CONTROL = 0x0200, /**< Pump Configuration Cluster */
+       ZB_ZCL_CLUSTER_THERMOSTAT = 0x0201, /**< Thermostat Cluster */
+       ZB_ZCL_CLUSTER_FAN_CONTROL = 0x0202, /**< Fan Control Cluster */
+       ZB_ZCL_CLUSTER_DEHUMID_CONTROL = 0x0203, /**< Dehumid Control Cluster */
+       ZB_ZCL_CLUSTER_THERMOSTAT_UI_CONFIG = 0x0204, /**< Thermostat UI Cluster */
+       ZB_ZCL_CLUSTER_COLOR_CONTROL = 0x0300, /**< Color Control Cluster */
+       ZB_ZCL_CLUSTER_BALLAST_CONFIGURATION = 0x0301, /**< Ballast Configuration Cluster */
+       ZB_ZCL_CLUSTER_ILLUM_MEASUREMENT = 0x0400, /**< Illuminance Measurement Cluster */
+       ZB_ZCL_CLUSTER_ILLUM_LEVEL_SENSING = 0x0401, /**< Illuminance Level Sensing Cluster */
+       ZB_ZCL_CLUSTER_TEMP_MEASUREMENT = 0x0402, /**< Temperature Measurement Cluster */
+       ZB_ZCL_CLUSTER_PRESSURE_MEASUREMENT = 0x0403, /**< Pressure Measurement Cluster */
+       ZB_ZCL_CLUSTER_FLOW_MEASUREMENT = 0x0404, /**< Flow Measurement Cluster */
+       ZB_ZCL_CLUSTER_RELATIVE_HUMIDITY_MEASUREMENT = 0x0405, /**< Relative Humidity Measurement Cluster */
+       ZB_ZCL_CLUSTER_OCCUPANCY_SENSING = 0x0406, /**< Occupancy Sensing Cluster */
+       ZB_ZCL_CLUSTER_IAS_ZONE = 0x0500, /**< IAS Zone Cluster */
+       ZB_ZCL_CLUSTER_IAS_ACE = 0x0501, /**< IAS Ace Cluster */
+       ZB_ZCL_CLUSTER_IAS_WD = 0x0502, /**< IAS WD Cluster */
+       ZB_ZCL_CLUSTER_GENERIC_TUNNEL = 0x0600, /**< Generic Tunnel Cluster */
+       ZB_ZCL_CLUSTER_BACNET_PROTOCOL_TUNNEL = 0x0601, /**< Bacnet Protocol Tunnel Cluster */
+       ZB_ZCL_CLUSTER_11073_PROTOCOL_TUNNEL = 0x0614, /**< 11073 Protocol Tunnel Cluster */
+       ZB_ZCL_CLUSTER_ISO7816_PROTOCOL_TUNNEL = 0x0615, /**< ISO7816 Protocol Tunnel Cluster */
+       ZB_ZCL_CLUSTER_PRICE = 0x0700, /**< Price Cluster */
+       ZB_ZCL_CLUSTER_DEMAND_RESPONSE_LOAD_CONTROL = 0x0701, /**< Demand Response Load Control Cluster */
+       ZB_ZCL_CLUSTER_SIMPLE_METERING = 0x0702, /**< Simple Metering Cluster */
+       ZB_ZCL_CLUSTER_MESSAGING = 0x0703, /**< Messaging Cluster */
+       ZB_ZCL_CLUSTER_TUNNELING = 0x0704, /**< Tunneling Cluster */
+       ZB_ZCL_CLUSTER_PREPAYMENT = 0x0705, /**< Prepayment Cluster */
+       ZB_ZCL_CLUSTER_ENERGY_MANAGEMENT = 0x0706, /**< Energy Management Cluster */
+       ZB_ZCL_CLUSTER_TOU_CALENDAR = 0x0707, /**< Calendar Cluster */
+       ZB_ZCL_CLUSTER_DEVICE_MANAGEMENT = 0x0708, /**< Device Management Cluster */
+       ZB_ZCL_CLUSTER_EVENTS = 0x0709, /**< Events Cluster */
+       ZB_ZCL_CLUSTER_MDU_PAIRING = 0x070A, /**< MDU Paring Cluster */
+       ZB_ZCL_CLUSTER_KEY_ESTABLISHMENT = 0x0800, /**< Key Establishment Cluster */
+       ZB_ZCL_CLUSTER_INFORMATION = 0x0900, /**< Information Cluster */
+       ZB_ZCL_CLUSTER_DATA_SHARING = 0x0901, /**< Data Sharing Cluster */
+       ZB_ZCL_CLUSTER_GAMING = 0x0902, /**< Gaming Cluster */
+       ZB_ZCL_CLUSTER_DATA_RATE_CONTROL = 0x0903, /**< Data Rate Control Cluster */
+       ZB_ZCL_CLUSTER_VOICE_OVER_ZIGBEE = 0x0904, /**< Voice Over Zigbee Cluster */
+       ZB_ZCL_CLUSTER_CHATTING = 0x0905, /**< Chatting Cluster */
+       ZB_ZCL_CLUSTER_PAYMENT = 0x0A01, /**< Payment Cluster */
+       ZB_ZCL_CLUSTER_BILLING = 0x0A02, /**< Billing Cluster */
+       ZB_ZCL_CLUSTER_APPLIANCE_IDENTIFICATION = 0x0B00, /**< Appliance Identification Cluster */
+       ZB_ZCL_CLUSTER_METER_IDENTIFICATION = 0x0B01, /**< Meter Identification Cluster */
+       ZB_ZCL_CLUSTER_APPLIANCE_EVENTS_AND_ALERT = 0x0B02, /**< Appliance Events and Alert Cluster */
+       ZB_ZCL_CLUSTER_APPLIANCE_STATISTICS = 0x0B03, /**< Appliance Statistics Cluster */
+       ZB_ZCL_CLUSTER_ELECTRICAL_MEASUREMENT = 0x0B04, /**< Electrical Measurement Cluster */
+       ZB_ZCL_CLUSTER_DIAGNOSTICS = 0x0B05, /**< Diagnostics Cluster */
+       ZB_ZCL_CLUSTER_ZLL_COMMISSIONING = 0x1000, /**< ZLL Commissioning Cluster */
+} zb_zcl_cluster_ids_e;
+
+/**
+ * @brief Attribute types for cluster: Basic.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_VERSION = 0x0000, /**< Version */
+       ZB_ZCL_ATTR_APPLICATION_VERSION = 0x0001, /**< Application version */
+       ZB_ZCL_ATTR_STACK_VERSION = 0x0002, /**< Stack version */
+       ZB_ZCL_ATTR_HW_VERSION = 0x0003, /**< HW version */
+       ZB_ZCL_ATTR_MANUFACTURER_NAME = 0x0004, /**< Manufacturer name  */
+       ZB_ZCL_ATTR_MODEL_IDENTIFIER = 0x0005, /**< Model identifier */
+       ZB_ZCL_ATTR_DATE_CODE = 0x0006, /**< Date code */
+       ZB_ZCL_ATTR_POWER_SOURCE = 0x0007, /**< Power source */
+       ZB_ZCL_ATTR_APPLICATION_PROFILE_VERSION = 0x0008, /**< Application profile version */
+       ZB_ZCL_ATTR_LOCATION_DESCRIPTION = 0x0010, /**< Location description */
+       ZB_ZCL_ATTR_PHYSICAL_ENVIRONMENT = 0x0011, /**< Physical environment */
+       ZB_ZCL_ATTR_DEVICE_ENABLED = 0x0012, /**< Device enabled */
+       ZB_ZCL_ATTR_ALARM_MASK = 0x0013, /**< Alarm mask */
+       ZB_ZCL_ATTR_DISABLE_LOCAL_CONFIG = 0x0014, /**< Disable local config */
+       ZB_ZCL_ATTR_SW_BUILD_ID = 0x4000, /**< SW build id ((since zll-1.0-11-0037-10)) */
+} zb_zcl_attribute_basic_e;
+
+/**
+ * @brief Attribute types for cluster: Power Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_MAINS_VOLTAGE = 0x0000, /**< Mains voltage */
+       ZB_ZCL_ATTR_MAINS_FREQUENCY = 0x0001, /**< Mains frequency */
+       ZB_ZCL_ATTR_MAINS_ALARM_MASK = 0x0010, /**< Mains alarm mask */
+       ZB_ZCL_ATTR_MAINS_VOLTAGE_MIN_THRESHOLD = 0x0011, /**< Mains voltage min. threshold */
+       ZB_ZCL_ATTR_MAINS_VOLTAGE_MAX_THRESHOLD = 0x0012, /**< Mains voltage max. threshold  */
+       ZB_ZCL_ATTR_MAINS_VOLTAGE_DWELL_TRIP_POINT = 0x0013, /**< Mains voltage dwell trip point  */
+       ZB_ZCL_ATTR_BATTERY_VOLTAGE = 0x0020, /**< Battery voltage */
+       ZB_ZCL_ATTR_BATTERY_PERCENTAGE_REMAINING = 0x0021, /**< Battery percentage remaining (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_MANUFACTURER = 0x0030, /**< Battery manufacturer id  */
+       ZB_ZCL_ATTR_BATTERY_SIZE = 0x0031, /**< Battery size */
+       ZB_ZCL_ATTR_BATTERY_AHR_RATING = 0x0032, /**< Battery Ampere/Hr rating */
+       ZB_ZCL_ATTR_BATTERY_QUANTITY = 0x0033, /**< Battery quantity */
+       ZB_ZCL_ATTR_BATTERY_RATED_VOLTAGE = 0x0034, /**< Battery rated voltage */
+       ZB_ZCL_ATTR_BATTERY_ALARM_MASK = 0x0035, /**< Battery alarm mask */
+       ZB_ZCL_ATTR_BATTERY_VOLTAGE_MIN_THRESHOLD = 0x0036, /**< Battery voltage min. threshold */
+       ZB_ZCL_ATTR_BATTERY_VOLTAGE_THRESHOLD_1 = 0x0037, /**< Battery voltage threshold 1 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_VOLTAGE_THRESHOLD_2 = 0x0038, /**< Battery voltage threshold 2 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_VOLTAGE_THRESHOLD_3 = 0x0039, /**< Battery voltage threshold 3 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_PERCENTAGE_MIN_THRESHOLD = 0x003A, /**< Battery percentage min. threshold (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_PERCENTAGE_THRESHOLD_1 = 0x003B, /**< Battery percentage threshold 1 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_PERCENTAGE_THRESHOLD_2 = 0x003C, /**< Battery percentage threshold 2 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_PERCENTAGE_THRESHOLD_3 = 0x003D, /**< Battery percentage threshold 3 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_ALARM_STATE = 0x003E, /**< Battery alarm state (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_VOLTAGE = 0x0040, /**< Battery 2 voltage (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_PERCENTAGE_REMAINING = 0x0041, /**< Battery 2 percentage remaining (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_MANUFACTURER = 0x0050, /**< Battery 2 manufacturer (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_SIZE = 0x0051, /**< Battery 2 size  (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_AHR_RATING = 0x0052, /**< Battery 2 Ampere/Hr rating (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_QUANTITY = 0x0053, /**< Battery 2 quantity (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_RATED_VOLTAGE = 0x0054, /**< Battery 2 rated voltage (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_ALARM_MASK = 0x0055, /**< Battery 2 alarm mask (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_VOLTAGE_MIN_THRESHOLD = 0x0056, /**< Battery 2 voltage min. threshold (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_VOLTAGE_THRESHOLD_1 = 0x0057, /**< Battery 2 voltage threshold 1 (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_VOLTAGE_THRESHOLD_2 = 0x0058, /**< Battery 2 voltage threshold 2 (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_VOLTAGE_THRESHOLD_3 = 0x0059, /**< Battery 2 voltage threshold 3 (since ha-1.2-05-3520-29 */
+       ZB_ZCL_ATTR_BATTERY_2_PERCENTAGE_MIN_THRESHOLD = 0x005A, /**< Battery 2 percentage min. threshold (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_PERCENTAGE_THRESHOLD_1 = 0x005B, /**< Battery 2 percentage threshold 1 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_PERCENTAGE_THRESHOLD_2 = 0x005C, /**< Battery 2 percentage threshold 2 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_PERCENTAGE_THRESHOLD_3 = 0x005D, /**< Battery 2 percentage threshold 3 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_2_ALARM_STATE = 0x005E, /**< Battery 2 alarm state (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_VOLTAGE = 0x0060, /**< Battery 3 voltage (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_PERCENTAGE_REMAINING = 0x0061, /**< Battery 3 percentage remaining (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_MANUFACTURER = 0x0070, /**< Battery 3 manufacturer (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_SIZE = 0x0071, /**< Battery 3 size (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_AHR_RATING = 0x0072, /**< Battery 3 Ampere/Hr rating (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_QUANTITY = 0x0073, /**< Battery 3 quantity (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_RATED_VOLTAGE = 0x0074, /**< Battery 3 rated voltage (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_ALARM_MASK = 0x0075, /**< Battery 3 alarm mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_VOLTAGE_MIN_THRESHOLD = 0x0076, /**< Battery 3 voltage min. threshold (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_VOLTAGE_THRESHOLD_1 = 0x0077, /**< Battery 3 voltage threshold 1 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_VOLTAGE_THRESHOLD_2 = 0x0078, /**< Battery 3 voltage threshold 2 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_VOLTAGE_THRESHOLD_3 = 0x0079, /**< Battery 3 voltage threshold 3 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_PERCENTAGE_MIN_THRESHOLD = 0x007A, /**< Battery 3 percentage min. threshold (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_PERCENTAGE_THRESHOLD_1 = 0x007B, /**< Battery 3 percentage threshold 1 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_PERCENTAGE_THRESHOLD_2 = 0x007C, /**< Battery 3 percentage threshold 2 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_PERCENTAGE_THRESHOLD_3 = 0x007D, /**< Battery 3 percentage threshold 3 (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_BATTERY_3_ALARM_STATE = 0x007E, /**< Battery 3 alarm state (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_power_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Device Temperature Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_CURRENT_TEMPERATURE = 0x0000, /**< Current temperature */
+       ZB_ZCL_ATTR_MIN_TEMP_EXPERIENCED = 0x0001, /**< Min. temp. experienced */
+       ZB_ZCL_ATTR_MAX_TEMP_EXPERIENCED = 0x0002, /**< Max. temp. experienced */
+       ZB_ZCL_ATTR_OVER_TEMP_TOTAL_DWELL = 0x0003, /**< Over temp. total dwell mask */
+       ZB_ZCL_ATTR_DEVICE_TEMP_ALARM_MASK = 0x0010, /**< Device temp. alarm mask */
+       ZB_ZCL_ATTR_LOW_TEMP_THRESHOLD = 0x0011, /**< Low temp. threshold */
+       ZB_ZCL_ATTR_HIGH_TEMP_THRESHOLD = 0x0012, /**< High temp. threshold */
+       ZB_ZCL_ATTR_LOW_TEMP_DWELL_TRIP_POINT = 0x0013, /**< Low temp. dwell trip point */
+       ZB_ZCL_ATTR_HIGH_TEMP_DWELL_TRIP_POINT = 0x0014, /**< High temp. dwell trip point */
+} zb_zcl_attribute_device_temperature_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Identify.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_IDENTIFY_TIME = 0x0000, /**< Identity time */
+       ZB_ZCL_ATTR_COMMISSION_STATE = 0x0001, /**< Commission state */
+} zb_zcl_attribute_identify_e;
+
+/**
+ * @brief Attribute types for cluster: Groups.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_GROUP_NAME_SUPPORT = 0x0000, /**< Group name support */
+} zb_zcl_attribute_group_e;
+
+/**
+ * @brief Attribute types for cluster: Scenes.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_SCENE_COUNT = 0x0000, /**< Scene count */
+       ZB_ZCL_ATTR_CURRENT_SCENE = 0x0001, /**< Current scene */
+       ZB_ZCL_ATTR_CURRENT_GROUP = 0x0002, /**< Current group */
+       ZB_ZCL_ATTR_SCENE_VALID = 0x0003, /**< Scene valid */
+       ZB_ZCL_ATTR_SCENE_NAME_SUPPORT = 0x0004, /**< Scene name support */
+       ZB_ZCL_ATTR_LAST_CONFIGURED_BY = 0x0005, /**< Last configured by */
+} zb_zcl_attribute_scenes_e;
+
+/**
+ * @brief Attribute types for cluster: On/off.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ON_OFF = 0x0000, /**< On/off */
+       ZB_ZCL_ATTR_SAMPLE_MFG_SPECIFIC_TRANSITION_TIME = 0x0000, /**< Sample manufacturer specific transition time */
+       ZB_ZCL_ATTR_GLOBAL_SCENE_CONTROL = 0x4000, /**< Global scene control (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_ON_TIME = 0x4001, /**< On time (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_OFF_WAIT_TIME = 0x4002, /**< Off wait time (since zll-1.0-11-0037-10) */
+} zb_zcl_attribute_on_off_e;
+
+/**
+ * @brief Attribute types for cluster: On/off Switch Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_SWITCH_TYPE = 0x0000, /**< Switch type */
+       ZB_ZCL_ATTR_SWITCH_ACTIONS = 0x0010, /**< Switch actions */
+} zb_zcl_attribute_on_off_switch_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Level Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_CURRENT_LEVEL = 0x0000, /**< Current level */
+       ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME = 0x0001, /**< Level control remaining */
+       ZB_ZCL_ATTR_ON_OFF_TRANSITION_TIME = 0x0010, /**< On/off transition time */
+       ZB_ZCL_ATTR_ON_LEVEL = 0x0011, /**< On level */
+       ZB_ZCL_ATTR_ON_TRANSITION_TIME = 0x0012, /**< On transition time (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_OFF_TRANSITION_TIME = 0x0013, /**< Off transition time (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_DEFAULT_MOVE_RATE = 0x0014, /**< Default move rate (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_level_control_e;
+
+/**
+ * @brief Attribute types for cluster: Alarms.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ALARM_COUNT = 0x0000, /**< alarm count */
+} zb_zcl_attribute_alarms_e;
+
+/**
+ * @brief Attribute types for cluster: Time.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_TIME = 0x0000, /**< Time */
+       ZB_ZCL_ATTR_TIME_STATUS = 0x0001, /**< Time status */
+       ZB_ZCL_ATTR_TIME_ZONE = 0x0002, /**< Time zone */
+       ZB_ZCL_ATTR_DST_START = 0x0003, /**< the daylight start time(DST) in seconds. The value 0xffffffff indicates an invalid DST start time.*/
+       ZB_ZCL_ATTR_DST_END = 0x0004, /**< DST end time in seconds. The value 0xffffffff indicates an invalid DST end time. */
+       ZB_ZCL_ATTR_DST_SHIFT = 0x0005, /**< Time shift. This represents a signed offset in seconds from the standard time, to be applied between the times #ZB_ZCL_ATTR_DST_START and ZB_ZCL_ATTR_DST_END to calculate the Local Time */
+       ZB_ZCL_ATTR_STANDARD_TIME = 0x0006, /**< Standard time. The value 0xffffffff indicates an invalid Standard Time. */
+       ZB_ZCL_ATTR_LOCAL_TIME = 0x0007, /**< Local time. The value 0xffffffff indicates an invalid Local Time. */
+       ZB_ZCL_ATTR_LAST_SET_TIME = 0x0008, /**< The most recent time that the Time attribute was set, either internally or over the ZigBee network. The value 0xffffffff indicates an invalid lst set Time*/
+       ZB_ZCL_ATTR_VALID_UNTIL_TIME = 0x0009, /**< Valid until time indicates a time, later than LastSetTime, up to which the Time attribute may be trusted. 'Trusted' means that the difference between the Time attribute and the true UTC time is less than an acceptable error. */
+} zb_zcl_attribute_time_e;
+
+/**
+ * @brief Attribute types for cluster: RSSI Location.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_LOCATION_TYPE = 0x0000, /**< Location type */
+       ZB_ZCL_ATTR_LOCATION_METHOD = 0x0001, /**< Location method */
+       ZB_ZCL_ATTR_LOCATION_AGE = 0x0002, /**< Location age */
+       ZB_ZCL_ATTR_QUALITY_MEASURE = 0x0003, /**< Quality measure */
+       ZB_ZCL_ATTR_NUMBER_OF_DEVICES = 0x0004, /**< Number of devices */
+       ZB_ZCL_ATTR_COORDINATE1 = 0x0010, /**< Coordinate 1 */
+       ZB_ZCL_ATTR_COORDINATE2 = 0x0011, /**< Coordinate 2 */
+       ZB_ZCL_ATTR_COORDINATE3 = 0x0012, /**< Coordinate 3 */
+       ZB_ZCL_ATTR_POWER = 0x0013, /**< Power */
+       ZB_ZCL_ATTR_PATH_LOSS_EXPONENT = 0x0014, /**< Path loss exponent */
+       ZB_ZCL_ATTR_REPORTING_PERIOD = 0x0015, /**< Reporting period */
+       ZB_ZCL_ATTR_CALCULATION_PERIOD = 0x0016, /**< Calculation period */
+       ZB_ZCL_ATTR_NUMBER_OF_RSSI_MEASUREMENTS = 0x0017, /**< Number of RSSI measurements */
+} zb_zcl_attribute_rssi_location_e;
+
+/**
+ * @brief Attribute types for cluster: Binary Input (Basic).
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ACTIVE_TEXT = 0x0004, /**< Active text */
+       ZB_ZCL_ATTR_DESCRIPTION = 0x001C, /**< Description */
+       ZB_ZCL_ATTR_INACTIVE_TEXT = 0x002E, /**< Inactive text */
+       ZB_ZCL_ATTR_OUT_OF_SERVICE = 0x0051, /**< Out of service */
+       ZB_ZCL_ATTR_POLARITY = 0x0054, /**< Polarity */
+       ZB_ZCL_ATTR_PRESENT_VALUE = 0x0055, /**< Present value */
+       ZB_ZCL_ATTR_RELIABILITY = 0x0067, /**< Reliability */
+       ZB_ZCL_ATTR_STATUS_FLAGS = 0x006F, /**< Status flag */
+       ZB_ZCL_ATTR_APPLICATION_TYPE = 0x0100, /**< Application type */
+} zb_zcl_attribute_binary_input_basic_e;
+
+/**
+ * @brief Attribute types for cluster: Commissioning.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_SHORT_ADDRESS = 0x0000, /**< Short address */
+       ZB_ZCL_ATTR_EXTENDED_PAN_ID = 0x0001, /**< Extended PAN ID */
+       ZB_ZCL_ATTR_PAN_ID = 0x0002, /**< PAN ID */
+       ZB_ZCL_ATTR_CHANNEL_MASK = 0x0003, /**< Channel mask */
+       ZB_ZCL_ATTR_PROTOCOL_VERSION = 0x0004, /**< Protocol version */
+       ZB_ZCL_ATTR_STACK_PROFILE = 0x0005, /**< Stack profile */
+       ZB_ZCL_ATTR_STARTUP_CONTROL = 0x0006, /**< Startup control */
+       ZB_ZCL_ATTR_TRUST_CENTER_ADDRESS = 0x0010, /**< Trust center address */
+       ZB_ZCL_ATTR_TRUST_CENTER_MASTER_KEY = 0x0011, /**< Trust center master key */
+       ZB_ZCL_ATTR_NETWORK_KEY = 0x0012, /**< Network key */
+       ZB_ZCL_ATTR_USE_INSECURE_JOIN = 0x0013, /**< Use insecure join */
+       ZB_ZCL_ATTR_PRECONFIGURED_LINK_KEY = 0x0014, /**< Preconfigured link key */
+       ZB_ZCL_ATTR_NETWORK_KEY_SEQUENCE_NUMBER = 0x0015, /**< Network key sequence number */
+       ZB_ZCL_ATTR_NETWORK_KEY_TYPE = 0x0016, /**< Network key type */
+       ZB_ZCL_ATTR_NETWORK_MANAGER_ADDRESS = 0x0017, /**< Network manager address */
+       ZB_ZCL_ATTR_SCAN_ATTEMPTS = 0x0020, /**< Scan attempts */
+       ZB_ZCL_ATTR_TIME_BETWEEN_SCANS = 0x0021, /**< Time between scans */
+       ZB_ZCL_ATTR_REJOIN_INTERVAL = 0x0022, /**< Re-join interval */
+       ZB_ZCL_ATTR_MAX_REJOIN_INTERVAL = 0x0023, /**< Max re-join interval */
+       ZB_ZCL_ATTR_INDIRECT_POLL_RATE = 0x0030, /**< Indirect poll rate */
+       ZB_ZCL_ATTR_PARENT_RETRY_THRESHOLD = 0x0031, /**< Parent retry threshold */
+       ZB_ZCL_ATTR_CONCENTRATOR_FLAG = 0x0040, /**< Concentrator flag */
+       ZB_ZCL_ATTR_CONCENTRATOR_RADIUS = 0x0041, /**< Concentrator radius */
+       ZB_ZCL_ATTR_CONCENTRATOR_DISCOVERY_TIME = 0x0042, /**< Concentrator discovery time */
+} zb_zcl_attribute_commissioning_e;
+
+/**
+ * @brief Attribute types for cluster: Partition.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_PARTITIONED_MAXIMUM_INCOMING_TRANSFER_SIZE = 0x0000, /**< Partitioned maximum incoming transfer size */
+       ZB_ZCL_ATTR_PARTITIONED_MAXIMUM_OUTGOING_TRANSFER_SIZE = 0x0001, /**< Partitioned maximum outgoing transfer size */
+       ZB_ZCL_ATTR_PARTITIONED_FRAME_SIZE = 0x0002, /**< Partitioned frame size */
+       ZB_ZCL_ATTR_LARGE_FRAME_SIZE = 0x0003, /**< Large frame size */
+       ZB_ZCL_ATTR_NUMBER_OF_ACK_FRAME = 0x0004, /**< Number of ACK frame */
+       ZB_ZCL_ATTR_NACK_TIMEOUT = 0x0005, /**< NACK timeout */
+       ZB_ZCL_ATTR_INTERFRAME_DELAY = 0x0006, /**< Interframe delay */
+       ZB_ZCL_ATTR_NUMBER_OF_SEND_RETRIES = 0x0007, /**< Number of send retries */
+       ZB_ZCL_ATTR_SENDER_TIMEOUT = 0x0008, /**< Sender timeout */
+       ZB_ZCL_ATTR_RECEIVER_TIMEOUT = 0x0009, /**< Receiver timeout */
+} zb_zcl_attribute_partition_e;
+
+/**
+ * @brief Attribute types for cluster: Over the Air Bootloading.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_UPGRADE_SERVER_ID = 0x0000, /**< Upgrade server ID */
+       ZB_ZCL_ATTR_FILE_OFFSET = 0x0001, /**< File offset */
+       ZB_ZCL_ATTR_CURRENT_FILE_VERSION = 0x0002, /**< Current file version */
+       ZB_ZCL_ATTR_CURRENT_ZIGBEE_STACK_VERSION = 0x0003, /**< Current Zigbee stack version */
+       ZB_ZCL_ATTR_DOWNLOADED_FILE_VERSION = 0x0004, /**< Downloaded file version */
+       ZB_ZCL_ATTR_DOWNLOADED_ZIGBEE_STACK_VERSION = 0x0005, /**< Downloaded Zigbee stack version */
+       ZB_ZCL_ATTR_IMAGE_UPGRADE_STATUS = 0x0006, /**< Image upgrade status */
+       ZB_ZCL_ATTR_MANUFACTURER_ID = 0x0007, /**< Manufacturer ID */
+       ZB_ZCL_ATTR_IMAGE_TYPE_ID = 0x0008, /**< Image type ID */
+       ZB_ZCL_ATTR_MINIMUM_BLOCK_REQUEST_PERIOD = 0x0009, /**< Minimum block request period (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_IMAGE_STAMP = 0x000A, /**< Image stamp (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_over_the_air_bootloading_client_attributes_e;
+
+/**
+ * @brief Attribute types for cluster: Power Profile.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_TOTAL_PROFILE_NUM = 0x0000, /**< Total profile number */
+       ZB_ZCL_ATTR_MULTIPLE_SCHEDULING = 0x0001, /**< Multiple scheduling */
+       ZB_ZCL_ATTR_ENERGY_FORMATTING = 0x0002, /**< Energy formatting */
+       ZB_ZCL_ATTR_ENERGY_REMOTE = 0x0003, /**< Energy remote */
+       ZB_ZCL_ATTR_SCHEDULE_MODE = 0x0004, /**< Schedule mode */
+} zb_zcl_attribute_power_profile_e;
+
+/**
+ * @brief Attribute types for cluster: Appliance Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_START_TIME = 0x0000, /**< Start time */
+       ZB_ZCL_ATTR_FINISH_TIME = 0x0001, /**< Finish time */
+       ZB_ZCL_ATTR_REMAINING_TIME = 0x0002, /**< Remaining time */
+} zb_zcl_attribute_appliance_control_e;
+
+/**
+ * @brief Attribute types for cluster: Poll Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_CHECK_IN_INTERVAL = 0x0000, /**< Check-in interval */
+       ZB_ZCL_ATTR_LONG_POLL_INTERVAL = 0x0001, /**< Long poll interval */
+       ZB_ZCL_ATTR_SHORT_POLL_INTERVAL = 0x0002, /**< Short poll interval */
+       ZB_ZCL_ATTR_FAST_POLL_TIMEOUT = 0x0003, /**< Fast poll interval */
+       ZB_ZCL_ATTR_CHECK_IN_INTERVAL_MIN = 0x0004, /**< Check-in interval min. */
+       ZB_ZCL_ATTR_LONG_POLL_INTERVAL_MIN = 0x0005, /**< Long poll interval min. */
+       ZB_ZCL_ATTR_FAST_POLL_TIMEOUT_MAX = 0x0006, /**< Fast poll interval max. */
+} zb_zcl_attribute_poll_control_e;
+
+/**
+ * @brief Attribute types for cluster: Shade Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_SHADE_CONFIG_PHYSICAL_CLOSED_LIMIT = 0x0000, /**< Shade config physical close limit */
+       ZB_ZCL_ATTR_SHADE_CONFIG_MOTOR_STEP_SIZE = 0x0001, /**< Shade config motor step size */
+       ZB_ZCL_ATTR_SHADE_CONFIG_STATUS = 0x0002, /**< Shade config status */
+       ZB_ZCL_ATTR_SHADE_CONFIG_CLOSED_LIMIT = 0x0010, /**< Shade config close limit */
+       ZB_ZCL_ATTR_SHADE_CONFIG_MODE = 0x0011, /**< Shade config mode */
+} zb_zcl_attribute_shade_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Door Lock.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_LOCK_STATE = 0x0000, /**< Lock state */
+       ZB_ZCL_ATTR_LOCK_TYPE = 0x0001, /**< Lock type */
+       ZB_ZCL_ATTR_ACTUATOR_ENABLED = 0x0002, /**< Actuator enabled */
+       ZB_ZCL_ATTR_DOOR_STATE = 0x0003, /**< Door state */
+       ZB_ZCL_ATTR_DOOR_OPEN_EVENTS = 0x0004, /**< Door open event */
+       ZB_ZCL_ATTR_DOOR_CLOSED_EVENTS = 0x0005, /**< Door closed event */
+       ZB_ZCL_ATTR_OPEN_PERIOD = 0x0006, /**< Open period */
+       ZB_ZCL_ATTR_NUM_LOCK_RECORDS_SUPPORTED = 0x0010, /**< Number of lock records supported (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_TOTAL_USERS_SUPPORTED = 0x0011, /**< Number of total users supported (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_PIN_USERS_SUPPORTED = 0x0012, /**< Number of PIN users supported (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_RFID_USERS_SUPPORTED = 0x0013, /**< Number of RFID users supported (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_WEEKDAY_SCHEDULES_SUPPORTED_PER_USER = 0x0014, /**< Number of weekday schedules supported per user (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_YEARDAY_SCHEDULES_SUPPORTED_PER_USER = 0x0015, /**< Number of yearday schedules supported per user (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUM_HOLIDAY_SCHEDULES_SUPPORTED_PER_USER = 0x0016, /**< Number of holiday schedules supported per user (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_MAX_PIN_LENGTH = 0x0017, /**< Max. PIN length (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_MIN_PIN_LENGTH = 0x0018, /**< Min. PIN length (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_MAX_RFID_CODE_LENGTH = 0x0019, /**< Max. RFID code length (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_MIN_RFID_CODE_LENGTH = 0x001A, /**< Min. RFID code length (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ENABLE_LOGGING = 0x0020, /**< Enable logging (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_LANGUAGE = 0x0021, /**< Language (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_LED_SETTINGS = 0x0022, /**< LED settings (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AUTO_RELOCK_TIME = 0x0023, /**< Auto relock time (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SOUND_VOLUME = 0x0024, /**< Sound volume (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_OPERATING_MODE = 0x0025, /**< Operating mode (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SUPPORTED_OPERATING_MODES = 0x0026, /**< Supported operating modes (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_DEFAULT_CONFIGURATION_REGISTER = 0x0027, /**< Default configuration register (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ENABLE_LOCAL_PROGRAMMING = 0x0028, /**< Enable local programming (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ENABLE_ONE_TOUCH_LOCKING = 0x0029, /**< Enable one touch locking (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ENABLE_INSIDE_STATUS_LED = 0x002A, /**< Enable inside status LED (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ENABLE_PRIVACY_MODE_BUTTON = 0x002B, /**< Enable privacy mode button (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_WRONG_CODE_ENTRY_LIMIT = 0x0030, /**< Wrong code entry limit (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_USER_CODE_TEMPORARY_DISABLE_TIME = 0x0031, /**< User code temporary disable time (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SEND_PIN_OVER_THE_AIR = 0x0032, /**< Send PIN Over-The-Air (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_REQUIRE_PIN_FOR_RF_OPERATION = 0x0033, /**< Require PIN for RF operation (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_ZIGBEE_SECURITY_LEVEL = 0x0034, /**< Zigbee security level (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_DOOR_LOCK_ALARM_MASK = 0x0040, /**< Door lock alarm mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_KEYPAD_OPERATION_EVENT_MASK = 0x0041, /**< Keypad operation event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_RF_OPERATION_EVENT_MASK = 0x0042, /**< RF operation event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_MANUAL_OPERATION_EVENT_MASK = 0x0043, /**< Manual operation event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_RFID_OPERATION_EVENT_MASK = 0x0044, /**< RFID operation event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_KEYPAD_PROGRAMMING_EVENT_MASK = 0x0045, /**< Keypad programming event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_RF_PROGRAMMING_EVENT_MASK = 0x0046, /**< RF programming event mask (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_RFID_PROGRAMMING_EVENT_MASK = 0x0047, /**< RFID programming event mask (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_door_lock_e;
+
+/**
+ * @brief Attribute types for cluster: Window Covering.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_COVERING_TYPE = 0x0000, /**< Covering type */
+       ZB_ZCL_ATTR_LIMIT_LIFT = 0x0001, /**< Limit lift */
+       ZB_ZCL_ATTR_LIMIT_TILT = 0x0002, /**< Limit tilt */
+       ZB_ZCL_ATTR_CURRENT_LIFT = 0x0003, /**< Current lift */
+       ZB_ZCL_ATTR_CURRENT_TILT = 0x0004, /**< Current tilt */
+       ZB_ZCL_ATTR_NUMBER_LIFT = 0x0005, /**< Number lift */
+       ZB_ZCL_ATTR_NUMBER_TILT = 0x0006, /**< Number tilt */
+       ZB_ZCL_ATTR_CONFIG_STATUS = 0x0007, /**< Config status */
+       ZB_ZCL_ATTR_CURRENT_LIFT_PERCENTAGE = 0x0008, /**< Current lift percentage */
+       ZB_ZCL_ATTR_CURRENT_TILT_PERCENTAGE = 0x0009, /**< Current tilt percentage */
+       ZB_ZCL_ATTR_OPEN_LIMIT_LIFT = 0x0010, /**< Open limit lift */
+       ZB_ZCL_ATTR_CLOSED_LIMIT_LIFT = 0x0011, /**< Closed limit lift */
+       ZB_ZCL_ATTR_OPEN_LIMIT_TILT = 0x0012, /**< Open limit tilt */
+       ZB_ZCL_ATTR_CLOSED_LIMIT_TILT = 0x0013, /**< Closed limit tilt */
+       ZB_ZCL_ATTR_VELOCITY_LIFT = 0x0014, /**< Velocity lift */
+       ZB_ZCL_ATTR_ACCELERATION_LIFT = 0x0015, /**< Acceleration lift */
+       ZB_ZCL_ATTR_DECELERATION_LIFT = 0x0016, /**< Deceleration lift */
+       ZB_ZCL_ATTR_MODE = 0x0017, /**< Mode */
+       ZB_ZCL_ATTR_SETPOINTS_LIFT = 0x0018, /**< Setpoints lift */
+       ZB_ZCL_ATTR_SETPOINTS_TILT = 0x0019, /**< Setpoints tilt */
+} zb_zcl_attribute_window_covering_e;
+
+/**
+ * @brief Attribute types for cluster: Pump Configuration and Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_MAX_PRESSURE = 0x0000, /**< Max. pressure */
+       ZB_ZCL_ATTR_MAX_SPEED = 0x0001, /**< Max. speed */
+       ZB_ZCL_ATTR_MAX_FLOW = 0x0002, /**< Max. flow */
+       ZB_ZCL_ATTR_MIN_CONST_PRESSURE = 0x0003, /**< Min. const. pressure */
+       ZB_ZCL_ATTR_MAX_CONST_PRESSURE = 0x0004, /**< Max. const. pressure */
+       ZB_ZCL_ATTR_MIN_COMP_PRESSURE = 0x0005, /**< Min. comp pressure */
+       ZB_ZCL_ATTR_MAX_COMP_PRESSURE = 0x0006, /**< Max. comp pressure */
+       ZB_ZCL_ATTR_MIN_CONST_SPEED = 0x0007, /**< Min. const. speed */
+       ZB_ZCL_ATTR_MAX_CONST_SPEED = 0x0008, /**< Max. const. speed */
+       ZB_ZCL_ATTR_MIN_CONST_FLOW = 0x0009, /**< Min. const. flow */
+       ZB_ZCL_ATTR_MAX_CONST_FLOW = 0x000A, /**< Max const. flow */
+       ZB_ZCL_ATTR_MIN_CONST_TEMP = 0x000B, /**< Min. const. temperature */
+       ZB_ZCL_ATTR_MAX_CONST_TEMP = 0x000C, /**< Max. const. temperature */
+       ZB_ZCL_ATTR_PUMP_STATUS = 0x0010, /**< Pump status */
+       ZB_ZCL_ATTR_EFFECTIVE_OPERATION_MODE = 0x0011, /**< Effective operation mode */
+       ZB_ZCL_ATTR_EFFECTIVE_CONTROL_MODE = 0x0012, /**< Effective control mode */
+       ZB_ZCL_ATTR_CAPACITY = 0x0013, /**< Capacity */
+       ZB_ZCL_ATTR_SPEED = 0x0014, /**< Speed */
+       ZB_ZCL_ATTR_LIFETIME_RUNNING_HOURS = 0x0015, /**< Lifetime running hours */
+       ZB_ZCL_ATTR_PUMP_POWER = 0x0016, /**< Pump power */
+       ZB_ZCL_ATTR_LIFETIME_ENERGY_CONSUMED = 0x0017, /**< Lifetime energy consumed */
+       ZB_ZCL_ATTR_OPERATION_MODE = 0x0020, /**< Operation mode */
+       ZB_ZCL_ATTR_CONTROL_MODE = 0x0021, /**< Control mode */
+       ZB_ZCL_ATTR_PUMP_ALARM_MASK = 0x0022, /**< Pump alarm mask */
+} zb_zcl_attribute_pump_configuration_and_control_e;
+
+/**
+ * @brief Attribute types for cluster: Thermostat.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_LOCAL_TEMPERATURE = 0x0000, /**< Local temperature */
+       ZB_ZCL_ATTR_OUTDOOR_TEMPERATURE = 0x0001, /**< Outdoor temperature */
+       ZB_ZCL_ATTR_THERMOSTAT_OCCUPANCY = 0x0002, /**< Thermostat occupancy */
+       ZB_ZCL_ATTR_ABS_MIN_HEAT_SETPOINT_LIMIT = 0x0003, /**< Abs. min. heat setpoint limit */
+       ZB_ZCL_ATTR_ABS_MAX_HEAT_SETPOINT_LIMIT = 0x0004, /**< Abs. max. heat setpoint limit */
+       ZB_ZCL_ATTR_ABS_MIN_COOL_SETPOINT_LIMIT = 0x0005, /**< Abs. min. cool setpoint limit */
+       ZB_ZCL_ATTR_ABS_MAX_COOL_SETPOINT_LIMIT = 0x0006, /**< Abs. max. cool setpoint limit */
+       ZB_ZCL_ATTR_PI_COOLING_DEMAND = 0x0007, /**< PI cooling demand */
+       ZB_ZCL_ATTR_PI_HEATING_DEMAND = 0x0008, /**< PI heating demand */
+       ZB_ZCL_ATTR_HVAC_SYSTEM_TYPE_CONFIGURATION = 0x0009, /**< HVAC system type configuration (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_LOCAL_TEMPERATURE_CALIBRATION = 0x0010, /**< Local temperature calibration */
+       ZB_ZCL_ATTR_OCCUPIED_COOLING_SETPOINT = 0x0011, /**< Occupied cooling setpoint */
+       ZB_ZCL_ATTR_OCCUPIED_HEATING_SETPOINT = 0x0012, /**< Occupied heating setpoint */
+       ZB_ZCL_ATTR_UNOCCUPIED_COOLING_SETPOINT = 0x0013, /**< Unoccupied cooling setpoint */
+       ZB_ZCL_ATTR_UNOCCUPIED_HEATING_SETPOINT = 0x0014, /**< Unoccupied heating setpoint */
+       ZB_ZCL_ATTR_MIN_HEAT_SETPOINT_LIMIT = 0x0015, /**< Min. heat setpoint limit */
+       ZB_ZCL_ATTR_MAX_HEAT_SETPOINT_LIMIT = 0x0016, /**< Max. heat setpoint limit */
+       ZB_ZCL_ATTR_MIN_COOL_SETPOINT_LIMIT = 0x0017, /**< Min. cool setpoint limit */
+       ZB_ZCL_ATTR_MAX_COOL_SETPOINT_LIMIT = 0x0018, /**< Max. cool setpoint limit */
+       ZB_ZCL_ATTR_MIN_SETPOINT_DEAD_BAND = 0x0019, /**< Min. setpoint dead band */
+       ZB_ZCL_ATTR_REMOTE_SENSING = 0x001A, /**< Remote sensing */
+       ZB_ZCL_ATTR_CONTROL_SEQUENCE_OF_OPERATION = 0x001B, /**< Control sequence of operation */
+       ZB_ZCL_ATTR_SYSTEM_MODE = 0x001C, /**< System mode */
+       ZB_ZCL_ATTR_THERMOSTAT_ALARM_MASK = 0x001D, /**< Thermostat alarm mask */
+       ZB_ZCL_ATTR_THERMOSTAT_RUNNING_MODE = 0x001E, /**< Thermostat running mode (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_START_OF_WEEK = 0x0020, /**< Smart of week (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUMBER_OF_WEEKLY_TRANSITIONS = 0x0021, /**< Number of weekly transitions (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_NUMBER_OF_DAILY_TRANSITIONS = 0x0022, /**< Number of daily transition (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_TEMPERATURE_SETPOINT_HOLD = 0x0023, /**< Temperature setpoint hold (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_TEMPERATURE_SETPOINT_HOLD_DURATION = 0x0024, /**< Temperature setpoint hold duration mode (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_THERMOSTAT_PROGRAMMING_OPERATION_MODE = 0x0025, /**< Thermostat programming operation mode (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_THERMOSTAT_RUNNING_STATE = 0x0029, /**< Thermostat running state (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SETPOINT_CHANGE_SOURCE = 0x0030, /**< Setpoint change source (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SETPOINT_CHANGE_AMOUNT = 0x0031, /**< Setpoint change amount (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_SETPOINT_CHANGE_SOURCE_TIMESTAMP = 0x0032, /**< Setpoint change source timestamp (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_TYPE = 0x0040, /**< AC type (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_CAPACITY = 0x0041, /**< AC capacity (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_REFRIGERANT_TYPE = 0x0042, /**< AC refrigerant type (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_COMPRESSOR = 0x0043, /**< AC compressor (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_ERROR_CODE = 0x0044, /**< AC error mode (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_LOUVER_POSITION = 0x0045, /**< AC louver position (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_COIL_TEMPERATURE = 0x0046, /**< AC coil temperature (since ha-1.2-05-3520-29) */
+       ZB_ZCL_ATTR_AC_CAPACITY_FORMAT = 0x0047, /**< AC capacity format (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_thermostat_e;
+
+/**
+ * @brief Attribute types for cluster: Fan Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_FAN_CONTROL_FAN_MODE = 0x0000, /**< Fan mode */
+       ZB_ZCL_ATTR_FAN_CONTROL_FAN_MODE_SEQUENCE = 0x0001, /**< Fan mode sequence */
+} zb_zcl_attribute_fan_control_e;
+
+/**
+ * @brief Attribute types for cluster: Dehumidification Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY = 0x0000, /**< Relative humidity */
+       ZB_ZCL_ATTR_DEHUMIDIFICATION_COOLING = 0x0001, /**< Dehumidification cooling */
+       ZB_ZCL_ATTR_RH_DEHUMIDIFICATION_SETPOINT = 0x0010, /**< RH dehumidification setpoint */
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_MODE = 0x0011, /**< Relative humidity mode */
+       ZB_ZCL_ATTR_DEHUMIDIFICATION_LOCKOUT = 0x0012, /**< Dehumidification lockout */
+       ZB_ZCL_ATTR_DEHUMIDIFICATION_HYSTERESIS = 0x0013, /**< Dehumidification hysteresis */
+       ZB_ZCL_ATTR_DEHUMIDIFICATION_MAX_COOL = 0x0014, /**< Dehumidification max. cool */
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_DISPLAY = 0x0015, /**< Relative humidity display */
+} zb_zcl_attribute_dehumidification_control_attributes_e;
+
+/**
+ * @brief Attribute types for cluster: Thermostat User Interface Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_TEMPERATURE_DISPLAY_MODE = 0x0000, /**< Temperature display mode */
+       ZB_ZCL_ATTR_KEYPAD_LOCKOUT = 0x0001, /**< Keypad lockout */
+       ZB_ZCL_ATTR_SCHEDULE_PROGRAMMING_VISIBILITY = 0x0002, /**< Schedule programming visibility (since ha-1.2-05-3520-29) */
+} zb_zcl_attribute_thermostat_user_interface_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Color Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_HUE = 0x0000, /**< Current hue */
+       ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_SATURATION = 0x0001, /**< Current saturation */
+       ZB_ZCL_ATTR_COLOR_CONTROL_REMAINING_TIME = 0x0002, /**< Remaining time */
+       ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_X = 0x0003, /**< Current x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_Y = 0x0004, /**< Current y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_DRIFT_COMPENSATION = 0x0005, /**< Drift compensation */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COMPENSATION_TEXT = 0x0006, /**< Compensation text */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMPERATURE = 0x0007, /**< Color temperature */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_MODE = 0x0008, /**< Color mode */
+       ZB_ZCL_ATTR_COLOR_CONTROL_NUMBER_OF_PRIMARIES = 0x0010, /**< Number of primaries */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_1_X = 0x0011, /**< Primary 1 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_1_Y = 0x0012, /**< Primary 1 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_1_INTENSITY = 0x0013, /**< Primary 1 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_2_X = 0x0015, /**< Primary 2 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_2_Y = 0x0016, /**< Primary 2 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_2_INTENSITY = 0x0017, /**< Primary 2 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_3_X = 0x0019, /**< Primary 3 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_3_Y = 0x001A, /**< Primary 3 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_3_INTENSITY = 0x001B, /**< Primary 3 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_4_X = 0x0020, /**< Primary 4 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_4_Y = 0x0021, /**< Primary 4 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_4_INTENSITY = 0x0022, /**< Primary 4 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_5_X = 0x0024, /**< Primary 5 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_5_Y = 0x0025, /**< Primary 5 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_5_INTENSITY = 0x0026, /**< Primary 5 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_6_X = 0x0028, /**< Primary 6 x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_6_Y = 0x0029, /**< Primary 6 y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_PRIMARY_6_INTENSITY = 0x002A, /**< Primary 6 intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_WHITE_POINT_X = 0x0030, /**< White point x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_WHITE_POINT_Y = 0x0031, /**< White point y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_R_X = 0x0032, /**< Color point R x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_R_Y = 0x0033, /**< Color point R y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_R_INTENSITY = 0x0034, /**< Color point R intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_G_X = 0x0036, /**< Color point G x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_G_Y = 0x0037, /**< Color point G y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_G_INTENSITY = 0x0038, /**< Color point G intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_B_X = 0x003A, /**< Color point B x */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_B_Y = 0x003B, /**< Color point B y */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_POINT_B_INTENSITY = 0x003C, /**< Color point B intensity */
+       ZB_ZCL_ATTR_COLOR_CONTROL_ENHANCED_CURRENT_HUE = 0x4000, /**< Enhanced current hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_ENHANCED_COLOR_MODE = 0x4001, /**< Enhanced color mode (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_ACTIVE = 0x4002, /**< Color loop active (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_DIRECTION = 0x4003, /**< Color loop direction (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_TIME = 0x4004, /**< Color loop time (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_START_ENHANCED_HUE = 0x4005, /**< Color start enhanced hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_LOOP_STORED_ENHANCED_HUE = 0x4006, /**< Color loop stored enhanced hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_CAPABILITIES = 0x400A, /**< Color capabilities (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MIN = 0x400B, /**< Color temp. physical min. (since zll-1.0-11-0037-10) */
+       ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_TEMP_PHYSICAL_MAX = 0x400C, /**< Color temp. physical max. (since zll-1.0-11-0037-10) */
+} zb_zcl_attribute_color_control_e;
+
+/**
+ * @brief Attribute types for cluster: Ballast Configuration.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_PHYSICAL_MIN_LEVEL = 0x0000, /**< Physical min. level */
+       ZB_ZCL_ATTR_PHYSICAL_MAX_LEVEL = 0x0001, /**< Physical max. level */
+       ZB_ZCL_ATTR_BALLAST_STATUS = 0x0002, /**< Ballast status */
+       ZB_ZCL_ATTR_MIN_LEVEL = 0x0010, /**< Min. level */
+       ZB_ZCL_ATTR_MAX_LEVEL = 0x0011, /**< Max. level */
+       ZB_ZCL_ATTR_POWER_ON_LEVEL = 0x0012, /**< Power on level */
+       ZB_ZCL_ATTR_POWER_ON_FADE_TIME = 0x0013, /**< Power on fade time */
+       ZB_ZCL_ATTR_INTRINSIC_BALLAST_FACTOR = 0x0014, /**< Intrinsic ballast factor */
+       ZB_ZCL_ATTR_BALLAST_FACTOR_ADJUSTMENT = 0x0015, /**< Ballast factor adjustment */
+       ZB_ZCL_ATTR_LAMP_QUALITY = 0x0020, /**< Lamp quality */
+       ZB_ZCL_ATTR_LAMP_TYPE = 0x0030, /**< Lamp type */
+       ZB_ZCL_ATTR_LAMP_MANUFACTURER = 0x0031, /**< Lamp manufacturer */
+       ZB_ZCL_ATTR_LAMP_RATED_HOURS = 0x0032, /**< Lamp rated hours */
+       ZB_ZCL_ATTR_LAMP_BURN_HOURS = 0x0033, /**< Lamp burn hours */
+       ZB_ZCL_ATTR_LAMP_ALARM_MODE = 0x0034, /**< Lamp alarm mode */
+       ZB_ZCL_ATTR_LAMP_BURN_HOURS_TRIP_POINT = 0x0035, /**< Lamp burn hours */
+} zb_zcl_attribute_ballast_configuration_e;
+
+/**
+ * @brief Attribute types for cluster: Illuminance Measurement.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ILLUM_MEASURED_VALUE = 0x0000, /**< Illuminance measured value */
+       ZB_ZCL_ATTR_ILLUM_MIN_MEASURED_VALUE = 0x0001, /**< Illuminance Min. measured value */
+       ZB_ZCL_ATTR_ILLUM_MAX_MEASURED_VALUE = 0x0002, /**< Illuminance Max. measured value */
+       ZB_ZCL_ATTR_ILLUM_TOLERANCE = 0x0003, /**< Illuminance Tolerance */
+       ZB_ZCL_ATTR_MEASUREMENT_LIGHT_SENSOR_TYPE = 0x0004, /**< Measurement light sensor type */
+} zb_zcl_attribute_illuminance_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Illuminance Level Sensing.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ILLUMINANCE_LEVEL_STATUS = 0x0000, /**< Illuminance level status */
+       ZB_ZCL_ATTR_ILLUMINANCE_SENSING_LIGHT_SENSOR_TYPE = 0x0001, /**< Illuminance sensing light sensor type */
+       ZB_ZCL_ATTR_ILLUMINANCE_TARGET_LEVEL = 0x0010, /**< Illuminance target level */
+} zb_zcl_attribute_illuminance_level_sensing_e;
+
+/**
+ * @brief Attribute types for cluster: Temperature Measurement.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_TEMP_MEASURED_VALUE = 0x0000, /**< Measured value */
+       ZB_ZCL_ATTR_TEMP_MIN_MEASURED_VALUE = 0x0001, /**< Min. measured value */
+       ZB_ZCL_ATTR_TEMP_MAX_MEASURED_VALUE = 0x0002, /**< Max. measured value */
+       ZB_ZCL_ATTR_TEMP_TOLERANCE = 0x0003, /**< Tolerance */
+} zb_zcl_attribute_temperature_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Pressure Measurement.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_PRESSURE_MEASURED_VALUE = 0x0000, /**< Measured value */
+       ZB_ZCL_ATTR_PRESSURE_MIN_MEASURED_VALUE = 0x0001, /**< Min. measured value */
+       ZB_ZCL_ATTR_PRESSURE_MAX_MEASURED_VALUE = 0x0002, /**< Max. measured value */
+       ZB_ZCL_ATTR_PRESSURE_TOLERANCE = 0x0003, /**< Tolerance */
+       ZB_ZCL_ATTR_PRESSURE_SCALED_VALUE = 0x0010, /**< Scaled value */
+       ZB_ZCL_ATTR_PRESSURE_MIN_SCALED_VALUE = 0x0011, /**< Min. scaled value */
+       ZB_ZCL_ATTR_PRESSURE_MAX_SCALED_VALUE = 0x0012, /**< Max. scaled value */
+       ZB_ZCL_ATTR_PRESSURE_SCALED_TOLERANCE = 0x0013, /**< Scaled tolerance */
+       ZB_ZCL_ATTR_PRESSURE_SCALE = 0x0014, /**< Scale */
+} zb_zcl_attribute_pressure_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Flow Measurement.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_FLOW_MEASURED_VALUE = 0x0000, /**< Measured value */
+       ZB_ZCL_ATTR_FLOW_MIN_MEASURED_VALUE = 0x0001, /**< Min. measured value */
+       ZB_ZCL_ATTR_FLOW_MAX_MEASURED_VALUE = 0x0002, /**< Max. measured value */
+       ZB_ZCL_ATTR_FLOW_TOLERANCE = 0x0003, /**< Tolerance */
+} zb_zcl_attribute_flow_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Relative Humidity Measurement.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_MEASURED_VALUE = 0x0000, /**< Measured value */
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_MIN_MEASURED_VALUE = 0x0001, /**< Min. measured value */
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_MAX_MEASURED_VALUE = 0x0002, /**< Max. measured value */
+       ZB_ZCL_ATTR_RELATIVE_HUMIDITY_TOLERANCE = 0x0003, /**< Tolerance */
+} zb_zcl_attribute_relative_humidity_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Occupancy Sensing.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_OCCUPANCY = 0x0000, /**< Occupancy */
+       ZB_ZCL_ATTR_OCCUPANCY_SENSOR_TYPE = 0x0001, /**< Occupancy sensor type */
+       ZB_ZCL_ATTR_PIR_OCCUPIED_TO_UNOCCUPIED_DELAY = 0x0010, /**< PIR occupied to unoccupied delay */
+       ZB_ZCL_ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_DELAY = 0x0011, /**< PIR unoccupied to occupied delay */
+       ZB_ZCL_ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_THRESHOLD = 0x0012, /**< PIR unoccupied to occupied threshold */
+       ZB_ZCL_ATTR_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY = 0x0020, /**< Ultrasonic occupied to unoccupied delay */
+       ZB_ZCL_ATTR_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY = 0x0021, /**< Ultrasonic unoccupied to occupied delay */
+       ZB_ZCL_ATTR_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD = 0x0022, /**< Ultrasonic unoccupied to occupied threshold */
+} zb_zcl_attribute_occupancy_sensing_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: IAS Zone.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_ZONE_STATE = 0x0000, /**< Zone state */
+       ZB_ZCL_ATTR_ZONE_TYPE = 0x0001, /**< Zone type */
+       ZB_ZCL_ATTR_ZONE_STATUS = 0x0002, /**< Zone status */
+       ZB_ZCL_ATTR_IAS_CIE_ADDRESS = 0x0010, /**< IAS CIE address */
+       ZB_ZCL_ATTR_ZONE_ID = 0x0011, /**< Zone ID */
+       ZB_ZCL_ATTR_NUMBER_OF_ZONE_SENSITIVITY_LEVELS_SUPPORTED = 0x0012, /**< Number of zone sensitivity levels supported */
+       ZB_ZCL_ATTR_CURRENT_ZONE_SENSITIVITY_LEVEL = 0x0013, /**< Current zone sensitivity level */
+} zb_zcl_attribute_ias_zone_server_e;
+
+/**
+ * @brief Attribute types for cluster: IAS WD.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_MAX_DURATION = 0x0000, /**< Max. duration */
+} zb_zcl_attribute_ias_wd_server_e;
+
+/**
+ * @brief Attribute types for cluster: Electrical Measurement.
+ * @details Cluster specification level: UNKNOWN
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_MEASUREMENT_TYPE = 0x0000, /**< Measurement type */
+       ZB_ZCL_ATTR_DC_VOLTAGE = 0x0100, /**< DC voltage */
+       ZB_ZCL_ATTR_DC_VOLTAGE_MIN = 0x0101, /**< DC voltage min. */
+       ZB_ZCL_ATTR_DC_VOLTAGE_MAX = 0x0102, /**< DC voltage max. */
+       ZB_ZCL_ATTR_DC_CURRENT = 0x0103, /**< DC current */
+       ZB_ZCL_ATTR_DC_CURRENT_MIN = 0x0104, /**< DC current min. */
+       ZB_ZCL_ATTR_DC_CURRENT_MAX = 0x0105, /**< DC current max. */
+       ZB_ZCL_ATTR_DC_POWER = 0x0106, /**< DC power */
+       ZB_ZCL_ATTR_DC_POWER_MIN = 0x0107, /**< DC power min. */
+       ZB_ZCL_ATTR_DC_POWER_MAX = 0x0108, /**< DC Power max. */
+       ZB_ZCL_ATTR_DC_VOLTAGE_MULTIPLIER = 0x0200, /**< DC voltage multiplier */
+       ZB_ZCL_ATTR_DC_VOLTAGE_DIVISOR = 0x0201, /**< DC voltage divisor */
+       ZB_ZCL_ATTR_DC_CURRENT_MULTIPLIER = 0x0202, /**< DC current multiplier */
+       ZB_ZCL_ATTR_DC_CURRENT_DIVISOR = 0x0203, /**< DC current divisor */
+       ZB_ZCL_ATTR_DC_POWER_MULTIPLIER = 0x0204, /**< DC power multiplier */
+       ZB_ZCL_ATTR_DC_POWER_DIVISOR = 0x0205, /**< DC power divisor */
+       ZB_ZCL_ATTR_AC_FREQUENCY = 0x0300, /**< AC frequency */
+       ZB_ZCL_ATTR_AC_FREQUENCY_MIN = 0x0301, /**< AC frequency min. */
+       ZB_ZCL_ATTR_AC_FREQUENCY_MAX = 0x0302, /**< AC frequency max. */
+       ZB_ZCL_ATTR_NEUTRAL_CURRENT = 0x0303, /**< Neutral current */
+       ZB_ZCL_ATTR_TOTAL_ACTIVE_POWER = 0x0304, /**< Total active power */
+       ZB_ZCL_ATTR_TOTAL_REACTIVE_POWER = 0x0305, /**< Total reactive power */
+       ZB_ZCL_ATTR_TOTAL_APPARENT_POWER = 0x0306, /**< Total apparent power */
+       ZB_ZCL_ATTR_MEASURED_1ST_HARMONIC_CURRENT = 0x0307, /**< Measured 1st harmonic current */
+       ZB_ZCL_ATTR_MEASURED_3RD_HARMONIC_CURRENT = 0x0308, /**< Measured 3rd harmonic current */
+       ZB_ZCL_ATTR_MEASURED_5TH_HARMONIC_CURRENT = 0x0309, /**< Measured 5th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_7TH_HARMONIC_CURRENT = 0x030A, /**< Measured 7th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_9TH_HARMONIC_CURRENT = 0x030B, /**< Measured 9th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_11TH_HARMONIC_CURRENT = 0x030C, /**< Measured 11th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_1ST_HARMONIC_CURRENT = 0x030D, /**< Measured phase 1st harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_3RD_HARMONIC_CURRENT = 0x030E, /**< Measured phase 3rd harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_5TH_HARMONIC_CURRENT = 0x030F, /**< Measured phase 5th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_7TH_HARMONIC_CURRENT = 0x0310, /**< Measured phase 7th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_9TH_HARMONIC_CURRENT = 0x0311, /**< Measured phase 9th harmonic current */
+       ZB_ZCL_ATTR_MEASURED_PHASE_11TH_HARMONIC_CURRENT = 0x0312, /**< Measured phase 11th harmonic current */
+       ZB_ZCL_ATTR_AC_FREQUENCY_MULTIPLIER = 0x0400, /**< AC frequency multiplier */
+       ZB_ZCL_ATTR_AC_FREQUENCY_DIVISOR = 0x0401, /**< AC frequency divisor */
+       ZB_ZCL_ATTR_POWER_MULTIPLIER = 0x0402, /**< Power multiplier */
+       ZB_ZCL_ATTR_POWER_DIVISOR = 0x0403, /**< Power divisor */
+       ZB_ZCL_ATTR_HARMONIC_CURRENT_MULTIPLIER = 0x0404, /**< Harmonic current multiplier */
+       ZB_ZCL_ATTR_PHASE_HARMONIC_CURRENT_MULTIPLIER = 0x0405, /**< Phase harmonic current multiplier */
+       ZB_ZCL_ATTR_INSTANTANEOUS_VOLTAGE = 0x0500, /**< Instantaneous voltage */
+       ZB_ZCL_ATTR_INSTANTANEOUS_LINE_CURRENT = 0x0501, /**< Instantaneous line current */
+       ZB_ZCL_ATTR_INSTANTANEOUS_ACTIVE_CURRENT = 0x0502, /**< Instantaneous active current */
+       ZB_ZCL_ATTR_INSTANTANEOUS_REACTIVE_CURRENT = 0x0503, /**< Instantaneous reactive current */
+       ZB_ZCL_ATTR_INSTANTANEOUS_POWER = 0x0504, /**< Instantaneous power */
+       ZB_ZCL_ATTR_RMS_VOLTAGE = 0x0505, /**< RMS voltage */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MIN = 0x0506, /**< RMS voltage min. */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MAX = 0x0507, /**< RMS voltage max. */
+       ZB_ZCL_ATTR_RMS_CURRENT = 0x0508, /**< RMS current  */
+       ZB_ZCL_ATTR_RMS_CURRENT_MIN = 0x0509, /**< RMS current min. */
+       ZB_ZCL_ATTR_RMS_CURRENT_MAX = 0x050A, /**< RMS current max. */
+       ZB_ZCL_ATTR_ACTIVE_POWER = 0x050B, /**< Active power */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MIN = 0x050C, /**< Active power min. */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MAX = 0x050D, /**< Active power max. */
+       ZB_ZCL_ATTR_REACTIVE_POWER = 0x050E, /**< Reactive power */
+       ZB_ZCL_ATTR_APPARENT_POWER = 0x050F, /**< Apparent power */
+       ZB_ZCL_ATTR_AC_POWER_FACTOR = 0x0510, /**< AC power factor */
+       ZB_ZCL_ATTR_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD = 0x0511, /**< Average RMS voltage measurement period */
+       ZB_ZCL_ATTR_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER = 0x0513, /**< Average RMS under voltage counter */
+       ZB_ZCL_ATTR_RMS_EXTREME_OVER_VOLTAGE_PERIOD = 0x0514, /**< RMS extreme over voltage period */
+       ZB_ZCL_ATTR_RMS_EXTREME_UNDER_VOLTAGE_PERIOD = 0x0515, /**< RMS extreme under voltage period */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SAG_PERIOD = 0x0516, /**< RMS voltage sag period */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SWELL_PERIOD = 0x0517, /**< RMS voltage swell period */
+       ZB_ZCL_ATTR_AC_VOLTAGE_MULTIPLIER = 0x0600, /**< AC voltage multiplier */
+       ZB_ZCL_ATTR_AC_VOLTAGE_DIVISOR = 0x0601, /**< AC voltage divisor */
+       ZB_ZCL_ATTR_AC_CURRENT_MULTIPLIER = 0x0602, /**< AC current multiplier */
+       ZB_ZCL_ATTR_AC_CURRENT_DIVISOR = 0x0603, /**< AC current divisor */
+       ZB_ZCL_ATTR_AC_POWER_MULTIPLIER = 0x0604, /**< AC power multiplier */
+       ZB_ZCL_ATTR_AC_POWER_DIVISOR = 0x0605, /**< AC power divisor */
+       ZB_ZCL_ATTR_DC_OVERLOAD_ALARMS_MASK = 0x0700, /**< DC overload alarms mask */
+       ZB_ZCL_ATTR_DC_VOLTAGE_OVERLOAD = 0x0701, /**< DC voltage overload */
+       ZB_ZCL_ATTR_DC_CURRENT_OVERLOAD = 0x0702, /**< DC current overload */
+       ZB_ZCL_ATTR_AC_OVERLOAD_ALARMS_MASK = 0x0800, /**< Overload alarms mask */
+       ZB_ZCL_ATTR_AC_VOLTAGE_OVERLOAD = 0x0801, /**< AC voltage overload */
+       ZB_ZCL_ATTR_AC_CURRENT_OVERLOAD = 0x0802, /**< AC current overload */
+       ZB_ZCL_ATTR_AC_POWER_OVERLOAD = 0x0803, /**< AC power overload */
+       ZB_ZCL_ATTR_AC_REACTIVE_POWER_OVERLOAD = 0x0804, /**< AC reactive power overload */
+       ZB_ZCL_ATTR_AVERAGE_RMS_OVER_VOLTAGE = 0x0805, /**< Average RMS over voltage */
+       ZB_ZCL_ATTR_AVERAGE_RMS_UNDER_VOLTAGE = 0x0806, /**< Average RMS under voltage */
+       ZB_ZCL_ATTR_RMS_EXTREME_OVER_VOLTAGE = 0x0807, /**< RMS extreme over voltage */
+       ZB_ZCL_ATTR_RMS_EXTREME_UNDER_VOLTAGE = 0x0808, /**< RMS extreme under voltage */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SAG = 0x0809, /**< RMS voltage sag */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SWELL = 0x080A, /**< RMS voltage swell */
+       ZB_ZCL_ATTR_LINE_CURRENT_PHASE_B = 0x0901, /**< Line current phase B */
+       ZB_ZCL_ATTR_ACTIVE_CURRENT_PHASE_B = 0x0902, /**< Active current phase B */
+       ZB_ZCL_ATTR_REACTIVE_CURRENT_PHASE_B = 0x0903, /**< Reactive current phase B */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_PHASE_B = 0x0905, /**< RMS voltage phase B */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MIN_PHASE_B = 0x0906, /**< RMS voltage min. phase B */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MAX_PHASE_B = 0x0907, /**< RMS voltage max. phase B */
+       ZB_ZCL_ATTR_RMS_CURRENT_PHASE_B = 0x0908, /**< RMS current phase B */
+       ZB_ZCL_ATTR_RMS_CURRENT_MIN_PHASE_B = 0x0909, /**< RMS current min. phase B */
+       ZB_ZCL_ATTR_RMS_CURRENT_MAX_PHASE_B = 0x090A, /**< RMS current max. phase B */
+       ZB_ZCL_ATTR_ACTIVE_POWER_PHASE_B = 0x090B, /**< Active power phase B */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MIN_PHASE_B = 0x090C, /**< Active power min. phase B */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MAX_PHASE_B = 0x090D, /**< Active power max. B */
+       ZB_ZCL_ATTR_REACTIVE_POWER_PHASE_B = 0x090E, /**< Reactive power phase B */
+       ZB_ZCL_ATTR_APPARENT_POWER_PHASE_B = 0x090F, /**< Apparent power phase B */
+       ZB_ZCL_ATTR_POWER_FACTOR_PHASE_B = 0x0910, /**< Power factor phase B */
+       ZB_ZCL_ATTR_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B = 0x0911, /**< Average RMS voltage measurement period phase B */
+       ZB_ZCL_ATTR_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B = 0x0912, /**< RMS over voltage counter phase B */
+       ZB_ZCL_ATTR_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B = 0x0913, /**< Average RMS under voltage counter phase B */
+       ZB_ZCL_ATTR_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B = 0x0914, /**< RMS extreme over voltage period phase B */
+       ZB_ZCL_ATTR_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B = 0x0915, /**< RMS extreme under voltage period phase B */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SAG_PERIOD_PHASE_B = 0x0916, /**< RMS voltage sag period phase B */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SWELL_PERIOD_PHASE_B = 0x0917, /**< RMS voltage swell period phase B */
+       ZB_ZCL_ATTR_LINE_CURRENT_PHASE_C = 0x0A01, /**< Line current phase C */
+       ZB_ZCL_ATTR_ACTIVE_CURRENT_PHASE_C = 0x0A02, /**< Active current phase C */
+       ZB_ZCL_ATTR_REACTIVE_CURRENT_PHASE_C = 0x0A03, /**< Reactive current phase C */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_PHASE_C = 0x0A05, /**< RMS voltage phase C */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MIN_PHASE_C = 0x0A06, /**< RMS voltage min. phase C */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_MAX_PHASE_C = 0x0A07, /**< RMS voltage max. phase C */
+       ZB_ZCL_ATTR_RMS_CURRENT_PHASE_C = 0x0A08, /**< RMS current phase C */
+       ZB_ZCL_ATTR_RMS_CURRENT_MIN_PHASE_C = 0x0A09, /**< RMS current min. phase C */
+       ZB_ZCL_ATTR_RMS_CURRENT_MAX_PHASE_C = 0x0A0A, /**< RMS current max. phase C */
+       ZB_ZCL_ATTR_ACTIVE_POWER_PHASE_C = 0x0A0B, /**< Active power phase C */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MIN_PHASE_C = 0x0A0C, /**< Active power min. phase C */
+       ZB_ZCL_ATTR_ACTIVE_POWER_MAX_PHASE_C = 0x0A0D, /**< Active power max. phase C */
+       ZB_ZCL_ATTR_REACTIVE_POWER_PHASE_C = 0x0A0E, /**< Reactive power phase C */
+       ZB_ZCL_ATTR_APPARENT_POWER_PHASE_C = 0x0A0F, /**< Reactive power phase C */
+       ZB_ZCL_ATTR_POWER_FACTOR_PHASE_C = 0x0A10, /**< Power factor phase C */
+       ZB_ZCL_ATTR_AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C = 0x0A11, /**< Average RMS voltage measurement period phase C */
+       ZB_ZCL_ATTR_AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C = 0x0A12, /**< Average RMS over voltage counter phase C */
+       ZB_ZCL_ATTR_AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C = 0x0A13, /**< Average RMS under voltage counter phase C */
+       ZB_ZCL_ATTR_RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C = 0x0A14, /**< RMS extreme over voltage period phase C */
+       ZB_ZCL_ATTR_RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C = 0x0A15, /**< RMS extreme under voltage period phase C */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SAG_PERIOD_PHASE_C = 0x0A16, /**< RMS voltage sag period phase C */
+       ZB_ZCL_ATTR_RMS_VOLTAGE_SWELL_PERIOD_PHASE_C = 0x0A17, /**< RMS voltage swell period phase C */
+} zb_zcl_attribute_electrical_measurement_e;
+
+/**
+ * @brief Attribute types for cluster: Diagnostics.
+ * @details Cluster specification level: UNKNOWN
+ * @since_tizen 4.0
+ *
+ */
+typedef enum {
+       ZB_ZCL_ATTR_SC_NUMBER_OF_RESETS = 0x0000, /**< Number of resets */
+       ZB_ZCL_ATTR_SC_PERSISTENT_MEMORY_WRITES = 0x0001, /**< Persistent memory write  */
+       ZB_ZCL_ATTR_SC_MAC_RX_BCAST = 0x0100, /**< MAC Rx broadcast count */
+       ZB_ZCL_ATTR_SC_MAC_TX_BCAST = 0x0101, /**< MAC Tx broadcast count t */
+       ZB_ZCL_ATTR_SC_MAC_RX_UCAST = 0x0102, /**< MAC Rx unicast */
+       ZB_ZCL_ATTR_SC_MAC_TX_UCAST = 0x0103, /**< MAC Tx unicast */
+       ZB_ZCL_ATTR_SC_MAC_TX_UCAST_RETRY = 0x0104, /**< MAC Tx unicast retry count */
+       ZB_ZCL_ATTR_SC_MAC_TX_UCAST_FAIL = 0x0105, /**< MAC Tx unicast fail count */
+       ZB_ZCL_ATTR_SC_APS_RX_BCAST = 0x0106, /**< APS Tx broadcast count */
+       ZB_ZCL_ATTR_SC_APS_TX_BCAST = 0x0107, /**< APS Tx broadcast count */
+       ZB_ZCL_ATTR_SC_APS_RX_UCAST = 0x0108, /**< APX Rx unicast count */
+       ZB_ZCL_ATTR_SC_APS_UCAST_SUCCESS = 0x0109, /**< APS unicast success count */
+       ZB_ZCL_ATTR_SC_APS_TX_UCAST_RETRY = 0x010A, /**< APS Tx unicast retry count */
+       ZB_ZCL_ATTR_SC_APS_TX_UCAST_FAIL = 0x010B, /**< APS Tx unicast fail count */
+       ZB_ZCL_ATTR_SC_ROUTE_DISC_INITIATED = 0x010C, /**< The number of Route discovery initiated */
+       ZB_ZCL_ATTR_SC_NEIGHBOR_ADDED = 0x010D, /**< The number of neighbor added */
+       ZB_ZCL_ATTR_SC_NEIGHBOR_REMOVED = 0x010E, /**< The number of neighbor removed */
+       ZB_ZCL_ATTR_SC_ATTR_NEIGHBOR_STALE = 0x010F, /**< The number of neighbor stale */
+       ZB_ZCL_ATTR_SC_JOIN_INDICATION = 0x0110, /**< Join indication count */
+       ZB_ZCL_ATTR_SC_CHILD_MOVED = 0x0111, /**< Number of Child moved */
+       ZB_ZCL_ATTR_SC_NWK_FC_FAILURE = 0x0112, /**< Network layer flow-control failure count */
+       ZB_ZCL_ATTR_SC_APS_FC_FAILURE = 0x0113, /**< APS layer flow-control failure count */
+       ZB_ZCL_ATTR_SC_APS_UNAUTHORIZED_KEY = 0x0114, /**< APS layer unauthorized key */
+       ZB_ZCL_ATTR_SC_NWK_DECRYPT_FAILURE = 0x0115, /**< Network layer decrypt failure count */
+       ZB_ZCL_ATTR_SC_APS_DECRYPT_FAILURE = 0x0116, /**< AOS layer decrypt failure count  */
+       ZB_ZCL_ATTR_SC_PACKET_BUFFER_ALLOC_FAILURES = 0x0117, /**< Packet buffer allocation failure count */
+       ZB_ZCL_ATTR_SC_RELAYED_UNICAST = 0x0118, /**< Relayed unicast count */
+       ZB_ZCL_ATTR_SC_PHY_TO_MAC_QUEUE_LIMIT_REACHED = 0x0119, /**< PHY to MAC queue limit reached  */
+       ZB_ZCL_ATTR_SC_PACKET_VALIDATE_DROP_COUNT = 0x011A, /**< Packet validate drop count */
+       ZB_ZCL_ATTR_SC_AVERAGE_MAC_RETRY_PER_APS_MSG_SENT = 0x011B, /**< Average MAC retry per APS message sent */
+       ZB_ZCL_ATTR_SC_LAST_MESSAGE_LQI = 0x011C, /**< Last message LQI */
+       ZB_ZCL_ATTR_SC_LAST_MESSAGE_RSSI = 0x011D, /**<  Last message RSSI */
+} zb_zcl_attribute_diagnostics_e;
+
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Global commands (Either direction).
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_CMD_READ_ATTRIBUTES = 0x00, /**< Read attributes */
+       ZB_ZCL_CMD_READ_ATTRIBUTES_RESPONSE = 0x01, /**< Read attributes response */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES = 0x02, /**< Write attributes */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES_UNDIVIDED = 0x03, /**< Write attributes undivided */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES_RESPONSE = 0x04, /**< Write attributes response */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES_NO_RESPONSE = 0x05, /**< Write attributes no response */
+       ZB_ZCL_CMD_CONFIGURE_REPORTING = 0x06, /**< Configure reporting */
+       ZB_ZCL_CMD_CONFIGURE_REPORTING_RESPONSE = 0x07, /**< Configure reporting response */
+       ZB_ZCL_CMD_READ_REPORTING_CONFIGURATION = 0x08, /**< Read reporting configuration */
+       ZB_ZCL_CMD_READ_REPORTING_CONFIGURATION_RESPONSE = 0x09, /**< Read reporting configuration response */
+       ZB_ZCL_CMD_REPORT_ATTRIBUTES = 0x0A, /**< Report attributes  */
+       ZB_ZCL_CMD_DEFAULT_RESPONSE = 0x0B, /**< Default response */
+       ZB_ZCL_CMD_DISCOVER_ATTRIBUTES = 0x0C, /**< Discover attributes */
+       ZB_ZCL_CMD_DISCOVER_ATTRIBUTES_RESPONSE = 0x0D, /**< Discover attributes response */
+       ZB_ZCL_CMD_READ_ATTRIBUTES_STRUCTURED = 0x0E, /**< Read attributes structured */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES_STRUCTURED = 0x0F, /**< Write attributes structured */
+       ZB_ZCL_CMD_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE = 0x10, /**< Write attributes structured response */
+       ZB_ZCL_CMD_DISCOVER_COMMANDS_RECEIVED = 0x11, /**< Discover commands received */
+       ZB_ZCL_CMD_DISCOVER_COMMANDS_RECEIVED_RESPONSE = 0x12, /**< Discover commands received */
+       ZB_ZCL_CMD_DISCOVER_COMMANDS_GENERATED = 0x13, /**< Discover commands generated */
+       ZB_ZCL_CMD_DISCOVER_COMMANDS_GENERATED_RESPONSE = 0x14, /**< Discover commands generated response */
+       ZB_ZCL_CMD_DISCOVER_ATTRIBUTES_EXTENDED = 0x15, /**< Discover attributes extended */
+       ZB_ZCL_CMD_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE = 0x16, /**< Discover attributes extended response */
+} zb_zcl_cmd_global_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: Basic.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_RESET_TO_FACTORY_DEFAULTS = 0x00, /**< Reset to factory default mode */
+} zb_zcl_cmd_client_basic_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Identify.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_IDENTIFY_QUERY_RESPONSE = 0x00, /**< Identify query response */
+} zb_zcl_cmd_server_identify_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Identify.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_IDENTIFY  = 0x00, /**< Identify */
+       ZB_ZCL_CMD_CS_IDENTIFY_QUERY  = 0x01, /**< Identify query */
+       ZB_ZCL_CMD_CS_E_Z_MODE_INVOKE  = 0x02, /**< EZ mode invoke */
+       ZB_ZCL_CMD_CS_UPDATE_COMMISSION_STATE  = 0x03, /**< Update commission state */
+       ZB_ZCL_CMD_CS_TRIGGER_EFFECT = 0x40, /**< Trigger effect (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_client_identify_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Groups.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_ADD_GROUP_RESPONSE  = 0x00, /**< Add group response */
+       ZB_ZCL_CMD_SC_VIEW_GROUP_RESPONSE  = 0x01, /**< View group response */
+       ZB_ZCL_CMD_SC_GET_GROUP_MEMBERSHIP_RESPONSE  = 0x02, /**< Get group membership response */
+       ZB_ZCL_CMD_SC_REMOVE_GROUP_RESPONSE  = 0x03, /**< Remove group response */
+} zb_zcl_cmd_server_group_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Groups.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_ADD_GROUP  = 0x00, /**< Add group */
+       ZB_ZCL_CMD_CS_VIEW_GROUP  = 0x01, /**< View group */
+       ZB_ZCL_CMD_CS_GET_GROUP_MEMBERSHIP  = 0x02, /**< Get group membership */
+       ZB_ZCL_CMD_CS_REMOVE_GROUP  = 0x03, /**< Remove group */
+       ZB_ZCL_CMD_CS_REMOVE_ALL_GROUPS  = 0x04, /**< Remove all groups */
+       ZB_ZCL_CMD_CS_ADD_GROUP_IF_IDENTIFYING  = 0x05, /**< Add group if identifying */
+} zb_zcl_cmd_client_group_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Scenes.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_ADD_SCENE_RESPONSE  = 0x00, /**< Add scene response */
+       ZB_ZCL_CMD_SC_VIEW_SCENE_RESPONSE  = 0x01, /**< View scene response */
+       ZB_ZCL_CMD_SC_REMOVE_SCENE_RESPONSE  = 0x02, /**< Remove scene response */
+       ZB_ZCL_CMD_SC_REMOVE_ALL_SCENES_RESPONSE  = 0x03, /**< Remove all scenes response */
+       ZB_ZCL_CMD_SC_STORE_SCENE_RESPONSE  = 0x04, /**< Store scenes response */
+       ZB_ZCL_CMD_SC_GET_SCENE_MEMBERSHIP_RESPONSE  = 0x06, /**< Get scene membership response */
+       ZB_ZCL_CMD_SC_ENHANCED_ADD_SCENE_RESPONSE = 0x40, /**< Enhanced add scene response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_ENHANCED_VIEW_SCENE_RESPONSE = 0x41, /**< Enhanced view scene response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_COPY_SCENE_RESPONSE = 0x42, /**< Copy scene response (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_server_scenes_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Scenes.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_ADD_SCENE  = 0x00, /**< Add scene */
+       ZB_ZCL_CMD_CS_VIEW_SCENE  = 0x01, /**< View scene */
+       ZB_ZCL_CMD_CS_REMOVE_SCENE  = 0x02, /**< Remove scene */
+       ZB_ZCL_CMD_CS_REMOVE_ALL_SCENES  = 0x03, /**< Remove all scenes */
+       ZB_ZCL_CMD_CS_STORE_SCENE  = 0x04, /**< Store scene */
+       ZB_ZCL_CMD_CS_RECALL_SCENE  = 0x05, /**< Recall scene */
+       ZB_ZCL_CMD_CS_GET_SCENE_MEMBERSHIP  = 0x06, /**< Get scene membership */
+       ZB_ZCL_CMD_CS_ENHANCED_ADD_SCENE = 0x40, /**< Enhanced add scene (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ENHANCED_VIEW_SCENE = 0x41, /**< Enhanced view scene (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_COPY_SCENE = 0x42, /**< Copy scene (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_client_scenes_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: On/off.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_OFF = 0x00, /**< Off */
+       ZB_ZCL_CMD_CS_ON = 0x01, /**< On  */
+       ZB_ZCL_CMD_CS_TOGGLE = 0x02, /**< Toggle */
+       ZB_ZCL_CMD_CS_OFF_WITH_EFFECT = 0x40, /**< Off with effect (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ON_WITH_RECALL_GLOBAL_SCENE = 0x41, /**< On with recall global scene (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ON_WITH_TIMED_OFF = 0x42, /**< on with timed off (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_client_on_off_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: Level Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_MOVE_TO_LEVEL  = 0x00, /**< Move to level */
+       ZB_ZCL_CMD_CS_MOVE = 0x01, /**< Move */
+       ZB_ZCL_CMD_CS_STEP = 0x02, /**< Step */
+       ZB_ZCL_CMD_CS_STOP = 0x03, /**< Stop */
+       ZB_ZCL_CMD_CS_MOVE_TO_LEVEL_WITH_ON_OFF = 0x04, /**< Move to level with on/off */
+       ZB_ZCL_CMD_CS_MOVE_WITH_ON_OFF = 0x05, /**< Move with on/off */
+       ZB_ZCL_CMD_CS_STEP_WITH_ON_OFF = 0x06, /**< Step with on/off */
+       ZB_ZCL_CMD_CS_STOP_WITH_ON_OFF = 0x07, /**< Stop with on/off */
+} zb_zcl_cmd_client_level_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Alarms Server side.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_ALARM = 0x00, /**< Alarm */
+       ZB_ZCL_CMD_SC_GET_ALARM_RESPONSE = 0x01, /**< Alarm response */
+} zb_zcl_cmd_server_alarms_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Alarms Client side.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_RESET_ALARM = 0x00, /**< Reset alarm */
+       ZB_ZCL_CMD_CS_RESET_ALL_ALARMS = 0x01, /**< Reset all alarms */
+       ZB_ZCL_CMD_CS_GET_ALARM  = 0x02, /**< Get alarm */
+       ZB_ZCL_CMD_CS_RESET_ALARM_LOG = 0x03, /**< Reset alarm log */
+} zb_zcl_cmd_client_alarms_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: RSSI Location Server side.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_DEVICE_CONFIGURATION_RESPONSE  = 0x00, /**< Device configuration response */
+       ZB_ZCL_CMD_SC_LOCATION_DATA_RESPONSE  = 0x01, /**< Location data response */
+       ZB_ZCL_CMD_SC_LOCATION_DATA_NOTIFICATION  = 0x02, /**< Location data notification */
+       ZB_ZCL_CMD_SC_COMPACT_LOCATION_DATA_NOTIFICATION  = 0x03, /**< Compact location data notification */
+       ZB_ZCL_CMD_SC_RSSI_PING  = 0x04, /**< RSSI ping */
+       ZB_ZCL_CMD_SC_RSSI_REQUEST  = 0x05, /**< RSSI request */
+       ZB_ZCL_CMD_SC_REPORT_RSSI_MEASUREMENTS  = 0x06, /**< Report RSSI measurements */
+       ZB_ZCL_CMD_SC_REQUEST_OWN_LOCATION  = 0x07, /**< Request own location */
+} zb_zcl_cmd_server_rssi_location_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: RSSI Location Client side.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_SET_ABSOLUTE_LOCATION  = 0x00, /**< Set absolute location */
+       ZB_ZCL_CMD_CS_SET_DEVICE_CONFIGURATION  = 0x01, /**< Set device configuration */
+       ZB_ZCL_CMD_CS_GET_DEVICE_CONFIGURATION  = 0x02, /**< Get device configuration */
+       ZB_ZCL_CMD_CS_GET_LOCATION_DATA  = 0x03, /**< Get location data */
+       ZB_ZCL_CMD_CS_RSSI_RESPONSE  = 0x04, /**< RSSI response */
+       ZB_ZCL_CMD_CS_SEND_PINGS  = 0x05, /**< Send ping */
+       ZB_ZCL_CMD_CS_ANCHOR_NODE_ANNOUNCE  = 0x06, /**< Anchor node announce */
+} zb_zcl_cmd_client_rssi_location_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Commissioning.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_RESTART_DEVICE_RESPONSE = 0x00, /**< Restart device response */
+       ZB_ZCL_CMD_SC_SAVE_STARTUP_PARAMETERS_RESPONSE = 0x01, /**< Save startup parameters response */
+       ZB_ZCL_CMD_SC_RESTORE_STARTUP_PARAMETERS_RESPONSE = 0x02, /**< Restore startup parameters response */
+       ZB_ZCL_CMD_SC_RESET_STARTUP_PARAMETERS_RESPONSE = 0x03, /**< Reset startup parameters response */
+} zb_zcl_cmd_server_commissioning_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server Command types for cluster: Commissioning.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_RESTART_DEVICE = 0x00, /**< Restart device */
+       ZB_ZCL_CMD_CS_SAVE_STARTUP_PARAMETERS = 0x01, /**< Save startup parameters */
+       ZB_ZCL_CMD_CS_RESTORE_STARTUP_PARAMETERS = 0x02, /**< Restore startup parameters */
+       ZB_ZCL_CMD_CS_RESET_STARTUP_PARAMETERS = 0x03, /**< Reset startup parameters */
+} zb_zcl_cmd_client_commissioning_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Serer to client command types for cluster: Partition.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_MULTIPLE_ACK = 0x00, /**< Multiple ACK */
+       ZB_ZCL_CMD_SC_READ_HANDSHAKE_PARAM_RESPONSE = 0x01, /**< Read handshake parameters response */
+} zb_zcl_cmd_server_partition_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server Command types for cluster: Partition.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_TRANSFER_PARTITIONED_FRAME = 0x00, /**< Transfer partitioned frame */
+       ZB_ZCL_CMD_CS_READ_HANDSHAKE_PARAM = 0x01, /**< Read handshake parameters */
+       ZB_ZCL_CMD_CS_WRITE_HANDSHAKE_PARAM = 0x02, /**< Write handshake parameters */
+} zb_zcl_cmd_client_partition_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Over the Air Bootloading.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_IMAGE_NOTIFY = 0x00, /**< Image notify */
+       ZB_ZCL_CMD_SC_QUERY_NEXT_IMAGE_RESPONSE = 0x02, /**< Query next image response */
+       ZB_ZCL_CMD_SC_IMAGE_BLOCK_RESPONSE = 0x05, /**< Image block response */
+       ZB_ZCL_CMD_SC_UPGRADE_END_RESPONSE = 0x07, /**< Upgrade end response */
+       ZB_ZCL_CMD_SC_QUERY_SPECIFIC_FILE_RESPONSE = 0x09, /**< Query specific file response */
+} zb_zcl_cmd_server_over_the_air_bootloading_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Over the Air Bootloading.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_QUERY_NEXT_IMAGE_REQUEST = 0x01, /**< Query next image request */
+       ZB_ZCL_CMD_CS_IMAGE_BLOCK_REQUEST = 0x03, /**< Image block request */
+       ZB_ZCL_CMD_CS_IMAGE_PAGE_REQUEST = 0x04, /**< Image page request */
+       ZB_ZCL_CMD_CS_UPGRADE_END_REQUEST = 0x06, /**< Upgrade end request */
+       ZB_ZCL_CMD_CS_QUERY_SPECIFIC_FILE_REQUEST = 0x08, /**< Query specific file request */
+} zb_zcl_cmd_client_over_the_air_bootloading_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Power Profile.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_POWER_PROFILE_NOTIFICATION = 0x00, /**< Power profile notification */
+       ZB_ZCL_CMD_SC_POWER_PROFILE_RESPONSE = 0x01, /**< Power profile response */
+       ZB_ZCL_CMD_SC_POWER_PROFILE_STATE_RESPONSE = 0x02, /**< Power profile state response */
+       ZB_ZCL_CMD_SC_GET_POWER_PROFILE_PRICE = 0x03, /**< Get power profile price */
+       ZB_ZCL_CMD_SC_POWER_PROFILES_STATE_NOTIFICATION = 0x04, /**< Power profiles state notification */
+       ZB_ZCL_CMD_SC_GET_OVERALL_SCHEDULE_PRICE = 0x05, /**< Get overall schedule price */
+       ZB_ZCL_CMD_SC_ENERGY_PHASES_SCHEDULE_REQUEST = 0x06, /**< Energy phases schedule request */
+       ZB_ZCL_CMD_SC_ENERGY_PHASES_SCHEDULE_STATE_RESPONSE = 0x07, /**< Energy phrase schedule state response */
+       ZB_ZCL_CMD_SC_ENERGY_PHASES_SCHEDULE_STATE_NOTIFICATION = 0x08, /**< Energy phrase schedule state notification */
+       ZB_ZCL_CMD_SC_POWER_PROFILE_SCHEDULE_CONSTRAINTS_NOTIFICATION = 0x09, /**< Power profile schedule constraints notification */
+       ZB_ZCL_CMD_SC_POWER_PROFILE_SCHEDULE_CONSTRAINTS_RESPONSE = 0x0A, /**< Power profile schedule constraints response */
+       ZB_ZCL_CMD_SC_GET_POWER_PROFILE_PRICE_EXTENDED = 0x0B, /**< Get power profile price extended */
+} zb_zcl_cmd_server_power_profile_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Power Profile.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_POWER_PROFILE_REQUEST = 0x00, /**< Power profile request */
+       ZB_ZCL_CMD_CS_POWER_PROFILE_STATE_REQUEST = 0x01, /**< Power profile state request */
+       ZB_ZCL_CMD_CS_GET_POWER_PROFILE_PRICE_RESPONSE = 0x02, /**< Get power profile price response */
+       ZB_ZCL_CMD_CS_GET_OVERALL_SCHEDULE_PRICE_RESPONSE = 0x03, /**< Get overall schedule price response */
+       ZB_ZCL_CMD_CS_ENERGY_PHASES_SCHEDULE_NOTIFICATION = 0x04, /**< Energy phases schedules notification */
+       ZB_ZCL_CMD_CS_ENERGY_PHASES_SCHEDULE_RESPONSE = 0x05, /**< Energy phases schedules response */
+       ZB_ZCL_CMD_CS_POWER_PROFILE_SCHEDULE_CONSTRAINTS_REQUEST = 0x06, /**< Power profile schedule constraints request */
+       ZB_ZCL_CMD_CS_ENERGY_PHASES_SCHEDULE_STATE_REQUEST = 0x07, /**< Energy phase schedules state request */
+       ZB_ZCL_CMD_CS_GET_POWER_PROFILE_PRICE_EXTENDED_RESPONSE = 0x08, /**< Get power profile price extended response */
+} zb_zcl_cmd_client_power_profile_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Appliance Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_SIGNAL_STATE_RESPONSE = 0x00, /**< Signal state response */
+       ZB_ZCL_CMD_SC_SIGNAL_STATE_NOTIFICATION = 0x01, /**< Signal state notification */
+} zb_zcl_cmd_server_appliance_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Appliance Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_EXECUTION_OF_A_COMMAND = 0x00, /**< Execution of a command */
+       ZB_ZCL_CMD_CS_SIGNAL_STATE = 0x01, /**< Signal state */
+       ZB_ZCL_CMD_CS_WRITE_FUNCTIONS = 0x02, /**< Write functions */
+       ZB_ZCL_CMD_CS_OVERLOAD_PAUSE_RESUME = 0x03, /**< Overload pause/resume */
+       ZB_ZCL_CMD_CS_OVERLOAD_PAUSE = 0x04, /**< Overload pause */
+       ZB_ZCL_CMD_CS_OVERLOAD_WARNING = 0x05, /**< Overload warning */
+} zb_zcl_cmd_client_appliance_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Poll Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_CHECK_IN = 0x00, /**< Check-in */
+} zb_zcl_cmd_server_poll_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Poll Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_CHECK_IN_RESPONSE = 0x00, /**< Check-in response */
+       ZB_ZCL_CMD_SC_FAST_POLL_STOP = 0x01, /**< Fast poll stop */
+       ZB_ZCL_CMD_SC_SET_LONG_POLL_INTERVAL = 0x02, /**< Set long poll interval */
+       ZB_ZCL_CMD_SC_SET_SHORT_POLL_INTERVAL = 0x03, /**< Set short poll interval */
+} zb_zcl_cmd_client_poll_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Door Lock.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_LOCK_DOOR_RESPONSE = 0x00, /**< Lock door response */
+       ZB_ZCL_CMD_SC_UNLOCK_DOOR_RESPONSE = 0x01, /**< Unlock door response */
+       ZB_ZCL_CMD_SC_TOGGLE_RESPONSE = 0x02, /**< Toggle response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_UNLOCK_WITH_TIMEOUT_RESPONSE = 0x03, /**< Unlock with timeout response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_LOG_RECORD_RESPONSE = 0x04, /**< Get log record response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_PIN_RESPONSE = 0x05, /**< Set PIN response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_PIN_RESPONSE = 0x06, /**< Get PIN response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_PIN_RESPONSE = 0x07, /**< Clear PIN response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_ALL_PINS_RESPONSE = 0x08, /**< Clear all PINs response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_USER_STATUS_RESPONSE = 0x09, /**< Set user status response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_USER_STATUS_RESPONSE = 0x0A, /**< Get user status response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_WEEKDAY_SCHEDULE_RESPONSE = 0x0B, /**< Set weekday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_WEEKDAY_SCHEDULE_RESPONSE = 0x0C, /**< Get weekday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_WEEKDAY_SCHEDULE_RESPONSE = 0x0D, /**< Clear weekday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_YEARDAY_SCHEDULE_RESPONSE = 0x0E, /**< Set yearday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_YEARDAY_SCHEDULE_RESPONSE = 0x0F, /**< Get yearday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_YEARDAY_SCHEDULE_RESPONSE = 0x10, /**< Clear yearday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_HOLIDAY_SCHEDULE_RESPONSE = 0x11, /**< Set holiday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_HOLIDAY_SCHEDULE_RESPONSE = 0x12, /**< Get holiday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_HOLIDAY_SCHEDULE_RESPONSE = 0x13, /**< Clear holiday schedule response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_USER_TYPE_RESPONSE = 0x14, /**< Set user type response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_USER_TYPE_RESPONSE = 0x15, /**< Get user type response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_SET_RFID_RESPONSE = 0x16, /**< Set RFID response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_GET_RFID_RESPONSE = 0x17, /**< Get RFID response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_RFID_RESPONSE = 0x18, /**< Clear RFID response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_CLEAR_ALL_RFIDS_RESPONSE = 0x19, /**< Clear ALL RFIDs response (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_OPERATION_EVENT_NOTIFICATION = 0x20, /**< Operation event notification (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_PROGRAMMING_EVENT_NOTIFICATION = 0x21, /**< Programming event notification (since ha-1.2-05-3520-29) */
+} zb_zcl_cmd_server_door_lock_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Door Lock.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_LOCK_DOOR = 0x00, /**< Lock door */
+       ZB_ZCL_CMD_CS_UNLOCK_DOOR = 0x01, /**< Unlock door */
+       ZB_ZCL_CMD_CS_DOOR_TOGGLE = 0x02, /**< Door toggle (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_UNLOCK_WITH_TIMEOUT = 0x03, /**< Unlock with timeout (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_LOG_RECORD  = 0x04, /**< Get log record (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_PIN = 0x05, /**< Set PIN  (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_PIN = 0x06, /**< Get PIN (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_PIN = 0x07, /**< Clear PIN (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_ALL_PINS = 0x08, /**< Clear all PINs (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_USER_STATUS = 0x09, /**< Set user status (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_USER_STATUS = 0x0A, /**< Get user status (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_WEEKDAY_SCHEDULE = 0x0B, /**< Set weekday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_WEEKDAY_SCHEDULE = 0x0C, /**< Get weekday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_WEEKDAY_SCHEDULE = 0x0D, /**< Clear weekday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_YEARDAY_SCHEDULE = 0x0E, /**< Set yearday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_YEARDAY_SCHEDULE = 0x0F, /**< Get yearday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_YEARDAY_SCHEDULE = 0x10, /**< Clear yearday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_HOLIDAY_SCHEDULE = 0x11, /**< Set holiday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_HOLIDAY_SCHEDULE = 0x12, /**< Get holiday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_HOLIDAY_SCHEDULE = 0x13, /**< Clear holiday schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_USER_TYPE = 0x14, /**< Set user type (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_USER_TYPE = 0x15, /**< Get user type (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_SET_RFID = 0x16, /**< Set RFID (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_RFID = 0x17, /**< Get RFID (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_RFID = 0x18, /**< Clear RFID (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_ALL_RFIDS = 0x19, /**< Clear all RFIDs (since ha-1.2-05-3520-29) */
+} zb_zcl_cmd_client_door_lock_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: Window Covering.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_UP_OPEN = 0x00, /**< Window covering up (open) */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_DOWN_CLOSE = 0x01, /**< Window covering down (close) */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_STOP = 0x02, /**< Window covering stop */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_GO_TO_LIFT_VALUE = 0x04, /**< Window covering go to lift value */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE = 0x05, /**< Window covering go to lift percentage */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_GO_TO_TILT_VALUE = 0x07, /**< Window covering go to tilt value */
+       ZB_ZCL_CMD_CS_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE = 0x08, /**< Window covering go to tilt percentage */
+} zb_zcl_cmd_client_window_covering_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Thermostat.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_CURRENT_WEEKLY_SCHEDULE = 0x00, /**< Current weekly schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_SC_RELAY_STATUS_LOG = 0x01, /**< Relay status log (since ha-1.2-05-3520-29) */
+} zb_zcl_cmd_server_thermostat_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Thermostat.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_SETPOINT_RAISE_LOWER = 0x00, /**< Setpoint raise or lower */
+       ZB_ZCL_CMD_CS_SET_WEEKLY_SCHEDULE = 0x01, /**< Set weekly schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_WEEKLY_SCHEDULE = 0x02, /**< Get weekly schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_CLEAR_WEEKLY_SCHEDULE = 0x03, /**< Clear weekly schedule (since ha-1.2-05-3520-29) */
+       ZB_ZCL_CMD_CS_GET_RELAY_STATUS_LOG = 0x04, /**< Get relay status log (since ha-1.2-05-3520-29) */
+} zb_zcl_cmd_client_thermostat_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: Color Control.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_MOVE_TO_HUE = 0x00, /**< Move to hue */
+       ZB_ZCL_CMD_CS_MOVE_HUE = 0x01, /**< Move hue */
+       ZB_ZCL_CMD_CS_STEP_HUE = 0x02, /**< Step hue */
+       ZB_ZCL_CMD_CS_MOVE_TO_SATURATION = 0x03, /**< Move to saturation */
+       ZB_ZCL_CMD_CS_MOVE_SATURATION = 0x04, /**< Move saturation */
+       ZB_ZCL_CMD_CS_STEP_SATURATION = 0x05, /**< Step saturation */
+       ZB_ZCL_CMD_CS_MOVE_TO_HUE_AND_SATURATION = 0x06, /**< Move to hue and saturation */
+       ZB_ZCL_CMD_CS_MOVE_TO_COLOR = 0x07, /**< Move to color */
+       ZB_ZCL_CMD_CS_MOVE_COLOR = 0x08, /**< Move color */
+       ZB_ZCL_CMD_CS_STEP_COLOR = 0x09, /**< Step color */
+       ZB_ZCL_CMD_CS_MOVE_TO_COLOR_TEMPERATURE = 0x0A, /**< Move to color temperature */
+       ZB_ZCL_CMD_CS_ENHANCED_MOVE_TO_HUE = 0x40, /**< Enhanced move to hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ENHANCED_MOVE_HUE = 0x41, /**< Enhanced move hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ENHANCED_STEP_HUE = 0x42, /**< Enhanced step hue (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_ENHANCED_MOVE_TO_HUE_AND_SATURATION = 0x43, /**< Enhanced move to hue and saturation (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_COLOR_LOOP_SET = 0x44, /**< Color loop set (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_STOP_MOVE_STEP = 0x47, /**< Stop move step (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_MOVE_COLOR_TEMPERATURE = 0x4B, /**< Move color temperature (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_STEP_COLOR_TEMPERATURE = 0x4C, /**< Step color temperature (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_client_color_control_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: IAS Zone.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_ZONE_STATUS_CHANGE_NOTIFICATION = 0x00, /**< Zone status change notification */
+       ZB_ZCL_CMD_SC_ZONE_ENROLL_REQUEST = 0x01, /**< Zone enroll request */
+       ZB_ZCL_CMD_SC_INITIATE_NORMAL_OPERATION_MODE_RESPONSE = 0x02, /**< Initiate normal operation mode response */
+       ZB_ZCL_CMD_SC_INITIATE_TEST_MODE_RESPONSE = 0x03, /**< Initiate test mode response */
+} zb_zcl_cmd_server_ias_zone_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief CLient to server command types for cluster: IAS Zone.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_ZONE_ENROLL_RESPONSE = 0x00, /**< Zone enroll response */
+       ZB_ZCL_CMD_CS_INITIATE_NORMAL_OPERATION_MODE = 0x01, /**< Initiate normal operation mode */
+       ZB_ZCL_CMD_CS_INITIATE_TEST_MODE = 0x02, /**< Initiate test mode */
+} zb_zcl_cmd_client_ias_zone_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: IAS ACE.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_ARM_RESPONSE = 0x00, /**< Arm response */
+       ZB_ZCL_CMD_SC_GET_ZONE_ID_MAP_RESPONSE = 0x01, /**< Get zone id map response */
+       ZB_ZCL_CMD_SC_GET_ZONE_INFORMATION_RESPONSE = 0x02, /**< Get zone information response */
+       ZB_ZCL_CMD_SC_ZONE_STATUS_CHANGED = 0x03, /**< Zone status change */
+       ZB_ZCL_CMD_SC_PANEL_STATUS_CHANGED = 0x04, /**< Panel status change */
+       ZB_ZCL_CMD_SC_GET_PANEL_STATUS_RESPONSE = 0x05, /**< Get panel status response (since ha-1.2.1-05-3520-30) */
+       ZB_ZCL_CMD_SC_SET_BYPASSED_ZONE_LIST = 0x06, /**< Set bypass zone list (since ha-1.2.1-05-3520-30) */
+       ZB_ZCL_CMD_SC_BYPASS_RESPONSE = 0x07, /**< Bypass response (since ha-1.2.1-05-3520-30) */
+       ZB_ZCL_CMD_SC_GET_ZONE_STATUS_RESPONSE = 0x08, /**< Get zone status response (since ha-1.2.1-05-3520-30) */
+} zb_zcl_cmd_server_ias_ace_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: IAS ACE.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_ARM = 0x00, /**< Arm */
+       ZB_ZCL_CMD_CS_BYPASS = 0x01, /**< Bypass  */
+       ZB_ZCL_CMD_CS_EMERGENCY = 0x02, /**< Emergency */
+       ZB_ZCL_CMD_CS_FIRE = 0x03, /**< Fire */
+       ZB_ZCL_CMD_CS_PANIC = 0x04, /**< Panic */
+       ZB_ZCL_CMD_CS_GET_ZONE_ID_MAP = 0x05, /**< Get zone id map */
+       ZB_ZCL_CMD_CS_GET_ZONE_INFORMATION = 0x06, /**< Get zone information */
+       ZB_ZCL_CMD_CS_GET_PANEL_STATUS = 0x07, /**< Get panel status (since ha-1.2.1-05-3520-30) */
+       ZB_ZCL_CMD_CS_GET_BYPASSED_ZONE_LIST = 0x08, /**< Bypassed zone list (since ha-1.2.1-05-3520-30) */
+       ZB_ZCL_CMD_CS_GET_ZONE_STATUS = 0x09, /**< Get zone status (since ha-1.2.1-05-3520-30) */
+} zb_zcl_cmd_client_ias_ace_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Command types for cluster: IAS WD.
+ * @details Cluster specification level: zcl-1.0-07-5123-03
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_START_WARNING = 0x00, /**< Start warning */
+       ZB_ZCL_CMD_CS_SQUAWK = 0x01, /**< Squawk */
+} zb_zcl_cmd_client_ias_wd_e;
+
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: Electrical Measurement.
+ * @details Cluster specification level: UNKNOWN
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_GET_PROFILE_INFO_RESPONSE_COMMAND = 0x00, /**< Get profile info. response command */
+       ZB_ZCL_CMD_SC_GET_MEASUREMENT_PROFILE_RESPONSE_COMMAND = 0x01, /**< Get measurement profile response command */
+} zb_zcl_cmd_server_electrical_measurement_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: Electrical Measurement.
+ * @details Cluster specification level: UNKNOWN
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_GET_PROFILE_INFO_COMMAND = 0x00, /**< Get profile info. command */
+       ZB_ZCL_CMD_CS_GET_MEASUREMENT_PROFILE_COMMAND = 0x01, /**< Get measurement profile command */
+} zb_zcl_cmd_client_electrical_measurement_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Server to client command types for cluster: ZLL Commissioning.
+ * @details Cluster specification level: zll-1.0-11-0037-10
+ * @since_tizen 4.0
+ * @remarks Direction : Server to Client
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_SC_SCAN_RESPONSE = 0x01, /**< Scan response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_DEVICE_INFORMATION_RESPONSE = 0x03, /**< Device information response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_NETWORK_START_RESPONSE = 0x11, /**< Network start response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_NETWORK_JOIN_ROUTER_RESPONSE = 0x13, /**< Network join router response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_NETWORK_JOIN_END_DEVICE_RESPONSE  = 0x15, /**< Network join end device response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_ENDPOINT_INFORMATION = 0x40, /**< Endpoint information (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_GET_GROUP_IDENTIFIERS_RESPONSE = 0x41, /**< Get group identifiers response (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_SC_GET_ENDPOINT_LIST_RESPONSE = 0x42, /**< Get endpoint list response (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_server_zll_commissioning_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Client to server command types for cluster: ZLL Commissioning.
+ * @details Cluster specification level: zll-1.0-11-0037-10
+ * @since_tizen 4.0
+ * @remarks Direction : Client to Server
+ *
+ */
+typedef enum {
+       ZB_ZCL_CMD_CS_SCAN_REQUEST = 0x00, /**< Scan request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_DEVICE_INFORMATION_REQUEST = 0x02, /**< Device information (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_IDENTIFY_REQUEST = 0x06, /**< Identify request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_RESET_TO_FACTORY_NEW_REQUEST = 0x07, /**< Reset to factory new request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_NETWORK_START_REQUEST = 0x10, /**< Network start request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_NETWORK_JOIN_ROUTER_REQUEST = 0x12, /**< Network join router request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_NETWORK_JOIN_END_DEVICE_REQUEST = 0x14, /**< Network join end device request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_NETWORK_UPDATE_REQUEST  = 0x16, /**< Network update request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_GET_GROUP_IDENTIFIERS_REQUEST = 0x41, /**< Get group identifiers request (since zll-1.0-11-0037-10) */
+       ZB_ZCL_CMD_CS_GET_ENDPOINT_LIST_REQUEST = 0x42, /**< Get end-point list request (since zll-1.0-11-0037-10) */
+} zb_zcl_cmd_client_zll_commissioning_e;
+
+/**
+ * @}
+ */
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_TYPE_H__ */
diff --git a/include/zigbee-zcl_internal.h b/include/zigbee-zcl_internal.h
new file mode 100644 (file)
index 0000000..3a8fb28
--- /dev/null
@@ -0,0 +1,3385 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_INTERNAL_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_INTERNAL_H__
+
+#include <zigbee-zcl-type.h>
+
+
+/**
+ * @internal
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the Attribute Report Fields in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_attr_report_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the Extended Attribute Information Fields in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_extended_attr_info_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the Discover Attribute Info Record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_discover_attr_info_record_h;
+
+/**
+ * @internal
+ * @brief Called after 'discover attribute' command.
+ * @details The discover attributes response command is generated in response to a discover
+ * attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a records can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a records should not be released.
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] discovery_complete Discovery complete
+ * @param[out] records Discover attribute information record
+ * @param[out] count The number of items in @a records
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_attr_discover()
+ */
+typedef void (*zb_zcl_global_attr_discover_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               unsigned char discovery_complete,
+               zb_zcl_discover_attr_info_record_h *records,
+               int count,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'discovering attributes' command.
+ * @details The discover attributes command is generated when a remote device wishes to
+ * discover the identifiers and types of the attributes on a device which are supported
+ * within the cluster to which this command is directed.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] start_id The value of the identifier at which to begin the attribute discovery.
+ * @param[in] max_attribute_ids The maximum number of attribute identifiers
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_zcl_global_attr_discover(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_attribute_id start_id,
+               unsigned char max_attribute_ids,
+               zb_zcl_global_attr_discover_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Creates discover attribute information record.
+ * @details This allocates heap for discover attribute information record
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_discover_attr_info_destroy().
+ *
+ * @param[out] handle The handle of discover attribute information record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_destroy()
+ * @see zb_discover_attr_info_get_id()
+ * @see zb_discover_attr_info_get_type()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_create(zb_zcl_discover_attr_info_record_h *handle);
+
+/**
+ * @internal
+ * @brief Destroys discover attribute information record.
+ * @details This destroys discover attribute information record
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of discover attribute information record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_create()
+ * @see zb_discover_attr_info_get_id()
+ * @see zb_discover_attr_info_get_type()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_destroy(zb_zcl_discover_attr_info_record_h handle);
+
+/**
+ * @internal
+ * @brief Gets identifier from discover attribute info.
+ * @details The attribute identifier field shall contain the identifier of a discovered
+ * attribute.
+ *
+ * Attributes shall be included in ascending order, starting with the
+ * lowest attribute identifier that is greater than or equal to the start attribute
+ * identifier field of the received discover attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_create()
+ * @see zb_discover_attr_info_destroy()
+ * @see zb_discover_attr_info_get_type()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_get_id(zb_zcl_discover_attr_info_record_h handle,
+               zb_attribute_id *id);
+
+/**
+ * @internal
+ * @brief Sets identifier to discover attribute info.
+ * @details The attribute identifier field shall contain the identifier of a discovered
+ * attribute.
+ *
+ * Attributes shall be included in ascending order, starting with the
+ * lowest attribute identifier that is greater than or equal to the start attribute
+ * identifier field of the received discover attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_create()
+ * @see zb_discover_attr_info_destroy()
+ * @see zb_discover_attr_info_get_type()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_set_id(zb_zcl_discover_attr_info_record_h handle,
+               zb_attribute_id id);
+
+/**
+ * @internal
+ * @brief Gets data type from discover attribute info.
+ * @details The attribute data type field shall contain the data type of the attribute in
+ * the same attribute report field
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] type attribute data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_create()
+ * @see zb_discover_attr_info_destroy()
+ * @see zb_discover_attr_info_get_id()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_get_type(zb_zcl_discover_attr_info_record_h handle,
+               zb_zcl_data_type_e *type);
+
+/**
+ * @internal
+ * @brief Sets data type to discover attribute info.
+ * @details The attribute data type field shall contain the data type of the attribute in
+ * the same attribute report field
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] type Attribute data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_discover_attr_info_create()
+ * @see zb_discover_attr_info_destroy()
+ * @see zb_discover_attr_info_get_id()
+ * @see zb_zcl_global_attr_discover_cb()
+ */
+int zb_discover_attr_info_set_type(zb_zcl_discover_attr_info_record_h handle,
+               zb_zcl_data_type_e type);
+
+/**
+ * @internal
+ * @brief Creates reporting attribute.
+ * @details Allocate memory for reporting attribute
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_attr_report_destroy().
+ *
+ * @param[out] handle The handle of reporting attribute
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_create(
+               zb_zcl_attr_report_h *handle);
+
+/**
+ * @Internal
+ * @brief Destroys reporting attribute.
+ * @details This destroys reporting attribute
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of reporting attribute
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_destroy(
+               zb_zcl_attr_report_h handle);
+
+/**
+ * @internal
+ * @brief Gets attribute identifier from reporting attribute.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that the reporting configuration details apply to.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_get_id(
+               zb_zcl_attr_report_h handle,
+               zb_attribute_id *id);
+
+/**
+ * @internal
+ * @brief Sets attribute identifier to reporting attribute.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that the reporting configuration details apply to.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_set_id(
+               zb_zcl_attr_report_h handle,
+               zb_attribute_id id);
+
+/**
+ * @internal
+ * @brief Gets attribute type from reporting attribute.
+ * @details The attribute data type field contains the data type of the attribute that is
+ * being reported.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type attribute data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_get_type(
+               zb_zcl_attr_report_h handle,
+               zb_zcl_data_type_e *type);
+
+/**
+ * @internal
+ * @brief Sets attribute type to reporting attribute.
+ * @details The attribute data type field contains the data type of the attribute that is
+ * being reported.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] type attribute data type @see
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_set_type(
+               zb_zcl_attr_report_h handle,
+               zb_zcl_data_type_e type);
+
+/**
+ * @internal
+ * @brief Gets attribute data from reporting attribute.
+ * @details The attribute data field is variable in length and shall contain the actual
+ * value of the attribute being reported.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a value should be released using free().
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type Attribute data type
+ * @param[out] value Attribute data value
+ * @param[out] count The length of attribute data
+  *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_get_value(
+               zb_zcl_attr_report_h handle,
+               zb_zcl_data_type_e* type,
+               unsigned char** value,
+               int* count);
+
+/**
+ * @internal
+ * @brief Sets attribute data to reporting attribute.
+ * @details The attribute data field is variable in length and shall contain the actual
+ * value of the attribute being reported.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] type Attribute data type
+ * @param[in] value Attribute data value
+ * @param[in] count The length of attribute data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_event_get_attr_report()
+ * @see zb_attr_report_create()
+ * @see zb_attr_report_destroy()
+ * @see zb_attr_report_get_id()
+ * @see zb_attr_report_set_id()
+ * @see zb_attr_report_get_type()
+ * @see zb_attr_report_set_type()
+ * @see zb_attr_report_get_value()
+ * @see zb_attr_report_set_value()
+ */
+int zb_attr_report_set_value(
+               zb_zcl_attr_report_h handle,
+                       zb_zcl_data_type_e type,
+                       unsigned char* value,
+                       int count);
+
+/**
+ * @internal
+ * @brief Creates extended attribute information.
+ * @details Allocate memory for extended attribute information
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_extended_attr_info_destroy().
+ *
+ * @param[out] handle The handle of extended attribute information
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_create(
+               zb_zcl_extended_attr_info_h *handle);
+
+/**
+ * @internal
+ * @brief Destroys extended attribute information.
+ * @details This destroys extended attribute information
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of extended attribute information
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_destroy(
+               zb_zcl_extended_attr_info_h handle);
+
+/**
+ * @internal
+ * @brief Gets attribute identifier from extended attribute information.
+ * @details The attribute identifier field shall contain the identifier of a discovered
+ * attribute.
+ *
+ * Attributes shall be included in ascending order, starting with the lowest attribute
+ * identifier that is greater than or equal to the start attribute identifier field of the
+ * received discover attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_get_id(
+               zb_zcl_extended_attr_info_h handle,
+               zb_attribute_id *id);
+
+/**
+ * @internal
+ * @brief Sets attribute identifier to extended attribute information.
+ * @details The attribute identifier field shall contain the identifier of a discovered
+ * attribute.
+ *
+ * Attributes shall be included in ascending order, starting with the lowest attribute
+ * identifier that is greater than or equal to the start attribute identifier field of the
+ * received discover attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_set_id(
+               zb_zcl_extended_attr_info_h handle,
+               zb_attribute_id id);
+
+/**
+ * @internal
+ * @brief Gets attribute identifier type from extended attribute information.
+ * @details The attribute data type field shall contain the data type of the attribute in
+ * the same attribute report field
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type attribute data type @see
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_get_type(
+               zb_zcl_extended_attr_info_h handle,
+               zb_zcl_data_type_e *type);
+
+/**
+ * @internal
+ * @brief Sets attribute identifier type to extended attribute information.
+ * @details The attribute data type field shall contain the data type of the attribute in
+ * the same attribute report field
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] type attribute data type @see
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_set_type(
+               zb_zcl_extended_attr_info_h handle,
+               zb_zcl_data_type_e type);
+
+/**
+ * @internal
+ * @brief Gets access control field from extended attribute information.
+ * @details The attribute access control field shall indicate whether the attribute is
+ * readable, writable, and/or reportable. This is an 8-bit bitmask field.
+ *
+ * The bits are in little endian order (bit 0 is listed first).
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] acl #ZB_ZCL_ACL_TYPE_WRITABLE : Bit-0., Writable \n
+ *                 #ZB_ZCL_ACL_TYPE_REPORTABLE Bit-1 : Reportable \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_get_acl(
+               zb_zcl_extended_attr_info_h handle,
+               zb_zcl_acl_type_e *acl);
+
+/**
+ * @internal
+ * @brief Sets attribute access control field to extended attribute information.
+ * @details The attribute access control field shall indicate whether the attribute is
+ * readable, writable, and/or reportable. This is an 8-bit bitmask field.
+ *
+ * The bits are in little endian order (bit 0 is listed first).
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] acl #ZB_ZCL_ACL_TYPE_WRITABLE : Bit-0., Writable \n
+ *                #ZB_ZCL_ACL_TYPE_REPORTABLE Bit-1 : Reportable \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ * @see zb_create_extended_attr_report()
+ * @see zb_destroy_extended_attr_report()
+ * @see zb_extended_attr_info_get_id()
+ * @see zb_extended_attr_info_set_id()
+ * @see zb_extended_attr_info_get_type()
+ * @see zb_extended_attr_info_set_type()
+ * @see zb_extended_attr_info_get_acl()
+ * @see zb_extended_attr_info_set_acl()
+ */
+int zb_extended_attr_info_set_acl(
+               zb_zcl_extended_attr_info_h handle,
+               zb_zcl_acl_type_e acl);
+
+/**
+ * @}
+ */
+
+
+ /**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE Alarm Cluster
+ *
+ * @brief Zigbee alarm cluster commands
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_ALARM_CLUSTER_MODULE_OVERVIEW Overview
+ * Attributes and commands for sending alarm notifications and configuring alarm
+ * functionality.
+ *
+ * Alarm conditions and their respective alarm codes are described in individual
+ * clusters, along with an alarm mask field. Where not masked, alarm notifications
+ * are reported to subscribed targets using binding.
+ *
+ * Where an alarm table is implemented, all alarms, masked or otherwise, are
+ * recorded and may be retrieved on demand.
+ *
+ * Alarms may either reset automatically when the conditions that cause are no
+ * longer active, or may need to be explicitly reset.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Generated Command IDs for the Alarms Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Alarm                                |     M      |
+ * |             0x01               | Get alarm response                   |     O      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Called after 'get alarm' command.
+ * @details The get alarm response command returns the results of a request to retrieve
+ * information from the alarm log, along with a time stamp indicating when the
+ * alarm situation was detected.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code \n
+ *                    #ZB_ZCL_STATUS_SUCCESS \n
+ *                    #ZB_ZCL_STATUS_NOT_FOUND \n
+ * @param[out] alarm_code Alarm code (8bit enumeration)
+ *                        Identifying code for the cause of the alarm,
+ *                        as given in the specification of the cluster
+ *                        whose attribute generated this alarm.
+ * @param[out] clusterid Custer identifier
+ * @param[out] time_stamp Unsigned 32bit time stamp
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_alarm_get_alarm()
+ */
+typedef void (*zb_zcl_alarm_get_alarm_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned char alarm_code,
+               zb_cluster_id clusterid,
+               unsigned int time_stamp,
+               void *user_data);
+
+/* Received Command IDs for the Alarms Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Reset Alarm                          |     M      |
+ * |             0x01               | Reset all alarms                     |     M      |
+ * |             0x02               | Get Alarm                            |     O      |
+ * |             0x03               | Reset alarm log                      |     O      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'reset alarm' command.
+ * @details This command resets a specific alarm. This is needed for some alarms that do
+ * not reset automatically. If the alarm condition being reset was in fact still active
+ * then a new notification will be generated and, where implemented, a new record added
+ * to the alarm log.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Destination endpoint
+ * @param[in] alarm_code Alarm code (8bit enumeration) Identifying code for the cause of
+ *                       the alarm, as given in the specification of the cluster whose
+ *                       attribute generated this alarm.
+ * @param[in] clusterid Custer identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_zcl_alarm_reset_alarm(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char alarm_code,
+               zb_cluster_id clusterid);
+
+/**
+ * @brief Sends 'reset all alarm' command.
+ * @details This command resets all alarms. Any alarm conditions that were in fact still
+ * active will cause a new notification to be generated and, where implemented, a new
+ * record added to the alarm log.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Destination zb_end_point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_zcl_alarm_reset_all_alarm(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @brief Sends 'get alarm' coommand.
+ * @details This command causes the alarm with the earliest timestamp in the alarm table
+ * to be reported in a get alarm response command 3.11.2.5.2. This command enables
+ * the reading of logged alarm conditions from the alarm table. Once an alarm
+ * condition has been reported the corresponding entry in the table is removed.
+ * This command does not have a payload.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Destination endpoint
+ * @param[in] cb Response callback function pointer
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_alarm_get_alarm_cb()
+ */
+int zb_zcl_alarm_get_alarm(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_alarm_get_alarm_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'reset all alarm log' command.
+ * @details This command causes the alarm table to be cleared, and does not have a payload.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Destination endpoint
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_zcl_alarm_reset_all_alarm_log(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @}
+ */
+
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE Basic Cluster
+ *
+ * @brief Zigbee basic cluster commands
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_BASIC_CLUSTER_MODULE_OVERVIEW Overview
+ * Attributes and commands for determining basic information about a device,
+ * setting user device information such as location, enabling a device and resetting it
+ * to factory defaults.
+ * Note: Where a physical ZigBee node supports multiple endpoints it will often be
+ * the case that many of these settings will apply to the whole node, that is they are
+ * the same for every endpoint on the device. In such cases they can be implemented
+ * once for the node, and mapped to each endpoint.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/**
+ * @brief Sends 'reset factory default' command.
+ * @details This function is aim to reset end-device as factory default settings.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep target endpoint
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ */
+int zb_zcl_basic_reset_factory_default(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @}
+ */
+
+ /**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE Color Control Cluster
+ *
+ * @brief Zigbee color control cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_COLOR_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
+ * This cluster provides an interface for changing the color of a light. Color is
+ * specified according to the Commission Internationale de l'Eclairage (CIE)
+ * specification CIE 1931 Color Space, Color control is carried out in terms of
+ * x,y values, as defined by this specification.
+ *
+ * Additionally, color may optionally be controlled in terms of color temperature, or
+ * as hue and saturation values based on optionally variable RGB and W color
+ * points. It is recommended that the hue and saturation are interpreted according to
+ * the HSV (aka HSB) color model.
+ *
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Command IDs for the Color Control Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Move to Hue                          |     O      |
+ * |             0x01               | Move Hue                             |     O      |
+ * |             0x02               | Step Hue                             |     O      |
+ * |             0x03               | Move to Saturation                   |     O      |
+ * |             0x04               | Move Saturation                      |     O      |
+ * |             0x05               | Step Saturation                      |     O      |
+ * |             0x06               | Move to Hue and Saturation           |     O      |
+ * |             0x07               | Move to Color                        |     M      |
+ * |             0x08               | Move Color                           |     M      |
+ * |             0x09               | Step Color                           |     M      |
+ * |             0x0a               | Move to Color Temperature            |     O      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'move to hue' command.
+ * @details On receipt of this command, a device shall also set the ColorMode attribute to the
+ * value 0x00 and then shall move from its current hue to the value given in the Hue
+ * field.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new hue shall be equal to the Transition time field.
+ *
+ * As hue is effectively measured on a circle, the new hue may be moved to in either
+ * direction. The direction of hue change is given by the Direction field. If Direction
+ * is 'Shortest distance', the direction is taken that involves the shortest path round
+ * the circle. This case corresponds to expected normal usage. If Direction is
+ * 'Longest distance', the direction is taken that involves the longest path round the
+ * circle. This case can be used for 'rainbow effects'. In both cases, if both distances
+ * are the same, the Up direction shall be taken.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out, and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE.
+ *
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] hue The Hue field specifies the hue to be moved to.
+ * @param[in] direction The direction field shall be one of the non-reserved values\n
+ *                      0x00 : Shortest distance\n
+ *                      0x01 : Longest distance\n
+ *                      0x02 : Up\n
+ *                      0x03 : Down\n
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to move to the new hue
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_to_hue(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char hue,
+               unsigned char direction,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move hue' command.
+ * @details On receipt of this command, a device shall set the ColorMode attribute to the
+ * value 0x00 and shall then move from its current hue in an up or down direction in
+ * a continuous fashion.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Stop\n
+ *                      0x01 : Up\n
+ *                      0x02 : Reserved\n
+ *                      0x03 : Down\n
+ * @param[in] rate The Rate field specifies the rate of movement in steps per second.\n
+ *                 A step is a change in the device's hue of one unit.
+ *                 If the Rate field has a value of zero, the command has no effect and
+ *                 a default response command is sent in response, with the status code
+ *                 set to INVALID_FIELD.\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_hue(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char move_mode,
+               unsigned char rate);
+
+/**
+ * @brief Sends 'step hue' command.
+ * @details On receipt of this command, a device shall set the ColorMode attribute to the
+ * value 0x00 and shall then move from its current hue in an up or down direction by
+ * one step.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Reserved\n
+ *                      0x01 : Up\n
+ *                      0x02 : Reserved\n
+ *                      0x03 : Down\n
+ * @param[in] step_size The change to be added to (or subtracted from) the current value \n
+ *                      of the device's hue.
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *                            A step is a change in the device's hue of 'Step size' units.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_step_hue(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char step_mode,
+               unsigned char step_size,
+               unsigned char transition_time);
+
+/**
+ * @brief Sends 'move to saturation' command.
+ * @details On receipt of this command, a device set the ColorMode attribute to the value
+ * 0x00 and shall then move from its current saturation to the value given in the
+ * Saturation field.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new saturation shall be equal to the Transition time field, in 1/10ths of
+ * a second.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] saturation The target saturation value
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *                            A step is a change in the device's hue of 'Step size' units.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_to_saturation(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char saturation,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move saturation' command.
+ * @details On receipt of this command, a device shall set the ColorMode attribute to the
+ * value 0x00 and shall then move from its current saturation in an up or down
+ * direction in a continuous fashion.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Stop\n
+ *                      0x01 : Up\n
+ *                      0x02 : Reserved\n
+ *                      0x03 : Down\n
+ * @param[in] rate The Rate field specifies the rate of movement in steps per second.\n
+ *                 A step is a change in the device's hue of one unit.
+ *                 If the Rate field has a value of zero, the command has no effect and
+ *                 a default response command is sent in response, with the status code
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_saturation(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char move_mode,
+               unsigned char rate);
+
+/**
+ * @brief Sends 'step saturation' command.
+ * @details On receipt of this command, a device shall set the ColorMode attribute to the
+ * value 0x00 and shall then move from its current saturation in an up or down
+ * direction in a continuous fashion.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Reserved\n
+ *                      0x01 : Up\n
+ *                      0x02 : Reserved\n
+ *                      0x03 : Down\n
+ * @param[in] step_size The change to be added to (or subtracted from) the current value \n
+ *                      of the device's hue.
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_step_saturation(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char step_mode,
+               unsigned char step_size,
+               unsigned char transition_time);
+
+/**
+ * @brief Sends 'move to hue and saturation' command.
+ * @details On receipt of this command, a device shall set the ColorMode attribute to the
+ * value 0x00 and shall then move from its current hue and saturation to the values
+ * given in the Hue and Saturation fields.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new color shall be equal to the Transition time field, in 1/10ths of a
+ * second.
+ *
+ * The path through color space taken during the transition is not specified, but it is
+ * recommended that the shortest path is taken though hue/saturation space, i.e.
+ * movement is 'in a straight line' across the hue/saturation disk.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] hue The Hue field specifies the hue to be moved to.
+ * @param[in] saturation The target saturation value
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *                            A step is a change in the device's hue of 'Step size' units.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_to_hue_and_saturation(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char hue,
+               unsigned char saturation,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move to color' command.
+ * @details On receipt of this command, a device shall set the value of the ColorMode
+ * attribute, where implemented, to 0x01, and shall then move from its current color
+ * to the color given in the ColorX and ColorY fields.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new color shall be equal to the Transition time field, in 1/10ths of a
+ * second.
+ *
+ * The path through color space taken during the transition is not specified, but it is
+ * recommended that the shortest path is taken though color space, i.e. movement is
+ * 'in a straight line' across the CIE xyY Color Space.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out, and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] color_x Target color position x
+ * @param[in] color_y Target color position y
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *                            A step is a change in the device's hue of 'Step size' units.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_to_color(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short color_x,
+               unsigned short color_y,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move color' commmand.
+ * @details On receipt of this command, a device shall set the value of the ColorMode
+ * attribute, where implemented, to 0x01, and shall then move from its current color
+ * in a continuous fashion according to the rates specified. This movement shall
+ * continue until the target color for the next step cannot be implemented on this
+ * device.
+ *
+ * If both the RateX and RateY fields contain a value of zero, no movement shall be
+ * carried out, and the command execution shall have no effect other than stopping
+ * the operation of any previously received command of this cluster. This command
+ * can thus be used to stop the operation of any other command of this cluster.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] rate_x The RateX field specifies the rate of movement in steps per second.
+ *                   A step is a change in the device's CurrentX attribute of one unit.
+ * @param[in] rate_y The RateY field specifies the rate of movement in steps per second.
+ *                   A step is a change in the device's CurrentY attribute of one unit.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_color(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short rate_x,
+               unsigned short rate_y);
+
+/**
+ * @brief Sends 'step color' command.
+ * @details On receipt of this command, a device shall set the value of the ColorMode
+ * attribute, where implemented, to 0x01, and shall then move from its current color
+ * by the color step indicated.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new color shall be equal to the Transition time field, in 1/10ths of a
+ * second.
+ *
+ * The path through color space taken during the transition is not specified, but it is
+ * recommended that the shortest path is taken though color space, i.e. movement is
+ * 'in a straight line' across the CIE xyY Color Space.
+ *
+ * Note that if the target color specified is not achievable by this hardware then
+ * command shall not be carried out, and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] step_x The StepX and StepY fields specify the change to be added to the device's
+ *                   CurrentX attribute and CurrentY attribute respectively.
+ * @param[in] step_y The StepX and StepY fields specify the change to be added to the device's
+ *                   CurrentX attribute and CurrentY attribute respectively.
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_step_color(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short step_x,
+               unsigned short step_y,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move to color temperature' command.
+ * @details On receipt of this command, a device shall set the value of the ColorMode
+ * attribute, where implemented, to 0x02, and shall then move from its current color
+ * to the color given by the Color Temperature field.
+ *
+ * The movement shall be continuous, i.e. not a step function, and the time taken to
+ * move to the new color shall be equal to the Transition time field, in 1/10ths of a
+ * second.
+ *
+ * By definition of this color mode, the path through color space taken during the
+ * transition is along the 'Black Body Line'.
+ *
+ * Note that if the target color specified is not achievable by the hardware then the
+ * command shall not be carried out, and a ZCL default response command shall be
+ * generated, where not disabled, with status code equal to INVALID_VALUE.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] color_temperature The target color temperature value
+ * @param[in] transition_time The Transition time field specifies, in 1/10ths of a second,
+ *                            the time that shall be taken to perform the step.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_ccontrol_move_to_color_temperature(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short color_temperature,
+               unsigned short transition_time);
+
+/**
+ * @}
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE Group Cluster
+ *
+ * @brief Zigbee group cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_GROUP_CLUSTER_MODULE_OVERVIEW Overview
+ * The ZigBee specification provides the capability for group addressing. That is,
+ * any endpoint on any device may be assigned to one or more groups, each labeled
+ * with a 16-bit identifier (0x0001 . 0xfff7), which acts for all intents and purposes
+ * like a network address. Once a group is established, frames, sent having a DstAddrMode
+ * of 0x01, denoting group addressing, will be delivered to every endpoint assigned to
+ * the group address named in the DstAddr parameter of the outgoing send request
+ * on every device in the network for which there are such endpoints.
+ *
+ * Management of group membership on each device and endpoint is implemented
+ * by the APS, but the over-the-air messages that allow for remote management and
+ * commissioning of groups are defined here in the cluster library on the theory that,
+ * while the basic group addressing facilities are integral to the operation of the
+ * stack, not every device will need or want to implement this management cluster.
+ *
+ * Furthermore, the placement of the management commands here allows developers
+ * of proprietary profiles to avoid implementing the library cluster but still exploit
+ * group addressing.
+ *
+ * Commands are defined here for discovering the group membership of a device,
+ * adding a group, removing a group and removing all groups.
+ *
+ * Finally, the group cluster allows application entities to store a name string for each
+ * group to which they are assigned and to report that name string in response to a
+ * client request.
+ * Note that configuration of group addresses for outgoing commands is achieved
+ * using the APS binding mechanisms, and is not part of this cluster.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Generated Command IDs for the Groups Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Add group response                   |     M      |
+ * |             0x01               | View group response                  |     M      |
+ * |             0x02               | Get group membership response        |     M      |
+ * |             0x03               | Remove group response                |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Called after 'add group' command.
+ * @details The add group response is sent by the groups cluster server in response to an
+ *  add group command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_DUPLICATE_EXISTS \n
+ *             #ZB_ZCL_STATUS_INSUFFICIENT_SPACE \n
+ * @param[out] group_id Group id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_add_group()
+ */
+typedef void (*zb_zcl_group_add_group_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               void *user_data);
+
+/**
+ * @brief Called after 'view group' command.
+ * @details The view group response command is sent by the groups cluster server in
+ * response to a view group command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks @remarks The @a group_name should not be released.
+ * @remarks The @a group_name can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_NOT_FOUND \n
+ * @param[out] group_id Group id
+ * @param[out] group_name Group name
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_view_group()
+ */
+typedef void (*zb_zcl_group_view_group_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               const char *group_name,
+               void *user_data);
+
+/**
+ * @brief Called after 'view group membership' command.
+ * @details The get group membership response command is sent by the groups cluster server
+ * in response to a get group membership command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks @remarks The @a group_list should not be released.
+ * @remarks The @a group_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] capacity How many we can add to this group
+ * @param[out] group_count The length of groups contained in the group_list
+ * @param[out] group_list the identifiers either of all the groups in the group table
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_view_group_membership()
+ */
+typedef void (*zb_zcl_group_get_group_membership_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char capacity,
+               unsigned char group_count,
+               unsigned short *group_list,
+               void *user_data);
+
+/**
+ * @brief Called after 'remove group' command.
+ * @details The add group response is sent by the groups cluster server in response to an
+ *  remove group command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_NOT_FOUND \n
+ * @param[out] group_id Group id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_add_group()
+ */
+typedef void (*zb_zcl_group_remove_group_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               void *user_data);
+
+/* Received Command IDs for the Groups Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Add group                            |     M      |
+ * |             0x01               | View group                           |     M      |
+ * |             0x02               | Get group membership                 |     M      |
+ * |             0x03               | Remove group                         |     M      |
+ * |             0x04               | Remove all group                     |     M      |
+ * |             0x05               | Add group if identifying             |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'add groups' command.
+ * @details The add group command allows the sending device to add group membership in a
+ * particular group for one or more endpoints on the receiving device.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ * @param[in] group_id Group ID
+ * @param[in] group_name Group name
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_group_add_group_cb()
+ */
+int zb_zcl_group_add_group(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               char *group_name,
+               zb_zcl_group_add_group_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'view group' command.
+ * @details The view group command allows the sending device to request that the receiving
+ * entity or entities respond with a view group response command containing the
+ * application name string for a particular group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ * @param[in] group_id Group ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_group_view_group_cb()
+ */
+int zb_zcl_group_view_group(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               zb_zcl_group_view_group_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'get group membership' command.
+ * @details The get group membership command allows the sending device to inquire about
+ * the group membership of the receiving device and endpoint in a number of ways.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ * @param[in] group_count Group count
+ * @param[in] group_list Group list
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_group_get_group_membership_cb()
+ */
+int zb_zcl_group_get_group_membership(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char group_count,
+               unsigned short *group_list,
+               zb_zcl_group_get_group_membership_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'remove group' command.
+ * @details The remove group command allows the sender to request that the receiving entity
+ * or entities remove their membership, if any, in a particular group.
+ * Note that if a group is removed the scenes associated with that group should be
+ * removed.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ * @param[in] group_id Group ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_group_remove_group_cb()
+ */
+int zb_zcl_group_remove_group(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               zb_zcl_group_remove_group_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'remove all group' command.
+ * @details The remove all groups command allows the sending device to direct the receiving
+ * entity or entities to remove all group associations.
+ *
+ * Note that removing all groups necessitates the removal of all associated scenes as
+ * well. (Note: scenes not associated with a group need not be removed).
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_group_remove_all_group(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @brief Sends 'remove group if identifying' command.
+ * @details The add group if identifying command allows the sending device to add group
+ * membership in a particular group for one or more endpoints on the receiving
+ * device, on condition that it is identifying itself. Identifying functionality is
+ * controlled using the identify cluster.
+ *
+ * This command might be used to assist configuring group membership in the
+ * absence of a commissioning tool.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Target endpoint
+ * @param[in] group_id Group ID
+ * @param[in] group_name Group name
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_group_add_group_if_identifying(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               const char *group_name);
+
+/**
+ * @}
+ */
+
+
+ /**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE Identity Cluster
+ *
+ * @brief Zigbee identity cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_IDENTITY_CLUSTER_MODULE_OVERVIEW Overview
+ *
+ * Attributes and commands to put a device into an Identification mode (e.g. flashing
+ * a light), that indicates to an observer . e.g. an installer - which of several devices
+ * it is, also to request any device that is identifying itself to respond to the initiator.
+ *
+ * Note that this cluster cannot be disabled, and remains functional regardless of the
+ * setting of the DeviceEnable attribute in the Basic cluster.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/**
+ * @brief Makes devices as Identify mode within specific time.
+ * @details The identify command starts or stops the receiving device identifying itself.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep endpoint number
+ * @param[in] identify_time Identify time
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_identify(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short identify_time);
+
+/**
+ * @brief Called after receiving identify query command.
+ * @details The identify query command allows the sending device to request the target or
+ * targets to respond if they are currently identifying themselves.
+ * This command has no payload.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] identify_time Identify time
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_identify_query()
+ */
+typedef void (*zb_zcl_identify_query_cb)(
+               zb_nwk_addr addr16,
+               unsigned short identify_time,
+               void *user_data);
+
+/**
+ * @brief Finds devices which sustains identify mode.
+ * @details The identify query command allows the sending device to request the target or
+ * targets to respond if they are currently identifying themselves.
+ * This command has no payload.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep endpoint number
+ * @param[in] cb response callback function
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ */
+int zb_zcl_identify_query(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_identify_query_cb cb,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE Level Control Cluster
+ *
+ * @brief Zigbee level control cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_LEVEL_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
+ * This cluster provides an interface for controlling a characteristic of a device that
+ * can be set to a level, for example the brightness of a light, the degree of closure of
+ * a door, or the power output of a heater.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Command IDs for the Level Control Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Move to Level                        |     M      |
+ * |             0x01               | Move                                 |     M      |
+ * |             0x02               | Step                                 |     M      |
+ * |             0x03               | Stop                                 |     M      |
+ * |             0x04               | Move to Level (with On/Off)          |     M      |
+ * |             0x05               | Move (with On/Off)                   |     M      |
+ * |             0x06               | Step (with On/Off)                   |     M      |
+ * |             0x07               | Stop                                 |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'move to level' command.
+ * @details On receipt of this command, a device shall move from its current level to the
+ * value given in the Level field. The meaning of 'level' is device dependent ? e.g.
+ * for a light it may mean brightness level.
+ *
+ * The movement shall be as continuous as technically practical, i.e. not a step
+ * function, and the time taken to move to the new level shall be equal to the value of
+ * the Transition time field, in tenths of a second, or as close to this as the device is
+ * able.
+ *
+ * If the Transition time field takes the value 0xffff then the time taken to move to
+ * the new level shall instead be determined by the OnOffTransitionTime attribute. If
+ * OnOffTransitionTime , which is an optional attribute, is not present, the device
+ * shall move to its new level as fast as it is able.
+ *
+ * If the device is not able to move at a variable rate, the Transition time field may be
+ * disregarded.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] level Brightness level
+ * @param[in] transition_time The Transition time field, in tenths of a second, \n
+ *                            or as close to this as the device is able
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_move_to_level(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char level,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move' command.
+ * @details On receipt of this command, a device shall move from its current level in an
+ * up or down direction in a continuous fashion
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Up\n
+ *                      0x01 : Down\n
+ * @param[in] rate The Rate field specifies the rate of movement in units per second. \n
+ *                 The actual rate of movement should be as close to this rate as the device is able.\n
+ *                 If the Rate field is 0xff the device should move as fast as it is able.\n
+ *                 If the device is not able to move at a variable rate, this field may be disregarded.\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_move(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char move_mode,
+               unsigned char rate);
+
+/**
+ * @brief Sends 'step' command.
+ * @details On receipt of this command, a device shall move from its current level in an
+ * up or down direction in a continuous fashion
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] step_mode The Step mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Up\n
+ *                      0x01 : Down\n
+ * @param[in] step_size Step size
+ * @param[in] transition_time The Transition time field specifies the time that shall be taken to perform the step,\n
+ *                            in tenths of a second. A step is a change in the CurrentLevel of 'Step size' units.\n
+ *                            The actual time taken should be as close to this as the device is able. If the\n
+ *                            Transition time field is 0xffff the device should move as fast as it is able.\n
+ *                            If the device is not able to move at a variable rate, the Transition time field may be\n
+ *                            disregarded.\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_step(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char step_mode,
+               unsigned char step_size,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'stop' command.
+ * @details This command has no payload. Upon receipt of this command, any Move to
+ * Level, Move or Step command (and their 'with On/Off' variants) currently in
+ * process shall be terminated.
+ *
+ * The value of CurrentLevel shall be left at its value upon receipt of the Stop command,
+ * and RemainingTime shall be set to zero.
+ *
+ * This command has two entries, one for the Move to Level, Move and Set commands,
+ * and one for their 'with On/Off' counterparts. This is solely for symmetry,
+ * to allow easy choice of one or other set of commands the, Stop commands are identical.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_stop(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @brief Sends 'move to level with on/off' command.
+ * @details On receipt of this command, a device shall move from its current level to the
+ * value given in the Level field. The meaning of 'level' is device dependent ? e.g.
+ * for a light it may mean brightness level.
+ *
+ * The movement shall be as continuous as technically practical, i.e. not a step
+ * function, and the time taken to move to the new level shall be equal to the value of
+ * the Transition time field, in tenths of a second, or as close to this as the device is
+ * able.
+ *
+ * If the Transition time field takes the value 0xffff then the time taken to move to
+ * the new level shall instead be determined by the OnOffTransitionTime attribute. If
+ * OnOffTransitionTime , which is an optional attribute, is not present, the device
+ * shall move to its new level as fast as it is able.
+ *
+ * If the device is not able to move at a variable rate, the Transition time field may be
+ * disregarded.
+ *
+ * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
+ * commands have identical payloads to the Move to Level, Move and Step
+ * commands respectively. The also have the same effects, except for the following
+ * additions.
+ *
+ * * Before commencing any command that has the effect of increasing
+ * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
+ * implemented, shall be set to On.
+ *
+ * * If any command that decreases CurrentLevel reduces it to the minimum level
+ * allowed by the device, the OnOff attribute of the On/Off cluster on the same
+ * endpoint, if implemented, shall be set to Off.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] level Brightness level
+ * @param[in] transition_time The Transition time field, in tenths of a second, \n
+ *                             or as close to this as the device is able
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_move_to_level_with_on_off(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char level,
+               unsigned short transition_time);
+
+/**
+ * @brief Sends 'move with on/off' command.
+ * @details On receipt of this command, a device shall move from its current level in an
+ * up or down direction in a continuous fashion.
+ *
+ * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
+ * commands have identical payloads to the Move to Level, Move and Step
+ * commands respectively. The also have the same effects, except for the following
+ * additions.
+ * * Before commencing any command that has the effect of increasing
+ * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
+ * implemented, shall be set to On.
+ * * If any command that decreases CurrentLevel reduces it to the minimum level
+ * allowed by the device, the OnOff attribute of the On/Off cluster on the same
+ * endpoint, if implemented, shall be set to Off.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] move_mode The Move mode field shall be one of the non-reserved values.\n
+ *                      0x00 : Up\n
+ *                      0x01 : Down\n
+ * @param[in] rate The Rate field specifies the rate of movement in units per second. \n
+ *  The actual rate of movement should be as close to this rate as the device is able.\n
+ *  If the Rate field is 0xff the device should move as fast as it is able.\n
+ *  If the device is not able to move at a variable rate, this field may be disregarded.\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_move_with_on_off(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char move_mode,
+               unsigned char rate);
+
+/**
+ * @brief Sends 'step with on/off' command.
+ * @details On receipt of this command, a device shall move from its current level in an
+ * up or down direction in a continuous fashion.
+ *
+ * The Move to Level (with On/Off), Move (with On/Off) and Step (with On/Off)
+ * commands have identical payloads to the Move to Level, Move and Step
+ * commands respectively. The also have the same effects, except for the following
+ * additions.
+ *
+ * * Before commencing any command that has the effect of increasing
+ * CurrentLevel, the OnOff attribute of the On/Off cluster on the same endpoint, if
+ * implemented, shall be set to On.
+ *
+ * * If any command that decreases CurrentLevel reduces it to the minimum level
+ * allowed by the device, the OnOff attribute of the On/Off cluster on the same
+ * endpoint, if implemented, shall be set to Off.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] step_mode The Step mode field shall be one of the non-reserved values\n
+ *                      0x00 : Up\n
+ *                      0x01 : Down\n
+ * @param[in] step_size Step size
+ * @param[in] transition_time The Transition time field specifies the time that shall be
+ *  taken to perform the step, in tenths of a second. A step is a change in the
+ *  CurrentLevel of 'Step size' units.
+ *
+ *  The actual time taken should be as close to this as the device is able. If the
+ *  Transition time field is 0xffff the device should move as fast as it is able.
+ *
+ *  If the device is not able to move at a variable rate, the Transition time field may be
+ *  disregarded.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_levelctrl_step_with_on_off(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char step_mode,
+               unsigned char step_size,
+               unsigned short transition_time);
+
+/**
+ * @}
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE Poll Control Cluster
+ *
+ * @brief Zigbee poll control cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_POLL_CONTROL_CLUSTER_MODULE_OVERVIEW Overview
+ * This cluster provides a mechanism for the management of an end device's MAC
+ * Data Request rate. For the purposes of this cluster, the term "poll" always refers to
+ * the sending of a MAC Data Request from the end device to the end device's parent.
+ * This cluster can be used for instance by a configuration device to make an end
+ * device responsive for a certain period of time so that the device can be managed
+ * by the controller.
+ *
+ * This cluster is composed of a client and server. The end device implements the
+ * server side of this cluster. The server side contains several attributes related to the
+ * MAC Data Request rate for the device. The client side implements commands
+ * used to manage the poll rate for the device.
+ *
+ * The end device which implements the server side of this cluster sends a query to
+ * the client on a predetermined interval to see if the client would like to manage the
+ * poll period of the end device in question. When the client side of the cluster hears
+ * from the server it has the opportunity to respond with configuration data to either
+ * put the end device in a short poll mode or let the end device continue to function
+ * normally.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+
+/* Commands Generated by the Poll Control Server
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Check-in                             |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Called after receiving 'check-in' event.
+ * @details The Poll Control Cluster server sends out a Check-in command to the devices to
+ * which it is paired based on the server's Check-inInterval attribute. It does this to
+ * find out if any of the Poll Control Cluster Clients with which it is paired are
+ * interested in having it enter fast poll mode so that it can be managed. This request
+ * is sent out based on either the Check-inInterval, or the next Check-in value in the
+ * Fast Poll Stop Request generated by the Poll Control Cluster Client.
+ *
+ * The Check-in command expects a Check-in Response command to be sent back
+ * from the Poll Control Client. If the Poll Control Server does not receive a Check-
+ * in response back from the Poll Control Client up to7.68 seconds it is free to return
+ * to polling according to the LongPollInterval.
+ *
+ * The Poll Control Cluster is used on end devices that may be battery powered. In
+ * order to conserve battery life, it is important that the Poll Control Server maintain
+ * certain boundaries for the setting of the Check-inInterval, LongPollInterval and
+ * the ShortPollInterval. Therefore, while these attributes are all Read/Write, it is
+ * possible that a battery-powered device might maintain its own boundary for the
+ * min and max of each of these attributes. The end device implementing the Poll
+ * Control Cluster Server may define its own boundaries for these attributes in order
+ * to protect itself against a power drain due to improper configuration.
+ * For instance a battery powered device may not allow another device to set its
+ * Check-inInterval to too short a value or its FastPollTimeout to too long an interval
+ * because it might cause the device to send too frequent check-in messages on the
+ * network and stay in fast poll mode for too long a time resulting in a drain on the
+ * battery.
+ *
+ * The Check-inInterval, LongPollInterval and ShortPollInterval should be set such
+ * that:
+ * \n
+ * - Check-in Interval >= Long Poll Interval >= Short Poll Interval\n
+ * - The default values chosen for this cluster are:\n
+ * - Check-in Interval = 1 hour = 0x3840 quarterseconds.\n
+ * - Long Poll Interval = 5 seconds = 0x14 quarterseconds.\n
+ * - Short Poll Interval = 2 quarterseconds = 0x02 quarterseconds.\n
+ * - Fast Poll Timeout = 10 seconds = 0x28 quarterseconds.\n
+ * \n
+ * It should be noted that for the Check-in Interval, 0 is a special value and does not
+ * apply to this equation.\n
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_pollctrl_set_long_poll_interval()
+ * @see zb_zcl_pollctrl_set_short_poll_interval()
+ */
+typedef void (*zb_zcl_pollctrl_check_in_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               void *user_data);
+
+/* Commands Generated by the Poll Control Client in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Check-in Response                    |     M      |
+ * |             0x00               | Fast Poll Stop                       |     M      |
+ * |             0x00               | Set Long Poll Interval               |     O      |
+ * |             0x00               | Set Short Poll Interval              |     O      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'check-in response'.
+ * @details The Check-in Response is sent in response to the receipt of a Check-in command.
+ *
+ * The Check-in Response is used by the Poll Control Client to indicate whether it
+ * would like the device implementing the Poll Control Cluster Server to go into a
+ * fast poll mode and for how long. If the Poll Control Cluster Client indicates that it
+ * would like the device to go into a fast poll mode, it is responsible for telling the
+ * device to stop fast polling when it is done sending messages to the fast polling
+ * device.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] start_fast_polling This Boolean value indicates whether or not the Poll
+ *                               Control Server device should begin fast polling or not.\n
+ *                               If the Start Fast Polling value is true, the server device
+ *                               is expected to begin fast polling until the Fast Poll
+ *                               Timeout has expired. If the Start Fast Polling argument
+ *                               is false, the Poll Control Server may continue in normal
+ *                               operation and is not required to go into fast poll mode.\n
+ * @param[in] fast_poll_timeout The Fast Poll Timeout value indicates the number of
+ *                              quarterseconds during which the device should continue
+ *                              fast polling. If the Fast Poll Timeout value is 0, the
+ *                              device is expected to continue fast polling until the
+ *                              amount of time indicated it the FastPollTimeout attribute
+ *                              has elapsed or it receives a Fast Poll Stop command\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_pollctrl_check_in_response(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char start_fast_polling,
+               unsigned short fast_poll_timeout);
+
+/**
+ * @brief Sends 'fast poll stop' command.
+ * @details The Fast Poll Stop command is used to stop the fast poll mode initiated by the
+ * Check-in response. The Fast Poll Stop command has no payload.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_pollctrl_fast_poll_stop(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep);
+
+/**
+ * @brief Sends 'set long poll interval' command.
+ * @details The Set Long Poll Interval command is used to set the read only LongPollInterval
+ * attribute.
+ *
+ * When the Poll Control Server receives the Set Long Poll Interval Command, it
+ * should check its internal minimal limit and the attributes relationship defined in
+ * 9.6.4.2 if the new Long Poll Interval is acceptable. If the new value is acceptable,
+ * the new value shall be saved to the LongPollInterval attribute.If the new value is
+ * not acceptable, the Poll Control Server shall send a default response of
+ * INVALID_VALUE (0x87) and the LongPollInterval attribute value is not updated.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] new_long_poll_interval long poll interval
+ * @param[in] cb Resopnse callback function
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_pollctrl_check_in_cb()
+ *
+ */
+int zb_zcl_pollctrl_set_long_poll_interval(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned int new_long_poll_interval,
+               zb_zcl_pollctrl_check_in_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'set short poll interval' command.
+ * @details The Set Short Poll Interval command is used to set the read only
+ * ShortPollInterval attribute.
+ *
+ * When the Poll Control Server receives the Set Short Poll Interval Command, it
+ * should check its internal minimal limit and the attributes relationship defined in
+ * 9.6.4.2 if the new Short Poll Interval is acceptable. If the new value is acceptable,
+ * the new value shall be saved to the ShortPollInterval attribute. If the new value is
+ * not acceptable, the Poll Control Server shall send a default response of
+ * INVALID_VALUE (0x87) and the ShortPollInterval attribute value is not updated.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] new_short_poll_interval long poll interval
+ * @param[in] cb Resopnse callback function
+ * @param[in] user_data user_data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_pollctrl_check_in_cb()
+ */
+int zb_zcl_pollctrl_set_short_poll_interval(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned int new_short_poll_interval,
+               zb_zcl_pollctrl_check_in_cb cb,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE Scene Cluster
+ *
+ * @brief Zigbee scene cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_SCENE_CLUSTER_MODULE_OVERVIEW Overview
+ * The scenes cluster provides attributes and commands for setting up and recalling
+ * scenes. Each scene corresponds to a set of stored values of specified attributes for
+ * one or more clusters on the same end point as the scenes cluster.
+ *
+ * In most cases scenes are associated with a particular group ID. Scenes may also
+ * exist without a group, in which case the value 0x0000 replaces the group ID. Note
+ * that extra care is required in these cases to avoid a scene ID collision, and that
+ * commands related to scenes without a group may only be unicast, i.e.: they may
+ *not be multicast or broadcast.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Generated Command IDs for the Scenes Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Add scene response                   |     M      |
+ * |             0x01               | View scene response                  |     M      |
+ * |             0x02               | Remove scene response                |     M      |
+ * |             0x03               | Remove all scene response            |     M      |
+ * |             0x04               | Store scene response                 |     M      |
+ * |             0x05               | Reserved                             |     -      |
+ * |             0x06               | Get scene membership response        |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Called after 'add scene' command.
+ * @details This command is generated in response to a received Add Scene command.
+ * The Status field is set to #ZB_ZCL_STATUS_SUCCESS, #ZB_ZCL_STATUS_INSUFFICIENT_SPACE or
+ * #ZB_ZCL_STATUS_INVALID_FIELD (the group is not present in the Group Table) as appropriate.
+ * The Group ID and Scene ID fields are set to the corresponding fields of the
+ * received Add Scene command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_NOT_FOUND \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ * @param[out] group_id Group id
+ * @param[out] scene_id Scene id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_add_scene()
+ */
+typedef void (*zb_zcl_scene_add_scene_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               unsigned char scene_id,
+               void *user_data);
+
+/**
+ * @brief Called after 'view scene' command.
+ * @details This command is generated in response to a received View Scene command
+ * The entry in the Scene Table with Scene ID and Group ID given in the received
+ * View Scene command is located (if possible). The Status field is set to
+ * #ZB_ZCL_STATUS_SUCCESS, #ZB_ZCL_STATUS_NOT_FOUND
+ * (the scene is not present in the Scene Table) or #ZB_ZCL_STATUS_INVALID_FIELD
+ * (the group is not present in the Group Table) as appropriate. The Group ID and
+ * Scene ID fields are set to the corresponding fields in the received View Scene
+ * command.
+ * If the status is #ZB_ZCL_STATUS_SUCCESS, the Transition time, Scene Name and Extension
+ * field fields are copied from the corresponding fields in the table entry, otherwise
+ * they are omitted.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a scene_name can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a extension_field_set can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_NOT_FOUND \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ * @param[out] group_id Group id
+ * @param[out] scene_id Scene id
+ * @param[out] transition_time Transition time
+ * @param[out] scene_name Scene name
+ * @param[out] extension_field_set Extension field sets, one per cluster\n
+ *                                  Extension field sets =\n
+ *                                  {{ClusterID 1, length 1, {extension field set 1}},\n
+ *                                   {ClusterID 2, length 2, {extension field set 2}}, ... }.
+ * @param[in] ext_len length of extension fields set
+ * @param[in] user_data user data
+ *
+ * @see zb_zcl_group_view_scene()
+ */
+typedef void (*zb_zcl_scene_view_scene_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               unsigned char scene_id,
+               unsigned short transition_time,
+               const char *scene_name,
+               const char *extension_field_set,
+               unsigned short ext_len,
+               void *user_data);
+
+/**
+ * @brief Called after 'remove scene' command.
+ * @details This command is generated in response to a received Remove Scene command.
+ * The Status field is set to #ZB_ZCL_STATUS_SUCCESS, #ZB_ZCL_STATUS_NOT_FOUND
+ * (the scene is not present in the Scene Table) or #ZB_ZCL_STATUS_INVALID_FIELD
+ * (the group is not present in the Group Table) as appropriate.
+ * The Group ID and Scene ID fields are set to the corresponding fields of the received
+ * Remove Scene command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 Network address
+ * @param[out] ep Endpoint number
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ * @param[out] group_id Group id
+ * @param[out] scene_id Scene id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_remove_scene()
+ */
+typedef void (*zb_zcl_scene_remove_scene_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               unsigned char scene_id,
+               void *user_data);
+
+/**
+ * @brief Called after 'remove all scene' command.
+ * @details This command is generated in response to a received Remove All Scenes
+ * command. The Status field is set to #ZB_ZCL_STATUS_SUCCESS or #ZB_ZCL_STATUS_INVALID_FIELD
+ * (the group is not present in the Group Table) as appropriate. The Group ID field is
+ * set to the corresponding field of the received Remove All Scenes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ * @param[out] group_id Group id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_remove_all_scene()
+ */
+typedef void (*zb_zcl_scene_remove_all_scene_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               void *user_data);
+
+/**
+ * @brief Called after 'store scene' command.
+ * @details This command is generated in response to a received Store Scene command.
+ * The Status field is set to #ZB_ZCL_STATUS_SUCCESS, #ZB_ZCL_STATUS_INSUFFICIENT_SPACE or
+ * #ZB_ZCL_STATUS_INVALID_FIELD (the group is not present in the Group Table) as
+ * appropriate.
+ * The Group ID and Scene ID fields are set to the corresponding fields of the received
+ * Store Scene command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ *             #ZB_ZCL_STATUS_INSUFFICIENT_SPACE \n
+ * @param[out] group_id Group id
+ * @param[out] scene_id Scene id
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_group_store_scene()
+ */
+typedef void (*zb_zcl_scene_store_scene_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned short group_id,
+               unsigned char scene_id,
+               void *user_data);
+
+/**
+ * @brief Called after 'get all scene membership' command.
+ * @details This command is generated in response to a received Get Scene Membership
+ * command
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a scene_list should not be released.
+ * @remarks The @a scene_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] addr16 The source Network address of the received information
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] status Status code see zb_zcl_type.h \n
+ *             #ZB_ZCL_STATUS_SUCCESS \n
+ *             #ZB_ZCL_STATUS_INVALID_FIELD \n
+ * @param[out] capacity The Capacity field shall contain the remaining capacity of the
+ *                      scene table of the device. (for all groups). The following values
+ *                      apply: \n
+ *                      0 : No further scenes may be added. \n
+ *                      0 < Capacity < 0xfeCapacity holds the number of scenes that may be added \n
+ *                      0xfe : At least 1 further scene may be added (exact number is unknown) \n
+ *                      0xff : It is unknown if any further scenes may be added \n
+ * @param[out] group_id Group id
+ * @param[out] scene_count The Scene count field shall contain the number of scenes
+ *                         contained in the Scene list field.
+ * @param[out] scene_list The Scene list field shall contain the identifiers of all the
+ *                        scenes in the scene table with the corresponding Group ID.
+ * @param[out] user_data user data
+ *
+ * @see zb_zcl_scene_get_scene_membership()
+ */
+typedef void (*zb_zcl_scene_get_scene_membership_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_zcl_status_e status,
+               unsigned char capacity,
+               unsigned short group_id,
+               unsigned char scene_count,
+               unsigned char *scene_list,
+               void *user_data);
+
+/* Received Command IDs for the Scenes Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Add scene                            |     M      |
+ * |             0x01               | View scene                           |     M      |
+ * |             0x02               | Remove scene                         |     M      |
+ * |             0x03               | Remove all scene                     |     M      |
+ * |             0x04               | Store scene                          |     M      |
+ * |             0x05               | Recall scene                         |     M      |
+ * |             0x06               | Get scene membership                 |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/* Reference : Extension field sets =
+ *  {{ClusterID 1, length 1, {extension field set 1}}, {ClusterID 2, length 2,
+ *  {extension field set 2}}, ... }.
+ */
+
+/**
+ * @brief Sends 'add scenes' command.
+ * @details The Add Scene command shall be addressed to a single device (not a group)
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] scene_id Scene ID
+ * @param[in] transition_time Transition time
+ * @param[in] scene_name Scene name
+ * @param[in] ext_field_len length of extension fields sets
+ * @param[in] extension_field_sets Extension field sets, one per cluster\n
+ *                                 Extension field sets = \n
+ *                                 {{ClusterID 1, length 1, {extension field set 1}}, \n
+ *                                  {ClusterID 2, length 2, {extension field set 2}}, ... }.
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_add_scene_cb()
+ */
+int zb_zcl_scene_add_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               unsigned char scene_id,
+               unsigned short transition_time,
+               const char *scene_name,
+               unsigned short ext_field_len,
+               const char *extension_field_sets,
+               zb_zcl_scene_add_scene_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'view scene' command.
+ * @details The View Scene command shall be addressed to a single device (not a group)
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] scene_id Scene ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_view_scene_cb()
+ */
+int zb_zcl_scene_view_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               unsigned char scene_id,
+               zb_zcl_scene_view_scene_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'remove scene' command.
+ * @details The Remove Scene command may be addressed to a single device or to a group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] scene_id Scene ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_view_scene_cb()
+ */
+int zb_zcl_scene_remove_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               unsigned char scene_id,
+               zb_zcl_scene_remove_scene_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'remove all scenes' command.
+ * @details The Remove All Scenes may be addressed to a single device or to a group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_remove_all_scene_cb()
+ */
+int zb_zcl_scene_remove_all_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               zb_zcl_scene_remove_all_scene_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'store scene' command.
+ * @details The Store Scene command may be addressed to a single device or to a group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] scene_id Scene ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_store_scene_cb()
+ */
+int zb_zcl_scene_store_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               unsigned char scene_id,
+               zb_zcl_scene_store_scene_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'recall scene' command.
+ * @details The Recall Scene command may be addressed to a single device or to a group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] scene_id Scene ID
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_zcl_scene_recall_scene(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               unsigned char scene_id);
+
+/**
+ * @brief Sends 'get scenes membership' command.
+ * @details The Get Scene Membership command can be used to find an unused scene
+ * number within the group when no commissioning tool is in the network, or for a
+ * commissioning tool to get used scenes for a group on a single device or on all
+ * devices in the group.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] group_id Group ID
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_scene_store_scene_cb()
+ */
+int zb_zcl_scene_get_scene_membership(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned short group_id,
+               zb_zcl_scene_get_scene_membership_cb cb,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE Thermostat Cluster
+ *
+ * @brief Zigbee thermostat cluster commands.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZCL_THERMOSTAT_MODULE_OVERVIEW Overview
+ * This cluster provides an interface to the functionality of a thermostat.
+ *
+ * @since_tizen 4.0
+ *
+ * @{
+ */
+
+/* Command IDs for the Thermostat Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Setpoint Raise/Lower                 |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Sends 'setpoint raise/lower' command.
+ * @details The attributes for the indicated setpoint(s) shall be increased by the amount
+ * specified in the Amount field.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] mode The mode field shall be set to one of the non-reserved values in below. It
+ *                 specifies which setpoint is to be configured. If it is set to auto, then both setpoints
+ *                 shall be adjusted.\n
+ *                 0x00 : Heat (adjust Heat setpoint)\n
+ *                 0x01 : Cool (adjust Cool setpoint)\n
+ *                 0x02 : Both (adjust Heat and Cool setpoint)\n
+ * @param[in] amount The amount field is a signed 8-bit integer that specifies the amount the setpoint(s)
+ *                   are to be a increased (or decreased) by, in steps of 0.1C
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_thermostat_adjust_setpoint(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char mode,
+               unsigned char amount);
+
+/**
+ * @}
+ */
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_INTERNAL_H__ */
diff --git a/include/zigbee-zcl_private.h b/include/zigbee-zcl_private.h
new file mode 100644 (file)
index 0000000..ff0b359
--- /dev/null
@@ -0,0 +1,640 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_PRIVATE_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_PRIVATE_H__
+
+#include <zigbee-zcl-type.h>
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the Structure for Read Structured Attribute Record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_read_structured_attr_record_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the write attribute structured status record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_write_attr_structured_status_record_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of the write attribute structured record in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_write_attr_structured_record_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_MODULE
+ * @brief Format of Attribute Value Field for an array, Set or Bag in Zigbee Cluster Library.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_zcl_attribute_array_h;
+
+/**
+ * @internal
+ * @brief Sends 'read attributes structured' command
+ * details The read attributes command is generated when a device wishes to determine the
+ * values of one or more attributes, or elements of attributes, located on another
+ * device. Each attribute identifier field shall contain the identifier of the attribute
+ * to be read.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_read_structured_attr_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_read_cb()
+ */
+int zb_zcl_global_attr_read_structured(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_read_structured_attr_record_h *records,
+               int count,
+               zb_zcl_global_attr_read_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'write attributes structured' command.
+ * @details When writing an element to an array or structure, the Indicator subfield indicates
+ * the number of index fields that follow it. This number is limited to the range 0 - 15
+ * (i.e. the upper 4 bits of the Indicator field are set to zero). It may be further limited
+ * by any relevant profile or application.
+ * If the Indicator subfield is 0, there are no index fields, and the whole of the
+ * attribute value is to be written.
+ * If this subfield is 1 or greater, the index fields indicate which element is to be
+ * written, nested to a depth of m. For example, if the attribute is an array of arrays
+ * (or structures), then if m = 2, index 1 = 5 and index 2 = 3, the third element of the
+ * fifth element of the attribute will be written.
+ * Note that elements are numbered from 1 upwards for both arrays and structures.
+ * The zeroth element of an array or structure has type 16 bit unsigned integer, and
+ * holds the number of elements in the array or structure. The zeroth element of an
+ * array may optionally be written (this is application dependent) and has the effect
+ * of changing the number of elements of the array. If the number is reduced, the
+ * array is truncated. If the number is increased, the content of new elements is
+ * application dependent.
+ * The zeroth element of a structure may not be written to. Writing to an element
+ * with an index greater than the number of elements in an array or structure is
+ * always an error.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_write_attr_structured_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write_cb()
+ */
+int zb_zcl_global_attr_write_structured(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_write_attr_structured_record_h *records,
+               int count,
+               zb_zcl_global_attr_write_cb cb,
+               void *user_data);
+
+/**
+ * @brief Creates reporting configuration response record.
+ * @details Allocate memory for reporting configuration response record
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_report_config_response_record_destroy().
+ *
+ * @param[out] handle The handle of reporting configuration response record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_create()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_set_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_set_dir()
+ * @see zb_report_config_response_record_get_id()
+ * @see zb_report_config_response_record_set_id()
+ */
+int zb_report_config_response_record_create(
+               zb_zcl_report_config_response_record_h *handle);
+
+/**
+ * @brief Sets status to reporting configuration response record.
+ * @details If the attribute is not implemented on the sender or receiver of the command,
+ * whichever is relevant (depending on direction), this field shall be set to
+ * #ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE.
+ *
+ * If the attribute is supported, but is not capable of
+ * being reported, this field shall be set to #ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE.
+ * Otherwise, this field shall be set to #ZB_ZCL_STATUS_SUCCESS.
+ *
+ * If the status field is not set to #ZB_ZCL_STATUS_SUCCESS, all fields except the
+ * direction and attribute identifier fields shall be omitted.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] status status @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_create()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_set_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_set_dir()
+ * @see zb_report_config_response_record_get_id()
+ * @see zb_report_config_response_record_set_id()
+ */
+int zb_report_config_response_record_set_status(
+               zb_zcl_report_config_response_record_h handle,
+               zb_zcl_status_e status);
+
+/**
+ * @brief Sets direction to reporting configuration response record.
+ * @details The direction field specifies whether values of the attribute are reported
+ * (0x00), or whether reports of the attribute are received (0x01).
+ *
+ * If this value is set to 0x00, then the attribute data type field, the minimum
+ * reporting interval field, the maximum reporting interval field and the reportable
+ * change field are included in the payload, and the timeout period field is omitted. If
+ * this value is set to 0x01, then the timeout period field is included in the payload,
+ * and the attribute data type field, the minimum reporting interval field, the
+ * maximum reporting interval field and the reportable change field are omitted.
+ *
+ * All other values of this field are reserved.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] dir direction 00 : #ZB_ZCL_CLIENT_TO_SERVER \n
+ *                          01 : #ZB_ZCL_SERVER_TO_CLIENT \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_create()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_set_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_set_dir()
+ * @see zb_report_config_response_record_get_id()
+ * @see zb_report_config_response_record_set_id()
+ */
+int zb_report_config_response_record_set_dir(
+               zb_zcl_report_config_response_record_h handle,
+               zb_zcl_fc_direction_e dir);
+
+/**
+ * @brief Gets change from reporting configuration record (type 5).
+ * @details The reportable change field shall contain the minimum change to the attribute
+ * that will result in a report being issued. This field is of variable length.
+ *
+ * For attributes with 'analog' data type the field has the same data type as the attribute.
+ *
+ * The sign (if any) of the reportable change field is ignored.
+ * For attributes of 'discrete' data type
+ * this field is omitted.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type attribute type
+ * @param[out] value attribute data (only analog data type is allowed)
+ * @param[out] size attribute data size
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
+ */
+int zb_report_config_record_get_change_3(
+               zb_zcl_reporting_config_record_h handle,
+               zb_zcl_data_type_e *type,
+               unsigned char *value,
+               int *size);
+
+/**
+ * @brief Gets direction from read reporting configuration record.
+ * @details The direction field specifies whether values of the attribute are reported
+ * (0x00), or whether reports of the attribute are received (0x01).
+ *
+ * All other values of this field are reserved.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] dir direction
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_get_id()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_get_dir()
+ * @see zb_read_report_config_record_set_dir()
+ */
+int zb_read_report_config_record_get_dir(
+               zb_zcl_read_report_config_record_h handle,
+               zb_zcl_fc_direction_e *dir);
+
+/**
+ * @brief Gets attribute identifier from read reporting configuration record.
+ * @details The attribute identifier field shall contain the identifier of the attribute
+ * whose reporting configuration details are to be read.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_get_id()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_get_dir()
+ * @see zb_read_report_config_record_set_dir()
+ */
+int zb_read_report_config_record_get_id(
+               zb_zcl_read_report_config_record_h handle,
+               unsigned short *id);
+
+/**
+ * @brief Called after zb_zcl_global_discover_commands_received() and
+ *        zb_zcl_global_discover_cmds_generated().
+ * @details The ZCL provides the facility to discover the commands that a cluster
+ * instance on a remote device can receive and generate. This is useful since an
+ * individual cluster instance may not be able to receive or generate all of the commands
+ * that are theoretically supported by the cluster.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a commandids can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a commandids should not be released.
+ *
+ * @param[out] addr16 source network address
+ * @param[out] ep where is sent from (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] discovery_complete which indicates whether the Command Discovery is
+ *             complete, i.e. whether there are any commands remaining to be discovered:\n
+ *             - TRUE - all commands have been discovered\n
+ *             - FALSE - there are further commands to be discovered\n
+ * @param[out] commandids Discovered commands list
+ * @param[out] commandids_len The number of discovered commands reported in this response
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_discover_cmd_received()
+ */
+typedef void (*zb_zcl_global_discover_cmds_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               unsigned char discovery_complete,
+               zb_command_id *commandids,
+               int commandids_len,
+               void *user_data);
+
+/**
+ * @brief Sends 'discover command recevied' command.
+ * @details This function to know remote cluster on remote device can handle specific commands.
+ * The ZCL provides the facility to discover the commands that a cluster
+ * instance on a remote device can receive and generate. This is useful since an
+ * individual cluster instance may not be able to receive or generate all of the commands
+ *  that are theoretically supported by the cluster.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] start_command_id Start command id .
+ * @param[in] max_command_ids Last command id
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_discover_cmd_received_cb()
+ */
+int zb_zcl_global_discover_cmds_received(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+           zb_command_id start_command_id,
+           unsigned char max_command_ids,
+           zb_zcl_global_discover_cmds_cb cb,
+           void *user_data);
+
+/**
+ * @brief Sends 'discover command generated' command.
+ * @details The ZCL provides the facility to discover the commands that a cluster
+ * instance on a remote device can receive and generate. This is useful since an
+ * individual cluster instance may not be able to receive or generate all of the commands
+ *  that are theoretically supported by the cluster.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] start_command_id Start command id .
+ * @param[in] max_command_ids Last command id
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_discover_cmds_cb()
+ */
+int zb_zcl_global_discover_cmds_generated(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_command_id start_command_id,
+               unsigned char max_command_ids,
+               zb_zcl_global_discover_cmds_cb cb,
+               void *user_data);
+
+/**
+ * @brief Called after zb_zcl_global_attr_extended_discover().
+ * @details The ZCL provides the facility to discover the commands that a cluster
+ * instance on a remote device can receive and generate. This is useful since an
+ * individual cluster instance may not be able to receive or generate all of the commands
+ *  that are theoretically supported by the cluster.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a records can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a records should not be released.
+ *
+ * @param[out] addr16 source network address
+ * @param[out] ep where is sent from (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] discovery_complete which indicates whether the Command Discovery is
+ *             complete, i.e. whether there are any commands remaining to be discovered:\n
+ *             - TRUE - all commands have been discovered\n
+ *             - FALSE - there are further commands to be discovered\n
+ * @param[out] records Discovered attribute information list
+ * @param[out] count Len The length of discovered information reported in this response
+ * @param[in] user_data User data
+ *
+ * @see zb_zcl_global_attr_extended_discover()
+ */
+typedef void (*zb_zcl_global_attr_extended_discover_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               unsigned char discovery_complete,
+               zb_zcl_extended_attr_info_h *records,
+               unsigned short count,
+               void *user_data);
+
+/**
+ * @brief Sends 'discover attributes extended' command.
+ * @details This function to know remote cluster on remote device has extended commands.
+ * The ZCL provides the facility to discover the commands that a cluster
+ * instance on a remote device can receive and generate. This is useful since an
+ * individual cluster instance may not be able to receive or generate all of the commands
+ *  that are theoretically supported by the cluster.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] start_id Start id .
+ * @param[in] max_attribute_ids Last command id
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_extended_discover_cb()
+ */
+int zb_zcl_global_attr_extended_discover(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_cluster_id start_id,
+               unsigned char max_attribute_ids,
+               zb_zcl_global_attr_extended_discover_cb cb,
+               void *user_data);
+
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZCL_PRIVATE_H__ */
diff --git a/include/zigbee-zdo-type.h b/include/zigbee-zdo-type.h
new file mode 100644 (file)
index 0000000..094be9a
--- /dev/null
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_TYPE_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_TYPE_H__
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief ZDO Status Enumerations Description.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_STATUS_SUCCESS = 0, /**< Success */
+       ZB_ZDP_STATUS_INVALID_REQUEST_TYPE = 0x80, /**< Invalid Request Type */
+       ZB_ZDP_STATUS_DEVICE_NOT_FOUND = 0x81, /**< Device Not Found */
+       ZB_ZDP_STATUS_INVALID_EP = 0x82, /**< Invalid Endpoint */
+       ZB_ZDP_STATUS_NOT_ACTIVE = 0x83, /**< Not Active */
+       ZB_ZDP_STATUS_NOT_SUPPORTED = 0x84, /**< Not Supported */
+       ZB_ZDP_STATUS_TIMEOUT = 0x85, /**< Timeout */
+       ZB_ZDP_STATUS_NO_MATCH = 0x86, /**< No Match */
+       ZB_ZDP_STATUS_NO_ENTRY = 0x88, /**< No Entry */
+       ZB_ZDP_STATUS_NO_DESCRIPTOR = 0x89, /**< No Descriptor */
+       ZB_ZDP_STATUS_INSUFFICIENT_SPACE = 0x8A, /**< Insufficient Space */
+       ZB_ZDP_STATUS_NOT_PERMITTED = 0x8B, /**< Not Permitted */
+       ZB_ZDP_STATUS_TABLE_FULL = 0x8C, /**< Table Full */
+       ZB_ZDP_STATUS_NOT_AUTHORIZED = 0x8D, /**< Not Authorized */
+       ZB_ZDP_STATUS_DEVICE_BINDING_TABLE_FULL = 0x8E, /**< Binding Table Full */
+       ZB_ZDP_STATUS_UNKNOWN = 0xFF /**< Unknown */
+} zb_zdp_status_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief RequestType Enumeration.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_REQ_TYPE_SINGLE_DEVICE_RESPONSE = 0, /**< Single Device Response : 0*/
+       ZB_ZDP_REQ_TYPE_EXTENDED_RESPONSE = 1, /**< Extended Response : 1 */
+} zb_zdp_req_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Values of the Logical Type Field.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_LOGICAL_TYPE_COORDINATOR = 0, /**< Coordinator */
+       ZB_ZDP_LOGICAL_TYPE_ROUTER = 1, /**< Router */
+       ZB_ZDP_LOGICAL_TYPE_END_DEVICE = 2, /**< End Device */
+} zb_zdp_logical_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Values of the Frequency Band Field.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_FREQ_BAND_868_868_6_MHZ = 0, /**< 868~888.6MHz */
+       ZB_ZDP_FREQ_BAND_902_928_MHZ = 2, /**< 902~928MHz */
+       ZB_ZDP_FREQ_BAND_2400_2483_5_MHZ = 3, /**< 2400~2483.5MHz */
+} zb_zdp_freq_band_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Alternative PAN coordinator bit in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_DO_PAN_COORDINATOR_SUPPORTED = 1, /**< This node is capable of becoming a PAN coordinator. */
+       ZB_ZDP_DO_PAN_COORDINATOR_NOT_SUPPORTED = 0, /**< Otherwise */
+} zb_zdp_do_pan_coordinator_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Device type bit in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_DEV_TYPE_RFD = 0, /**< This node is a reduced function device (RFD) */
+       ZB_ZDP_DEV_TYPE_FFD = 1, /**< This node is a full function device (FFD) */
+} zb_zdp_dev_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Power Source bit in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_PWR_SRC_MAIN_POWER = 1, /**< Current power source is main power. This information is
+               derived from the node current power source field of the node power descriptor */
+       ZB_ZDP_PWR_SRC_NO_NODE_POWER_DESCRIPTION = 0, /**< Otherwise */
+} zb_zdp_pwr_src_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Receiver on when idle bit in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_PM_DO_NOT_POWER_SAVE_MODE = 1, /**< The device does not disable its receiver to conserve power during idle periods. */
+       ZB_ZDP_PM_KEEP_POWER_SAVE_MODE = 0, /**< Otherwise */
+} zb_zdp_pm_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Security capability bit in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_SECURITY_CAP_NOT_SUPPORTED = 0, /**< ZDP does not support security mode */
+       ZB_ZDP_SECURITY_CAP_SUPPORTED = 1, /**< ZDP supports security mode */
+} zb_zdp_security_cap_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Indicates the device supports main-power in MAC capability Flags.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_POWER_NO_POWER = 0, /**< Not having mains-power */
+       ZB_ZDP_POWER_MAINS_POWER = 1, /**< Having mains-power */
+} zb_zdp_power_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Format of the MAC Capability Flags Field in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR = (1 << 0), /**< Alternative Pan Coordinator (see #zb_zdp_do_pan_coordinator_e) */
+       ZB_ZDP_DEVICE_TYPE = (1 << 1), /**< Device Type (see #zb_zdp_dev_type_e) */
+       ZB_ZDP_POWER_SOURCE = (1 << 2), /**< Power Source (see #zb_zdp_pwr_src_type_e) */
+       ZB_ZDP_RECEIVER_ON_WHEN_IDLE = (1 << 3), /**< Register on When Idle */
+       ZB_ZDP_SECURITY_CAPABILITY = (1 << 6), /**< Security Capability (see #zb_zdp_security_cap_e) */
+       ZB_ZDP_ALLOCATE_ADDRESS = (1 << 7), /**< Allocated Address. \n
+               This mean device receive network address from coordinator.
+               This field will always have a value of 1 in implementations of IEEE 802.15.4 spec,
+               indicating that the joining device must be issued a 16-bit short address */
+} zb_zdp_mac_capability_field_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Server Mask Bit Assignments.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_SERVER_MASK_PRIMARY_TRUST_CENTER = (1 << 0), /**< Primary Trust Center */
+       ZB_ZDP_SERVER_MASK_BACKUP_TRUST_CENTER = (1 << 1), /**< Backup Trust Center */
+       ZB_ZDP_SERVER_MASK_PRIMARY_BINDING_TABLE_CACHE = (1 << 2), /**< Primary Binding Table Cache */
+       ZB_ZDP_SERVER_MASK_BACKUP_BINDING_TABLE_CACHE = (1 << 3), /**< Backup Binding Table Cache */
+       ZB_ZDP_SERVER_MASK_PRIMARY_DISCOVERY_CACHE = (1 << 4), /**< Primary Discovery Cache */
+       ZB_ZDP_SERVER_MASK_BACKUP_DISCOVERY_CACHE = (1 << 5), /**< Backup Discovery Cache */
+       ZB_ZDP_SERVER_MASK_NETWORK_MANAGER = (1 << 6), /**< Network Manager */
+} zb_zdp_server_mask_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Fields of the Node Descriptor.
+ * @details Type and capabilities of the node.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_node_descriptor_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Values of the Current Power Mode Field in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_CUR_PWR_MODE_RECEIVER_SYNCHRONIZED_WITH_RECEIVER_ON = 0, /**< Register Synchronized with Receiver On */
+       ZB_ZDP_CUR_PWR_MODE_RECEIVER_COMES_ON_PERIODICALLY = (1 << 0), /**< Register Comes on Periodically */
+       ZB_ZDP_CUR_PWR_MODE_RECEIVER_COMES_ON_WHEN_STIMULATED = (1 << 1), /**< Register Comes on When Stimulated */
+} zb_zdp_cur_pwr_mode_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Fields of the Node Power Descriptor.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_PWR_SRC_TYPE_CONSTANT_POWER = 0, /**< Constant Power */
+       ZB_ZDP_PWR_SRC_TYPE_RECHARGEABLE_BATTERY = 1, /**< Rechargeable Battery */
+       ZB_ZDP_PWR_SRC_TYPE_DISPOSABLE_BATTERY = 2, /**< Disposable Battery */
+} zb_zdp_pwr_src_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Values of the Available Power Sources Field in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_PWR_SRC_LEVEL_CHARGE_LEVEL_CRITICAL = 0, /**< Charge Level Critical */
+       ZB_ZDP_PWR_SRC_LEVEL_CHARGE_LEVEL_33 = 1, /**< Charge Level 33% */
+       ZB_ZDP_PWR_SRC_LEVEL_CHARGE_LEVEL_66 = 2, /**< Charge Level 66% */
+       ZB_ZDP_PWR_SRC_LEVEL_CHARGE_LEVEL_100 = 3, /**< Charge Level 100% */
+} zb_zdp_pwr_src_level_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Binding type.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_BINDING_TYPE_UNICAST = 0x03, /**< A unicast binding whose 64-bit identifier
+       is the destination #zb_ieee_addr. */
+       ZB_ZDP_BINDING_TYPE_MANY_TO_ONE = 0x83, /**< A unicast binding whose 64-bit
+       identifier is the many-to-one destination #zb_ieee_addr. A Route discovery should be
+       disabled when sending unicast via may-to-one binding */
+       ZB_ZDP_BINDING_TYPE_MULTICAST = 0x01, /**< A multicast binding whose 64-bit
+       identifier is the group address. A multicast binding can be used to send messages to
+       the group and to receive message sent to the group */
+} zb_zdp_binding_type_e;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief The Node Power Descriptor in Zigbee Specification.
+ * @details Node power characteristics.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_node_power_descriptor_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief Cluster counts to handle with.
+ *
+ * @since_tizen 4.0
+ */
+#define MAX_ENDPOINT_CLUSTERS 32
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief The handle of zigbee simple description.
+ * @details Device descriptions contained in node.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_simple_desc_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief The handle of zigbee end-device information.
+ * @details A #zb_end_dev_info_h is an opaque data structure.
+ * #zb_end_dev_info_h is a data type of network address, IEEE address, endpoint count
+ * and endpoint information structure.
+ * @since_tizen 4.0
+ */
+typedef void* zb_end_dev_info_h;
+
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_TYPE_H__ */
diff --git a/include/zigbee-zdo_internal.h b/include/zigbee-zdo_internal.h
new file mode 100644 (file)
index 0000000..bf10b99
--- /dev/null
@@ -0,0 +1,4487 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__
+
+#include <zigbee-zdo-type.h>
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE Binding Manager
+ *
+ * @brief Zigbee provides API for Binding.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_OVERVIEW Overview
+ * Binding provides a mechanism for attaching an endpoint on one node to one or more
+ * endpoints on another node. Binding can even be destined for groups of nodes. Then,
+ * when using APSDE-DATA.request, simply use the "indirect" addressing mode, and the
+ * request will be sent to each endpoint or group listed in the local binding table.
+ *
+ * The binding table is smart, and keeps track of both the short (16-bit NwkAddr) and long
+ * (IEEE) address of a node. If a destination device has changed its short address (either
+ * due to a ZigBee End-Device moving from one parent to another in ZigBee stack profile
+ * 0x01, or due to a address conflict in ZigBee Pro), the binding table entry is updated
+ * automatically to point to that new address.
+ *
+ */
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief NetworkList Record Format in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_network_list_record_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief NeighborTableList Record Format in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_neighbor_table_desc_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief RoutingTableList Record Format in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_routing_table_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief BindingTableList Record Format in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_binding_table_h;
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @brief DiscoveryCacheList Record Format in Zigbee Specification.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zdo_discovery_cache_h;
+
+/**
+ * @internal
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_BINDING_MANAGER_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Called after 'bind' command.
+ * @details The Bind_cb is generated in response to a Bind_req. If the Bind_req is
+ * processed and the Binding Table entry committed on the Remote Device, a Status of
+ * #ZB_ZDP_STATUS_SUCCESS is returned.
+ *
+ * If the Remote Device is not a Primary binding table cache or the SrcAddress,
+ * a Status of #ZB_ZDP_STATUS_SUCCESS is returned.
+ *
+ * The supplied endpoint shall be checked to determine whether it falls within the
+ * specified range.
+ * If it does not, a Status of #ZB_ZDP_STATUS_INVALID_EP shall be returned.
+ *
+ * If the Remote Device is the Primary binding table cache or SrcAddress but does not
+ * have Binding Table resources for the request, a Status of #ZB_ZDP_STATUS_TABLE_FULL is
+ * returned.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_INVALID_EP \n
+ *                    #ZB_ZDP_STATUS_TABLE_FULL \n
+ *                    #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_bind_req()
+ *
+ */
+typedef void (*zb_zdo_bind_cb)(
+               zb_zdp_status_e status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'bind' command.
+ * @details Binding request when destination address present but not endpoint present.
+ * The Bind_req is generated from a Local Device wishing to create a Binding
+ * Table entry for the source and destination addresses contained as parameters.
+ *
+ * The destination addressing on this command shall be unicast only, and the destination
+ * address shall be that of a Primary binding table cache or to the SrcAddress itself.
+ * The Binding Manager is optionally supported on the source device (unless that
+ * device is also the ZigBee Coordinator) so that device shall issue a
+ * #ZB_ZDP_STATUS_NOT_SUPPORTED status to the Bind_req if not supported.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] dst_addr16 The Network address of destination
+ * @param[in] src_addr64 The IEEE address of source
+ * @param[in] src_ep The source endpoint for the binding entry
+ * @param[in] clusterid The identifier of the cluster on the source device that is bound
+ *                       to the destination.
+ * @param[in] dst_addr64 The IEEE address of destination
+ * @param[in] type #ZB_ZDP_BINDING_TYPE_UNICAST : A unicast binding whose 64-bit identifier is the
+ * destination zb_ieee_addr. \n
+ * #ZB_ZDP_BINDING_TYPE_MANY_TO_ONE : A unicast binding whose 64-bit identifier is
+ * the many-to-one destination zb_ieee_addr. A Route discovery should be disabled when
+ * sending unicast via may-to-one binding \n
+ * #ZB_ZDP_BINDING_TYPE_MULTICAST : A multicast binding whose 64-bit identifier is the group
+ * address. A multicast binding can be used to send messages to the group and to
+ * receive message sent to the group
+ * @param[in] group_addr The destination address for the binding entry
+ * @param[in] dst_ep The destination endpoint for the binding entry.
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_bind_cb()
+ */
+int zb_zdo_bind_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr dst_addr16,
+               zb_ieee_addr src_addr64,
+               zb_end_point src_ep,
+               zb_cluster_id clusterid,
+               zb_ieee_addr dst_addr64,
+               unsigned char type,
+               zb_nwk_addr group_addr,
+               unsigned char dst_ep,
+               zb_zdo_bind_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'unbind' command.
+ * @details The Unbind_cb is generated in response to an Unbind_req. If the Unbind_req is
+ * processed and the corresponding Binding Table entry is removed from the Remote
+ * Device, a Status of #ZB_ZDP_STATUS_NOT_SUPPORTED is returned. If the Remote Device is not
+ * the ZigBee Coordinator or the SrcAddress, a Status of #ZB_ZDP_STATUS_NOT_SUPPORTED is
+ * returned.
+ *
+ * The supplied endpoint shall be checked to determine whether it falls within the
+ * specified range. If it does not, a Status of #ZB_ZDP_STATUS_INVALID_EP shall be returned.
+ * If the Remote Device is the ZigBee Coordinator or SrcAddress but does not have a
+ * Binding Table entry corresponding to the parameters received in the request, a
+ * Status of #ZB_ZDP_STATUS_NO_ENTRY is returned.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_INVALID_EP \n
+ *                    #ZB_ZDP_STATUS_NO_ENTRY \n
+ *                    #ZB_ZDP_STATUS_NOT_AUTHORIZED
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_unbind_req_addr()
+ *
+ */
+typedef void (*zb_zdo_unbind_cb)(
+               zb_zdp_status_e status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'Unbind' command.
+ * @details Binding request when destination address present but not endpoint present
+ * The Unbind_req is generated from a Local Device wishing to remove a Binding
+ * Table entry for the source and destination addresses contained as parameters.
+ *
+ * The destination addressing on this command shall be unicast only and the destination
+ * address must be that of the a Primary binding table cache or the SrcAddress.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] dst_addr16 The Network address of destination
+ * @param[in] src_addr64 The IEEE address of source
+ * @param[in] src_ep The source endpoint for the binding entry
+ * @param[in] clusterid The identifier of the cluster on the source device that is bound
+ *                       to the destination.
+ * @param[in] dst_addr64 The IEEE address of destination
+ * @param[in] type #ZB_ZDP_BINDING_TYPE_UNICAST : A unicast binding whose 64-bit identifier is
+ *                  the destination zb_ieee_addr. \n
+ *                 #ZB_ZDP_BINDING_TYPE_MANY_TO_ONE : A unicast binding whose 64-bit identifier
+ *                  is the many-to-one destination zb_ieee_addr. A Route discovery should be
+ *                  disabled when sending unicast via may-to-one binding \n
+ *                 #ZB_ZDP_BINDING_TYPE_MULTICAST : A multicast binding whose 64-bit identifier is
+ *                  the group address. A multicast binding can be used to send messages
+ *                  to the group and to receive message sent to the group \n
+ * @param[in] group_addr The destination address for the binding entry
+ * @param[in] dst_ep The destination endpoint for the binding entry.
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_unbind_cb()
+ *
+ */
+int zb_zdo_unbind_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr dst_addr16,
+               zb_ieee_addr src_addr64,
+               zb_end_point src_ep,
+               zb_cluster_id clusterid,
+               zb_ieee_addr dst_addr64,
+               unsigned char type,
+               zb_nwk_addr group_addr,
+               unsigned char dst_ep,
+               zb_zdo_unbind_cb cb,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @internal
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Called after 'extended simple descriptor request' command.
+ * @details The Extended_Simple_Desc_cb is generated by a remote device in response to an
+ * Extended_Simple_Desc_req directed to the remote device. This command shall
+ * be unicast to the originator of the Extended_Simple_Desc_req command.
+ * The remote device shall generate the Extended_Simple_Desc_cb command using
+ * the format illustrated in param list. The NWKAddrOfInterest field shall match
+ * that specified in the original Extended_Simple_Desc_req command. If the
+ * endpoint field specified in the original Extended_Simple_Desc_req command
+ * does not fall within the correct range specified in Table 2.49, the remote device
+ * shall set the Status field to #ZB_ZDP_STATUS_INVALID_EP, set the Endpoint and
+ * StartIndex fields to their respective values supplied in the request, and not include
+ * the AppClusterList field.
+ *
+ * If the NWKAddrOfInterest field matches the network address of the remote
+ * device, it shall determine whether the endpoint field specifies the identifier of an
+ * active endpoint on the device.
+ *
+ * If the endpoint field corresponds to an active
+ * endpoint, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS,
+ * set the AppClusterList field to the sequence of octets from the concatenated AppInput
+ * ClusterList and AppOutputClusterList from the Simple Descriptor (Tables 2.39),
+ * and supply that field as AppClusterList in the response. Note that dependent on
+ * the value of StartIndex in the request, the results in AppClusterList may be empty
+ * (for example, the StartIndex begins after the sequence of octets given by the
+ * concatenation of AppInputClusterList and AppOutputClusterList).
+ *
+ * If the endpoint
+ * field does not correspond to an active endpoint, the remote device shall set the
+ * Status field to NOT_ACTIVE, set the StartIndex field to the value supplied in the
+ * request, and not include the AppClusterList field.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a app_cluster_list can be used only in the callback. To use outside,
+ * make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INVALID_EP \n
+ *                    #ZB_ZDP_STATUS_NOT_ACTIVE \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] ep The endpoint on the destination
+ * @param[out] app_input_cluster_count The total count of application input cluster in
+ *                                    the simple descriptor for this endpoint
+ * @param[out] app_output_cluster_count The total count of application output cluster in
+ *                                     the simple descriptor for this endpoint
+ * @param[out] start_idx Starting index within the AppClusterList of the response
+ *                       represented by an ordered list of the Application Input
+ *                       Cluster List and Application Output Cluster List from the
+ *                       Simple Descriptor for this endpoint.
+ * @param[out] app_cluster_list A concatenated, ordered list of the AppInputClusterList
+ *                              and AppOutputClusterList, beginning with StartIndex,
+ *                              from the Simple Descriptor.
+ *                              This field shall only be included in the frame if the
+ *                              status field is equal to ZB_ZDP_STATUS_SUCCESS.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_extended_simple_desc_req()
+ */
+typedef void (*zb_zdo_extended_simple_desc_cb)(
+               unsigned char status,
+               zb_nwk_addr addr16,
+               unsigned char ep,
+               unsigned char app_input_cluster_count,
+               unsigned char app_output_cluster_count,
+               unsigned char start_idx,
+               const unsigned char *app_cluster_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'extended simple descriptor request' command.
+ * @details The Extended_Active_EP_req command is generated from a local device wishing
+ * to acquire the list of endpoints on a remote device with simple descriptors. This
+ * command shall be unicast either to the remote device itself or to an alternative
+ * device that contains the discovery information of the remote device.
+ *
+ * The Extended_Active_EP_req is used for devices which support more active
+ * endpoints than can be returned by a single Active_EP_req.
+ * The local device shall generate the Extended_Active_EP_req command using the
+ * format illustrated in Table 2.66. in Zigbee Specification.
+ *
+ * The NWKAddrOfInterest field shall contain thenetwork address of the remote device
+ * for which the active endpoint list is required.
+ *
+ * The StartIndex field shall be set in the request to enable retrieval of
+ * lists of active endpoints from devices whose list exceeds the size of a single ASDU and
+ * where fragmentation is not supported.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] start_idx Starting index within the active endpoint list in the response
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_extended_simple_desc_cb()
+ */
+int zb_zdo_extended_simple_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char start_idx,
+               zb_zdo_extended_simple_desc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'matching descriptor request' command.
+ * @details The Match_Desc_cb is generated by a remote device in response to a
+ * Match_Desc_req either broadcast or directed to the remote device. This command
+ * shall be unicast to the originator of the Match_Desc_req command.
+ *
+ * The remote device shall generate the Match_Desc_cb command using the format
+ * illustrated in Table 2.96 in Zigbee Specification.
+ *
+ * If the NWKAddrOfInterest field of the original
+ * Match_Desc_req was equal to the broadcast network address for all devices for
+ * which macRxOnWhenIdle = TRUE (0xfffd), the remote device shall apply the
+ * match criterion, as described below, that was specified in the original
+ * Match_Desc_req command to each of its simple descriptors. If the remote device
+ * is the coordinator or a router, it shall also apply the match criterion, as described
+ * below, to each simple descriptor that it may have obtained from each of its
+ * children.
+ *
+ *
+ * If the NWKAddrOfInterest field of the original Match_Desc_req was not equal to
+ * the broadcast network address for all devices for which macRxOnWhenIdle =
+ * TRUE (0xfffd), the remote device shall set the NWKAddrOfInterest field to the
+ * same network address that was specified in the original Match_Desc_req
+ * command.
+ *
+ *
+ * If the NWKAddrOfInterest field matches the network address of the remote
+ * device, it shall apply the match criterion, as described below, that was specified in
+ * the original Match_Desc_req command to each of its simple descriptors.
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the MatchLength field to 0, and not include the
+ * MatchList field. If the NWKAddrOfInterest field does not match the network
+ * address of the remote device and it is the coordinator or a router, it shall determine
+ * whether the NWKAddrOfInterest field matches the network address of one of its
+ * children. If the NWKAddrOfInterest field does not match the network address of
+ * one of the children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the MatchLength field to 0, and not include the
+ * MatchList field.
+ *
+ *
+ * If the NWKAddrOfInterest matches the network address of one of the children of
+ * the remote device, it shall determine whether any simple descriptors for that
+ * device are available. If no simple descriptors are available for the child indicated
+ * by the NWKAddrOfInterest field, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the MatchLength field to 0, and not include the
+ * MatchList field. If any simple descriptors are available for the child indicated by
+ * the NWKAddrOfInterest field, the remote device shall apply the match criterion,
+ * as described below, that was specified in the original Match_Desc_req command
+ * to each of these simple descriptors.
+ *
+ *
+ * The remote device shall apply the match criteria to each simple descriptor as follows.
+ * The remote device shall first check if the ProfileID
+ * field matches exactly the application profile identifier field of the simple
+ * descriptor. If the profileID field does not match exactly the remote device shall
+ * check if the Profile ID of the Match_desc_req matches the wildcard profile
+ * (0xFFFF) and the Profile ID of the Simple Descriptor is within the Standard range
+ * (a public profile) as dictated by document [B25]. 14 If the profile identifiers do not
+ * match, the remote device shall assume the match to be unsuccessful and perform
+ * no further matching.
+ *
+ *
+ * If the profile identifiers match, the remote device shall determine whether the
+ * match criteria contains a list of input clusters (the NumInClusters field is not equal
+ * to 0). If the match criteria contains a list of input clusters, the remote device shall
+ * check that at least one of the cluster identifiers listed in the InClusterList field
+ * matches one of the cluster identifiers in the application input cluster list field of
+ * the simple descriptor. If at least one matching input cluster is found, the remote
+ * device shall assume the match to be successful, note the identifier of the endpoint
+ * to which this simple descriptor refers and perform no further matching.
+ * If the remote device is unable to find any matching input clusters, it shall
+ * determine whether the match criterion contains a list of output clusters (the
+ * NumOutClusters field is not equal to 0). If the match criterion contains a list of
+ * output clusters, the remote device shall check that at least one of the cluster
+ * identifiers listed in the OutClusterList field matches one of the cluster identifiers
+ * in the application output cluster list field of the simple descriptor. If at least one
+ * matching output cluster is found, the remote device shall assume the match to be
+ * successful and note the identifier of the endpoint to which this simple descriptor
+ * refers. If the remote device is unable to find any output matching clusters, it shall
+ * assume the match to be unsuccessful.
+ *
+ *
+ * If the above procedure produces one or more matches, the remote device shall
+ * construct a separate Match_Desc_cb command for each matching device
+ * (including itself). For each response, the Status field shall be set to
+ * #ZB_ZDO_STATUS_SUCCESS, the NWKAddrOfInterest field shall be set to the address of
+ * the appropriate matching
+ * device, the MatchLength field shall be set to the number of simple descriptors that
+ * matched the criteria for the appropriate matching device, and the MatchList field
+ * shall contain an ascending list of the endpoints on which a simple descriptor
+ * matched the criteria for the appropriate matching device.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a match_list should not be released.
+ * @remarks The @a match_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] match_length The count of endpoint on the remote device that match
+ *                          the request criteria
+ * @param[out] match_list List of bytes each of which represents an 8-bit endpoint
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_match_desc_req()
+ */
+typedef void (*zb_zdo_match_desc_cb)(
+               zb_zdp_status_e status,
+               zb_nwk_addr addr16,
+               unsigned char match_length,
+               unsigned char *match_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'matching descriptor request' command.
+ * @details The Match_Desc_req command is generated from a local device wishing to find
+ * remote devices supporting a specific simple descriptor match criterion. This
+ * command shall either be broadcast to all devices for which macRxOnWhenIdle =
+ * TRUE, or unicast. If the command is unicast, it shall be directed either to the
+ * remote device itself or to an alternative device that contains the discovery
+ * information of the remote device.
+ *
+ * The local device shall generate the Match_Desc_req command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address indicating a broadcast to all devices for which macRxOnWhenIdle =
+ * TRUE (0xfffd) if the command is to be broadcast, or the network address of the
+ * remote device for which the match is required.
+ * The remaining fields shall contain the required criterion for which the simple
+ * descriptor match is requested. The ProfileID field shall contain the identifier of
+ * the profile for which the match is being sought or the wildcard profile ID of
+ * 0xFFFF.
+ *
+ * The NumInClusters field shall contain the number of elements in the InClusterList
+ * field. If the value of this field is 0, the InClusterList field shall not be included. If
+ * the value of the NumInClusters field is not equal to 0, the InClusterList field shall
+ * contain the list of input cluster identifiers for which the match is being sought.
+ * The NumOutClusters field shall contain the number of elements in the
+ * OutClusterList field. If the value of this field is 0, the OutClusterList field shall
+ * not be included. If the value of the NumOutClusters field is not equal to 0, the
+ * OutClusterList field shall contain the list of output cluster identifiers for which the
+ * match is being sought.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] profileid Profile ID to be matched at the destination
+ * @param[in] num_in_clusters The number of items in input clusters provided for matching
+ *                            within the in_cluster_list
+ * @param[in] in_cluster_list List of input cluster ids to b used for matching
+ * @param[in] num_out_clusters The number of output clusters provided for matching within
+ *                             the out_cluster_list
+ * @param[in] out_cluster_list List of output cluster ids to b used for matching
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_match_desc_cb()
+ */
+int zb_zdo_match_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_profile_id profileid,
+               unsigned char num_in_clusters,
+               unsigned short *in_cluster_list,
+               unsigned char num_out_clusters,
+               unsigned short *out_cluster_list,
+               zb_zdo_match_desc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief called after 'node descriptor request' command.
+ * @details The Node_Desc_cb is generated by a remote device in response to a
+ * Node_Desc_req directed to the remote device. This command shall be unicast to
+ * the originator of the Node_Desc_req command.
+ *
+ * The remote device shall generate the Node_Desc_cb command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall match that specified
+ * in the original Node_Desc_req command. If the NWKAddrOfInterest field
+ * matches the network address of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_SUCCESS and include its node descriptor in the NodeDescriptor field.
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE and not include the NodeDescriptor field.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the remote
+ * device and it is the coordinator or a router, it shall determine whether the
+ * NWKAddrOfInterest field matches the network address of one of its children. If
+ * the NWKAddrOfInterest field does not match the network address of one of the
+ * children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND and not include the NodeDescriptor field.
+ *
+ * If the NWKAddrOfInterest matches the network address of one of the children of the
+ * remote device, it shall determine whether a node descriptor for that device is
+ * available. If a node descriptor is not available for the child indicated by the
+ * NWKAddrOfInterest field, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_NO_DESCRIPTOR and not include the NodeDescriptor field.
+ *
+ * If a node descriptor is available for the child indicated by the NWKAddrOfInterest
+ * field, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and
+ * include the node descriptor of the matching child device in the NodeDescriptor field.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a node_desc should not be released.
+ * @remarks The @a node_desc can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] node_desc This field shall only be included in the frame if the
+ *                       status field is equal to #ZB_ZDP_STATUS_SUCCESS.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_node_desc_req()
+ */
+typedef void (*zb_zdo_node_desc_cb)(
+               zb_zdp_status_e status,
+               zb_nwk_addr addr16,
+               const zb_zdo_node_descriptor_h node_desc,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'node descriptor request' command.
+ * @details The Node_Desc_req command is generated from a local device wishing to inquire
+ * as to the node descriptor of a remote device. This command shall be unicast either
+ * to the remote device itself or to an alternative device that contains the discovery
+ * information of the remote device.
+ *
+ * The local device shall generate the Node_Desc_req command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the node descriptor is required.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_node_desc_cb()
+ */
+int zb_zdo_node_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_zdo_node_desc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'power descriptor request' command.
+ * @details The Power_Desc_cb is generated by a remote device in response to a
+ * Power_Desc_req directed to the remote device. This command shall be unicast to
+ * the originator of the Power_Desc_req command.
+ *
+ * The remote device shall generate the Power_Desc_cb command using the format
+ * illustrated in Table 2.93 in Zigbee Specification.
+ * The NWKAddrOfInterest field shall match that specified
+ * in the original Power_Desc_req command. If the NWKAddrOfInterest field
+ * matches the network address of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_SUCCESS and include its power descriptor in the PowerDescriptor field.
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE and not include the PowerDescriptor field. If the
+ * NWKAddrOfInterest field does not match the network address of the remote
+ * device and it is the coordinator or a router, it shall determine whether the
+ * NWKAddrOfInterest field matches the network address of one of its children. If
+ * the NWKAddrOfInterest field does not match the network address of one of the
+ * children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND and not include the PowerDescriptor field.
+ *
+ * If the NWKAddrOfInterest matches the network address of one of the children of the
+ * remote device, it shall determine whether a power descriptor for that device is
+ * available. If a power descriptor is not available for the child indicated by the
+ * NWKAddrOfInterest field, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_NO_DESCRIPTOR and not include the PowerDescriptor field.
+ *
+ * If a power descriptor is available for the child indicated by the NWKAddrOfInterest
+ * field,
+ * the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and include
+ * the power descriptor of the matching child device in the PowerDescriptor field.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a power_desc should not be released.
+ * @remarks The @a power_desc can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] power_desc This field shall only be included in the frame if the
+ *                       status field is equal to #ZB_ZDP_STATUS_SUCCESS.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_power_desc_req()
+ */
+typedef void (*zb_zdo_power_desc_cb)(
+               zb_zdp_status_e status,
+               zb_nwk_addr addr16,
+               const zb_zdo_node_power_descriptor_h power_desc,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'power descriptor request' command.
+ * @details The Power_Desc_req command is generated from a local device wishing to
+ * inquire as to the power descriptor of a remote device. This command shall be
+ * unicast either to the remote device itself or to an alternative device that contains
+ * the discovery information of the remote device.
+ *
+ * The local device shall generate the Power_Desc_req command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the power descriptor is required.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_power_desc_cb()
+ */
+int zb_zdo_power_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_zdo_power_desc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'complex descriptor request' command.
+ * @details The Complex_Desc_cb is generated by a remote device in response to a
+ * Complex_Desc_req directed to the remote device. This command shall be unicast
+ * to the originator of the Complex_Desc_req command.
+ * The remote device shall generate the Complex_Desc_cb command using the
+ * format illustrated in param list. The NWKAddrOfInterest field shall match that
+ * specified in the original Complex_Desc_req command. If the
+ * NWKAddrOfInterest field matches the network address of the remote device but a
+ * complex descriptor does not exist, it shall set the Status field to
+ * #ZB_ZDP_STATUS_NOT_SUPPORTED, set the Length field to 0, and not include the
+ * ComplexDescriptor field. If the NWKAddrOfInterest field matches the network
+ * address of the remote device and a complex descriptor exists, it shall set the Status
+ * field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the complex
+ * descriptor, and include its complex descriptor (see sub-clause 2.3.2.6) in the
+ * ComplexDescriptor field.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
+ * ComplexDescriptor field. If the NWKAddrOfInterest field does not match the
+ * network address of the remote device and it is the coordinator or a router, it shall
+ * determine whether the NWKAddrOfInterest field matches the network address of
+ * one of its children. If the NWKAddrOfInterest field does not match the network
+ * address of one of the children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
+ * ComplexDescriptor field.
+ *
+ * If the NWKAddrOfInterest matches the network
+ * address of one of the children of the remote device, it shall determine whether a
+ * complex descriptor for that device is available. If a complex descriptor is not
+ * available for the child indicated by the NWKAddrOfInterest field, the remote
+ * device shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length
+ * field to 0, and not include the ComplexDescriptor field.
+ *
+ * If a complex descriptor is available
+ * for the child indicated by the NWKAddrOfInterest field, the remote device shall
+ * set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of
+ * the complex
+ * descriptor for that device, and include the complex descriptor of the matching
+ * child device in the ComplexDescriptor field.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a complex_desc should not be released.
+ * @remarks The @a complex_desc can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] length Length in bytes of the complex_desc field
+ * @param[out] complex_desc This field shall only be included in the frame if the
+ *                          status field is equal to #ZB_ZDP_STATUS_SUCCESS.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_complex_desc_req()
+ */
+typedef void (*zb_zdo_complex_desc_cb)(
+               zb_zdp_status_e status,
+               zb_nwk_addr addr16,
+               unsigned char length,
+               unsigned char *complex_desc,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'complex descriptor request' command.
+ * @details The Complex_Desc_req command is generated from a local device wishing to
+ * inquire as to the complex descriptor of a remote device. This command shall be
+ * unicast either to the remote device itself or to an alternative device that contains
+ * the discovery information of the remote device.
+ *
+ * The local device shall generate the Complex_Desc_req command using the
+ * format illustrated in param list. The NWKAddrOfInterest field shall contain the
+ * network address of the remote device for which the complex descriptor is
+ * required.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_complex_desc_cb()
+ */
+int zb_zdo_complex_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_zdo_complex_desc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'user descriptor request' command.
+ * @details The User_Desc_cb is generated by a remote device in response to a
+ * User_Desc_req directed to the remote device. This command shall be unicast to
+ * the originator of the User_Desc_req command.
+ *
+ * The remote device shall generate the User_Desc_cb command using the format
+ * illustrated in Table 2.98 in Zigbee Specification.
+ * The NWKAddrOfInterest field shall match that specified
+ * in the original User_Desc_req command. If the NWKAddrOfInterest field
+ * matches the network address of the remote device but a user descriptor does not
+ * exist, it shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length
+ * field to 0, and not include the UserDescriptor field. If the NWKAddrOfInterest field
+ * matches the network address of the remote device and a user descriptor exists, it
+ * shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the Length field to the
+ * length of the user descriptor, and include its user descriptor in the UserDescriptor
+ * field.
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
+ * UserDescriptor field.
+ *
+ * If the NWKAddrOfInterest field does not match the network
+ * address of the remote device and it is the coordinator or a router, it shall determine
+ * whether the NWKAddrOfInterest field matches the network address of one of its
+ * children.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of
+ * one of the children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
+ * UserDescriptor field.
+ *
+ * If the NWKAddrOfInterest matches the network address of
+ * one of the children of the remote device, it shall determine whether a user
+ * descriptor for that device is available.
+ *
+ * If a user descriptor is not available for the
+ * child indicated by the NWKAddrOfInterest field, the remote device shall set the
+ * Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the Length field to 0, and not
+ * include the UserDescriptor field.
+ *
+ * If a user descriptor is available for the child indicated by the
+ * NWKAddrOfInterest field, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the user descriptor for
+ * that device, and include the user descriptor of the matching child device in the
+ * UserDescriptor field.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a user_desc should not be released.
+ * @remarks The @a user_desc can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR
+ * @param[out] addr16 Network address for the request
+ * @param[out] len Length in bytes of the user_desc field
+ * @param[out] user_desc This field shall only be included in the frame if the
+ *                            status field is equal to #ZB_ZDP_STATUS_SUCCESS.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_user_desc_req()
+ */
+typedef void (*zb_zdo_user_desc_cb)(
+               zb_zdp_status_e status,
+               zb_nwk_addr addr16,
+               unsigned char len,
+               unsigned char *user_desc,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'User descriptor request' command.
+ * @details The User_Desc_req command is generated from a local device wishing to inquire
+ * as to the user descriptor of a remote device. This command shall be unicast either
+ * to the remote device itself or to an alternative device that contains the discovery
+ * information of the remote device.
+ *
+ * The local device shall generate the User_Desc_req command using the format
+ * illustrated in Table 2.53 in Zigbee Specification.
+ * The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the user descriptor is required.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_complex_desc_cb()
+ */
+int zb_zdo_user_desc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_zdo_user_desc_cb cb,
+               void *user_data);
+/**
+ * @internal
+ * @brief Called after 'user descriptor confirm' request.
+ * @details The User_Desc_conf is generated by a remote device in response to a
+ * User_Desc_set directed to the remote device. This command shall be unicast to
+ * the originator of the User_Desc_set command.
+ *
+ * The remote device shall generate the User_Desc_conf command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall match that
+ * specified in the original User_Desc_set command. If the NWKAddrOfInterest
+ * field matches the network address of the remote device but a user descriptor does
+ * not exist, it shall set the Status field to #ZB_ZDP_STATUS_NOT_SUPPORTED. If the
+ * NWKAddrOfInterest field matches the network address of the remote device and
+ * a user descriptor exists, it shall set the Status field to #ZB_ZDP_STATUS_SUCCESS and
+ * configure the user descriptor with the ASCII character string specified in the original
+ * User_Desc_set command.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE.
+ *
+ * If the NWKAddrOfInterest field does not match the
+ * network address of the remote device and it is the coordinator or a router, it shall
+ * determine whether the NWKAddrOfInterest field matches the network address of
+ * one of its children. If the NWKAddrOfInterest field does not match the network
+ * address of one of the children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND.
+ *
+ * If the NWKAddrOfInterest matches the network
+ * address of one of the children of the remote device, it shall determine whether a
+ * user descriptor for that device is available. If a user descriptor is not available for
+ * the child indicated by the NWKAddrOfInterest field, the remote device shall set
+ * the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR.
+ *
+ * If a user descriptor is available for the
+ * child indicated by the NWKAddrOfInterest field, the remote device shall set the
+ * Status field to #ZB_ZDP_STATUS_SUCCESS and configure the user descriptor with the ASCII
+ * character string specified in the original User_Desc_set command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    returned value from NLME-GET.confirm primitive \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_user_desc_req()
+ */
+typedef void (*zb_zdo_user_desc_conf_cb)(
+               zb_zdp_status_e status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'user descriptor set request' command.
+ * @details The User_Desc_set command is generated from a local device wishing to
+ * configure the user descriptor on a remote device. This command shall be unicast
+ * either to the remote device itself or to an alternative device that contains the
+ * discovery information of the remote device.
+ *
+ * The local device shall generate the User_Desc_set command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the user descriptor is to be configured and
+ * the UserDescription field shall contain the ASCII character string that is to be
+ * configured in the user descriptor. Characters with ASCII codes numbered 0x00
+ * through 0x1f are not permitted to be included in this string.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] len The length of the user_desc filed in bytes
+ * @param[in] user_desc Pointer of user description
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_user_desc_conf_cb()
+ */
+int zb_zdo_user_desc_set(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char len,
+               unsigned char *user_desc,
+               zb_zdo_user_desc_conf_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'device announce request' command.
+ * @details The Device_annce is provided to enable ZigBee devices on the network to notify
+ * other ZigBee devices that the device has joined or re-joined the network,
+ * identifying the device's 64-bit IEEE address and new 16-bit NWK address, and
+ * informing the Remote Devices of the capability of the ZigBee device.
+ *
+ * This command shall be invoked for all ZigBee end devices upon join or rejoin. This
+ * command may also be invoked by ZigBee routers upon join or rejoin as part of
+ * NWK address conflict resolution.
+ *
+ * The destination addressing on this primitive is
+ * broadcast to all devices for which macRxOnWhenIdle = TRUE.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 The IEEE address for device of interest
+ * @param[in] capability Capability (see zb_zdp_mac_capability_field_e in zb_zdo.h header)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_user_desc_conf_cb()
+ */
+int zb_zdo_device_annce(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               unsigned char capability);
+
+/**
+ * @internal
+ * @brief Creates node power descriptor.
+ * @details Creates node power descriptor handle
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_node_power_desc_destroy().
+ *
+ * @param[out] handle The handle of node power descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_clone()
+ * @see zb_node_power_desc_destroy()
+ */
+int zb_node_power_desc_create(
+               zb_zdo_node_power_descriptor_h *handle);
+
+/**
+ * @internal
+ * @brief Clones a node power descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a src should be released using zb_node_power_desc_destroy().
+ * @remarks The @a dst should be released using zb_node_power_desc_destroy().
+ *
+ * @param[in] src handle of source node power descriptor
+ * @param[in] dst handle of destination node power descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_create()
+ * @see zb_node_power_desc_destroy()
+ */
+int zb_node_power_desc_clone(
+               zb_zdo_node_power_descriptor_h src, zb_zdo_node_power_descriptor_h *dst);
+
+/**
+ * @internal
+ * @brief Destroys node power descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_clone()
+ * @see zb_node_power_desc_destroy()
+ */
+int zb_node_power_desc_destroy(
+               zb_zdo_node_power_descriptor_h handle);
+
+/**
+ * @internal
+ * @brief Gets current power mode from node power descriptor.
+ * @details The current power mode field of the node power descriptor is four bits in length
+ * and specifies the current sleep/power-saving mode of the node.
+ *
+ * The current power mode field shall be set to one of the non-reserved values
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[out] current_power_mode 0b0000 : Receiver synchronized with the receiver on when
+ *                                         idle sub-field of the node descriptor \n
+ *                                0b0001 : Receiver comes on periodically as defined by the
+ *                                         node power descriptor \n
+ *                                0b0010 : Receiver comes on when stimulated, e.g. by a
+ *                                         user pressing a button
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_set_current_power_mode()
+ */
+int zb_node_power_desc_get_current_power_mode(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_cur_pwr_mode_e* current_power_mode);
+
+/**
+ * @internal
+ * @brief Sets current power mode from node power descriptor.
+ * @details The current power mode field of the node power descriptor is four bits in length
+ * and specifies the current sleep/power-saving mode of the node.
+ *
+ * The current power mode field shall be set to one of the non-reserved values
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[in] current_power_mode  0b0000 : Receiver synchronized with the receiver on when
+ *                                         idle sub-field of the node descriptor \n
+ *                                0b0001 : Receiver comes on periodically as defined by the
+ *                                         node power descriptor \n
+ *                                0b0010 : Receiver comes on when stimulated, e.g. by a
+ *                                         user pressing a button
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_get_current_power_mode()
+ */
+int zb_node_power_desc_set_current_power_mode(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_cur_pwr_mode_e current_power_mode);
+
+/**
+ * @internal
+ * @brief Gets available power mode from node power descriptor.
+ * @details The available power sources field of the node power descriptor is four bits in
+ * length and specifies the power sources available on this node.
+ *
+ * For each power source supported on this node, the corresponding bit of the available power sources
+ * field, shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[out] available_power_sources  0b0001 : Constant (mains) power \n
+ *                                      0b0010 : Rechargeable battery \n
+ *                                      0b0100 : Disposable battery \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_set_available_power_sources()
+ */
+int zb_node_power_desc_get_available_power_sources(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_type_e* available_power_sources);
+
+/**
+ * @internal
+ * @brief Sets available power mode from node power descriptor.
+ * @details The available power sources field of the node power descriptor is four bits in
+ * length and specifies the power sources available on this node.
+ *
+ * For each power
+ * source supported on this node, the corresponding bit of the available power sources
+ * field, shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[in] available_power_sources  0b0001 : Constant (mains) power \n
+ *                                     0b0010 : Rechargeable battery \n
+ *                                     0b0100 : Disposable battery \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_get_available_power_sources()
+ */
+int zb_node_power_desc_set_available_power_sources(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_type_e available_power_sources);
+
+/**
+ * @internal
+ * @brief Gets current power source from node power descriptor.
+ * @details The current power source field of the node power descriptor is four bits in
+ * length and specifies the current power source being utilized by the node.
+ *
+ * For the current power source selected, the corresponding bit of the current power
+ * source field, shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[out] current_power_source  0b0001 : Constant (mains) power \n
+ *                                  0b0010 : Rechargeable battery \n
+ *                                  0b0100 : Disposable battery \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_set_current_power_source()
+ */
+int zb_node_power_desc_get_current_power_source(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_type_e* current_power_source);
+
+/**
+ * @internal
+ * @brief Sets current power source from node power descriptor.
+ * @details The current power source field of the node power descriptor is four bits in
+ * length and specifies the current power source being utilized by the node.
+ *
+ * For the current power source selected, the corresponding bit of the current power
+ * source field, shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[in] current_power_source  0b0001 : Constant (mains) power \n
+ *                                  0b0010 : Rechargeable battery \n
+ *                                  0b0100 : Disposable battery \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_get_current_power_source()
+ */
+int zb_node_power_desc_set_current_power_source(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_type_e current_power_source);
+
+/**
+ * @internal
+ * @brief Gets current power source level from node power descriptor.
+ * @details The current power source level field of the node power descriptor is four bits
+ * in length and specifies the level of charge of the power source.
+ *
+ * The current power
+ * source level field shall be set to one of the non-reserved values
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[out] current_power_source_level  0b0000 : Critical \n
+ *                                        0b0100 : 33% \n
+ *                                        0b1000 : 66% \n
+ *                                        0b1100 : 100% \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_set_current_power_source_level()
+ */
+int zb_node_power_desc_get_current_power_source_level(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_level_e* current_power_source_level);
+
+/**
+ * @internal
+ * @brief Sets current power source level from node power descriptor.
+ * @details The current power source level field of the node power descriptor is four bits
+ * in length and specifies the level of charge of the power source.
+ *
+ * The current power
+ * source level field shall be set to one of the non-reserved values
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node power descriptor
+ * @param[in] current_power_source_level  0b0000 : Critical \n
+ *                                        0b0100 : 33% \n
+ *                                        0b1000 : 66% \n
+ *                                        0b1100 : 100% \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_power_desc_get_current_power_source_level()
+ */
+int zb_node_power_desc_set_current_power_source_level(
+               zb_zdo_node_power_descriptor_h handle,
+               zb_zdp_pwr_src_level_e current_power_source_level);
+
+/**
+ * @internal
+ * @brief Creates node descriptor.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_node_desc_destroy().
+ *
+ * @param[out] handle The handle of node descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_clone()
+ * @see zb_node_desc_destroy()
+ */
+int zb_node_desc_create(zb_zdo_node_descriptor_h *handle);
+
+/**
+ * @internal
+ * @brief Copies node descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a src should be released using zb_node_desc_destroy().
+ * @remarks The @a dst should be released using zb_node_desc_destroy().
+ *
+ * @param[in] src handle of source node descriptor
+ * @param[in] dst handle of destination node descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_create()
+ * @see zb_node_desc_destroy()
+ */
+int zb_node_desc_clone(zb_zdo_node_descriptor_h src, zb_zdo_node_descriptor_h *dst);
+
+/**
+ * @internal
+ * @brief Destroys node descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_create()
+ * @see zb_node_desc_clone()
+ */
+int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle);
+
+/**
+ * @internal
+ * @brief Gets logical type from node descriptor.
+ * @details The logical type field of the node descriptor is three bits in length and
+ * specifies the device type of the ZigBee node.
+ *
+ * The logical type field shall be set to one of the non-reserved values.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] logical_type  0b000 : ZigBee coordinator \n
+ *                          0b001 : ZigBee router \n
+ *                          0b010 : ZigBee end device \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_logical_type()
+ */
+int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
+               unsigned char* logical_type);
+
+/**
+ * @internal
+ * @brief Sets logical type from to descriptor.
+ * @details The logical type field of the node descriptor is three bits in length and
+ * specifies the device type of the ZigBee node.
+ *
+ *  The logical type field shall be set to one of the non-reserved values.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] logical_type  0b000 : ZigBee coordinator \n
+ *                          0b001 : ZigBee router \n
+ *                          0b010 : ZigBee end device \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_logical_type()
+ */
+int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
+               unsigned char logical_type);
+
+/**
+ * @internal
+ * @brief Gets complex descriptor available from node descriptor.
+ * @details The complex descriptor available field of the node descriptor is one bit in
+ * length and specifies whether a complex descriptor is available on this device. \n\n
+ * If this field is set to 1, a complex descriptor is available. \n\n
+ * If this field is set to 0, a complex descriptor is not available.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] complex_desciptor_available  1 : a complex descriptor is available \n
+ *                                          0 : a complex descriptor is not available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_complex_descriptor_available()
+ */
+int zb_node_desc_get_complex_desciptor_available(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* complex_desciptor_available);
+
+/**
+ * @internal
+ * @brief Sets complex descriptor available to node descriptor.
+ * @details The complex descriptor available field of the node descriptor is one bit in
+ * length and specifies whether a complex descriptor is available on this device. \n\n
+ * If this field is set to 1, a complex descriptor is available. \n\n
+ * If this field is set to 0, a complex descriptor is not available.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] complex_desciptor_available  1 : a complex descriptor is available \n
+ *                                         0 : a complex descriptor is not available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_complex_desciptor_available()
+ */
+int zb_node_desc_set_complex_descriptor_available(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char complex_desciptor_available);
+
+/**
+ * @internal
+ * @brief Gets user descriptor available from node descriptor.
+ * @details The user descriptor available field of the node descriptor is one bit in
+ * length and specifies whether a user descriptor is available on this device.
+ *
+ * If this field is set to 1, a user descriptor is available.
+ * If this field is set to 0, a user descriptor is not available.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] user_descriptor_available  1 : a user descriptor is available \n
+ *                                        0 : a user descriptor is not available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_user_descriptor_available()
+ */
+int zb_node_desc_get_user_descriptor_available(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* user_descriptor_available);
+
+/**
+ * @internal
+ * @brief Sets user descriptor available to node descriptor.
+ * @details The user descriptor available field of the node descriptor is one bit in
+ * length and specifies whether a user descriptor is available on this device. \n\n
+ * If this field is set to 1, a user descriptor is available.
+ * If this field is set to 0, a user descriptor is not available.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] user_descriptor_available  1 : a user descriptor is available \n
+ *                                       0 : a user descriptor is not available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_user_descriptor_available()
+ */
+int zb_node_desc_set_user_descriptor_available(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char user_descriptor_available);
+
+/**
+ * @internal
+ * @brief Gets APS flags available from node descriptor.
+ * @details The APS flags field of the node descriptor is three bits in length and
+ * specifies the application support sub-layer capabilities of the node.
+ *
+ * This field is currently not supported and shall be set to zero.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] aps_flags 0 : APS flags \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_aps_flags()
+ */
+int zb_node_desc_get_aps_flags(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* aps_flags);
+/**
+ * @internal
+ * @brief Sets APS flags available to node descriptor.
+ * @details The APS flags field of the node descriptor is three bits in length and
+ * specifies the application support sub-layer capabilities of the node.
+ *
+ * This field is currently not supported and shall be set to zero.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] aps_flags 0 : APS flags
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_aps_flags()
+ */
+int zb_node_desc_set_aps_flags(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char aps_flags);
+
+/**
+ * @internal
+ * @brief Gets frequency band from node descriptor.
+ * @details The frequency band field of the node descriptor is five bits in length and
+ * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
+ * utilized by the node.
+ *
+ * For each frequency band supported by the underlying IEEE
+ * 802.15.4 radio, the corresponding bit of the frequency band field.
+ *
+ * shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] frequency_band 0b00001 : 868-868,6MHz \n
+ *                            0b00010 : Reserved \n
+ *                            0b00100 : 902-928MHz \n
+ *                            0b01000 : 2400-2483.5MHz
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_frequency_band()
+ */
+int zb_node_desc_get_frequency_band(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* frequency_band);
+
+/**
+ * @internal
+ * @brief Sets frequency band to node descriptor.
+ * @details The frequency band field of the node descriptor is five bits in length and
+ * specifies the frequency bands that are supported by the underlying IEEE 802.15.4 radio
+ * utilized by the node.
+ *
+ * For each frequency band supported by the underlying IEEE
+ * 802.15.4 radio, the corresponding bit of the frequency band field.
+ * shall be set to 1. All other bits shall be set to 0.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] frequency_band 0b00001 : 868-868,6MHz \n
+ *                           0b00010 : Reserved \n
+ *                           0b00100 : 902-928MHz \n
+ *                           0b01000 : 2400-2483.5MHz
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_frequency_band()
+ */
+int zb_node_desc_set_frequency_band(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char frequency_band);
+
+/**
+ * @internal
+ * @brief Gets MAC capability from node descriptor.
+ * @details The MAC capability flags field is eight bits in length and specifies the node
+ * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer.  The
+ * MAC capability flags field shall be formatted as illustrated in below table.
+ *
+ * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
+ * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
+ * PAN coordinator sub-field shall be set to 0.
+ *
+ * The device type sub-field is one bit in length and shall be set to 1 if this node is a
+ * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
+ * indicating a reduced function device (RFD).
+ *
+ * The power source sub-field is one bit in length and shall be set to 1 if the current
+ * power source is mains power. Otherwise, the power source sub-field shall be set to
+ * 0. This information is derived from the node current power source field of the
+ * node power descriptor.
+ *
+ * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
+ * device does not disable its receiver to conserve power during idle periods.
+ * Otherwise, the receiver on when idle sub-field shall be set to 0
+ *
+ * The security capability sub-field is one bit in length and shall be set to 1 if the
+ * device is capable of sending and receiving frames secured using the security suite
+ * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
+ * The allocate address sub-field is one bit in length and shall be set to 0 or 1.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
+ *                                 Bit 1 : Device Type \n
+ *                                 Bit 2 : Power source \n
+ *                                 Bit 3 : Receiver on when idle \n
+ *                                 Bit 4-5 : Reserved \n
+ *                                 Bit 6 : Security capability \n
+ *                                 Bit 7 : Allocated address \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_mac_capability_flags()
+ */
+int zb_node_desc_get_mac_capability_flags(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* mac_capability_flags);
+
+/**
+ * @internal
+ * @brief Sets MAC capability to node descriptor.
+ * @details The MAC capability flags field is eight bits in length and specifies the node
+ * capabilities, as required by the IEEE 802.15.4-2003 MAC sub-layer.  The
+ * MAC capability flags field shall be formatted as illustrated in below table.
+ *
+ * The alternate PAN coordinator sub-field is one bit in length and shall be set to 1 if
+ * this node is capable of becoming a PAN coordinator. Otherwise, the alternative
+ * PAN coordinator sub-field shall be set to 0.
+ *
+ * The device type sub-field is one bit in length and shall be set to 1 if this node is a
+ * full function device (FFD). Otherwise, the device type sub-field shall be set to 0,
+ * indicating a reduced function device (RFD).
+ *
+ * The power source sub-field is one bit in length and shall be set to 1 if the current
+ * power source is mains power. Otherwise, the power source sub-field shall be set to
+ * 0. This information is derived from the node current power source field of the
+ * node power descriptor.
+ *
+ * The receiver on when idle sub-field is one bit in length and shall be set to 1 if the
+ * device does not disable its receiver to conserve power during idle periods.
+ * Otherwise, the receiver on when idle sub-field shall be set to 0
+ *
+ * The security capability sub-field is one bit in length and shall be set to 1 if the
+ * device is capable of sending and receiving frames secured using the security suite
+ * specified in [B1]. Otherwise, the security capability sub-field shall be set to 0.
+ * The allocate address sub-field is one bit in length and shall be set to 0 or 1.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] mac_capability_flags Bit 0 : Alternative PAN coordinator \n
+ *                                  Bit 1 : Device Type \n
+ *                                  Bit 2 : Power source \n
+ *                                  Bit 3 : Receiver on when idle \n
+ *                                  Bit 4-5 : Reserved \n
+ *                                  Bit 6 : Security capability \n
+ *                                  Bit 7 : Allocated address \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_mac_capability_flags()
+ */
+int zb_node_desc_set_mac_capability_flags(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char mac_capability_flags);
+
+/**
+ * @internal
+ * @brief Gets manufacturer code from node descriptor.
+ * @details The manufacturer code field of the node descriptor is sixteen bits in length
+ *  and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
+ * the manufacturer to the device.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] manufacturer_code manufacturer code
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_manufacturer_code()
+ */
+int zb_node_desc_get_manufacturer_code(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short* manufacturer_code);
+
+/**
+ * @internal
+ * @brief Sets manufacturer code to node descriptor.
+ * @details The manufacturer code field of the node descriptor is sixteen bits in length
+ *  and specifies a manufacturer code that is allocated by the ZigBee Alliance, relating
+ * the manufacturer to the device.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] manufacturer_code manufacturer code
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_frequency_band()
+ */
+int zb_node_desc_set_manufacturer_code(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short manufacturer_code);
+
+/**
+ * @internal
+ * @brief Gets maximum buffer size from node descriptor.
+ * @details The maximum buffer size field of the node descriptor is eight bits in length,
+ * with a valid range of 0x00-0x7f.
+ *
+ * This field specifies the maximum size, in octets,
+ * of the network sub-layer data unit (NSDU) for this node. This is the maximum size of
+ *  data or commands passed to or from the application by the application support
+ * sub-layer, before any fragmentation or re-assembly.
+ *
+ * This field can be used as a high-level indication for network management.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] maximum_buffer_size 0x00~0x7f
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_maximum_buffer_size()
+ */
+int zb_node_desc_get_maximum_buffer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char* maximum_buffer_size);
+
+/**
+ * @internal
+ * @brief Sets maximum buffer size to node descriptor.
+ * @details The maximum buffer size field of the node descriptor is eight bits in length,
+ *  with a valid range of 0x00-0x7f.
+ *
+ * This field specifies the maximum size, in octets, of the network sub-layer data unit (NSDU)
+ * for this node. This is the maximum size of data or commands passed to or from
+ * the application by the application support sub-layer, before any fragmentation or re-assembly.
+ *
+ * This field can be used as a high-level indication for network management.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] maximum_buffer_size 0x00~0x7f
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_maximum_buffer_size()
+ */
+int zb_node_desc_set_maximum_buffer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned char maximum_buffer_size);
+
+/**
+ * @internal
+ * @brief Gets maximum incoming transfer size from node descriptor.
+ * @details The maximum transfer size field of the node descriptor is sixteen bits in
+ *  length, with a valid range of 0x0000-0x7fff.
+ *
+ * This field specifies the maximum  size, in octets, of the application sub-layer data unit
+ * (ASDU) that can be transferred to this node in one single message transfer.
+ *
+ * This value can exceed the value of  the node maximum buffer size field through the use of fragmentation.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] maximum_incoming_transfer_size 0x0000~0x7fff
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_maximum_buffer_size()
+ */
+int zb_node_desc_get_maximum_incoming_transfer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short* maximum_incoming_transfer_size);
+
+/**
+ * @internal
+ * @brief Sets maximum incoming transfer size to node descriptor.
+ * @details The maximum transfer size field of the node descriptor is sixteen bits in
+ *  length, with a valid range of 0x0000-0x7fff.
+ *
+ * This field specifies the maximum size, in octets, of the application sub-layer data unit
+ * (ASDU) that can be transferred to this node in one single message transfer.
+ *
+ * This value can exceed the value of the node maximum buffer size field through the use of fragmentation.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] maximum_incoming_transfer_size 0x0000~0x7fff
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_maximum_buffer_size()
+ */
+int zb_node_desc_set_maximum_incoming_transfer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short maximum_incoming_transfer_size);
+
+/**
+ * @internal
+ * @brief Gets server mask from node descriptor.
+ * @details The server mask field of the node descriptor is sixteen bits in length,
+ * with bit settings signifying the system server capabilities of this node.
+ *
+ * It is used to facilitate discovery of particular system servers by other nodes on the
+ *  system.
+ *
+ * The bit settings are defined in below table.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] server_mask Bit 0 : Primary Trust Center \n
+ *                         Bit 1 : Backup Trust Center \n
+ *                         Bit 2 : Primary Binding Table Cache \n
+ *                         Bit 3 : Backup Binding Table Cache \n
+ *                         Bit 4 : Primary Discovery Cache \n
+ *                         Bit 5 : Backup Discovery Cache \n
+ *                         Bit 6 : Network Manager \n
+ *                         Bit 7~15 : Reserved
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_server_mask()
+ */
+int zb_node_desc_get_server_mask(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short* server_mask);
+
+/**
+ * @internal
+ * @brief Sets server mask to node descriptor.
+ * @details The server mask field of the node descriptor is sixteen bits in length,
+ * with bit settings signifying the system server capabilities of this node.
+ *
+ * It is used to facilitate discovery of particular system servers by other nodes on the
+ *  system.
+ *
+ * The bit settings are defined in below table.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] server_mask Bit 0 : Primary Trust Center \n
+ *                         Bit 1 : Backup Trust Center \n
+ *                         Bit 2 : Primary Binding Table Cache \n
+ *                         Bit 3 : Backup Binding Table Cache \n
+ *                         Bit 4 : Primary Discovery Cache \n
+ *                         Bit 5 : Backup Discovery Cache \n
+ *                         Bit 6 : Network Manager \n
+ *                         Bit 7~15 : Reserved
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_server_mask()
+ */
+int zb_node_desc_set_server_mask(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short server_mask);
+
+/**
+ * @internal
+ * @brief Gets maximum outgoing transfer size from node descriptor.
+ * @details The maximum transfer size field of the node descriptor is sixteen bits in,
+ * length with a valid range of 0x0000-0x7fff.
+ *
+ * This field specifies the maximum size, in octets, of the application sub-layer data unit
+ * (ASDU) that can be transferred from this node in one single message transfer.
+ *
+ * This value can exceed the value of the  node maximum buffer size field through the use
+ * of fragmentation.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] maximum_outgoing_transfer_size 0x0000~0x7ffff
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_server_mask()
+ */
+int zb_node_desc_get_maximum_outgoing_transfer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short* maximum_outgoing_transfer_size);
+
+/**
+ * @internal
+ * @brief Sets maximum outgoing transfer size to node descriptor.
+ * @details The maximum transfer size field of the node descriptor is sixteen bits in,
+ * length with a valid range of 0x0000-0x7fff.
+ *
+ * This field specifies the maximum size,in octets, of the application sub-layer data unit
+ * (ASDU) that can be transferred from this node in one single message transfer.
+ *
+ * This value can exceed the value of the
+ * node maximum buffer size field through the use of fragmentation.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] maximum_outgoing_transfer_size 0x0000~0x7ffff
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_server_mask()
+ */
+int zb_node_desc_set_maximum_outgoing_transfer_size(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short maximum_outgoing_transfer_size);
+
+/**
+ * @internal
+ * @brief Gets descriptor capability from node descriptor.
+ * @details The descriptor capability field of the node descriptor is eight bits in length
+ * , with bit settings signifying the descriptor capabilities of this node.
+ *
+ * It is used to facilitate discovery of particular features of the descriptor fields by
+ * other nodes on the system. The bit settings are defined in Table.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
+ *                                         Bit 1 : Extended Simple Descriptor List Available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_set_descriptor_capability_field()
+ */
+int zb_node_desc_get_descriptor_capability_field(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short* descriptor_capability_field);
+
+/**
+ * @internal
+ * @brief Sets descriptor capability to node descriptor.
+ * @details The descriptor capability field of the node descriptor is eight bits in length
+ * , with bit settings signifying the descriptor capabilities of this node.
+ *
+ * It is used to facilitate discovery of particular features of the descriptor fields by
+ * other nodes on the system. The bit settings are defined in Table.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[in] descriptor_capability_field Bit 0 : Extended Active Endpoint List Available \n
+ *                                        Bit 1 : Extended Simple Descriptor List Available \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE Out of range error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_node_desc_get_descriptor_capability_field()
+ */
+int zb_node_desc_set_descriptor_capability_field(
+               zb_zdo_node_descriptor_h handle,
+               unsigned short descriptor_capability_field);
+
+
+/**
+ * @}
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
+ *
+ * @brief Zigbee provides API for Network Management.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_OVERVIEW Overview
+ * The Network Management services are really handy optional services used for reading the
+ * various tables contained within ZigBee nodes, and to request certain common actions
+ *
+ * @since_tizen 4.0
+ *
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Called after receiving 'find system server request'.
+ * @details The System_Server_Discovery_cb is generated from Remote Devices on receipt
+ * of a System_Server_Discovery_req primitive if the parameter matches the Server
+ * Mask field in its node descriptor. If there is no match, the
+ * System_Server_Discovery_req shall be ignored and no response given. Matching
+ * is performed by masking the ServerMask parameter of the
+ * System_Server_Discovery_req with the Server Mask field in the node descriptor.
+ * This command shall be unicast to the device which sent
+ * System_Server_Discovery_req with Acknowledge request set in TxOptions. The
+ * parameter ServerMask contains the bits in the parameter of the request which
+ * match the server mask in the node descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    returned value from NLME-GET.confirm primitive \n
+ * @param[out] server_mask Server Mask Bit Assignment
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_system_server_discover_req()
+ */
+typedef void (*zb_zdo_system_server_discover_cb)(
+               unsigned char status,
+               unsigned short server_mask,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'find system server request' command.
+ * @details The System_Server_Discovery_req is generated from a Local Device wishing to
+ * discover the location of a particular system server or servers as indicated by the
+ * ServerMask parameter.
+ *
+ * The destination addressing on this request is 'broadcast to
+ * all devices for which macRxOnWhenIdle = TRUE.'
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] server_mask Server Mask Bit Assignment
+ * @param[in] cb The callback function
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_system_server_discover_cb()
+ */
+int zb_zdo_system_server_discover_req(
+               zb_zigbee_h handle,
+               unsigned short server_mask,
+               zb_zdo_system_server_discover_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'find node cache request' command.
+ * @details The Find_node_cache_cb is provided to notify a Local Device of the successful
+ * iscovery of the Primary Discovery Cache device for the given NWKAddr and
+ * EEEAddr fields supplied in the request, or to signify that the device of interest is
+ * apable of responding to discovery requests.
+ *
+ * The Find_node_cache_cb shall be
+ * enerated only by Primary Discovery Cache devices holding discovery
+ * nformation for the NWKAddr and IEEEAddr in the request or the device of
+ * nterest itself and all other Remote Devices shall not supply a response.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] cache_nwk_addr NWK Address for the Primary Discovery Cache device holding
+ *                            the discovery information.
+ * @param[out] addr16 Server NWK Address for the device of interest.
+ * @param[out] addr64 Server IEEE Address for the device of interest.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_find_node_cache_req()
+ */
+typedef void (*zb_zdo_find_node_cache_cb)(
+               zb_nwk_addr cache_nwk_addr,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'find Node cache store request' command.
+ * @details The Find_node_cache_req is provided to enable ZigBee devices on the network to
+ * broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a
+ * device on the network that holds discovery information for the device of interest,
+ * as specified in the request parameters.
+ *
+ * The effect of a successful
+ * Find_node_cache_req is to have the Primary Discovery Cache device, holding
+ * discovery information for the device of interest, unicast a Find_node_cache_cb
+ * back to the Local Device. Note that, like the NWK_addr_req, only the device
+ * meeting this criteria shall respond to the request generated by
+ * Find_node_cache_req.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_find_node_cache_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_find_node_cache_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'find discovery cache request' command.
+ * @details The Find_node_cache_cb is provided to notify a Local Device of the successful
+ * discovery of the Primary Discovery Cache device for the given NWKAddr and
+ * IEEEAddr fields supplied in the request, or to signify that the device of interest is
+ * capable of responding to discovery requests.
+ *
+ * The Find_node_cache_cb shall be
+ * generated only by Primary Discovery Cache devices holding discovery
+ * information for the NWKAddr and IEEEAddr in the request or the device of
+ * interest itself and all other Remote Devices shall not supply a response.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    returned value from NLME-GET.confirm primitive \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_discovery_cache_req()
+ */
+typedef void (*zb_zdo_discovery_cache_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'discovery cache request' command.
+ * @details The Discovery_Cache_req is provided to enable devices on the network to locate
+ * a Primary Discovery Cache device on the network.
+ *
+ * The destination addressing on
+ * this primitive shall be broadcast to all devices for which macRxOnWhenIdle =
+ * TRUE.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_discovery_cache_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_discovery_cache_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'find discovery store request' command.
+ * @details The Discovery_store_cb is provided to notify a Local Device of the request status
+ * from a Primary Discovery Cache device. Included in the response is a status code
+ * to notify the Local Device whether the request is successful (the Primary Cache
+ * Device has space to store the discovery cache data for the Local Device), whether
+ * the request is unsupported (meaning the Remote Device is not a Primary
+ * Discovery Cache device), or insufficient space exists.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_discovery_store_req()
+ */
+typedef void (*zb_zdo_discovery_store_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'discovery store request' command.
+ * @details The Discovery_store_req is provided to enable ZigBee end devices on the
+ * network to request storage of their discovery cache information on a Primary
+ * Discovery Cache device.
+ *
+ * Included in the request is the amount of storage space the Local Device requires.
+ * The destination addressing on this request is unicast.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] node_desc_size Size of node description structure
+ * @param[in] power_desc_size Size of power description structure
+ * @param[in] active_ep_size Number of active EP
+ * @param[in] simple_desc_count Number of simple description structure
+ * @param[in] simple_desc_list Pointer of simple description structure size
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_discovery_store_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               unsigned char node_desc_size,
+               unsigned char power_desc_size,
+               unsigned char active_ep_size,
+               unsigned char simple_desc_count,
+               unsigned char *simple_desc_list,
+               zb_zdo_discovery_store_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'node description store request' command.
+ * @details The Node_store_cb is provided to notify a Local Device of the request status
+ * from a Primary Discovery Cache device.
+ *
+ * Included in the response is a status code
+ * to notify the Local Device whether the request is successful (the Primary Cache
+ * Device has space to store the discovery cache data for the Local Device), whether
+ * the request is not supported (meaning the Remote Device is not a Primary
+ * Discovery Cache device), or insufficient space exists.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_PERMITTED \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_node_desc_store_req()
+ */
+typedef void (*zb_zdo_node_desc_store_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'node description store request' command.
+ * @details The Node_Desc_store_req is provided to enable ZigBee end devices on the
+ * network to request storage of their Node Descriptor on a Primary Discovery
+ * Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status from a
+ * Discovery_store_req to the same Primary Discovery Cache device.
+ *
+ * Included in this request is the Node Descriptor the Local Device wishes to cache.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] nodedsc Pointer of node description structure
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_node_desc_store_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_node_descriptor_h nodedsc,
+               zb_zdo_node_desc_store_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'power description store request' command.
+ * @details The Power_Desc_store_cb is provided to notify a Local Device of the request
+ * status from a Primary Discovery Cache device. Included in the response is a status
+ * code to notify the Local Device whether the request is successful (the Primary
+ * Cache Device has space to store the discovery cache data for the Local Device),
+ * whether the request is not supported (meaning the Remote Device is not a Primary
+ * Discovery Cache device), or insufficient space exists.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS  \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_PERMITTED \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_power_desc_store_req()
+ */
+typedef void (*zb_zdo_power_desc_store_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'power description store request' command.
+ * @details The Power_Desc_store_req is provided to enable ZigBee end devices on the
+ * network to request storage of their Power Descriptor on a Primary Discovery
+ * Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status from a
+ * Discovery_store_req to the same Primary Discovery Cache device. Included in
+ * this request is the Power Descriptor the Local Device wishes to cache.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] powerdsc Pointer of power description structure
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_power_desc_store_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_node_power_descriptor_h powerdsc,
+               zb_zdo_power_desc_store_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'active end-point store request' command.
+ * @details The Active_EP_store_cb is provided to notify a Local Device of the request
+ * status from a Primary Discovery Cache device.
+ *
+ * Included in the response is a status
+ * code to notify the Local Device whether the request is successful (the Primary
+ * Cache Device has space to store the discovery cache data for the Local Device),
+ * the request is not supported (meaning the Remote Device is not a Primary
+ * Discovery Cache device), or insufficient space exists.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_PERMITTED \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_active_ep_store_req()
+ */
+typedef void (*zb_zdo_active_ep_store_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'active end-point store request' command.
+ * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
+ * network to request storage of their list of Simple Descriptors on a Primary
+ * Discovery Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status
+ * from a Discovery_store_req to the same Primary Discovery Cache device. Note that each
+ * Simple Descriptor for every active endpoint on the Local Device must be
+ * individually uploaded to the Primary Discovery Cache device via this command
+ * to enable cached discovery.
+ *
+ * Included in this request is the length of the Simple
+ * Descriptor the Local Device wishes to cache and the Simple Descriptor itself.
+ *
+ * The endpoint is a field within the Simple Descriptor and is accessed by the Remote
+ * Device to manage the discovery cache information for the Local Device.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] active_ep_count Number of End-point List
+ * @param[in] ep_list End-point list
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_active_ep_store_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               unsigned char active_ep_count,
+               unsigned char *ep_list,
+               zb_zdo_active_ep_store_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'simple description store request' command.
+ * @details The Simple_Desc_store_cb is provided to notify a Local Device of the request
+ * status from a Primary Discovery Cache device.
+ *
+ * Included in the response is a status
+ * code to notify the Local Device whether the request is successful (the Primary
+ * Cache Device has space to store the discovery cache data for the Local Device),
+ * the request is not supported (meaning the Remote Device is not a Primary
+ * Discovery Cache device), or insufficient space exists.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_PERMITTED \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_simple_desc_store_req()
+ */
+typedef void (*zb_zdo_simple_desc_store_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'simple description store request' command.
+ * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
+ * network to request storage of their list of Simple Descriptors on a Primary
+ * Discovery Cache device which has previously received a #ZB_ZDP_STATUS_SUCCESS status
+ * from a Discovery_store_req to the same Primary Discovery Cache device.
+ *
+ * Note that each
+ * Simple Descriptor for every active endpoint on the Local Device must be
+ * individually uploaded to the Primary Discovery Cache device via this command
+ * to enable cached discovery.
+ *
+ * Included in this request is the length of the Simple
+ * Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The
+ * endpoint is a field within the Simple Descriptor and is accessed by the Remote
+ * Device to manage the discovery cache information for the Local Device.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] simpledsc Pointer of simple description structure
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_simple_desc_store_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_simple_desc_h simpledsc,
+               zb_zdo_simple_desc_store_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'simple description remove request' command.
+ * @details The Remove_node_cache_cb is provided to notify a Local Device of the request
+ * status from a Primary Discovery Cache device.
+ *
+ * Included in the response is a status
+ * code to notify the Local Device whether the request is successful (the Primary
+ * Cache Device has removed the discovery cache data for the indicated device of
+ * interest), or the request is not supported (meaning the Remote Device is not a
+ * Primary Discovery Cache device).
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INSUFFICIENT_SPACE \n
+ *                    #ZB_ZDP_STATUS_NOT_PERMITTED \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_remove_node_cache_req()
+ */
+typedef void (*zb_zdo_remove_node_cache_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'remove node cache request' command.
+ * @details The Remove_node_cache_req is provided to enable ZigBee devices on the
+ * network to request removal of discovery cache information for a specified ZigBee
+ * end device from a Primary Discovery Cache device.
+ *
+ * The effect of a successful
+ * Remove_node_cache_req is to undo a previously successful Discovery_store_req
+ * and additionally remove any cache information stored on behalf of the specified
+ * ZigBee end device on the Primary Discovery Cache device.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_remove_node_cache_cb()
+ */
+int zb_zdo_remove_node_cache_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_ieee_addr addr64,
+               zb_zdo_remove_node_cache_cb cb,
+               void *user_data);
+
+/**
+ * @}
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * @internal
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
+ * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE Network Manager
+ *
+ * @brief Zigbee provides API for Network Management.
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_HEADER Required Header
+ *  \#include <zigbee.h>
+ *
+ * @section CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_OVERVIEW Overview
+ * The Network Management services are really handy optional services used for reading the
+ * various tables contained within ZigBee nodes, and to request certain common actions
+ *
+ * @since_tizen 4.0
+ *
+ */
+
+/**
+ * @internal
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Called after 'network management discovery request' command.
+ * @details The Mgmt_NWK_Disc_cb is generated in response to an Mgmt_NWK_Disc_req.
+ * If this management command is not supported, a status of NOT_SUPPORTED shall be
+ * returned and all parameter fields after the Status field shall be omitted.
+ *
+ * Otherwise, the Remote Device shall implement the following process.
+ *
+ * Upon receipt of and after support for the Mgmt_NWK_Disc_req has been verified,
+ * the Remote Device shall issue an NLME-NETWORK-DISCOVERY.request primitive using the
+ * ScanChannels and ScanDuration parameters, supplied in the Mgmt_NWK_Disc_req command.
+ *
+ * Upon receipt of the NLME-NETWORK-DISCOVERY.confirm primitive, the Remote Device shall
+ * report the results, starting with the StartIndex element, via the Mgmt_NWK_Disc_cb
+ * command.
+ *
+ * The NetworkList field shall contain whole NetworkList records, formatted as specified
+ * in Table 2.125 in Zigbee specification, until the limit on MSDU size, i.e.,
+ * aMaxMACFrameSize is reached. The number of results reported shall be set in the
+ * NetworkListCount.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a nwk_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status ZB_ZDP_STATUS_NOT_SUPPORTED or returned value from NLME-NETWORK.DISCOVERY.
+ *                    request
+ * @param[out] network_count The total number of networks reported by the NLME-NETWORK-
+ *                           DISCOVERY.confirm.
+ * @param[out] start_idx The starting point in the NetworkList from the NLME-NETWORK-
+ *                       DISCOVERY.confirm where reporting begins for this response.
+ * @param[out] network_list_count The number of network list descriptors reported within
+ *                                this response.
+ * @param[out] nwk_list A list of network list descriptors.
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_nwk_disc_req()
+ */
+typedef void (*zb_zdo_mgmt_nwk_disc_cb)(
+               zb_zdp_status_e status,
+               unsigned char network_count,
+               unsigned char start_idx,
+               unsigned char network_list_count,
+               const zb_zdo_network_list_record_h *nwk_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Bitmask to scan all 802.15.4 channels.
+ * @since_tizen 4.0
+ */
+#define ZB_802_15_4_CHANNELS_MASK 0x07FFF800UL
+
+/**
+ * @internal
+ * @brief Sends 'network discover management request' command.
+ * @details The Mgmt_NWK_Disc_req is generated from a Local Device requesting that the
+ * Remote Device execute a Scan to report back networks in the vicinity of the Local
+ * Device.
+ *
+* The destination addressing on this command shall be unicast.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination address
+ * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
+ *                          The 27 least significant bits (b0, b1,... b26) indicate
+ *                          which channels are to be scanned (1 = scan, 0 = do not scan)
+ *                          for each of the 27 valid channels.
+ * @param[in] scan_duration A value used to calculate the length of time to spend
+ *                          scanning each channel. The time spent scanning each channel is
+ *                          (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
+ *                          the value of the ScanDuration parameter. For more information
+ *                          on MAC sub-layer scanning
+ * @param[in] scan_count A number of beacon-request in one scan-duration
+ * @param[in] start_idx Starting index
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_zdo_mgmt_nwk_disc_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned int scan_channels,
+               unsigned char scan_duration,
+               unsigned char scan_count,
+               unsigned char start_idx,
+               zb_zdo_mgmt_nwk_disc_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'network management LQI request' command.
+ * @details The Recover_Source_Bind_cb is generated from a backup binding table cache
+ * device in response to a Recover_Source_Bind_req from a primary binding table
+ * cache and contains the status of the request. This command shall be unicast to the
+ * requesting device.
+ *
+ * If the responding device is not a backup binding table cache, it shall return a status
+ * of #ZB_ZDP_STATUS_NOT_SUPPORTED. If the originator of the request is not recognized as
+ * a primary binding table cache, it shall return a status of
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE.
+ *
+ * Otherwise, the backup binding table cache shall prepare a list of binding table
+ * entries from its backup beginning with StartIndex.
+ *
+ * It will fit in as many entries as possible into a Recover_Source_Bind_cb command and
+ * return a status of #ZB_ZDP_STATUS_SUCCESS.
+ *
+ * If StartIndex is more than the number of entries in the Source table, a status of
+ * #ZB_ZDP_STATUS_NO_ENTRY is returned.
+ *
+ * For a successful response, SourceTableEntries is the total number of entries in the
+ * backup source table, and SourceTableListCount is the number of entries which is being
+ * returned in the response.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a neighbor_table_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_TABLE_FULL \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_NO_ENTRY \n
+ * @param[out] neighbor_table_entries Total number of neighbor table entries in the backup
+ *                                  binding cache.
+ * @param[out] start_idx Starting index within the neighbor table to begin reporting for
+ *                       the neighbor table list.
+ * @param[out] neighbor_table_list_count The number of neighbor table entries included
+ *                                       within neighbor table list.
+ * @param[out] neighbor_table_list A list of neighbor table list.
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_lqi_req()
+ */
+typedef void (*zb_zdo_mgmt_lqi_cb)(
+               zb_zdp_status_e status,
+               unsigned char neighbor_table_entries,
+               unsigned char start_idx,
+               unsigned char neighbor_table_list_count,
+               const zb_zdo_neighbor_table_desc_h *neighbor_table_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'LQI management request' command.
+ * @details The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a
+ * neighbor list for the Remote Device along with associated LQI values to each
+ * neighbor. The destination addressing on this command shall be unicast only and
+ * the destination address must be that of a ZigBee Coordinator or ZigBee Router.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination address
+ * @param[in] start_idx Starting index for the requested elements of the neighbor table
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ */
+int zb_zdo_mgmt_lqi_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char start_idx,
+               zb_zdo_mgmt_lqi_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'routing management request' command.
+ * @details The Mgmt_Rtg_cb is generated in response to an Mgmt_Rtg_req. If this
+ * management command is not supported, a status of #ZB_ZDP_STATUS_NOT_SUPPORTED shall be
+ * returned and all parameter fields after the Status field shall be omitted. Otherwise,
+ * the Remote Device shall implement the following processing.
+ *
+ * Upon receipt of and after support for the Mgmt_Rtg_req has been verified, the
+ * Remote Device shall perform an NLME-GET.request (for the nwkRouteTable
+ * attribute) and process the resulting NLME-GET.confirm (containing the
+ * nwkRouteTable attribute) to create the Mgmt_Rtg_cb command.
+ *
+ * The Mgmt_Rtg_cb command shall contain the same status that was contained in the
+ * NLME-GET.confirm primitive and if this was not #ZB_ZDP_STATUS_SUCCESS, all parameter
+ * fields after the status field shall be omitted.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a routing_table_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    returned value from NLME-GET.confirm  primitive \n
+ * @param[out] routing_table_entries Total number of routing table entries within the
+ *                                   remote device.
+ * @param[out] start_idx Starting index within the Routing Table to begin reporting for
+ *                       the RoutingTableList.
+ * @param[out] routing_table_list_count The number of routing table entries included
+ *                                      within RoutingTableList.
+ * @param[out] routing_table_list A list of routing table list.
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_rtg_req()
+ */
+typedef void (*zb_zdo_mgmt_rtg_cb)(
+               zb_zdp_status_e status,
+               unsigned char routing_table_entries,
+               unsigned char start_idx,
+               unsigned char routing_table_list_count,
+               const zb_zdo_routing_table_h *routing_table_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'routing management request' command.
+ * @details The Mgmt_Rtg_req is generated from a Local Device wishing to retrieve the
+ * contents of the Routing Table from the Remote Device. The destination
+ * addressing on this command shall be unicast only and the destination address
+ * must be that of the ZigBee Router or ZigBee Coordinator.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination network address
+ * @param[in] start_idx Starting index for the requested elements of the routing table
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ */
+int zb_zdo_mgmt_rtg_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char start_idx,
+               zb_zdo_mgmt_rtg_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'binding management request' command.
+ * @details The Mgmt_Bind_cb is generated in response to a Mgmt_Bind_req. If this
+ * management command is not supported, a status of #ZB_ZDP_STATUS_NOT_SUPPORTED shall be
+ * returned and all parameter fields after the Status field shall be omitted. Otherwise,
+ * the Remote Device shall implement the following processing.
+ *
+ * Upon receipt of and after support for the Mgmt_Bind_req has been verified, the
+ * Remote Device shall perform an APSME-GET.request (for the apsBindingTable
+ * attribute) and process the resulting APSME-GET.confirm (containing the
+ * apsBindingTable attribute) to create the Mgmt_Bind_cb command. The
+ * Mgmt_Bind_cb command shall contain the same status that was contained in the
+ * APSME-GET.confirm primitive and if this was not #ZB_ZDP_STATUS_SUCCESS, all parameter
+ * fields after the status field shall be omitted.
+ *
+ * From the apsBindingTable attribute, the binding table shall be accessed, starting
+ * with the index specified by StartIndex, and moved to the BindingTableList field of
+ * the Mgmt_Bind_cb command. The entries reported from the binding table shall
+ * be those, starting with StartIndex and including whole BindingTableList records
+ * until the MSDU size limit, i.e., aMaxMACFrameSize,
+ * is reached. Within the Mgmt_Bind_Rsp command, the BindingTableEntries field
+ * shall represent the total number of Binding Table entries in the Remote Device.
+ * The BindingTableListCount field shall be the number of entries reported in the
+ * BindingTableList field of the Mgmt_Bind_req command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a binding_table_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    returned value from NLME-GET.confirm primitive \n
+ * @param[out] binding_table_entries Total number of Binding Table entries within the
+ *                                  Remote Device.
+ * @param[out] start_idx Starting index within the Binding Table to begin reporting for
+ *                      the BindingTableList.
+ * @param[out] binding_table_list_count The number of binding table entries included
+ *                                      within BindingTableList.
+ * @param[out] binding_table_list A list of routing table list.
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_bind_req()
+ */
+typedef void (*zb_zdo_mgmt_bind_cb)(
+               zb_zdp_status_e status,
+               unsigned char binding_table_entries,
+               unsigned char start_idx,
+               unsigned char binding_table_list_count,
+               const zb_zdo_binding_table_h *binding_table_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'binding management request' command.
+ * @details The Mgmt_Bind_req is generated from a Local Device wishing to retrieve the
+ * contents of the Binding Table from the Remote Device.
+ *
+ * The destination addressing on this command shall be unicast only and the destination address
+ * must be that of a Primary binding table cache or source device holding its own
+ * binding table.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination network address
+ * @param[in] start_idx Starting index for the requested elements of the binding table
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_zdo_mgmt_bind_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char start_idx,
+               zb_zdo_mgmt_bind_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'direct join management request' command.
+ * @details The Mgmt_Direct_Join_cb is generated in response to a Mgmt_Direct_Join_req.
+ * If this management command is not supported, a status of NOT_SUPPORTED
+ * shall be returned.
+ *
+ * Otherwise, the Remote Device shall implement the following processing.
+ * Upon receipt and after support for the Mgmt_Direct_Join_req has been verified,
+ * the Remote Device shall execute the NLME-DIRECT-JOIN.request to directly
+ * associate the DeviceAddress contained in the Mgmt_Direct_Join_req to the
+ * network.
+ *
+ * The Mgmt_Direct_Join_cb shall contain the same status that was
+ * contained in the NLME-DIRECT-JOIN.confirm primitive.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
+ *                    returned value from NLME-DIRECT-JOIN.confirm primitive \n
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_direct_join_cb()
+ */
+typedef void (*zb_zdo_mgmt_direct_join_cb)(
+               unsigned char status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'direct join device management request' command.
+ * @details The Mgmt_Direct_Join_req is generated from a Local Device requesting that a
+ * Remote Device permit a device designated by DeviceAddress to join the network directly.
+ *
+ * The Mgmt_Direct_Join_req is generated by a management application
+ * which directs the request to a Remote Device where the NLME-DIRECT-
+ * JOIN.request is to be executed using the parameter supplied by
+ * Mgmt_Direct_Join_req.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr64 The IEEE address for designated device to leave
+ * @param[in] capability Capability (See zb_zdp_mac_capability_field_e in zb_zdo.h header)
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_direct_join_cb()
+ */
+int zb_zdo_mgmt_direct_join_req(
+               zb_zigbee_h handle,
+               zb_ieee_addr addr64,
+               unsigned char capability,
+               zb_zdo_mgmt_direct_join_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'cache management request' command.
+ * @details The Mgmt_Cache_cb is generated in response to an Mgmt_Cache_req. If this
+ * management command is not supported, or the Remote Device is not a Primary
+ * Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter
+ * fields after the Status field shall be omitted. Otherwise, the Remote Device shall
+ * implement the following processing.
+ *
+ * Upon receipt of the Mgmt_Cache_req and after support for the Mgmt_Cache_req has been verified,
+ * the Remote Device shall access an internally maintained list of registered ZigBee End Devices utilizing the
+ * discovery cache on this Primary Discovery Cache device. The entries reported
+ * shall be those, starting with StartIndex and including whole DiscoveryCacheList
+ * records until the limit on MSDU size, i.e., aMaxMACFrameSize is reached.
+ *
+ * Within the Mgmt_Cache_cb command, the
+ * DiscoveryCacheListEntries field shall represent the total number of registered
+ * entries in the Remote Device. The parameter DiscoveryCacheListCount shall be
+ * the number of entries reported in the DiscoveryCacheList field of the
+ * Mgmt_Cache_cb command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a discover_cache_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] discovery_cache_entries discovery cache entries
+ * @param[out] start_idx data User data
+ * @param[out] discovery_cache_list_count The list shall contain the number of elements
+ *                                        given by the DiscoveryCacheListCount parameter.
+ * @param[out] discover_cache_list A list of descriptors.
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_cache_req()
+ */
+typedef void (*zb_zdo_mgmt_cache_cb)(
+               unsigned char status,
+               unsigned char discovery_cache_entries,
+               unsigned char start_idx,
+               unsigned char discovery_cache_list_count,
+               const zb_zdo_discovery_cache_h *discover_cache_list,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'cache management request' command.
+ * @details The Mgmt_Cache_req is provided to enable ZigBee devices on the network to
+ * retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache
+ * device.
+ *
+ * The destination addressing on this primitive shall be unicast.
+ *
+ * @since_tizen 4.0
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination network address
+ * @param[in] start_idx Starring index for the requested elements of the discover cache
+ *                      list
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_cache_cb()
+ */
+int zb_zdo_mgmt_cache_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char start_idx,
+               zb_zdo_mgmt_cache_cb cb,
+               void *user_data);
+
+
+/**
+ * @internal
+ * @brief Called after 'leave management request' command.
+ * @details The Mgmt_Leave_cb is generated in response to a Mgmt_Leave_req.
+ *
+ * If this management command is not supported, a status of NOT_SUPPORTED shall be
+ * returned.  Otherwise, the Remote Device shall implement the following
+ * processing.
+ *
+ * Upon receipt of and after support for the Mgmt_Leave_req has been verified, the
+ * Remote Device shall execute the NLME-LEAVE.request to disassociate from the
+ * currently associated network. The Mgmt_Leave_cb shall contain the same status
+ * that was contained in the NLME-LEAVE.confirm primitive.
+ *
+ * Once a device has disassociated, it may execute pre-programmed logic to perform
+ * NLME-NETWORK-DISCOVERY and NLME-JOIN to join/re-join a network.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
+ *                    returned value from NLME-LEAVE.confirm primitive \n
+ * @param[in] user_data User data
+ *
+ * @see zb_zdo_mgmt_leave_req()
+ */
+typedef void (*zb_zdo_mgmt_leave_cb)(
+               zb_zdp_status_e status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'leave device management request' command.
+ * @details The Mgmt_Leave_req is generated from a Local Device requesting that a Remote
+ * Device leave the network or to request that another device leave the network.
+ * The Mgmt_Leave_req is generated by a management application which directs the
+ * request to a Remote Device where the NLME-LEAVE.request is to be executed
+ * using the parameter supplied by Mgmt_Leave_req.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr64 The IEEE address for designated device to leave
+ * @param[in] remove_children This field has a value of 1 if the device being asked to
+ *                            leave the network is also being asked to remove its child
+ *                            devices, if any. Otherwise, it has a value of 0.
+ * @param[in] rejoin This field has a value of 1 if the device being asked to leave from
+ *                   the current parent is requested to rejoin the network. Otherwise,
+ *                   it has a value of 0.
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_leave_cb()
+ */
+int zb_zdo_mgmt_leave_req(
+               zb_zigbee_h handle,
+               zb_ieee_addr addr64,
+               bool remove_children,
+               bool rejoin,
+               zb_zdo_mgmt_leave_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Called after 'permit joining management request' command.
+ * @details The Mgmt_Permit_Joining_cb is generated in response to a unicast
+ * Mgmt_Permit_Joining_req.
+ *
+ * In the description which follows, note that no
+ * response shall be sent if the Mgmt_Permit_Joining_req was received as a
+ * broadcast to all routers. If this management command is not permitted by the
+ * requesting device, a status of INVALID_REQUEST shall be returned.
+ *
+ * Upon receipt and after support for Mgmt_Permit_Joining_req has been verified, the
+ * Remote Device shall execute the NLME-PERMIT-JOINING.request.
+ *
+ * The Mgmt_Permit-Joining_cb shall contain the same status that was contained in the
+ * NLME-PERMIT-JOINING.confirm primitive.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ *                    #ZB_ZDP_STATUS_NOT_AUTHORIZED \n
+ *                    returned value from NLME-DIRECT-JOINING.confirm primitive \n
+ * @param[out] user_data User data
+ *
+ * @see zb_zdo_mgmt_direct_join_cb()
+ */
+typedef void (*zb_zdo_mgmt_permit_joining_cb)(
+               zb_zdp_status_e status,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'permit join device management request' command.
+ * @details The Mgmt_Permit_Joining_req is generated from a Local Device requesting that
+ * a remote device or devices allow or disallow association. The
+ * Mgmt_Permit_Joining_req is generated by a management application or
+ * commissioning tool which directs the request to a remote device(s) where the
+ * NLME-PERMIT-JOINING.request is executed using the PermitDuration
+ * parameter supplied by Mgmt_Permit_Joining_req. Additionally, if the remote
+ * device is the Trust Center and TC_Significance is set to 1, the Trust Center
+ * authentication policy will be affected. The addressing may be unicast or
+ * 'broadcast to all routers and coordinator'.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 destination network address
+ * @param[in] permit_duration The length of time in seconds during which the ZigBee
+ *                            coordinator or router will allow associations. \n
+ *                            The value 0x00 and 0xff indicate that permission is
+ *                            disabled or enabled, respectively, without a specified time
+ *                            limit.
+ * @param[in] tc_significance If this is set to 0x01 and the remote device is the Trust Center,
+ *                            the command affects the Trust Center authentication policy as
+ *                            described in the sub-clauses below; \n \n
+ *                            If this is set to 0x00, there is no effect on the Trust Center.
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_permit_joining_cb()
+ */
+int zb_zdo_mgmt_permit_joining_req(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               unsigned char permit_duration,
+               unsigned char tc_significance,
+               zb_zdo_mgmt_permit_joining_cb cb,
+               void *user_data);
+
+/**
+ * @internal
+ * @brief Sends 'update network management request' command.
+ * @details This command is provided to allow updating of network configuration parameters
+ * or to request information from devices on network conditions in the local
+ * operating environment. The destination addressing on this primitive shall be
+ * unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved.
+ *                         The 27 least significant bits (b0, b1,... b26) indicate
+ *                         which channels are to be scanned (1 = scan, 0 = do not scan)
+ *                         for each of the 27 valid channels.
+ * @param[in] scan_duration A value used to calculate the length of time to spend
+ *                         scanning each channel.\n The time spent scanning each channel
+ *                         is (aBaseSuperframeDuration * (2 n + 1)) symbols, where n is
+ *                         the value of the ScanDuration parameter. For more information
+ *                         on MAC sub-layer scanning
+ * @param[in] scan_count This field represents the number of energy scan to be conducted
+ *                      and reported
+ * @param[in] nwk_update_id The value of the nwkUpdateId contained in this request.
+ *                         This value is set by the Network Channel Manager prior to
+ *                         sending the message. \n
+ *                         This field shall only be present of the ScanDuration is 0xfe
+ *                         or 0xff. If the ScanDuration is 0xff, then the value in the
+ *                         nwkUpdateID shall be ignored. \n
+ * @param[in] nwk_manager_addr This field shall be present only if the ScanDuration is set
+ *                            to 0xff, and, where present, indicates the NWK address for
+ *                            the device with the Network Manager bit set in its Node
+ *                            Descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_update_noti()
+ */
+int zb_zdo_mgmt_nwk_update_req(
+               zb_zigbee_h handle,
+               unsigned int scan_channels,
+               unsigned char scan_duration,
+               unsigned char scan_count,
+               unsigned char nwk_update_id,
+               zb_nwk_addr nwk_manager_addr);
+
+
+/**
+ * @internal
+ * @brief Gets extended pan id from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] extended_pan_id The 64-bit extended PAN identifier of the discovered
+ *                             network.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_extended_pan_id(
+               zb_zdo_network_list_record_h handle,
+               zb_ieee_addr extended_pan_id);
+
+/**
+ * @internal
+ * @brief Gets logical channel number from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has multiple network_list_record.
+ *
+ *  Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] logical_channel The current logical channel occupied by the network.
+ *                             Selected from the available logical channels supported by
+ *                             the PHY.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_logical_channel(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* logical_channel);
+
+/**
+ * @internal
+ * @brief Gets ZigBee version from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] zigbee_version 0x0~0xf : The version of the ZigBee protocol in use
+ *                             in the discovered network.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_zigbee_version(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* zigbee_version);
+
+/**
+ * @internal
+ * @brief Gets stack profile from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] stack_profile 0x0~0xf : A ZigBee stack profile identifier indicating
+ *                             the stack profile in use in the discovered network.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_stack_profile(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* stack_profile);
+
+/**
+ * @internal
+ * @brief Gets beacon order from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] beacon_order 0x0~0xf : This specifies how often the MAC sub-layer
+ * beacon is to be transmitted by a given device on the network.  For a discussion of
+ *
+ * MAC sub-layer beacon order
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_beacon_order(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* beacon_order);
+
+/**
+ * @internal
+ * @brief Gets superframe order from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] superframe_order 0x0~0xf : For beacon-oriented networks, i.e., beacon
+ * order < 15, this specifies the length of the active period of the superframe.
+ *
+ * For a discussion of MAC sub-layer superframe order.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_superframe_order(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* superframe_order);
+
+/**
+ * @internal
+ * @brief Gets permit joining from network list record.
+ * @details When received zb_zdo_mgmt_nwk_disc_cb() callback (originally, ZigBee
+ * called Mgmt_NWK_Disc_rsp (ClusterID = 0x8030) ), it has a network_list_record.
+ *
+ * Therefore this function can help parsing parameter in network_list_record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] permit_joining 0 or 1 : A value of TRUE indicates that at least one
+ * ZigBee router on the network currently permits joining, i.e., its NWK has been
+ * issued an NLME-PERMIT-JOINING primitive and the time limit, if given, has
+ * not yet expired.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_nwk_disc_cb()
+ */
+int zb_network_list_record_get_permit_joining(
+               zb_zdo_network_list_record_h handle,
+               unsigned char* permit_joining);
+
+/**
+ * @internal
+ * @brief Gets destination address from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] dst_addr The destination address for the binding entry
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
+               zb_nwk_addr* dst_addr);
+
+/**
+ * @internal
+ * @brief Gets status bits (3bit) from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] status 0x0=ACTIVE. \n
+ *                    0x1=DISCOVERY_UNDERWAY. \n
+ *                    0x2=DISCOVERY_FAILED. \n
+ *                    0x3=INACTIVE. \n
+ *                    0x4=VALIDATION_UNDERWAY \n
+ *                    0x5-0x7=RESERVED. \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
+               zb_zdp_status_e* status);
+
+/**
+ * @internal
+ * @brief Gets memory constrained (1bit) from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] memory_constrained A flag indicating whether the device is a memory
+ *                                constrained concentrator.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_memory_constrained(
+               zb_zdo_routing_table_h handle, unsigned char* memory_constrained);
+
+/**
+ * @internal
+ * @brief Gets many-to-one (1bit) from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] many_to_one A flag indicating that the destination is a concentrator that
+ *                         issued a many-to-one request.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
+               unsigned char* many_to_one);
+
+/**
+ * @internal
+ * @brief Gets routing record required (1bit) from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] route_record_required A flag indicating that a route record command frame
+ *                                   should be sent to the destination prior to the next
+ *                                   data packet.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_route_record_required(
+               zb_zdo_routing_table_h handle, unsigned char* route_record_required);
+
+/**
+ * @internal
+ * @brief Gets next hop address from routing table record.
+ * @details When received zb_zdo_mgmt_rtg_cb() callback (originally, The Mgmt_Rtg_rsp
+ * command (ClusterID=0x8032) ), it has a routing table record.
+ *
+ * Therefore this function can help parsing parameter in routing table records.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] next_hop_addr Next-hop address.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_rtg_cb()
+ * @see zb_routing_table_get_dst_addr()
+ * @see zb_routing_table_get_dst_status()
+ * @see zb_routing_table_get_memory_constrained()
+ * @see zb_routing_table_get_many_to_one()
+ * @see zb_routing_table_get_route_record_required()
+ * @see zb_routing_table_get_next_hop_addr()
+ */
+int zb_routing_table_get_next_hop_addr(
+               zb_zdo_routing_table_h handle, zb_nwk_addr* next_hop_addr);
+
+/**
+ * @internal
+ * @brief Gets extended pan id from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] extended_pan_id The 64-bit extended PAN id of the neighboring device
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_extended_pan_id(
+               zb_zdo_neighbor_table_desc_h handle,
+               zb_ieee_addr extended_pan_id);
+
+/**
+ * @internal
+ * @brief Gets IEEE address from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr64 64-bit IEEE address that is unique to every device.
+ * If this value is unknown at the time of the request, this field shall be set to
+ * 0xffffffffffffffff.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_ieee_addr(
+               zb_zdo_neighbor_table_desc_h handle,
+               zb_ieee_addr addr64);
+
+/**
+ * @internal
+ * @brief Gets network address from neighbor table list record..
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr16 16-bit network address that is unique to every device.
+ *
+ * If this value is unknown at the time of the request, this field shall be set to
+ * 0xffffffffffffffff.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_nwk_addr(
+               zb_zdo_neighbor_table_desc_h handle,
+               zb_nwk_addr* addr16);
+
+/**
+ * @internal
+ * @brief Gets device type from neighbor table list record..
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] device_type The type of the neighbor device: \n
+ *                         0x0 = ZigBee coordinator \n
+ *                         0x1 = ZigBee router \n
+ *                         0x2 = ZigBee end device \n
+ *                         0x3 = Unknown \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_device_type(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* device_type);
+
+/**
+ * @internal
+ * @brief Gets RxOnWhenIdle value from neighbor table list record..
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] rx_on_when_idle Indicates if neighbor's receiver is
+ *                             enabled during idle portions of the \n
+ *                             CAP: \n
+ *                             0x0 = Receiver is off \n
+ *                             0x1 = Receiver is on \n
+ *                             0x2 = unknown
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_rx_on_when_idle(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* rx_on_when_idle);
+
+/**
+ * @internal
+ * @brief Gets Relationship value from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] relationship The relationship between the
+ *                           neighbor and the current device: \n
+ *                           0x0 = neighbor is the parent \n
+ *                           0x1 = neighbor is a child \n
+ *                           0x2 = neighbor is a sibling \n
+ *                           0x3 = None of the above \n
+ *                           0x4 = previous child
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_relationship(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* relationship);
+
+/**
+ * @internal
+ * @brief Gets Permit joining value from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] permit_joining An indication of whether the
+ *                            neighbor device is accepting join requests: \n
+ *                            0x0 = neighbor is not accepting join requests \n
+ *                            0x1 = neighbor is accepting join requests \n
+ *                            0x2 = unknown
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_permit_joining(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* permit_joining);
+
+/**
+ * @internal
+ * @brief Gets Depth value from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] depth The 0x00~nwkcMaxDepth (see. Zigbee Spec.) \n
+ *                   tree depth of the neighbor device. \n
+ *                   A value of 0x00 indicates that the device is the ZigBee
+ *                   coordinator for the network.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_depth(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* depth);
+
+/**
+ * @internal
+ * @brief Gets LQI (Link-Quality Indicator) value from neighbor table list record.
+ * @details When received zb_zdo_mgmt_lqi_cb() callback (originally, ZigBee
+ * called Mgmt_Lqi_rsp (ClusterID = 0x8031) ), it has multiple neigbor_table_list.
+ *
+ * Therefore this function can help parsing parameter in neigbor_table_list.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] lqi The estimated link quality for RF transmissions from this device. \n
+ *                 (see ZigBee specification for discussion of how this is calculated.)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_lqi_cb()
+ * @see zb_neighbor_table_desc_get_extended_pan_id()
+ * @see zb_neighbor_table_desc_get_ieee_addr()
+ * @see zb_neighbor_table_desc_get_nwk_addr()
+ * @see zb_neighbor_table_desc_get_device_type()
+ * @see zb_neighbor_table_desc_get_rx_on_when_idle()
+ * @see zb_neighbor_table_desc_get_relationship()
+ * @see zb_neighbor_table_desc_get_permit_joining()
+ * @see zb_neighbor_table_desc_get_depth()
+ * @see zb_neighbor_table_desc_get_lqi()
+ */
+int zb_neighbor_table_desc_get_lqi(
+               zb_zdo_neighbor_table_desc_h handle,
+               unsigned char* lqi);
+
+/**
+ * @internal
+ * @brief Gets source MAC address from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] src_addr The source IEEE address for the binding entry.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_src_addr(
+               zb_zdo_binding_table_h handle,
+               zb_ieee_addr src_addr);
+
+/**
+ * @internal
+ * @brief Gets SrcEndpoint from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] src_ep The source endpoint for the binding entry.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_src_ep(
+               zb_zdo_binding_table_h handle,
+               unsigned char *src_ep);
+
+/**
+ * @internal
+ * @brief Gets ClusterId from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] clusterid The identifier of the cluster on the source device that is bound
+ *                        to the destination device.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_cluster_id(
+               zb_zdo_binding_table_h handle,
+               unsigned short *clusterid);
+
+/**
+ * @internal
+ * @brief Gets DstAddrMode from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] dst_addr_mode The addressing mode for the destination address. \n
+ *                       This field can take one of the non-reserved values
+ *                       from the following list: \n\n
+ *                       0x00 = reserved \n
+ *                       0x01 = 16-bit group address for DstAddr and DstEndpoint not
+ *                              present \n
+ *                       0x02 = reserved \n
+ *                       0x03 = 64-bit extended address for DstAddr and DstEndp present \n
+ *                       0x04 ? 0xff = reserved \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_dst_addr_mode(
+               zb_zdo_binding_table_h handle,
+               unsigned char *dst_addr_mode);
+
+/**
+ * @internal
+ * @brief Gets nwk DstAddr from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr16 The destination address for the binding entry. \n
+ *                    As specified by the DstAddrMode field.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No network address
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_dst_addr16(
+               zb_zdo_binding_table_h handle,
+               zb_nwk_addr *addr16);
+
+/**
+ * @internal
+ * @brief Gets ieee DstAddr from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr64 The destination address for the binding entry. \n
+ *                    As specified by the DstAddrMode field.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No IEEE address
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_dst_addr64(
+               zb_zdo_binding_table_h handle,
+               zb_ieee_addr addr64);
+
+/**
+ * @internal
+ * @brief Gets DstEndPoint from binding table record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Bind_rsp (ClusterID = 0x8033) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in binding_table structure.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] dst_ep 0x01~0xff : This field shall be present only if the DstAddrMode
+ *                    field has a value of 0x03 and, if present, shall be the destination
+ *                    endpoint for the binding entry.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_bind_cb()
+ */
+int zb_binding_table_get_dst_ep(
+               zb_zdo_binding_table_h handle,
+               unsigned char *dst_ep);
+
+/**
+ * @internal
+ * @brief Gets ExtendedAddress from discovery cache record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in discovery cache list record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr64 64-bit IEEE Address of the cached device.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_cache_cb()
+ */
+int zb_discovery_cache_get_ieee_addr(
+               zb_zdo_discovery_cache_h handle,
+               zb_ieee_addr addr64);
+
+/**
+ * @internal
+ * @brief Gets NetworkAddress from discovery cache record.
+ * @details When received zb_zdo_mgmt_bind_cb() callback (originally, ZigBee
+ * called Mgmt_Cache_rsp (ClusterID = 0x8037) ), it has multiple binding table.
+ *
+ * Therefore this function can help parsing parameter in discovery cache list record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of node descriptor
+ * @param[out] addr16 16-bit network Address of the cached device.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_mgmt_cache_cb()
+ */
+int zb_discovery_cache_get_nwk_addr(
+               zb_zdo_discovery_cache_h handle,
+               zb_nwk_addr *addr16);
+
+/**
+ * @}
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_INTERNAL_H__ */
diff --git a/include/zigbee-zdo_private.h b/include/zigbee-zdo_private.h
new file mode 100644 (file)
index 0000000..7d3e728
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_PRIVATE_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_PRIVATE_H__
+
+#include <zigbee-zdo-type.h>
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_ZDO_PRIVATE_H__ */
+
index 8e2cdca..b5a5375 100644 (file)
 extern "C" {
 #endif
 
-#include <tizen_type.h>
-
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zb_zdo.h>
-#include <zb_zcl.h>
-#include <zb_ha.h>
-
 /**
  * @file zigbee.h
  */
@@ -40,11 +32,151 @@ extern "C" {
  */
 
 /**
+ * @brief Zigbee profile id.
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_PROFILE_HOME_AUTOMATION = 0x0104, /**< Zigbee Home Automation profile */
+} zb_profile_id_e;
+
+#include <tizen_error.h>
+
+/**
+ * @brief Enumeration for zigbee CAPI error code.
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+       ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+       ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Out of range */
+       ZIGBEE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+       ZIGBEE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< DBus error */
+       ZIGBEE_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */
+       ZIGBEE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+       ZIGBEE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+       ZIGBEE_ERROR_INVALID_ENDPOINT = TIZEN_ERROR_ZIGBEE | 0x01, /**< Endpoint 0 is reserved for ZDP */
+       ZIGBEE_ERROR_INVALID_ADDRESS = TIZEN_ERROR_ZIGBEE | 0x02, /**< Wrong address */
+       ZIGBEE_ERROR_OPERATION_FAILED = TIZEN_ERROR_ZIGBEE | 0x03, /**< Operation failed */
+} zb_error_e;
+
+#include <tizen_type.h>
+#include <zigbee-zdo-type.h>
+#include <zigbee-zcl-type.h>
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : IEEE Address.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_ieee_addr[8];
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Network Address.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned short zb_nwk_addr;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : End Point.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_end_point;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Device ID.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned short zb_device_id;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Profile ID.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned short zb_profile_id;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Cluster ID.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned short zb_cluster_id;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Attribute ID.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned short zb_attribute_id;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : Command ID.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_command_id;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The data type abbreviation : 128 bit security key.
+ *
+ * @since_tizen 4.0
+ */
+typedef unsigned char zb_aes128_key[16];
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The handle of zigbee.
+ * @since_tizen 4.0
+ */
+typedef void* zb_zigbee_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The event handle.
+ *
+ * @since_tizen 4.0
+ */
+typedef void* zb_event_data_h;
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The events for zb_event_cb().
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_ENABLE_EVENT = 0x00, /**< This event is received after enabling zigbee system service */
+       ZB_ZDP_FORM_NETWORK_DONE = 0x01, /**< This event comes from coming network operation completed */
+       ZB_ZDP_JOIN_EVENT = 0x02, /**< This event takes place when a new device joins */
+       ZB_ZDP_REJOIN_EVENT = 0x03, /**< This event takes place when an existing device or devices which are received 'leave_network' command are re-joined */
+       ZB_ZDP_CHILD_LEFT = 0x04, /**< This event takes place when a child device leaves current network explicitly */
+       ZB_ZDP_LEAVE_DONE_EVENT = 0x05, /**< This event will take place after dismissing the current network */
+       ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT = 0x10, /**< This event is used when global default response */
+       ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT = 0x21, /**< A Device which supports IAS zone cluster wants to register its ability */
+       ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT = 0x22, /**< A Device which supports IAS zone cluster announces its status change */
+       ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT = 0x23, /**< A Device which supports IAS zone cluster announces its status change */
+} zb_event_e;
+
+/**
  * @brief Creates handle to access the zigbee service.
- * @details All this function to start zigbee service
  *
  * @since_tizen 4.0
  *
+ * @remarks The @a handle should be released using zb_destroy().
+ *
  * @param[out] handle The handle of zigbee
  *
  * @return 0 on success, otherwise a negative error value.
@@ -56,7 +188,7 @@ extern "C" {
  *
  * @see zb_destroy()
  */
-int zb_create(zigbee_h *handle);
+int zb_create(zb_zigbee_h *handle);
 
 /**
  * @brief Destroys to the zigbee service handle.
@@ -73,7 +205,62 @@ int zb_create(zigbee_h *handle);
  *
  * @see zb_create()
  */
-int zb_destroy(zigbee_h handle);
+int zb_destroy(zb_zigbee_h handle);
+
+/**
+ * @platform
+ * @brief Enables the zigbee service.
+ * @details All this function to start zigbee service
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @remarks You must free all resources of the zigbee by calling zb_destroy()
+ * if zigbee service is no longer needed.
+ *
+ * @param[in] handle The handle of zigbee
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_create()
+ * @see zb_destroy()
+ *
+ */
+int zb_enable(zb_zigbee_h handle);
+
+/**
+ * @platform
+ * @brief Disables the zigbee service.
+ * @details Call this function to stop the zigbee service.
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @remarks You must free all resources of the zigbee by calling zb_destroy()
+ * if zigbee service is no longer needed.
+ *
+ * @param[in] handle The handle of zigbee
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_create()
+ * @see zb_destroy()
+ *
+ */
+int zb_disable(zb_zigbee_h handle);
 
 /**
  * @brief Called after receiving events from zigbee service.
@@ -82,12 +269,14 @@ int zb_destroy(zigbee_h handle);
  *
  * @since_tizen 4.0
  *
- * @remarks You can receive below events. Please see the "see" section.
+ * @remarks The @a ev should not be released.
+ * @remarks The @a ev can be used only in the callback.
  *
- * @param[in] addr16 Network address (16 bit) from the source device
- * @param[in] addr64 IEEE address (EUI64) from the source device
- * @param[in] event_type The event identification
- * @param[in] user_data parameter data pointer
+ * @param[out] addr16 Network address (16 bit) from the source device
+ * @param[out] addr64 IEEE address (EUI64) from the source device
+ * @param[out] event_type The event identification
+ * @param[out] ev event data pointer
+ * @param[out] user_data User data
  *
  * @pre The callback must be registered when using zb_set_event_handler()
  *
@@ -95,29 +284,13 @@ int zb_destroy(zigbee_h handle);
  * @see #ZB_ZDP_JOIN_EVENT
  * @see #ZB_ZDP_REJOIN_EVENT
  * @see #ZB_ZDP_LEAVE_DONE_EVENT
- * @see #ZB_ZDP_UPDATED_NETWORK_NOTIFICATION_EVENT
- * @see #ZB_ZCL_ALARM_EVENT
- * @see #ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT
- * @see #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT
- * @see #ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT
- * @see #ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_COLOR_CONTROL_CURRENT_TEMPERATURE_ATTRIBUTE_REPORT_EVENT
- * @see #ZB_ZCL_DOOR_LOCK_OPERATIONAL_NOTIFICATION_EVENT
- * @see #ZB_ZCL_DOOR_LOCK_PROGRAMING_NOTIFICATION_EVENT
- * @see #ZB_ZCL_SIMPLE_METERING_REMOVE_MIRROR_EVENT
- * @see #ZB_ZCL_SIMPLE_METERING_REQUEST_MIRROR_EVENT
  * @see zb_event_cb()
  */
-typedef void (*zb_event_cb)(nwk_addr addr16, ieee_addr addr64, zb_event_e event_type,
-               zb_event_data_user_data);
+typedef void (*zb_event_cb)(zb_nwk_addr addr16, zb_ieee_addr addr64, zb_event_e event_type,
+               zb_event_data_h ev, void *user_data);
 
 /**
- * @brief Sets event handler for the zigbee service.
- * @details To set event handler to get events from the zigbee service
+ * @brief Sets the event handler to get events from the zigbee service.
  *
  * @since_tizen 4.0
  *
@@ -134,554 +307,3836 @@ typedef void (*zb_event_cb)(nwk_addr addr16, ieee_addr addr64, zb_event_e event_
  * @see zb_destroy()
  *
  */
-int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler);
-
+int zb_set_event_cb(zb_zigbee_h handle, zb_event_cb event_handler);
+
+/**
+ * @brief Gets status code of enable commmand.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] status The result of enable command
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_enable_status(zb_event_data_h ev, zb_error_e* status);
+
+/**
+ * @brief Gets PAN ID after forming a network.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] pan_id The result of enable command
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_form_network_panid(zb_event_data_h ev, zb_nwk_addr* pan_id);
+
+/**
+ * @brief Gets the number of end-points of a joined device.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] count The number of end-points of a device joined to the network
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_join_count(zb_event_data_h ev, unsigned char* count);
+
+/**
+ * @brief Gets the end-point list at a new device joined.
+ * @since_tizen 4.0
+ *
+ * @remarks The @a ep should be released using free().
+ *
+ * @param[in] ev Event data structure
+ * @param[out] ep The end point list
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_join_ep(zb_event_data_h ev, zb_end_point** ep);
+
+
+/**
+ * @brief Gets the status code of leave request commands.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] status The result of end-device left command
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_child_left_status(zb_event_data_h ev, zb_error_e* status);
+
+/**
+ * @brief Gets the end-point number of the device which sent this default response.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] ep Source end point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_global_default_rsp_ep(zb_event_data_h ev, zb_end_point* ep);
+
+/**
+ * @brief Gets the cluster id of the device which sent this default response.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] clusterid The cluster id
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_global_default_rsp_cluster_id(zb_event_data_h ev,
+               zb_cluster_id* clusterid);
+
+/**
+ * @brief Gets the command id of the device which sent this default response.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] commandid The command id
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_global_default_rsp_command_id(zb_event_data_h ev,
+               zb_command_id* commandid);
+
+/**
+ * @brief Gets status code of a default response of the global command request.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] status The result of the global command
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_global_default_rsp_status(zb_event_data_h ev,
+               zb_zcl_status_e* status);
+
+/**
+ * @brief Gets the end-point number of the IAS notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] src_ep Source end point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_noti_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
+
+/**
+ * @brief Gets zone status of the IAS notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] zone_status Zone status
+ *  Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+ *  Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+ *  Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
+ *  Bit 3 : Battery : 1 - Low battery / 0 - Battery OK\n
+ *  Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
+ *  Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
+ *  Notification commands. The CIE device may use these periodic reports as an\n
+ *  indication that a zone is operational. Zones that do not implement the periodic\n
+ *  reporting are required to set this bit to zero (the CIE will know not to interpret the\n
+ *  lack of reports as a problem).\n
+ *  Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
+ *  Note 2: This bit indicates whether or not a Zone Status Change Notification\n
+ *  command will be sent to indicate that an alarm is no longer present. Some Zones\n
+ *  do not have the ability to detect that alarm condition is no longer present, they\n
+ *  only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
+ *  zero, indicating to the CIE not to look for alarm-restore notifications.\n
+ *  Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
+ *  Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_noti_zone_status(zb_event_data_h ev,
+               unsigned short* zone_status);
+
+/**
+ * @brief Gets the end-point number of the IAS extended notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] src_ep Source end point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_ext_noti_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
+
+/**
+ * @brief Gets status of the IAS extended notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] status Status
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_ext_noti_status(zb_event_data_h ev, unsigned char* status);
+
+/**
+ * @brief Gets zone status of the IAS extended notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] zone_status Zone status
+ *  Bit 0 : Alarm1 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+ *  Bit 1 : Alarm2 : 1 - opened or alarmed / 0 - closed or not alarmed\n
+ *  Bit 2 : Temper : 1 - Tempered / 0 - Not tempered\n
+ *  Bit 3 : Battery : 1 - Low battery / 0 - Battery OK\n
+ *  Bit 4 : Supervision report : 1 - Report / 0 - Does not report\n
+ *  Note 1: This bit indicates whether the Zone issues periodic Zone Status Change\n
+ *  Notification commands. The CIE device may use these periodic reports as an\n
+ *  indication that a zone is operational. Zones that do not implement the periodic\n
+ *  reporting are required to set this bit to zero (the CIE will know not to interpret the\n
+ *  lack of reports as a problem).\n
+ *  Bit 5 : Restore reports : 1 - Reports restore / 0 - Does not report restore\n
+ *  Note 2: This bit indicates whether or not a Zone Status Change Notification\n
+ *  command will be sent to indicate that an alarm is no longer present. Some Zones\n
+ *  do not have the ability to detect that alarm condition is no longer present, they\n
+ *  only can tell that an alarm has occurred. These Zones must set the "Restore" bit to\n
+ *  zero, indicating to the CIE not to look for alarm-restore notifications.\n
+ *  Bit 6 : Trouble : 1 - Trouble/Failure / 0 - OK\n
+ *  Bit 7 : AC(mains) : 1 - ACMains fault / 0 - AC/Mains OK\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_ext_noti_zone_status(zb_event_data_h ev,
+               unsigned short* zone_status);
+
+/**
+ * @brief Gets delay of the IAS extended notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] delay Delay
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_ext_noti_delay(zb_event_data_h ev, unsigned short* delay);
+
+/**
+ * @brief Gets zone id of the IAS extended notification.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] zone_id Zone id
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_ias_ext_noti_zone_id(zb_event_data_h ev, unsigned char* zone_id);
+
+/**
+ * @brief Gets the end-point number of the device which sent this enroll request.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] src_ep Source end point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_enroll_request_src_ep(zb_event_data_h ev, zb_end_point* src_ep);
+
+/**
+ * @brief Gets zone type of the enroll request.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] zone_type Zone type
+ *
+ *  0x0000 : Standard CIE / Alarm1 - System Alarm, Alarm2 - N/A\n
+ *  0x000d : Motion Sensor / Alarm1 - Intrusion indication, Alarm2 - Presence indication\n
+ *  0x0015 : Contact switch / Alarm1 - 1st portal Open-Close, Alarm2 - 2nd portal Open-Close\n
+ *  0x0028 : Fire sensor / Alarm1 - Fire indication, Alarm2 - N/A\n
+ *  0x002a : Water sensor / Alarm1 - Water overflow indication, Alarm2 - N/A\n
+ *  0x002b : Gas Sensor / Alarm1 - CO indication, Alarm2 - Cooking indication\n
+ *  0x002c : Personal emergency Sensor / Alarm1 - Fall / Concussion, Alarm2 - Emergency button\n
+ *  0x002d : Vibration or Movement Sensor / Alarm1 - Movement indication, Alarm2 - Vibration\n
+ *  0x010f : Remote control / Alarm1 - Panic, Alarm2 - Emergency\n
+ *  0x0115 : Key fob / Alarm1 - Panic, Alarm2 - Emergency\n
+ *  0x021d : Keypad / Alarm1 - Panic, Alarm2 - Emergency\n
+ *  0x0225 : Standard Warning Device (see. EN 50131 European Standards Series for Intruder Alarm Systems)
+ *           / Alarm1 - N/A, Alarm2 -N/A\n
+ *  0x8000~0xfffe : Reserved for manufacturer specific types / Alarm1 - N/A, Alarm2 - N/A\n
+ *  0xffff : Invalid Zone Type / Alarm1 - N/A, Alarm2 - N/A\n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_enroll_request_zone_type(zb_event_data_h ev,
+               unsigned short* zone_type);
+/**
+ * @brief Gets manufacturer code of the enroll request.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] mfg_code Manufacture code
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_enroll_request_mfg_code(zb_event_data_h ev,
+               unsigned char* mfg_code);
+
+/**
+ * @brief Called after zigbee network formation is completed.
+ * @details Response of forming the zigbee network
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] panid PAN ID
+ * @param[out] user_data user data
+ *
+ * @see zb_form_network()
+ */
+typedef void (*zb_form_network_cb)(zb_nwk_addr panid, void *user_data);
+
+/**
+ * @brief Makes the network work as a zigbee coordinator.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks If you want to change parameters related to network configuration you should
+ * call zb_zdo_set_compatible_startup_parameters() function.
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] cb zb_form_network_cb()
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @post When forming network is finished, form_network_done event will be generated.
+ *
+ * @see zb_disable_network()
+ * @see zb_zdo_set_compatible_startup_parameters()
+ */
+int zb_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data);
+
+/**
+ * @brief Called after disabling the zigbee network.
+ * @details Response of disabling the zigbee network
+ *
+ * @since_tizen 4.0
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_NOT_SUPPORTED \n
+ * @param[out] user_data user data
+ *
+ * @see zb_form_network()
+ */
+typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data);
+/**
+ * @brief Disables network and stops zigbee coordinator role.
+ * @details This function to stop zigbee coordinator
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] cb zb_disable_network_cb()
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_form_network()
+ */
+int zb_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb, void *user_data);
+
+/**
+ * @brief Forces a node to leave one network and to rejoin the other.
+ * @details If @a remove_children is set to true, the target end device will reset its
+ * state-machine to factory defaults.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr The source EUI64 of the binding (the remote device's EUI64)
+ * @param[in] remove_children Remove children
+ * @param[in] rejoin Rejoin after leave
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_form_network()
+ */
+int zb_leave_device(zb_zigbee_h handle, zb_ieee_addr addr, bool remove_children, bool rejoin);
+
+/**
+ * @brief Allows or disallows the coordinator device to accept other device's association
+ * request.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks Especially, this can be very useful for disabling joining all throughout the
+ * network. Typically, this is the last step when commissioning a network. It closes it
+ * down to prevent other nodes getting on the network without permission.
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] timeout Number of seconds during which devices will be allowed to join
+ * the network. A value of 0xff turns permit joining on permanently
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_form_network()
+ */
+int zb_permit_join(zb_zigbee_h handle, unsigned char timeout);
+
+/**
+ * @brief Shows current coordinator's IEEE MAC address.
+ * @details The function gets the coordinator's MAC address from the machine which runs
+ * zigbee-service daemon.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[out] addr64 the Zigbee IEEE MAC address of this machine.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_get_network_info()
+ */
+int zb_get_controller_mac_address(zb_zigbee_h handle, zb_ieee_addr addr64);
+
+/**
+ * @brief Gets information of the current network environment of coordinator.
+ * @details The function shows network environment
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[out] addr64 the Zigbee IEEE MAC address
+ * @param[out] nodeid Node ID
+ * @param[out] panid PAN ID
+ * @param[out] channel 11~26 : 2.4GHz~2.485GHz
+ * @param[out] tx_power Tx power strength
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_form_network()
+ */
+int zb_get_network_info(zb_zigbee_h handle, zb_ieee_addr addr64, zb_nwk_addr *nodeid,
+               zb_nwk_addr *panid, unsigned char *channel, unsigned char *tx_power);
+
+/**
+ * @brief Gets all children device list information.
+ * @details This function return end-point list and simple description per each end-point
+ * at each device.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a list should be released using zb_end_dev_info_list_free().
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[out] count The number of end-devices
+ * @param[out] list The device information list
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_list_free()
+ *
+ */
+int zb_end_dev_info_get_list(zb_zigbee_h handle, int *count,
+               zb_end_dev_info_h **list);
+
+/**
+ * @brief Gets endpoint list information.
+ * @details This function return end-point list of each device.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a ep_list should be released using free().
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr64 the Zigbee IEEE MAC address
+ * @param[out] count The number of endpoints
+ * @param[out] ep_list The device endpoint list
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_end_dev_get_endpoint_list(zb_zigbee_h handle, zb_ieee_addr addr64,
+               unsigned char *count, zb_end_point **ep_list);
+
+/**
+ * @brief Gets cluster list information.
+ * @details This function return in and out cluster list of each device.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a in_cluster_list should be released using free().
+ * @remarks The @a out_cluster_list should be released using free().
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr64 the Zigbee IEEE MAC address
+ * @param[in] ep endpoint number
+ * @param[out] in_cluster_count The number of in-clusters
+ * @param[out] in_cluster_list The device server cluster list
+ * @param[out] out_cluster_count The number of out-clusters
+ * @param[out] out_cluster_list The device client list
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_end_dev_info_get_cluster_list(zb_zigbee_h handle, zb_ieee_addr addr64, zb_end_point ep,
+               unsigned char *in_cluster_count, zb_cluster_id **in_cluster_list,
+               unsigned char *out_cluster_count, zb_cluster_id **out_cluster_list);
+
+/**
+ * @brief Frees all children device list information.
+ * @details This function return end-point list and simple description per each end-point
+ * at each device.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] list The device information list
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_list_free(zb_end_dev_info_h *list);
+
+/**
+ * @brief Creates an end-device handle.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_end_dev_destroy().
+ *
+ * @param[out] handle The handle of end-device descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_clone()
+ * @see zb_end_dev_info_destroy()
+ */
+int zb_end_dev_info_create(zb_end_dev_info_h *handle);
+
+/**
+ * @brief Clones an end-device handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a src should be released using zb_end_dev_destroy().
+ * @remarks The @a dst should be released using zb_end_dev_destroy().
+ *
+ * @param[in] src handle of source end-device descriptor
+ * @param[in] dst handle of destination end-device descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_create()
+ * @see zb_end_dev_info_destroy()
+ */
+int zb_end_dev_info_clone(zb_end_dev_info_h src, zb_end_dev_info_h *dst);
+
+/**
+ * @brief Destroys an end-device handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of end-device descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_create()
+ * @see zb_end_dev_info_clone()
+ */
+int zb_end_dev_info_destroy(zb_end_dev_info_h handle);
+
+/**
+ * @brief Gets network address of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] addr16 network address of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_network_address(zb_end_dev_info_h handle,
+               zb_nwk_addr *addr16);
+
+/**
+ * @brief Gets ieee address of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] addr64 ieee address of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_get_list()
+ */
+int zb_end_dev_info_get_ieee_address(zb_end_dev_info_h handle, zb_ieee_addr addr64);
+
+/**
+ * @brief Gets a number of end-points of a specific end-device.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] count a number of endpoints of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_get_list()
+ */
+int zb_end_dev_info_get_num_of_ep(zb_end_dev_info_h handle, unsigned char *count);
+
+/**
+ * @brief Gets pointer of end-points list.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb().
+ * The number of items on the list can be found with zb_end_dev_info_get_num_of_ep().
+ * @remarks The @a ep_list should be released using free().
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] ep_list list of endpoints of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ # @see zb_end_dev_info_get_num_of_ep()
+ */
+int zb_end_dev_info_get_ep_list(zb_end_dev_info_h handle, zb_end_point **ep_list);
+
+/**
+ * @brief Gets 802.15.4 MAC capability of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] capability 802.15.4 MAC capability of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_mac_capability(zb_end_dev_info_h handle,
+       zb_zdp_mac_capability_field_e *capability);
+
+/**
+ * @brief Gets ability of alternative PAN coordinator of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] can_do_it alternative of PAN coordinator of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_alternative_pan_coordinator(
+               zb_end_dev_info_h handle, zb_zdp_do_pan_coordinator_e *can_do_it);
+
+/**
+ * @brief Gets device id of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[in] ep endpoint number
+ * @param[out] deviceid device id of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_device_id(zb_end_dev_info_h handle, zb_end_point ep,
+               zb_device_id *deviceid);
+
+/**
+ * @brief Gets profile id of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[in] ep endpoint number
+ * @param[out] profileid profile id of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_profile_id(zb_end_dev_info_h handle, zb_end_point ep,
+               zb_profile_id *profileid);
+
+/**
+ * @brief Gets power source type of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] power_src power source type of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_info_get_list()
+ */
+int zb_end_dev_info_get_power_source(zb_end_dev_info_h handle,
+               zb_zdp_power_e *power_src);
+
+/**
+ * @brief Gets security capability of a specific end-point.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks This function should be called in zb_end_dev_info_cb()
+ *
+ * @param[in] handle The handle of a specific end-device
+ * @param[out] sec_capability security type of the end-point
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ * @see zb_foreach_end_dev_info()
+ * @see zb_end_dev_get_list()
+ */
+int zb_end_dev_info_get_security_capabilty(zb_end_dev_info_h handle,
+               zb_zdp_security_cap_e *sec_capability);
+
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZDO_DEVICE_DISCOVERY_MODULE
+ *
+ * @{
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Creates a simple descriptor.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_simple_desc_destroy().
+ *
+ * @param[out] handle The handle of a simple descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_clone()
+ * @see zb_simple_desc_destroy()
+ */
+int zb_simple_desc_create(zb_zdo_simple_desc_h *handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Clones a simple descriptor.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a dst should be released using zb_simple_desc_destroy().
+ *
+ * @param[in] src handle of a source simple descriptor
+ * @param[in] dst handle of a destination simple descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_create()
+ * @see zb_simple_desc_destroy()
+ */
+int zb_simple_desc_clone(zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h *dst);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Destroys a simple a descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_create()
+ * @see zb_simple_desc_clone()
+ */
+int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets active endpoint number from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] ep endpoint number
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_ep()
+ */
+int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, zb_end_point *ep);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets active endpoint number to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] ep endpoint number
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_ep()
+ */
+int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, zb_end_point ep);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets profile id from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] profileid profile id
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_profile_id()
+ */
+int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
+               zb_profile_id *profileid);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets profile id to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] profileid profile id
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_device_id()
+ */
+int zb_simple_desc_set_profile_id(
+               zb_zdo_simple_desc_h handle,
+               zb_profile_id profileid);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets device id from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] deviceid 16-bit device identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_device_id()
+ */
+int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
+               zb_device_id *deviceid);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets device id to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] deviceid 16-bit device identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_device_ver()
+ */
+int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
+               zb_device_id deviceid);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets device version from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] device_ver device version
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_device_ver()
+ */
+int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
+               unsigned short *device_ver);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets device version to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] device_ver device version
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_device_ver()
+ */
+int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
+               unsigned short device_ver);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets the number of items in input clusters from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle Handle of a simple descriptor
+ * @param[out] num_of_in_clusters The number of input clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_num_of_in_clusters()
+ */
+int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
+               unsigned char *num_of_in_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets the number of input clusters to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] num_of_in_clusters number of input clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_num_of_in_clusters()
+ */
+int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
+               unsigned char num_of_in_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets number of output clusters from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] num_of_out_clusters number of output clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_num_of_out_clusters()
+ */
+int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
+               unsigned char *num_of_out_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets number of output clusters to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] num_of_out_clusters number of output clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_num_of_out_clusters()
+ */
+int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
+               unsigned char num_of_out_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets input cluster list from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a in_clusters should not be released.
+ * @remarks The @a in_clusters is available until handle is released
+ *
+ * @param[in] handle The handle of simple descriptor
+ * @param[out] in_clusters input clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_set_in_clusters()
+ */
+int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
+               zb_cluster_id **in_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets input cluster list to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] in_clusters input clusters
+ * @param[in] num number of input clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_in_clusters()
+ */
+int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
+               zb_cluster_id *in_clusters, int num);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Gets output cluster list from a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a out_clusters should not be released.
+ * @remarks The @a out_clusters is available until handle is released
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[out] out_clusters output clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_in_clusters()
+ */
+int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
+               zb_cluster_id **out_clusters);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_SIMPLE_DESCRIPTOR_MODULE
+ * @brief Sets output cluster list to a simple descriptor handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of a simple descriptor
+ * @param[in] out_clusters output clusters
+ * @param[in] num number of output clusters
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_simple_desc_get_in_clusters()
+ */
+int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
+               zb_cluster_id *out_clusters, int num);
+
+
+/**
+ * @brief Called after Network / IEEE address request.
+ * @details The NWK_addr_cb is generated by a Remote Device in response to a
+ * NWK_addr_req or IEEE_addr_req command inquiring as to the NWK address of the Remote
+ * Device or the NWK address of an address held in a local discovery cache.
+ * The destination addressing on this command is unicast.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a assoc_dev_addr_list should not be released.
+ * @remarks The @a assoc_dev_addr_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND
+ * @param[out] remote_dev_addr64 64-bit address for the remote device
+ * @param[out] remote_dev_addr16 16-bit address for the remote device
+ * @param[out] assoc_dev_len The number of items in the 16-bit short addresses to follow.
+ *                           If the RequestType in the request is Extended Response
+ *                           and there are no associated devices on the Remote Device,
+ *                           this field shall be set to 0.
+ *                           If an error occurs or the RequestType in the request is
+ *                           for a Single Device Response, this field shall not
+ *                           be included in the frame.
+ * @param[out] start_idx Starting index into the list of associated devices for this
+ *                       report. If the RequestType in the request is Extended Response
+ *                       and there are no associated devices on the Remote Device,
+ *                       this field shall not be included in the frame.
+ *                       If an error occurs or the RequestType in the request is
+ *                       for a Single Device Response, this field shall not
+ *                       be included in the frame.
+ * @param[out] assoc_dev_addr_list A list of 16-bit addresses, one corresponding to each
+ *                               associated device to Remote Device; The number of 16-bit
+ *                               network addresses contained in this field is specified
+ *                               in the NumAssocDev field.
+ *                               If the RequestType in the request is Extended Response
+ *                               and there are no associated devices on the Remote Device,
+ *                               this field shall not be included in the frame.
+ *                               If an error occurs or the RequestType in the request is
+ *                               for a Single Device Response, this field shall not
+ *                               be included in the frame.
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_nwk_addr_req()
+ */
+typedef void (*zb_zdo_addr_cb)(zb_zdp_status_e status, zb_ieee_addr remote_dev_addr64,
+               zb_nwk_addr remote_dev_addr16, unsigned char assoc_dev_len,
+               unsigned char start_idx, zb_device_id *assoc_dev_addr_list, void *user_data);
+
+/**
+ * @brief Sends 'Network address request' command.
+ * @details The NWK_addr_req is generated from a Local Device wishing to inquire as to the
+ * 16-bit address of the Remote Device based on its known IEEE address. The
+ * destination addressing on this command shall be unicast or broadcast to all
+ * devices for which macRxOnWhenIdle = TRUE.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr64 IEEE address for device of interest
+ * @param[in] request_type \n
+ *            0x00 - Single device response \n
+ *            0x01 - Extended response \n
+ * @param[in] start_idx If the Request type for this command is Extended response,
+ *                      is StartIndex provides the starting index for the requested
+ *                      elements of the associated devices list
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_nwk_addr_cb()
+ */
+int zb_zdo_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64,
+               zb_zdp_req_type_e request_type, unsigned char start_idx, zb_zdo_addr_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'IEEE address request' command.
+ * @details The IEEE_addr_req is generated from a Local Device wishing to inquire as to
+ * the 64-bit IEEE address of the Remote Device based on their known 16-bit address.
+ * The destination addressing on this command shall be unicast.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_ieee_addr_cb()
+ */
+int zb_zdo_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
+               void *user_data);
+
+/**
+ * @brief Called after active endpoint request command.
+ * @details The Active_EP_cb is generated by a remote device in response to an
+ * Active_EP_req directed to the remote device. This command shall be unicast to
+ * the originator of the Active_EP_req command.
+ *
+ * The remote device shall generate the Active_EP_cb command using the format
+ * illustrated param list.
+ *
+ * The NWKAddrOfInterest field shall match that specified in the original
+ * Active_EP_req command.
+ *
+ * If the NWKAddrOfInterest field matches the network address of the remote device,
+ * it shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field
+ * to the number of active endpoints on that device and include an ascending list of
+ * all the identifiers of the active endpoints on that device in the ActiveEPList field.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the remote device
+ * and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the ActiveEPCount field to 0, and not include
+ * the ActiveEPList field.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the remote device
+ * and it is the coordinator or a router, it shall determine whether the NWKAddrOfInterest
+ * field matches the network address of a device it holds in a discovery cache.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of a device it holds
+ * in a discovery cache, it shall set the Status field to #ZB_ZDP_STATUS_DEVICE_NOT_FOUND,
+ * set the ActiveEPCount field to 0, and not include the ActiveEPList field.
+ *
+ * If the NWKAddrOfInterest matches the network address of a device held in a discovery
+ * cache on the remote device, it shall determine whether that device has any active
+ * endpoints.
+ *
+ * If the discovery information corresponding to the ActiveEP request has not yet been
+ * uploaded to the discovery cache, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the ActiveEPCount field to 0 and not include the
+ * ActiveEPList field.
+ *
+ * If the cached device has no active endpoints, the remote device shall set the Status
+ * field to #ZB_ZDP_STATUS_SUCCESS, set the ActiveEPCount field to 0, and not include
+ * the ActiveEPList field.
+ *
+ * If the cached device has active endpoints,
+ * the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS, set
+ * the ActiveEPCount field to the number of active endpoints on that device,
+ * and include an ascending list of all the identifiers of the active endpoints on that
+ * device in the ActiveEPList field .
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a ep_list should not be released.
+ * @remarks The @a ep_list can be used only in the callback. To use outside, make a copy.
+ *
+ * @param[out] status #ZB_ZDP_STATUS_SUCCESS \n
+ *                    #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE \n
+ *                    #ZB_ZDP_STATUS_DEVICE_NOT_FOUND \n
+ *                    #ZB_ZDP_STATUS_NO_DESCRIPTOR \n
+ * @param[out] addr16 Network address for the request
+ * @param[out] count The count of active endpoints on the remote device
+ * @param[out] ep_list List of bytes each of which represents an 8-bit endpoints
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_active_ep()
+ */
+typedef void (*zb_zdo_active_ep_cb)(zb_zdp_status_e status, zb_nwk_addr addr16,
+               unsigned char count, zb_end_point *ep_list, void *user_data);
+
+/**
+ * @brief Sends 'active end-point request' command.
+ * @details The Active_EP_req command is generated from a local device wishing to acquire
+ * the list of endpoints on a remote device with simple descriptors. This command
+ * shall be unicast either to the remote device itself or to an alternative device that
+ * contains the discovery information of the remote device.
+ *
+ * The local device shall generate the Active_EP_req command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the active endpoint list is required.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_active_ep_cb()
+ */
+int zb_zdo_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
+               void *user_data);
+
+/**
+ * @brief Called after 'simple descriptor request' command.
+ * @details The Simple_Desc_cb is generated by a remote device in response to a
+ * Simple_Desc_req directed to the remote device. This command shall be unicast to
+ * the originator of the Simple_Desc_req command.
+ * The remote device shall generate the Simple_Desc_cb command using the format
+ * illustrated in Table 2.94 in Zigbee Specification. The NWKAddrOfInterest field shall
+ * match that specified in the original Simple_Desc_req command.
+ * If the endpoint field specified in the original Simple_Desc_req command does not fall
+ * within the correct range specified in param list, the remote device shall set the Status
+ * field to #ZB_ZDP_STATUS_INVALID_EP, set the Length field to 0 and not include the
+ * SimpleDescriptor field.
+ *
+ * If the NWKAddrOfInterest field matches the network address of the remote
+ * device, it shall determine whether the endpoint field specifies the identifier of an
+ * active endpoint on the device. If the endpoint field corresponds to an active
+ * endpoint, the remote device shall set the Status field to #ZB_ZDP_STATUS_SUCCESS,
+ * set the Length field to the length of the simple descriptor on that endpoint,
+ * and include the simple descriptor for that endpoint in the SimpleDescriptor field.
+ * If the endpoint field does not correspond to an active endpoint, the remote device
+ * shall set the Status field to #ZB_ZDP_STATUS_NOT_ACTIVE, set the Length field to 0,
+ * and not include the SimpleDescriptor field.
+ *
+ * If the NWKAddrOfInterest field does not match the network address of the
+ * remote device and it is an end device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_INVALID_REQUEST_TYPE, set the Length field to 0, and not include the
+ * SimpleDescriptor field. If the NWKAddrOfInterest field does not match the
+ * network address of the remote device and it is the coordinator or a router, it shall
+ * determine whether the NWKAddrOfInterest field matches the network address of
+ * one of its children. If the NWKAddrOfInterest field does not match the network
+ * address of one of the children of the remote device, it shall set the Status field to
+ * #ZB_ZDP_STATUS_DEVICE_NOT_FOUND, set the Length field to 0, and not include the
+ * SimpleDescriptor field.
+ *
+ * If the NWKAddrOfInterest matches the network address of one of the children of
+ * the remote device, it shall determine whether a simple descriptor for that device
+ * and on the requested endpoint is available. If a simple descriptor is not available
+ * on the requested endpoint of the child indicated by the NWKAddrOfInterest field,
+ * the remote device shall set the Status field to #ZB_ZDP_STATUS_NO_DESCRIPTOR, set the
+ * Length field to 0, and not include the SimpleDescriptor field. If a simple descriptor
+ * is available on the requested endpoint of the child indicated by the
+ * NWKAddrOfInterest field, the remote device shall set the Status field to
+ * #ZB_ZDP_STATUS_SUCCESS, set the Length field to the length of the simple descriptor
+ * on that endpoint, and include the simple descriptor for that
+ * endpoint of the matching child device in the SimpleDescriptor field.
+ *
+ * @since_tizen 4.0
+ *
+ * The @a desc can be used only in the callback. To use outside, make a copy using zb_simple_desc_clone().
+ *
+ * @param[out] addr16 Network address for the request
+ * @param[out] len Length in bytes of the simple descriptor to follow
+ * @param[out] desc Simple descriptor structure this filed shall only be included
+ *                  in the frame if the status field is equal to #ZB_ZDP_STATUS_SUCCESS
+ * @param[out] user_data user data
+ *
+ * @see zb_zdo_simple_desc_req()
+ */
+typedef void (*zb_zdo_simple_desc_cb)(zb_nwk_addr addr16, unsigned char len,
+               const zb_zdo_simple_desc_h desc, void *user_data);
+
+/**
+ * @brief Sends 'simple descriptor request' command.
+ * @details The Simple_Desc_req command is generated from a local device wishing to
+ * inquire as to the simple descriptor of a remote device on a specified endpoint. This
+ * command shall be unicast either to the remote device itself or to an alternative
+ * device that contains the discovery information of the remote device.
+ *
+ * The local device shall generate the Simple_Desc_req command using the format
+ * illustrated in param list. The NWKAddrOfInterest field shall contain the network
+ * address of the remote device for which the simple descriptor is required and the
+ * endpoint field shall contain the endpoint identifier from which to obtain the
+ * required simple descriptor.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address for device of interest
+ * @param[in] ep The endpoint on the destination
+ * @param[in] cb Response callback
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zdo_simple_desc_cb()
+ */
+int zb_zdo_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
+               zb_zdo_simple_desc_cb cb, void *user_data);
+
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
+ *
+ * @{
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Creates a read attribute status record.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of read attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_clone()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_create(zb_zcl_read_attr_status_record_h *handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Clones a read attribute status record.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a dst should be released using zb_read_attr_status_record_destroy().
+ *
+ * @param[in] src Source handle of read attribute status record
+ * @param[in] dst Destination handle of read attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_clone(zb_zcl_read_attr_status_record_h src,
+               zb_zcl_read_attr_status_record_h *dst);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Destroys a read attribute status record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_clone()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_destroy(zb_zcl_read_attr_status_record_h handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets identifier from read attribute status record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that has been read (or of which an element has been read).
+ *
+ * This field shall contain the same value that was included in the corresponding
+ * attribute identifier field of the original read attributes or read attributes
+ * structured command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_get_id(
+               zb_zcl_read_attr_status_record_h handle, zb_attribute_id* id);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets identifier to read attribute status record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that has been read (or of which an element has been read).
+ *
+ * This field shall contain the same value that was included in the corresponding
+ * attribute identifier field of the original read attributes or read attributes
+ * structured command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_set_id(
+               zb_zcl_read_attr_status_record_h handle, zb_attribute_id id);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets status from read attribute status record.
+ * @details The status field is 8 bits in length and specifies the status of the read
+ * operation on this attribute.
+ *
+ * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
+ * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
+ * not successful.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] status error code @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_get_status(
+               zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e* status);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets status to read attribute status record.
+ * @details The status field is 8 bits in length and specifies the status of the read
+ * operation on this attribute.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] status error code @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_set_status(
+               zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e status);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets type from read attribute status record.
+ * @details The attribute data type field shall contain the data type of the attribute
+ * in the same read attributes status record.
+ *
+ * This field shall only be included in #zb_zcl_data_type_e if the associated status
+ * field contains a value of #ZB_ZCL_STATUS_SUCCESS.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] type Data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_get_type(
+               zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e *type);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets type to read attribute status record.
+ * @details The attribute data type field shall contain the data type of the attribute
+ * in the same read attributes status record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] type Data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_set_type(
+               zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e type);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets data value from read attribute status record.
+ * @details The attribute value field is variable in length and shall contain the current
+ * value of this attribute.
+ *
+ * This field shall only be included if the associated
+ * status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
+ * For an attribute or element of simple type, this
+ * field has the format shown in the Table of Data Types .
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a value should be released using free().
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] type Attribute data type. The attribute data type shall contain the data
+ *  type of the attribute in the same read attributes status record
+ *  (see #zb_zcl_data_type_e). This field shall only be included if the status
+ *  code is #ZB_ZCL_STATUS_SUCCESS.
+ * @param[out] value Attribute value. The attribute value field is variable in length
+ *  and shall contain the current value of this attribute. This field shall only be
+ *  included if the associated status field contains a value of #ZB_ZCL_STATUS_SUCCESS.
+ *  For an attribute or element of simple type (not array, structure, set or bag), this
+ *  field has the format shown in the Table of Data Types (see #zb_zcl_data_type_e).
+ * @param[out] count The number of attribute data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_read_attr_status_record_set_value()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ */
+int zb_read_attr_status_record_get_value(
+               zb_zcl_read_attr_status_record_h handle,
+               zb_zcl_data_type_e* type,
+               unsigned char** value,
+               int* count);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets data value to read attribute status record.
+ * @details The attribute value field is variable in length and shall contain the current
+ * value of this attribute.
+ *
+ * For an attribute or element of simple type, this
+ * field has the format shown in the #zb_zcl_data_type_e.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] type Attribute data type
+ * @param[in] value Attribute data value
+ * @param[in] count The length of attribute data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_attr_status_record_create()
+ * @see zb_read_attr_status_record_destroy()
+ * @see zb_read_attr_status_record_set_id()
+ * @see zb_read_attr_status_record_set_status()
+ * @see zb_zcl_global_attr_read_cb()
+ * @see zb_read_attr_status_record_get_id()
+ * @see zb_read_attr_status_record_get_status()
+ * @see zb_read_attr_status_record_get_type()
+ * @see zb_read_attr_status_record_get_value()
+ */
+int zb_read_attr_status_record_set_value(
+               zb_zcl_read_attr_status_record_h handle,
+               zb_zcl_data_type_e type,
+               unsigned char* value,
+               int count);
+
+/**
+ * @brief Called with device attributes.
+ * @details This callback is called when device attributes are requested with
+ * #zb_zcl_global_attr_read().
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a records can be used only in the callback.
+ * If you want to use them outside, copy each of them with #zb_read_attr_status_record_clone().
+ * @remarks The @a records should not be released.
+ *
+ * @param[out] addr16 The source network address
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] records Attribute status record
+ * @param[out] count The number of items in @records
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_attr_read()
+ */
+typedef void (*zb_zcl_global_attr_read_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               zb_zcl_read_attr_status_record_h *records,
+               int count,
+               void *user_data);
+
+/**
+ * @brief Sends 'read attributes' command.
+ * @details Call this function to read attributes of devices.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] attribute_ids Attributes_ids-list
+ * @param[in] count The number of items in the @a attribute_ids list
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_read_cb()
+ */
+int zb_zcl_global_attr_read(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_attribute_id *attribute_ids,
+               int count,
+               zb_zcl_global_attr_read_cb cb,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Creates write attribute status record.
+ * @details This allocates heap for write attribute status record
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @remarks The @a handle should be released using zb_write_attr_status_destroy().
+ *
+ * @param[out] handle The handle of write attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_set_status()
+ * @see zb_write_attr_status_get_id()
+ * @see zb_write_attr_status_set_id()
+ */
+int zb_write_attr_status_create(zb_zcl_write_attr_status_record_h *handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Clones a write attribute status record.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a dst should be released using zb_write_attr_status_destroy().
+ *
+ * @param[in] src Source handle of write attribute status record
+ * @param[in] dst Destination handle of write attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_set_status()
+ * @see zb_write_attr_status_get_id()
+ * @see zb_write_attr_status_set_id()
+ */
+int zb_write_attr_status_clone(zb_zcl_write_attr_status_record_h src,
+               zb_zcl_write_attr_status_record_h *dst);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Destroys a write attribute status record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_set_status()
+ * @see zb_write_attr_status_get_id()
+ * @see zb_write_attr_status_set_id()
+ */
+int zb_write_attr_status_destroy(zb_zcl_write_attr_status_record_h handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets the status from a write attribute status record.
+ * @details The status field is 8 bits in length and specifies the status of the read
+ * operation on this attribute.
+ *
+ * This field shall be set to #ZB_ZCL_STATUS_SUCCESS, if the operation
+ * was successful, or an error code, as specified in #zb_zcl_status_e if the operation was
+ * not successful.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[out] status error code @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_id()
+ * @see zb_write_attr_status_set_id()
+ * @see zb_write_attr_status_set_status()
+ */
+int zb_write_attr_status_get_status(
+               zb_zcl_write_attr_status_record_h handle,
+               zb_zcl_status_e *status);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets the status to a write attribute status record.
+ * @details The status field is 8 bits in length and specifies the status of the read
+ * operation on this attribute.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of read attribute status record
+ * @param[in] status error code @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_get_id()
+ * @see zb_write_attr_status_set_id()
+ */
+int zb_write_attr_status_set_status(
+               zb_zcl_write_attr_status_record_h handle,
+               zb_zcl_status_e status);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Gets the identifier from a write attribute status record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that has been write (or of which an element has been write).
+ *
+ * This field shall contain the same value that was included in the corresponding
+ * attribute identifier field of the original write attributes or write attributes
+ * structured command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_set_status()
+ * @see zb_write_attr_status_set_id()
+ */
+int zb_write_attr_status_get_id(
+               zb_zcl_write_attr_status_record_h handle,
+               zb_attribute_id *id);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_STATUS_RECORD_MODULE
+ * @brief Sets the identifier to a write attribute status record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that has been write (or of which an element has been write).
+ *
+ * This field shall contain the same value that was included in the corresponding
+ * attribute identifier field of the original write attributes or write attributes
+ * structured command.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_write_attr_cb()
+ * @see zb_write_attr_status_create()
+ * @see zb_write_attr_status_clone()
+ * @see zb_write_attr_status_destroy()
+ * @see zb_write_attr_status_get_status()
+ * @see zb_write_attr_status_set_status()
+ * @see zb_write_attr_status_get_id()
+ */
+int zb_write_attr_status_set_id(
+               zb_zcl_write_attr_status_record_h handle,
+               zb_attribute_id id);
+
+/**
+ * @brief Called when write attributes command are requested.
+ * @details This callback is called when attributes are written with
+ * #zb_zcl_global_attr_write() or #zb_zcl_global_attr_write_undivided().
+ * In other words, the write attributes response is generated in response to the write
+ * attributes command.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a records can be used only in the callback.
+ * @remarks If you want to use them outside, copy them with #zb_write_attr_status_clone().
+ * @remarks The @a records should not be released.
+ *
+ * @param[out] addr16 The source network address
+ * @param[out] ep The source end-point of the received information (ex. endpoint 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] records Attribute status record
+ * @param[out] count The number of items in @a records
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_attr_write()
+ */
+typedef void (*zb_zcl_global_attr_write_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               zb_zcl_write_attr_status_record_h *records,
+               int count,
+               void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
+ * @brief Creates a write attribute record.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of write attribute record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write()
+ * @see zb_zcl_global_attr_write_undivided()
+ * @see zb_zcl_global_write_attr_no_rep()
+ * @see zb_write_attr_record_destroy()
+ * @see zb_write_attr_record_set_id()
+ * @see zb_write_attr_record_set_value()
+ */
+int zb_write_attr_record_create(zb_zcl_write_attr_record_h *handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
+ * @brief Destroys a write attribute record handle.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write()
+ * @see zb_zcl_global_attr_write_undivided()
+ * @see zb_zcl_global_write_attr_no_rep()
+ * @see zb_write_attr_record_create()
+ * @see zb_write_attr_record_clone()
+ * @see zb_write_attr_record_set_id()
+ * @see zb_write_attr_record_set_value()
+ */
+int zb_write_attr_record_destroy(zb_zcl_write_attr_record_h handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
+ * @brief Sets the attribute identifier of a write attribute record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that is to be written.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute record
+ * @param[in] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write()
+ * @see zb_zcl_global_attr_write_undivided()
+ * @see zb_zcl_global_write_attr_no_rep()
+ * @see zb_write_attr_record_create()
+ * @see zb_write_attr_record_destroy()
+ * @see zb_write_attr_record_set_value()
+ */
+int zb_write_attr_record_set_id(zb_zcl_write_attr_record_h handle,
+               zb_attribute_id id);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
+ * @brief Sets the attribute data type of a write attribute record.
+ * @details The attribute data type field shall contain the data type of the attribute
+ * that is to be written.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute record
+ * @param[in] type attribute data type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write()
+ * @see zb_zcl_global_attr_write_undivided()
+ * @see zb_zcl_global_write_attr_no_rep()
+ * @see zb_write_attr_record_create()
+ * @see zb_write_attr_record_destroy()
+ * @see zb_write_attr_record_set_id()
+ * @see zb_write_attr_record_set_value()
+ */
+int zb_write_attr_record_set_type(zb_zcl_write_attr_record_h handle,
+               zb_zcl_data_type_e type);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_WRITE_ATTRIBUTE_RECORD_MODULE
+ * @brief Sets data value to write attribute status record.
+ * @details The attribute data type field shall contain the data type of the attribute in
+ * the same attribute report field
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] type Attribute data type
+ * @param[in] value Attribute data value
+ * @param[in] count The number of items in @a value
+
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write()
+ * @see zb_zcl_global_attr_write_undivided()
+ * @see zb_zcl_global_write_attr_no_rep()
+ * @see zb_write_attr_record_create()
+ * @see zb_write_attr_record_destroy()
+ * @see zb_write_attr_record_set_id()
+ * @see zb_write_attr_record_set_value()
+ */
+int zb_write_attr_record_set_value(
+               zb_zcl_write_attr_record_h handle,
+               zb_zcl_data_type_e type,
+               unsigned char* value,
+               int count);
+
+/**
+ * @brief Sends 'write Attributes' command.
+ * @details Call this function to write attributes of other devices.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_write_attr_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write_cb()
+ */
+int zb_zcl_global_attr_write(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_write_attr_record_h *records,
+               int count,
+               zb_zcl_global_attr_write_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'write attributes undivided' command.
+ * @details Call this function to write attributes without fragmentation to other devices.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_write_attr_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_attr_write_cb()
+ */
+int zb_zcl_global_attr_write_undivided(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_write_attr_record_h *records,
+               int count,
+               zb_zcl_global_attr_write_cb cb,
+               void *user_data);
+
+/**
+ * @brief Sends 'write Attributes without response' command.
+ * @details Call this function to write attributes of other devices without receiving any
+ * response.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_write_attr_record_h
+ * @param[in] count The number of items in @a records array
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_zcl_global_attr_write_no_rsp(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_write_attr_record_h *records,
+               int count);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
+ * @brief Clones a report config response record.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a dst should be released using zb_report_config_response_record_destroy().
+ *
+ * @param[in] src Source handle of report config response record
+ * @param[in] dst Destination handle of report config response record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_get_id()
+ */
+int zb_report_config_response_record_clone(
+               zb_zcl_report_config_response_record_h src,
+               zb_zcl_report_config_response_record_h *dst);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
+ * @brief Destroys a reporting configuration response record.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of reporting configuration response record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_get_id()
+ */
+int zb_report_config_response_record_destroy(
+               zb_zcl_report_config_response_record_h handle);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
+ * @brief Gets status from a reporting configuration response record.
+ * @details If the attribute is not implemented on the sender or receiver of the command,
+ * whichever is relevant (depending on direction), the result shall be set to
+ * #ZB_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE.
+ *
+ * If the attribute is supported, but is not capable of
+ * being reported, this field shall be set to #ZB_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE.
+ *
+ * Otherwise, this field shall be set to #ZB_ZCL_STATUS_SUCCESS.
+ *
+ * If the status field is not set to #ZB_ZCL_STATUS_SUCCESS, all fields except the
+ * direction and attribute identifier fields shall be omitted.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] status status @see #zb_zcl_status_e
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_get_id()
+ */
+int zb_report_config_response_record_get_status(
+               zb_zcl_report_config_response_record_h handle,
+               zb_zcl_status_e *status);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
+ * @brief Gets the direction from a reporting configuration response record.
+ * @details The direction field specifies whether values of the attribute are reported
+ * (0x00), or whether reports of the attribute are received (0x01).
+ *
+ * If this value is set to 0x00, then the attribute data type field, the minimum
+ * reporting interval field, the maximum reporting interval field and the reportable
+ * change field are included in the payload, and the timeout period field is omitted. If
+ * this value is set to 0x01, then the timeout period field is included in the payload,
+ * and the attribute data type field, the minimum reporting interval field, the
+ * maximum reporting interval field and the reportable change field are omitted.
+ *
+ * All other values of this field are reserved.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] dir direction 00 : #ZB_ZCL_CLIENT_TO_SERVER \n
+ *                           01 : #ZB_ZCL_SERVER_TO_CLIENT \n
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_get_id()
+ */
+int zb_report_config_response_record_get_dir(
+               zb_zcl_report_config_response_record_h handle,
+               zb_zcl_fc_direction_e *dir);
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RESPONSE_RECORD_MODULE
+ * @brief Gets the attribute identifier from a reporting configuration response record.
+ * @details The attribute identifier field is 16 bits in length and shall contain the
+ * identifier of the attribute that the reporting configuration details apply to.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_config_report_write_cb()
+ * @see zb_report_config_response_record_clone()
+ * @see zb_report_config_response_record_destroy()
+ * @see zb_report_config_response_record_get_status()
+ * @see zb_report_config_response_record_get_dir()
+ * @see zb_report_config_response_record_get_id()
+ */
+int zb_report_config_response_record_get_id(
+               zb_zcl_report_config_response_record_h handle,
+               zb_attribute_id *id);
 
 /**
- * @brief Called after zigbee network formation is completed.
- * @details Response of forming the zigbee network
+ * @brief Called with configure reporting response.
+ * @details This callback is called after #zb_zcl_global_config_report_write() is called.
  *
  * @since_tizen 4.0
  *
- * @param[in] panid PAN ID
- * @param[in] user_data user data
+ * @remarks The @a records can be used only in the callback.
+ * @remarks The @a records should not be released.
  *
- * @see zb_form_network()
+ * @param[out] addr16 The source network address
+ * @param[out] ep The source from which the response was sent (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] records Reporting configuration response record
+ * @param[out] count The number of reporting configuration response record
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_config_report_write()
  */
-typedef void (*zb_form_network_cb)(nwk_addr panid, void *user_data);
+typedef void (*zb_zcl_global_config_report_write_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               zb_zcl_report_config_response_record_h *records,
+               int count,
+               void *user_data);
 
 /**
- * @brief Makes network works as a zigbee coordinator.
- * @details This function to enable the zigbee coordinator.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Creates a reporting configuration record.
+ * @details Allocate memory for reporting configuration record
  *
  * @since_tizen 4.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/zigbee
  *
- * @remarks If you want to change parameters related to network configuration you should
- * call zb_zdo_set_compatible_startup_parameters() API
+ * @remarks The @a handle should be released using zb_report_config_record_destroy().
  *
- * @param[in] handle The handle of zigbee
- * @param[in] cb zb_form_network_cb()
- * @param[in] user_data user data
+ * @param[out] handle The handle of reporting configuration record
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
  * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @post When forming network finished, form_network_done event will be generated.
- *
- * @see zb_disable_network()
- * @see zb_zdo_set_compatible_startup_parameters()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data);
+int zb_report_config_record_create(zb_zcl_reporting_config_record_h *handle);
 
 /**
- * @brief Called after disabling the zigbee network.
- * @details Response of disabling the zigbee network
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Clones a reporting configuration record.
  *
  * @since_tizen 4.0
  *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
+ * @remarks The @a dst should be released using zb_report_config_record_destroy().
  *
- * @see zb_form_network()
+ * @param[in] src Source handle of reporting configuration record
+ * @param[in] dst Destination handle of reporting configuration record
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data);
+int zb_report_config_record_clone(zb_zcl_reporting_config_record_h src,
+               zb_zcl_reporting_config_record_h *dst);
+
 /**
- * @brief Disables network and stops zigbee coordinator role.
- * @details This function to stop zigbee coordinator
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Destroys a reporting configuration record.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[in] cb zb_disable_network_cb()
- * @param[in] user_data user data
+ * @param[in] handle The handle of reporting configuration record
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_form_network()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_data);
+int zb_report_config_record_destroy(zb_zcl_reporting_config_record_h handle);
 
 /**
- * @brief Forces a node to leave one network and to rejoin the other.
- * @details Force a node to leave one network and to rejoin the other. If remove_children
- * sets true, the the target end device will reset its state-machine as factory default.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the direction from a reporting configuration record.
+ * @details The direction field specifies whether values of the attribute are be reported,
+ * or whether reports of the attribute are to be received.
+ *
+ * If this value is set to 0x00, then the attribute data type field, the minimum
+ * reporting interval field, the maximum reporting interval field and the reportable
+ * change field are included in the payload, and the timeout period field is omitted.
+ * The record is sent to a cluster server (or client) to configure how it sends reports to
+ * a client (or server) of the same cluster.
+ *
+ * If this value is set to 0x01, then the timeout period field is included in the payload,
+ * and the attribute data type field, the minimum reporting interval field, the
+ * maximum reporting interval field and the reportable change field are omitted. The
+ * record is sent to a cluster client (or server) to configure how it should expect
+ * reports from a server (or client) of the same cluster.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[in] addr The source EUI64 of the binding (the remote device's EUI64)
- * @param[in] remove_children Remove children
- * @param[in] rejoin Rejoin after leave
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] dir 00 : The receiver of the Configure Reporting command shall configure
+ *                     reporting to send to each destination as resolved by
+ *                   the bindings for the cluster hosting the attributes to be reported.\n
+ *                 01 : This indicates to the receiver of the Configure Reporting
+ *                     command that the sender has configured its reporting
+ *                     mechanism to transmit reports and that, based on the current
+ *                     state of the sender's bindings, the sender will send reports to the
+ *                     receiver.\n
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_form_network()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, bool rejoin);
+int zb_report_config_record_get_dir(zb_zcl_reporting_config_record_h handle,
+               zb_zcl_fc_direction_e *dir);
 
 /**
- * @brief Enables or disables coordinator device can accept other device's association request.
- * @details The function is generated from a Local Device requesting that
- * a remote device or devices allow or disallow association.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the direction of a reporting configuration record.
+ * @details The direction field specifies whether values of the attribute are be reported,
+ * or whether reports of the attribute are to be received.
+ *
+ * If this value is set to 0x00, then the attribute data type field, the minimum
+ * reporting interval field, the maximum reporting interval field and the reportable
+ * change field are included in the payload, and the timeout period field is omitted.
+ * The record is sent to a cluster server (or client) to configure how it sends reports to
+ * a client (or server) of the same cluster.
+ *
+ * If this value is set to 0x01, then the timeout period field is included in the payload,
+ * and the attribute data type field, the minimum reporting interval field, the
+ * maximum reporting interval field and the reportable change field are omitted. The
+ * record is sent to a cluster client (or server) to configure how it should expect
+ * reports from a server (or client) of the same cluster.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @remarks Especially, this can be very useful for disabling joining all throughout the
- * network. Typically, this is the last step when commissioning a network. It closes it
- * down to prevent other nodes getting on the network without permission.
  *
- * @param[in] handle The handle of zigbee
- * @param[in] timeout Number of seconds during which devices will be allowed to join
- * the network. A value of 0xff turns permit joining on permanently
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] dir 00 : The receiver of the Configure Reporting command shall configure
+ *                     reporting to send to each destination as resolved by
+ *                   the bindings for the cluster hosting the attributes to be reported.\n
+ *                01 : This indicates to the receiver of the Configure Reporting
+ *                     command that the sender has configured its reporting
+ *                     mechanism to transmit reports and that, based on the current
+ *                     state of the sender's bindings, the sender will send reports to the
+ *                     receiver.\n
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_form_network()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_permit_join(zigbee_h handle, unsigned char timeout);
+int zb_report_config_record_set_dir(zb_zcl_reporting_config_record_h handle,
+               zb_zcl_fc_direction_e dir);
 
 /**
- * @brief Shows current coordinator's IEEE MAC address.
- * @details The function gets the coordinator's MAC address from the machine which runs
- * zigbee-service daemon.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the attribute identifier from a reporting configuration record.
+ * @details If the direction field is 0x00, this field contains the identifier of the
+ * attribute that is to be reported.
+ *
+ * If instead the direction field is 0x01, the device shall expect reports of values
+ * of this attribute.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[out] addr64 the Zigbee IEEE MAC address of this machine.
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] id Attribute identifier
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_get_network_info()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64);
+int zb_report_config_record_get_id(zb_zcl_reporting_config_record_h handle,
+               unsigned short *id);
 
 /**
- * @brief Gets information of the current network environment of coordinator.
- * @details The function shows network environment
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the attribute identifier of a reporting configuration record.
+ * @details If the direction field is 0x00, this field contains the identifier of the
+ * attribute that is to be reported.
+ *
+ * If instead the direction field is 0x01, the device shall expect reports of values
+ * of this attribute.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[out] addr64 the Zigbee IEEE MAC address
- * @param[out] nodeid Node ID
- * @param[out] panid PAN ID
- * @param[out] channel 11~26 : 2.4GHz~2.485GHz
- * @param[out] tx_power Tx power strength
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] id Attribute identifier
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_form_network()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid,
-               nwk_addr *panid, unsigned char *channel, unsigned char *tx_power);
+int zb_report_config_record_set_id(zb_zcl_reporting_config_record_h handle,
+               unsigned short id);
 
 /**
- * @brief Gets all children device list information.
- * @details This function return end-point list and simple description per each end-point
- * at each device.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the attribute data type from a reporting configuration record.
+ * @details The Attribute data type field contains the data type of the attribute that is
+ * to be reported.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[out] count The number of end-devices
- * @param[out] list The device information list
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type attribute data type
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see struct zb_end_device_info_s
- *
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_all_device_list(zigbee_h handle, int *count, zb_end_device_info_h **list);
+int zb_report_config_record_get_type(zb_zcl_reporting_config_record_h handle,
+               zb_zcl_data_type_e *type);
 
 /**
- * @brief Gets endpoint list information.
- * @details This function return end-point list at each device.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the minimum interval from a reporting configuration record.
+ * @details The minimum reporting interval field is 16 bits in length and shall contain
+ * the minimum interval, in seconds, between issuing reports of the specified attribute.
+ *
+ * If this value is set to 0x0000, then there is no minimum limit, unless one is
+ * imposed by the specification of the cluster using this reporting mechanism or by
+ * the applicable profile.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 the Zigbee IEEE MAC address
- * @param[out] count The number of endpoints
- * @param[out] ep_list The device endpoint list
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] min_i minimum interval time
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *count,
-               unsigned char *ep_list);
+int zb_report_config_record_get_min_interval(zb_zcl_reporting_config_record_h handle,
+               unsigned short *min_i);
 
 /**
- * @brief Gets cluster list information.
- * @details This function return in and out cluster list at each device.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the minimum interval of a reporting configuration record.
+ * @details The minimum reporting interval field is 16 bits in length and shall contain
+ * the minimum interval, in seconds, between issuing reports of the specified attribute.
+ *
+ * If this value is set to 0x0000, then there is no minimum limit, unless one is
+ * imposed by the specification of the cluster using this reporting mechanism or by
+ * the applicable profile.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 the Zigbee IEEE MAC address
- * @param[in] ep endpoint number
- * @param[out] in_cluster_count The number of in-clusters
- * @param[out] in_cluster_list The device server cluster list
- * @param[out] out_cluster_count The number of out-clusters
- * @param[out] out_cluster_list The device client list
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] min_i minimum interval time
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep,
-               unsigned char *in_cluster_count, unsigned short *in_cluster_list,
-               unsigned char *out_cluster_count, unsigned short *out_cluster_list);
+int zb_report_config_record_set_min_interval(zb_zcl_reporting_config_record_h handle,
+               unsigned short min_i);
 
 /**
- * @brief Frees all children device list information.
- * @details This function return end-point list and simple description per each end-point
- * at each device.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the maximum interval from a reporting configuration record.
+ * @details The maximum reporting interval field is 16 bits in length and shall contain
+ * the maximum interval, in seconds, between issuing reports of the specified attribute.
+ *
+ * If this value is set to 0xffff, then the device shall not issue reports for the
+ * specified attribute, and the configuration information for that attribute need not be
+ * maintained.
  *
  * @since_tizen 4.0
  *
- * @param[in] list The device information list
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] max_i maximum interval time
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see struct zb_end_device_info_s
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_device_list_free(zb_end_device_info_h *list);
+int zb_report_config_record_get_max_interval(zb_zcl_reporting_config_record_h handle,
+               unsigned short *max_i);
 
 /**
- * @brief Called after getting end-device information.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the maximum interval of a reporting configuration record.
+ * @details The maximum reporting interval field is 16 bits in length and shall contain
+ * the maximum interval, in seconds, between issuing reports of the specified attribute.
  *
- * @since_tizen 4.0
+ * If this value is set to 0xffff, then the device shall not issue reports for the
+ * specified attribute, and the configuration information for that attribute need not be
+ * maintained.
  *
- * @param[in] index nth child
- * @param[in] child handle of a end-device
- * @param[in] user_data user data
+ * @since_tizen 4.0
  *
- * @return #ZIGBEE_FUNC_CONTINUE to continue iteration, otherwise #ZIGBEE_FUNC_STOP to stop iteration.
- * @retval #ZIGBEE_FUNC_CONTINUE Continue iteration
- * @retval #ZIGBEE_FUNC_STOP Stop iteration
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] max_i maximum interval time
  *
- * @pre The callback must be registered when using zb_devices_info_foreach_end_device()
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_devices_info_foreach_end_device()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-typedef bool (*zb_end_device_cb)(int index, zb_end_device_info_h child, void *user_data);
+int zb_report_config_record_set_max_interval(zb_zcl_reporting_config_record_h handle,
+               unsigned short max_i);
 
 /**
- * @brief Calls a function for each children end-point of parent.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the timeout from a reporting configuration record.
+ * @details The timeout period field is 16 bits in length and shall contain the maximum
+ * expected time, in seconds, between received reports for the attribute specified in
+ * the attribute identifier field. If more time than this elapses between reports, this
+ * may be an indication that there is a problem with reporting.
+ *
+ * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
+ * Note that, for a server/client connection to work properly using automatic
+ * reporting, the timeout value set for attribute reports to be received by the client (or
+ * server) cluster must be set somewhat higher than the maximum reporting interval
+ * set for the attribute on the server (or client) cluster.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] list handle of end-devices parent
- * @param[in] cb zb_end_device_cb()
- * @param[in] user_data user data
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] timeout timeout
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_devices_info_foreach_end_device()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_devices_info_foreach_end_device(zb_end_device_info_h *list,
-               zb_end_device_cb cb, void *user_data);
+int zb_report_config_record_get_timeout(zb_zcl_reporting_config_record_h handle,
+               unsigned short *timeout);
 
 /**
- * @brief Gets network address of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the timeout of a reporting configuration record.
+ * @details The timeout period field is 16 bits in length and shall contain the maximum
+ * expected time, in seconds, between received reports for the attribute specified in
+ * the attribute identifier field. If more time than this elapses between reports, this
+ * may be an indication that there is a problem with reporting.
+ *
+ * If this value is set to 0x0000, reports of the attribute are not subject to timeout.
+ * Note that, for a server/client connection to work properly using automatic
+ * reporting, the timeout value set for attribute reports to be received by the client (or
+ * server) cluster must be set somewhat higher than the maximum reporting interval
+ * set for the attribute on the server (or client) cluster.
  *
  * @since_tizen 4.0
  *
- * @remarks This function should be called in zb_end_device_cb()
- *
- * @param[in] handle handle of a specific end-device
- * @param[out] addr16 network address of the end-point
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] timeout timeout
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
  */
-int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16);
+int zb_report_config_record_set_timeout(zb_zcl_reporting_config_record_h handle,
+               unsigned short timeout);
 
 /**
- * @brief Gets ieee address of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Gets the change from a reporting configuration record.
+ * @details The reportable change field shall contain the minimum change to the attribute
+ * that will result in a report being issued. This field is of variable length.
  *
- * @since_tizen 4.0
+ * For attributes with 'analog' data type
+ * the field has the same data type as the attribute.
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * The sign (if any) of the reportable change field is ignored.
+ * For attributes of 'discrete' data type
+ * this field is omitted.
  *
- * @param[in] handle handle of a specific end-device
- * @param[out] addr64 ieee address of the end-point
+ * @since_tizen 4.0
+ *
+ * @remarks The @a value should be released using free().
+ *
+ * @param[in] handle The handle of write attribute status record
+ * @param[out] type attribute type The attribute data type shall contain the data
+ *  type of the attribute in the same read attributes status record
+ *  (see #zb_zcl_data_type_e).
+ * @param[out] value The reportable change value. The reportable change field shall
+ *  contain the minimum change to the attribute that will result in a report being issued.
+ *  For attributes with 'analog' data type (see #zb_zcl_data_type_e) the field has the
+ *  same data type as the attribute. If the reportable change has not been configured,
+ *  this field shall contain the invalid value for the relevant data type.
+ *  For attributes of 'discrete' data type (see #zb_zcl_data_type_e) this field is not
+ *  permitted.
+ * @param[out] size attribute data size
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64);
+int zb_report_config_record_get_change(zb_zcl_reporting_config_record_h handle,
+               zb_zcl_data_type_e *type, unsigned char **value, int *size);
 
 /**
- * @brief Gets a number of end-points of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the change to a reporting configuration record.
+ * @details The reportable change field shall contain the minimum change to the attribute
+ * that will result in a report being issued. This field is of variable length.
+ * For attributes with 'analog' data type
+ * the field has the same data type as the attribute.
  *
- * @since_tizen 4.0
+ * The sign (if any) of the reportable change field is ignored.
+ * For attributes of 'discrete' data type
+ * this field is omitted.
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * @since_tizen 4.0
  *
- * @param[in] handle handle of a specific end-device
- * @param[out] count a number of endpoints of the end-point
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] type attribute type
+ * @param[in] value attribute data (only analog data type is allowed)
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_zcl_global_read_report_config_cb()
+ * @see zb_report_config_record_create()
+ * @see zb_report_config_record_clone()
+ * @see zb_report_config_record_destroy()
+ * @see zb_report_config_record_get_id()
+ * @see zb_report_config_record_set_id()
+ * @see zb_report_config_record_get_dir()
+ * @see zb_report_config_record_set_dir()
+ * @see zb_report_config_record_get_type()
+ * @see zb_report_config_record_get_min_interval()
+ * @see zb_report_config_record_set_min_interval()
+ * @see zb_report_config_record_get_max_interval()
+ * @see zb_report_config_record_set_max_interval()
+ * @see zb_report_config_record_get_change()
+ * @see zb_report_config_record_set_change()
+ * @see zb_report_config_record_get_timeout()
+ * @see zb_report_config_record_set_timeout()
  */
-int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *count);
+int zb_report_config_record_set_change(zb_zcl_reporting_config_record_h handle,
+               zb_zcl_data_type_e type, unsigned char *value);
 
 /**
- * @brief Gets list of end-points of a specific end-point.
+ * @brief Sends 'setting configure reporting' command.
+ * @details Call this function to set the configuration of attribute status changing reporting.
  *
  * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
  *
- * @remarks This function should be called in zb_end_device_cb()
- *
- * @param[in] handle handle of a specific end-device
- * @param[out] ep_list list of endpoints of the end-point
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_reporting_config_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_zcl_global_config_report_write_cb()
+ */
+int zb_zcl_global_config_report_write(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_reporting_config_record_h *records,
+               int count,
+               zb_zcl_global_config_report_write_cb cb,
+               void *user_data);
+
+
+/**
+ * @brief Called with a configuration report.
+ * @details This callback is called after zb_zcl_global_config_report_read() is called.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a records can be used only in the callback.
+ * @remarks The @a records should not be released.
+ *
+ * @param[out] addr16 Source network address
+ * @param[out] ep The source end-point (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] records Read reporting configuration response record
+ * @param[out] count The number of items in @a records
+ * @param[out] user_data User data
+ *
+ * @see zb_zcl_global_config_report_read()
  */
-int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list);
+typedef void (*zb_zcl_global_config_report_read_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               zb_cluster_id clusterid,
+               zb_zcl_reporting_config_record_h *records,
+               int count,
+               void *user_data);
 
 /**
- * @brief Gets 802.15.4 MAC capability of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Creates a read reporting configuration record.
+ * @details Allocates memory for read reporting configuration record.
  *
  * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * @remarks The @a handle should be released using zb_read_report_config_record_destroy().
  *
- * @param[in] handle handle of a specific end-device
- * @param[out] capability 802.15.4 MAC capability of the end-point
+ * @param[out] handle The handle of read configuration record
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_set_dir()
  */
-int zb_get_mac_capability(zb_end_device_info_h handle, unsigned char *capability);
+int zb_read_report_config_record_create(
+               zb_zcl_read_report_config_record_h *handle);
 
 /**
- * @brief Gets ability of alternative PAN coordinator of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Destroys a read reporting configuration record.
+ * @details Removes allocated memory for read reporting configuration record.
  *
  * @since_tizen 4.0
  *
- * @remarks This function should be called in zb_end_device_cb()
- *
- * @param[in] handle handle of a specific end-device
- * @param[out] can_do_it alternative of PAN coordinator of the end-point
+ * @param[in] handle The handle of write attribute record
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_set_dir()
  */
-int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle,
-               unsigned char *can_do_it);
+int zb_read_report_config_record_destroy(
+               zb_zcl_read_report_config_record_h handle);
 
 /**
- * @brief Gets device id of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the direction of a read reporting configuration record.
+ * @details The direction field specifies whether values of the attribute are reported
+ * (0x00), or whether reports of the attribute are received (0x01).
  *
- * @since_tizen 4.0
+ * All other values of this field are reserved.
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * @since_tizen 4.0
  *
- * @param[in] handle handle of a specific end-device
- * @param[in] ep endpoint number
- * @param[out] device_id device id of the end-point
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] dir direction
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_set_dir()
  */
-int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep, unsigned short *device_id);
+int zb_read_report_config_record_set_dir(
+               zb_zcl_read_report_config_record_h handle,
+               zb_zcl_fc_direction_e dir);
 
 /**
- * @brief Gets profile id of a specific end-point.
+ * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_READ_REPORTING_CONFIG_RECORD_MODULE
+ * @brief Sets the attribute identifier of a read reporting configuration record.
+ * @details The attribute identifier field shall contain the identifier of the attribute
+ * whose reporting configuration details are to be read.
  *
  * @since_tizen 4.0
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * @param[in] handle The handle of write attribute status record
+ * @param[in] id Attribute identifier
  *
- * @param[in] handle handle of a specific end-device
- * @param[in] ep endpoint number
- * @param[out] profile_id profile id of the end-point
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_read_report_config_record_create()
+ * @see zb_read_report_config_record_destroy()
+ * @see zb_read_report_config_record_set_id()
+ * @see zb_read_report_config_record_set_dir()
+ */
+int zb_read_report_config_record_set_id(
+               zb_zcl_read_report_config_record_h handle,
+               unsigned short id);
+
+/**
+ * @brief Sends 'reading configure reporting' command.
+ * @details Call this function to read the configuration of attribute status changing
+ * reporting.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 target network address
+ * @param[in] src_ep source end-point (ex. 1)
+ * @param[in] dst_ep destination end-point (ex. 1)
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
+ *            Only OR operation is allowed in ZCL header \n
+ *            - Frame Type : \n
+ *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
+ *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
+ *            - Manufacturer Specific : \n
+ *            - Direction : \n
+ *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
+ *            #ZB_ZCL_SERVER_TO_CLIENT \n
+ *            - Disable Default Response : \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_ENABLED (default) \n
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] records Array of #zb_zcl_read_report_config_record_h
+ * @param[in] count The number of items in @a records array
+ * @param[in] cb Response callback function
+ * @param[in] user_data User data
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
+ * @retval #ZIGBEE_ERROR_OUT_OF_MEMORY Out-of-memory
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
+ * @see zb_zcl_global_config_report_read_cb()
  */
-int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep, unsigned short *profile_id);
+int zb_zcl_global_config_report_read(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_cluster_id clusterid,
+               zb_zcl_read_report_config_record_h *records,
+               int count,
+               zb_zcl_global_config_report_read_cb cb,
+               void *user_data);
 
 /**
- * @brief Gets power source type of a specific end-point.
+ * @}
+ */
+
+/**
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_IAS_ZONE_CLUSTER_MODULE
+ *
+ * @{
+ */
+
+/* Generated Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Zone Status Change Notification      |     M      |
+ * |             0x01               | Zone Enroll Request                  |     M      |
+ * |             0x11               | Zone Status Change Notification (Ext)|     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+
+/* Received Command IDs for the IAS Zone Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Zone Enroll Response                 |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief Values of the Enroll Response Code in Zigbee Cluster Library.
  *
  * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS = 0x00, /**< Success */
+       ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED = 0x01, /**< This specific Zone type is not known to the CIE and is not supported */
+       ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED = 0x02, /**< CIE does not permit new zones to enroll at this time. */
+       ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES = 0x03, /**< CIE reached its limit of number of enrolled zones */
+} zb_ias_zone_enroll_response_e;
+
+/**
+ * @brief Sends 'zone enroll response' command.
+ * @details On receipt, the device embodying the Zone server is notified that it is now
+ * enrolled as an active alarm device.
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * The device embodying the Zone server must authenticate received messages by
+ * checking the address of their sender against IAS_CIE_Address. This is to ensure
+ * that only messages from the correct CIE are accepted.
  *
- * @param[in] handle handle of a specific end-device
- * @param[out] power_src power source type of the end-point
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] enroll_response_code #ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS \n
+ *                                 #ZB_ZCL_IAS_ZONE_ENROLL_NOT_SUPPORTED \n
+ *                                 #ZB_ZCL_IAS_ZONE_ENROLL_NO_ENROLL_PERMITTED \n
+ *                                 #ZB_ZCL_IAS_ZONE_ENROLL_TOO_MANY_ZONES \n
+ * @param[in] zone_id The Zone ID field is the index into the zone table of the CIE. This
+ *                    field is only relevant if the response code is success.
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
  */
-int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src);
+int zb_zcl_zone_enroll_response(
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point ep,
+               unsigned char enroll_response_code,
+               unsigned char zone_id);
 
 /**
- * @brief Gets security capability of a specific end-point.
+ * @}
+ */
+
+/**
+ * @addtogroup CAPI_NETWORK_ZIGBEE_ZCL_ON_OFF_CLUSTER_MODULE
+ *
+ * @{
+ */
+
+/* Command IDs for the On/Off Cluster in Zigbee Cluster Library
+ * +--------------------------------+--------------------------------------+------------+
+ * |Command Identifier Field Value  |              Description             | Mandatory/ |
+ * |                                |                                      | Optional   |
+ * +--------------------------------+--------------------------------------+------------+
+ * |             0x00               | Off                                  |     M      |
+ * |             0x01               | On                                   |     M      |
+ * |             0x02               | Toggle                               |     M      |
+ * +--------------------------------+--------------------------------------+------------+
+ */
+
+/**
+ * @brief On/Off/Toggle value.
  *
  * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZCL_OFF = 0x00, /**< Off */
+       ZB_ZCL_ON = 0x01, /**< On */
+       ZB_ZCL_TOGGLE = 0x02, /**< Toggle */
+} zb_zcl_on_off_e;
+
+/**
+ * @brief Sends 'on/off/toggle' command.
+ * @details On receipt of 'on' command, a device shall enter its 'Off' state.
+ * This state is device dependent, but it is recommended that it is used for power off or
+ * similar functions.
  *
- * @remarks This function should be called in zb_end_device_cb()
+ * On receipt of 'off' command, a device shall enter its 'On' state. This state is
+ * device dependent, but it is recommended that it is used for power on or similar
+ * functions.
  *
- * @param[in] handle handle of a specific end-device
- * @param[out] sec_capability security type of the end-point
+ * On receipt of 'toggle' command, if a device is in its 'Off' state it shall enter
+ * its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] addr16 Network address
+ * @param[in] ep Endpoint ID
+ * @param[in] on_off_type #ZB_ZCL_OFF \n
+ *                        #ZB_ZCL_ON \n
+ *                        #ZB_ZCL_TOGGLE \n
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #ZIGBEE_ERROR_NONE Successful
  * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
+ * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
+ * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
  *
- * @see zb_end_device_cb()
- * @see zb_devices_info_foreach_end_device()
- * @see zb_get_all_device_list()
  */
-int zb_get_security_capabilty(zb_end_device_info_h handle,
-               unsigned char *sec_capability);
+int zb_zcl_on_off_control(zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep,
+               zb_zcl_on_off_e on_off_type);
 
 /**
  * @}
old mode 100755 (executable)
new mode 100644 (file)
index 282463c..7cdae4c
@@ -22,11 +22,9 @@ extern "C" {
 
 #include <tizen_type.h>
 
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zb_zdo.h>
-#include <zb_zcl.h>
-#include <zb_ha.h>
+#include <zigbee.h>
+#include <zigbee-zdo_internal.h>
+#include <zigbee-zcl_internal.h>
 
 /**
  * @file zigbee_internal.h
@@ -40,177 +38,59 @@ extern "C" {
  */
 
 /**
- * @platform
- * @internal
- * @brief Enables the zigbee service.
- * @details All this function to start zigbee service
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @remarks You must free all resources of the zigbee by calling zb_destroy()
- * if zigbee service is no longer needed.
- *
- * @param[in] handle The handle of zigbee
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create()
- * @see zb_destroy()
- *
- */
-int zb_enable(zigbee_h handle);
-
-/**
- * @platform
- * @internal
- * @brief Disables the zigbee service.
- * @details All this function to stop zigbee service
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @remarks You must free all resources of the zigbee by calling zb_destroy()
- * if zigbee service is no longer needed.
- *
- * @param[in] handle The handle of zigbee
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_NO_DATA No data available
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_create()
- * @see zb_destroy()
- *
- */
-int zb_disable(zigbee_h handle);
-
-/**
- * @platform
- * @internal
- * @brief Resets chip for the zigbee transceiver.
- * @details If the Zigbee transceiver works abnormally, this function do HW reset.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- */
-int zb_hw_reset(zigbee_h handle);
-
-/**
- * @platform
- * @internal
- * @brief Switches channel when an occupied channel is noisy.
- * @details When noisy, do energy scan and active scan to switch operational channel.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] channel target channel number to switch
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see zb_coex_stop()
- *
- */
-int zb_coex_start(zigbee_h handle, unsigned char channel);
-
-/**
- * @platform
- * @internal
- * @brief Stops channel switching operation.
- * @details Halt current operation related to channel switching.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see zb_coex_start()
- *
- */
-int zb_coex_stop(zigbee_h handle);
-
-/**
- * @internal
- * @brief APS Delivery Mode.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_APS_DELIVERY_UNICAST = 0, /**< Unicast delivery */
-       ZB_APS_DELIVERY_INDIRECT = 1, /**< Indirect delivery */
-       ZB_APS_DELIVERY_BROADCAST = 2, /**< Broadcast delivery */
-       ZB_APS_DELIVERY_MULTICAST = 3 /**< Multicast delivery */
-} zb_aps_delivery_mode_e;
-
-/**
- * @internal
- * @brief APS ACK Request.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_APS_NO_ACK_REQUEST = (0 << 6), /**< Not request ACK */
-       ZB_APS_ACK_REQUEST = (1 << 6), /**< Request ACK */
-} zb_aps_ack_request_e;
-
-/**
- * @internal
- * @brief Frame type at ZCL Header.
- *
- * @since_tizen 4.0
- */
-typedef enum {
-       ZB_ZCL_FC_GLOBALLY_USED = (0 << 0), /**< Profile widely used */
-       ZB_APS_FC_CLUSTER_SPECIFIC = (1 << 0), /**< Cluster specific */
-} zb_zcl_fc_type_e;
-
-/**
- * @internal
- * @brief Manufacturer specific or not at ZCL Header.
+ * @brief Devices specified the HA profile.
  *
  * @since_tizen 4.0
  */
 typedef enum {
-       ZB_ZCL_FC_NOT_MANUFACTURER = (0 << 2), /**< Manufacturer code not present */
-       ZB_ZCL_FC_MANUFACTURER = (1 << 2), /**< Manufacturer code present */
-} zb_zcl_fc_manufacturer_present_e;
-
+       /* General devices */
+       ZB_HA_ON_OFF_SWITCH = 0x0000, /**< On/off switch device */
+       ZB_HA_LEVEL_CONTROL_SWITCH = 0x0001, /**< Level control device */
+       ZB_HA_ON_OFF_OUTPUT = 0x0002, /**< On/off output device */
+       ZB_HA_LEVEL_CONTROLLABLE_OUTPUT = 0x0003, /**< Controllable output device */
+       ZB_HA_SCENE_SELECOTOR = 0x0004, /**< Scene selector device */
+       ZB_HA_CONFIGURATION_TOOL = 0x0005, /**< Configuration tool device */
+       ZB_HA_REMOTE_CONTROL = 0x0006, /**< Remote control device */
+       ZB_HA_COMBINED_INTERFACE = 0x0007, /**< Combined interface device */
+       ZB_HA_RANGE_EXTENDER = 0x0008, /**< Range extender device */
+       ZB_HA_MAINS_POWER_OUTLET = 0x0009, /**< Main power outlet device */
+       ZB_HA_DOOR_LOCK = 0x000A, /**< Door lock device */
+       ZB_HA_DOOR_LOCK_CONTROLLER = 0x000B, /**< Door lock controller device */
+       ZB_HA_SIMPLE_SENSOR = 0x000C, /**< Simple sensor device */
+       ZB_HA_CONSUMPTION_AWARENESS_DEVICE = 0x000D, /**< Consumption awareness device */
+       ZB_HA_HOME_GATEWAY = 0x0050, /**< Home gateway device */
+       ZB_HA_SMART_PLUG = 0x0051, /**< Smart plug device */
+       ZB_HA_WHITE_GOODS = 0x0052, /**< White goods device */
+       ZB_HA_METER_INTERFACE = 0x0053, /**< Meter interface device */
+       /* Lighting devices */
+       ZB_HA_ON_OFF_LIGHT = 0x0100, /**< On/off light device */
+       ZB_HA_DIMMABLE_LIGHT = 0x0101, /**< Dimmable light device */
+       ZB_HA_COLOR_DIMMABLE_LIGHT = 0x0102, /**< Color dimmable light device */
+       ZB_HA_ON_OFF_LIGHT_SWITCH = 0x0103, /**< On/off light device */
+       ZB_HA_DIMMER_SWITCH = 0x0104, /**< Dimmer switch device */
+       ZB_HA_COLOR_DIMMER_SWITCH = 0x0105, /**< Color dimmer switch device */
+       ZB_HA_LIGHT_SENSOR = 0x0106, /**< Light sensor device */
+       ZB_HA_OCUPANCY_SENSOR = 0x0107, /**< Ocupancy sensor device */
+       /* Closures devices */
+       ZB_HA_SHADE = 0x0200, /**< Shade device */
+       ZB_HA_SHADE_CONTROLLER = 0x0201, /**< Shade controller device */
+       ZB_HA_WINDOW_COVERING_DEVICE = 0x0202, /**< Window covering device */
+       ZB_HA_WINDOW_COVERING_CONTROLLER = 0x0203, /**< Window covering controller device */
+       /* HVAC devices */
+       ZB_HA_HEATING_COOLLING_UNIT = 0x0300, /**< Heating coolling device */
+       ZB_HA_THERMOSTAT = 0x0301, /**< Thermostat device */
+       ZB_HA_TEMPERATURE_SENSOR = 0x0302, /**< Temperature sensor device */
+       ZB_HA_PUMP = 0x0303, /**< Pump device */
+       ZB_HA_PUMP_CONTROLLER = 0x0304, /**< Pump controller device */
+       ZB_HA_PRESSURE_SENSOR = 0x0305, /**< Pressure sensor device */
+       ZB_HA_FLOW_SENSOR = 0x0306, /**< Flow sensor device */
+       ZB_HA_MINI_SPLIT_AC = 0x0307, /**< Mini split device */
+       /* Intruder Alarms system */
+       ZB_HA_IAS_CONTROL_AND_INDICATING_EQUIPMENT = 0x0400, /**< IAS control and indicating equipment device */
+       ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT = 0x0401, /**< IAS ancillary control device */
+       ZB_HA_IAS_ZONE = 0x0402, /**< IAS zone device */
+       ZB_HA_IAS_WARNIGN_DEVICE = 0x0403, /**< IAS warning device */
+} ha_device_id_e;
 
 /**
  * @internal
@@ -218,23 +98,26 @@ typedef enum {
  *
  * @since_tizen 4.0
  *
- * @param[in] addr16 Network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] profile_id Profile id
- * @param[in] payload_len Length of payload
- * @param[in] payload Payload data
- * @param[in] user_data User data
+ * @remarks The @a payload can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a payload should not be released.
+ *
+ * @param[out] addr16 Network address
+ * @param[out] src_ep source end-point (ex. 1)
+ * @param[out] dst_ep destination end-point (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] profileid Profile id
+ * @param[out] payload_len Length of payload in bytes
+ * @param[out] payload Payload data
+ * @param[out] user_data User data
  *
  * @see zb_aps_send()
  */
-typedef void (*zb_aps_send_rsp)(
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned short cluster_id,
-               unsigned short profile_id,
+typedef void (*zb_aps_send_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_cluster_id clusterid,
+               zb_profile_id profileid,
                unsigned short payload_len,
                unsigned char *payload,
                void *user_data);
@@ -245,23 +128,26 @@ typedef void (*zb_aps_send_rsp)(
  *
  * @since_tizen 4.0
  *
- * @param[in] addr16 Network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] profile_id Profile id
- * @param[in] payload_len Length of payload
- * @param[in] payload Payload data
- * @param[in] user_data User data
+ * @remarks The @a payload can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a payload should not be released.
+ *
+ * @param[out] addr16 Network address
+ * @param[out] src_ep source end-point (ex. 1)
+ * @param[out] dst_ep destination end-point (ex. 1)
+ * @param[out] clusterid ZCL cluster id
+ * @param[out] profileid Profile id
+ * @param[out] payload_len Length of payload in bytes
+ * @param[out] payload Payload data
+ * @param[out] user_data User data
  *
  * @see zb_zcl_send()
  */
-typedef void (*zb_zcl_send_rsp)(
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned short cluster_id,
-               unsigned short profile_id,
+typedef void (*zb_zcl_send_cb)(
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_cluster_id clusterid,
+               zb_profile_id profileid,
                unsigned short payload_len,
                unsigned char *payload,
                void *user_data);
@@ -272,29 +158,31 @@ typedef void (*zb_zcl_send_rsp)(
  *
  * @since_tizen 4.0
  *
- * @param[in] length The length of data
- * @param[in] data Received data
- * @param[in] user_data User data
+ * @remarks The @a data can be used only in the callback. To use outside, make a copy.
+ * @remarks The @a data should not be released.
+ *
+ * @param[out] length The length of data in bytes
+ * @param[out] data Received data
+ * @param[out] user_data User data
  *
  * @see zb_send_to_local()
  */
-typedef void (*zb_send_to_local_rsp)(
+typedef void (*zb_send_to_local_cb)(
                unsigned short length,
                unsigned char *data,
                void *user_data);
 
 /**
- * @platform
  * @internal
  * @brief Sends custom APS data.
  *
  * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
  *
  * @param[in] handle Handle of node descriptor
  * @param[in] addr16 Network address
- * @param[in] aps_frame_ctl APS Frame control bits. \n
+ * @param[in] aps_fc APS Frame control bits. \n
  *            - Delivery Mode : \n
  *            #ZB_APS_DELIVERY_UNICAST \n
  *            #ZB_APS_DELIVERY_INDIRECT \n
@@ -305,9 +193,9 @@ typedef void (*zb_send_to_local_rsp)(
  *            #ZB_APS_ACK_REQUEST
  * @param[in] src_ep source end-point (ex. 1)
  * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] profile_id Profile id
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] profileid Profile id
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
  *            Only OR operation is allowed in ZCL header \n
  *            - Frame Type : \n
  *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
@@ -318,10 +206,10 @@ typedef void (*zb_send_to_local_rsp)(
  *            #ZB_ZCL_SERVER_TO_CLIENT \n
  *            - Disable Default Response : \n
  *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED
  * @param[in] mfg_code Manufacturer Code
  * @param[in] cmd_id Command ID
- * @param[in] payload_len Length of payload
+ * @param[in] payload_len Length of payload in bytes
  * @param[in] payload Payload data
  * @param[in] cb Callback function to get response.
  * @param[in] user_data User data to be received from callback function.
@@ -332,39 +220,38 @@ typedef void (*zb_send_to_local_rsp)(
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  *
- * @see zb_aps_send_rsp()
+ * @see zb_aps_send_cb()
  */
 int zb_aps_send(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char aps_frame_ctl,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned short cluster_id,
-               unsigned short profile_id,
-               unsigned char zcl_frame_ctl,
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_aps_frame_ctl aps_fc,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_cluster_id clusterid,
+               zb_profile_id profileid,
+               zb_zcl_frame_ctl zcl_fc,
                unsigned short mfg_code,
-               unsigned char cmd_id,
+               zb_command_id cmd_id,
                unsigned short payload_len,
                unsigned char *payload,
-               zb_aps_send_rsp cb,
+               zb_aps_send_cb cb,
                void *user_data);
 
 /**
- * @platform
  * @internal
  * @brief Sends custom ZCL data.
  *
  * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
  *
  * @param[in] handle Handle of node descriptor
  * @param[in] addr16 Network address
  * @param[in] src_ep source end-point (ex. 1)
  * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] cluster_id ZCL cluster id
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
+ * @param[in] clusterid ZCL cluster id
+ * @param[in] zcl_fc frame control bits (default 0x00). \n
  *            Only OR operation is allowed in ZCL header \n
  *            - Frame Type : \n
  *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
@@ -375,9 +262,9 @@ int zb_aps_send(
  *            #ZB_ZCL_SERVER_TO_CLIENT \n
  *            - Disable Default Response : \n
  *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE
+ *            #ZB_ZCL_DEFAULT_RESPONSE_DISABLED
  * @param[in] cmd APL Command
- * @param[in] payload_len Length of payload
+ * @param[in] payload_len Length of payload in bytes
  * @param[in] payload Payload data
  * @param[in] cb Callback function to get response.
  * @param[in] user_data User data to be received from callback function.
@@ -388,31 +275,30 @@ int zb_aps_send(
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  *
- * @see zb_zcl_send_rsp()
+ * @see zb_zcl_send_cb()
  */
 int zb_zcl_send(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned short cluster_id,
-               unsigned char zcl_frame_ctl,
-               unsigned char cmd,
+               zb_zigbee_h handle,
+               zb_nwk_addr addr16,
+               zb_end_point src_ep,
+               zb_end_point dst_ep,
+               zb_cluster_id clusterid,
+               zb_zcl_frame_ctl zcl_fc,
+               zb_command_id cmd,
                unsigned short payload_len,
                unsigned char *payload,
-               zb_zcl_send_rsp cb,
+               zb_zcl_send_cb cb,
                void *user_data);
 
 /**
- * @platform
  * @internal
  * @brief Transmits data that needs to be processed locally.
  *
  * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
  *
- * @param[in] handle handle of node descriptor
+ * @param[in] handle The handle of node descriptor
  * @param[in] length The length of data
  * @param[in] data Data to send
  * @param[in] cb Callback function to get response.
@@ -424,1156 +310,19 @@ int zb_zcl_send(
  * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
  * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
  *
- * @see zb_send_to_local_rsp()
+ * @see zb_send_to_local_cb()
  */
 int zb_send_to_local(
-               zigbee_h handle,
+               zb_zigbee_h handle,
                unsigned short length,
                unsigned char *data,
-               zb_send_to_local_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_MODULE_ZDO_MODULE
- * @brief Zigbee configuration API.
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @platform
- * @internal
- * @brief Sets start-up attribute set.
- * @details In order to ensure interoperability, all ZigBee HA devices should implement
- * compatible Startup Attribute Sets (SAS). This does not mean that set must be
- * modifiable through a commissioning cluster, but that the device must internally
- * implement these stack settings to ensure compatibility and consistent user
- * experience. The start up set parameters described by the Commissioning cluster
- * provide a good basis to specify a HA startup set.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] pan_id Short address
- * @param[in] epan_id Usually 00-50-C2-77-10-00-00-00 is the global commissioning EPID
- * @param[in] channel_mask Channel mask
- * @param[in] start_control Start control
- * @param[in] trust_center_addr Trust center addr
- * @param[in] master_key Master key
- * @param[in] master_key_len Master key length
- * @param[in] network_key Network key
- * @param[in] network_key_len Network key length
- * @param[in] default_link_key_join Default link key join
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- */
-int zb_zdo_set_compatible_startup_parameters(
-               zigbee_h handle,
-               nwk_addr pan_id,
-               ieee_addr epan_id,
-               unsigned int channel_mask,
-               unsigned char start_control,
-               ieee_addr trust_center_addr,
-               const unsigned char *master_key,
-               unsigned char master_key_len,
-               const unsigned char *network_key,
-               unsigned char network_key_len,
-               unsigned char default_link_key_join);
-
-/**
- * @}
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZCL_GLOBAL_COMMAND_MODULE
- * @brief Zigbee global commands.
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @platform
- * @internal
- * @brief Sends 'read attributes structured' command
- * details The read attributes command is generated when a device wishes to determine the
- * values of one or more attributes, or elements of attributes, located on another
- * device. Each attribute identifier field shall contain the identifier of the attribute
- * to be read.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records The combination of attribute identifier and selector .
- * @param[in] records_len The maximum number of read_structured_attribute_record
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_read_attr_structured(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               read_structured_attr_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'write attributes structured' command.
- * @details When writing an element to an array or structure, the Indicator subfield indicates
- * the number of index fields that follow it. This number is limited to the range 0 - 15
- * (i.e. the upper 4 bits of the Indicator field are set to zero). It may be further limited
- * by any relevant profile or application.
- * If the Indicator subfield is 0, there are no index fields, and the whole of the
- * attribute value is to be written.
- * If this subfield is 1 or greater, the index fields indicate which element is to be
- * written, nested to a depth of m. For example, if the attribute is an array of arrays
- * (or structures), then if m = 2, index 1 = 5 and index 2 = 3, the third element of the
- * fifth element of the attribute will be written.
- * Note that elements are numbered from 1 upwards for both arrays and structures.
- * The zeroth element of an array or structure has type 16 bit unsigned integer, and
- * holds the number of elements in the array or structure. The zeroth element of an
- * array may optionally be written (this is application dependent) and has the effect
- * of changing the number of elements of the array. If the number is reduced, the
- * array is truncated. If the number is increased, the content of new elements is
- * application dependent.
- * The zeroth element of a structure may not be written to. Writing to an element
- * with an index greater than the number of elements in an array or structure is
- * always an error.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 target network address
- * @param[in] src_ep source end-point (ex. 1)
- * @param[in] dst_ep destination end-point (ex. 1)
- * @param[in] zcl_frame_ctl frame control bits (default 0x00). \n
- *            Only OR operation is allowed in ZCL header \n
- *            - Frame Type : \n
- *            #ZB_ZCL_FC_GLOBALLY_USED (default) \n
- *            #ZB_APS_FC_CLUSTER_SPECIFIC \n
- *            - Manufacturer Specific : \n
- *            - Direction : \n
- *            #ZB_ZCL_CLIENT_TO_SERVER (default) \n
- *            #ZB_ZCL_SERVER_TO_CLIENT \n
- *            - Disable Default Response : \n
- *            #ZB_ZCL_LEAVE_WELL_ALONE (default) \n
- *            #ZB_ZCL_DISABLE_DEFAULT_RESPONSE \n
- * @param[in] cluster_id ZCL cluster id
- * @param[in] records The combination of attribute identifier and selector .
- * @param[in] records_len The maximum number of write_structured_attribute_record
- * @param[in] cb Response callback function
- * @param[in] user_data User data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ENDPOINT Invalid endpoint. 0 is reserved for ZDP
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zcl_global_rsp()
- */
-int zb_zcl_global_write_attr_structured(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char src_ep,
-               unsigned char dst_ep,
-               unsigned char zcl_frame_ctl,
-               unsigned short cluster_id,
-               write_attr_structured_record_h *records,
-               int records_len,
-               zb_zcl_global_rsp cb,
-               void *user_data);
-
-
-#ifdef ZB_SUPPORT_PRIORITY_5
-/**
- * @platform
- * @internal
- * @brief Called after 'direct join management request' command.
- * @details The Mgmt_Direct_Join_rsp is generated in response to a Mgmt_Direct_Join_req.
- * If this management command is not supported, a status of NOT_SUPPORTED
- * shall be returned.\n\n Otherwise, the Remote Device shall implement the following
- * processing.\n\n
- * Upon receipt and after support for the Mgmt_Direct_Join_req has been verified,
- * the Remote Device shall execute the NLME-DIRECT-JOIN.request to directly
- * associate the DeviceAddress contained in the Mgmt_Direct_Join_req to the
- * network.\n\n The Mgmt_Direct_Join_rsp shall contain the same status that was
- * contained in the NLME-DIRECT-JOIN.confirm primitive.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_NOT_AUTHORIZED \n
- *                    returned value from NLME-DIRECT-JOIN.confirm primitive \n
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_direct_join_rsp()
- */
-typedef void (*zb_zdo_mgmt_direct_join_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'direct join device management request' command.
- * @details The Mgmt_Direct_Join_req is generated from a Local Device requesting that a
- * Remote Device permit a device designated by DeviceAddress to join the network
- * directly.\n\n The Mgmt_Direct_Join_req is generated by a management application
- * which directs the request to a Remote Device where the NLME-DIRECT-
- * JOIN.request is to be executed using the parameter supplied by
- * Mgmt_Direct_Join_req.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 The IEEE address for designated device to leave
- * @param[in] capability See zb_zdo_mac_capability_field_e in zb_zdo.h header file
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_direct_join_rsp()
- */
-int zb_zdo_mgmt_direct_join_req(
-               zigbee_h handle,
-               ieee_addr addr64,
-               unsigned char capability,
-               zb_zdo_mgmt_direct_join_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'cache management request' command.
- * @details The Mgmt_Cache_rsp is generated in response to an Mgmt_Cache_req. If this
- * management command is not supported, or the Remote Device is not a Primary
- * Cache Device, a status of NOT_SUPPORTED shall be returned and all parameter
- * fields after the Status field shall be omitted. Otherwise, the Remote Device shall
- * implement the following processing.\n\n Upon receipt of the Mgmt_Cache_req and
- * after support for the Mgmt_Cache_req has been verified, the Remote Device shall
- * access an internally maintained list of registered ZigBee End Devices utilizing the
- * discovery cache on this Primary Discovery Cache device.\n\n The entries reported
- * shall be those, starting with StartIndex and including whole DiscoveryCacheList
- * records (see Table 2.139) until the limit on MSDU size, i.e., aMaxMACFrameSize
- * (see [B1]), is reached.\n\n Within the Mgmt_Cache_rsp command, the
- * DiscoveryCacheListEntries field shall represent the total number of registered
- * entries in the Remote Device. The parameter DiscoveryCacheListCount shall be
- * the number of entries reported in the DiscoveryCacheList field of the
- * Mgmt_Cache_rsp command.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] discovery_cache_entries discovery cache entries
- * @param[in] start_idx data User data
- * @param[in] discovery_cache_list_count The list shall contain the number of elements
- *                                        given by the DiscoveryCacheListCount parameter.
- * @param[in] discover_cache_list A list of descriptors.
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_cache_req()
- */
-typedef void (*zb_zdo_mgmt_cache_rsp)(
-               unsigned char status,
-               unsigned char discovery_cache_entries,
-               unsigned char start_idx,
-               unsigned char discovery_cache_list_count,
-               const zb_zdo_discovery_cache_h *discover_cache_list,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'cache management request' command.
- * @details The Mgmt_Cache_req is provided to enable ZigBee devices on the network to
- * retrieve a list of ZigBee End Devices registered with a Primary Discovery Cache
- * device.\n\n The destination addressing on this primitive shall be unicast.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 destination network address
- * @param[in] start_idx Starring index for the requested elements of the discover cache
- *                      list
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_cache_rsp()
- */
-int zb_zdo_mgmt_cache_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char start_idx,
-               zb_zdo_mgmt_cache_rsp cb,
+               zb_send_to_local_cb cb,
                void *user_data);
 
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
 /**
  * @}
  */
 
-#ifdef ZB_SUPPORT_PRIORITY_5
-/**
- * @internal
- * @brief Called after 'extended simple descriptor request' command.
- * @details The Extended_Simple_Desc_rsp is generated by a remote device in response to an
- * Extended_Simple_Desc_req directed to the remote device. This command shall
- * be unicast to the originator of the Extended_Simple_Desc_req command.
- * The remote device shall generate the Extended_Simple_Desc_rsp command using
- * the format illustrated in param list. The NWKAddrOfInterest field shall match
- * that specified in the original Extended_Simple_Desc_req command. If the
- * endpoint field specified in the original Extended_Simple_Desc_req command
- * does not fall within the correct range specified in Table 2.49, the remote device
- * shall set the Status field to INVALID_EP, set the Endpoint and StartIndex fields to
- * their respective values supplied in the request, and not include the AppClusterList
- * field.\n\n
- * If the NWKAddrOfInterest field matches the network address of the remote
- * device, it shall determine whether the endpoint field specifies the identifier of an
- * active endpoint on the device.\n\n If the endpoint field corresponds to an active
- * endpoint, the remote device shall set the Status field to SUCCESS, set the
- * AppClusterList field to the sequence of octets from the concatenated AppInput
- * ClusterList and AppOutputClusterList from the Simple Descriptor (Tables 2.39),
- * and supply that field as AppClusterList in the response. Note that dependent on
- * the value of StartIndex in the request, the results in AppClusterList may be empty
- * (for example, the StartIndex begins after the sequence of octets given by the
- * concatenation of AppInputClusterList and AppOutputClusterList).\n\n If the endpoint
- * field does not correspond to an active endpoint, the remote device shall set the
- * Status field to NOT_ACTIVE, set the StartIndex field to the value supplied in the
- * request, and not include the AppClusterList field.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INVALID_EP \n
- *                    #ZB_ZDP_NOT_ACTIVE \n
- *                    #ZB_ZDP_DEVICE_NOT_FOUND \n
- *                    #ZB_ZDP_INV_REQUESTTYPE \n
- *                    #ZB_ZDP_NO_DESCRIPTOR
- * @param[in] addr16 Network address for the request
- * @param[in] ep The endpoint on the destination
- * @param[in] app_input_cluster_count The total count of application input cluster in
- *                                    the simple descriptor for this endpoint
- * @param[in] app_output_cluster_count The total count of application output cluster in
- *                                     the simple descriptor for this endpoint
- * @param[in] start_idx Starting index within the AppClusterList of the response
- *                       represented by an ordered list of the Application Input
- *                       Cluster List and Application Output Cluster List from the
- *                       Simple Descriptor for this endpoint.
- * @param[in] app_cluster_list A concatenated, ordered list of the AppInputClusterList
- *                              and AppOutputClusterList, beginning with StartIndex,
- *                              from the Simple Descriptor.
- *                              This field shall only be included in the frame if the
- *                              status field is equal to ZB_ZDP_SUCCESS.
- * @param[in] user_data user data
- *
- * @see zb_zdo_extended_simple_desc_req()
- */
-typedef void (*zb_zdo_extended_simple_desc_rsp)(
-               unsigned char status,
-               nwk_addr addr16,
-               unsigned char ep,
-               unsigned char app_input_cluster_count,
-               unsigned char app_output_cluster_count,
-               unsigned char start_idx,
-               const unsigned char *app_cluster_list,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'extended simple descriptor request' command.
- * @details The Extended_Active_EP_req command is generated from a local device wishing
- * to acquire the list of endpoints on a remote device with simple descriptors. This
- * command shall be unicast either to the remote device itself or to an alternative
- * device that contains the discovery information of the remote device.n\n The
- * Extended_Active_EP_req is used for devices which support more active
- * endpoints than can be returned by a single Active_EP_req.
- * The local device shall generate the Extended_Active_EP_req command using the
- * format illustrated in Table 2.66. in Zigbee Specification.\n\n
- * The NWKAddrOfInterest field shall contain the
- * network address of the remote device for which the active endpoint list is
- * required.\n\n The StartIndex field shall be set in the request to enable retrieval of
- * lists of active endpoints from devices whose list exceeds the size of a single ASDU and
- * where fragmentation is not supported.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] start_idx Starting index within the active endpoint list in the response
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_extended_simple_desc_rsp()
- */
-int zb_zdo_extended_simple_desc_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               unsigned char start_idx,
-               zb_zdo_extended_simple_desc_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_MODULE
- * @defgroup CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_MODULE Service Discovery
- *
- * @brief Zigbee provides API for Service Discover.
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_HEADER Header
- *  \#include <zigbee.h>
- *
- * @section CAPI_NETWORK_ZIGBEE_ZDO_SERVICE_DISCOVERY_OVERVIEW Overview
- * This function set consists of ZDP service discovery API
- *
- * @{
- */
-
-/**
- * @internal
- * @brief Called after receiving 'find system server request'.
- * @details The System_Server_Discovery_rsp is generated from Remote Devices on receipt
- * of a System_Server_Discovery_req primitive if the parameter matches the Server
- * Mask field in its node descriptor. If there is no match, the
- * System_Server_Discovery_req shall be ignored and no response given. Matching
- * is performed by masking the ServerMask parameter of the
- * System_Server_Discovery_req with the Server Mask field in the node descriptor.
- * This command shall be unicast to the device which sent
- * System_Server_Discovery_req with Acknowledge request set in TxOptions. The
- * parameter ServerMask contains the bits in the parameter of the request which
- * match the server mask in the node descriptor.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    returned value from NLME-GET.confirm primitive \n
- * @param[in] server_mask Server Mask Bit Assignment
- * @param[in] user_data user data
- *
- * @see zb_zdo_system_server_discover_req()
- */
-typedef void (*zb_zdo_system_server_discover_rsp)(
-               unsigned char status,
-               unsigned short server_mask,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'find system server request' command.
- * @details The System_Server_Discovery_req is generated from a Local Device wishing to
- * discover the location of a particular system server or servers as indicated by the
- * ServerMask parameter.\n\n The destination addressing on this request is 'broadcast to
- * all devices for which macRxOnWhenIdle = TRUE.'
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] server_mask Server Mask Bit Assignment
- * @param[in] cb The callback function
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_system_server_discover_rsp()
- */
-int zb_zdo_system_server_discover_req(
-               zigbee_h handle,
-               unsigned short server_mask,
-               zb_zdo_system_server_discover_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'find node cache request' command.
- * @details The Find_node_cache_rsp is provided to notify a Local Device of the successful
- * iscovery of the Primary Discovery Cache device for the given NWKAddr and
- * EEEAddr fields supplied in the request, or to signify that the device of interest is
- * apable of responding to discovery requests.\n\n The Find_node_cache_rsp shall be
- * enerated only by Primary Discovery Cache devices holding discovery
- * nformation for the NWKAddr and IEEEAddr in the request or the device of
- * nterest itself and all other Remote Devices shall not supply a response.
- *
- * @since_tizen 4.0
- *
- * @param[in] cache_nwk_addr NWK Address for the Primary Discovery Cache device holding
- *                            the discovery information.
- * @param[in] addr16 Server NWK Address for the device of interest.
- * @param[in] addr64 Server IEEE Address for the device of interest.
- * @param[in] user_data user data
- *
- * @see zb_zdo_find_node_cache_req()
- */
-typedef void (*zb_zdo_find_node_cache_rsp)(
-               nwk_addr cache_nwk_addr,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'find Node cache store request' command.
- * @details The Find_node_cache_req is provided to enable ZigBee devices on the network to
- * broadcast to all devices for which macRxOnWhenIdle = TRUE a request to find a
- * device on the network that holds discovery information for the device of interest,
- * as specified in the request parameters.\n\n The effect of a successful
- * Find_node_cache_req is to have the Primary Discovery Cache device, holding
- * discovery information for the device of interest, unicast a Find_node_cache_rsp
- * back to the Local Device. Note that, like the NWK_addr_req, only the device
- * meeting this criteria shall respond to the request generated by
- * Find_node_cache_req.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_find_node_cache_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_find_node_cache_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'find discovery cache request' command.
- * @details The Find_node_cache_rsp is provided to notify a Local Device of the successful
- * discovery of the Primary Discovery Cache device for the given NWKAddr and
- * IEEEAddr fields supplied in the request, or to signify that the device of interest is
- * capable of responding to discovery requests.\n\n The Find_node_cache_rsp shall be
- * generated only by Primary Discovery Cache devices holding discovery
- * information for the NWKAddr and IEEEAddr in the request or the device of
- * interest itself and all other Remote Devices shall not supply a response.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    returned value from NLME-GET.confirm primitive \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_discovery_cache_req()
- */
-typedef void (*zb_zdo_discovery_cache_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'discovery cache request' command.
- * @details The Discovery_Cache_req is provided to enable devices on the network to locate
- * a Primary Discovery Cache device on the network.\n\n The destination addressing on
- * this primitive shall be broadcast to all devices for which macRxOnWhenIdle =
- * TRUE.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_discovery_cache_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_discovery_cache_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'find discovery store request' command.
- * @details The Discovery_store_rsp is provided to notify a Local Device of the request status
- * from a Primary Discovery Cache device. Included in the response is a status code
- * to notify the Local Device whether the request is successful (the Primary Cache
- * Device has space to store the discovery cache data for the Local Device), whether
- * the request is unsupported (meaning the Remote Device is not a Primary
- * Discovery Cache device), or insufficient space exists.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_discovery_store_req()
- */
-typedef void (*zb_zdo_discovery_store_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'discovery store request' command.
- * @details The Discovery_store_req is provided to enable ZigBee end devices on the
- * network to request storage of their discovery cache information on a Primary
- * Discovery Cache device.\n\n Included in the request is the amount of storage space
- * the Local Device requires.\n\n
- * The destination addressing on this request is unicast.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] node_desc_size Size of node description structure
- * @param[in] power_desc_size Size of power description structure
- * @param[in] active_ep_size Number of active EP
- * @param[in] simple_desc_count Number of simple description structure
- * @param[in] simple_desc_list Pointer of simple description structure size
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_discovery_store_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               unsigned char node_desc_size,
-               unsigned char power_desc_size,
-               unsigned char active_ep_size,
-               unsigned char simple_desc_count,
-               unsigned char *simple_desc_list,
-               zb_zdo_discovery_store_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'node description store request' command.
- * @details The Node_store_rsp is provided to notify a Local Device of the request status
- * from a Primary Discovery Cache device.\n\n Included in the response is a status code
- * to notify the Local Device whether the request is successful (the Primary Cache
- * Device has space to store the discovery cache data for the Local Device), whether
- * the request is not supported (meaning the Remote Device is not a Primary
- * Discovery Cache device), or insufficient space exists.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_PERMITED \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_node_desc_store_req()
- */
-typedef void (*zb_zdo_node_desc_store_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'node description store request' command.
- * @details The Node_Desc_store_req is provided to enable ZigBee end devices on the
- * network to request storage of their Node Descriptor on a Primary Discovery
- * Cache device which has previously received a SUCCESS status from a
- * Discovery_store_req to the same Primary Discovery Cache device.\n\n Included in
- * this request is the Node Descriptor the Local Device wishes to cache.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] nodedsc Pointer of node description structure
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_node_desc_store_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_node_descriptor_h nodedsc,
-               zb_zdo_node_desc_store_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'power description store request' command.
- * @details The Power_Desc_store_rsp is provided to notify a Local Device of the request
- * status from a Primary Discovery Cache device. Included in the response is a status
- * code to notify the Local Device whether the request is successful (the Primary
- * Cache Device has space to store the discovery cache data for the Local Device),
- * whether the request is not supported (meaning the Remote Device is not a Primary
- * Discovery Cache device), or insufficient space exists.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS  \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_PERMITED \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_power_desc_store_req()
- */
-typedef void (*zb_zdo_power_desc_store_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'power description store request' command.
- * @details The Power_Desc_store_req is provided to enable ZigBee end devices on the
- * network to request storage of their Power Descriptor on a Primary Discovery
- * Cache device which has previously received a SUCCESS status from a
- * Discovery_store_req to the same Primary Discovery Cache device. Included in
- * this request is the Power Descriptor the Local Device wishes to cache.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] powerdsc Pointer of power description structure
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_power_desc_store_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_node_power_descriptor_h powerdsc,
-               zb_zdo_power_desc_store_rsp cb,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Called after 'active end-point store request' command.
- * @details The Active_EP_store_rsp is provided to notify a Local Device of the request
- * status from a Primary Discovery Cache device.\n\n Included in the response is a status
- * code to notify the Local Device whether the request is successful (the Primary
- * Cache Device has space to store the discovery cache data for the Local Device),
- * the request is not supported (meaning the Remote Device is not a Primary
- * Discovery Cache device), or insufficient space exists.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_PERMITED \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_active_ep_store_req()
- */
-typedef void (*zb_zdo_active_ep_store_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'active end-point store request' command.
- * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
- * network to request storage of their list of Simple Descriptors on a Primary
- * Discovery Cache device which has previously received a SUCCESS status from a
- * Discovery_store_req to the same Primary Discovery Cache device. Note that each
- * Simple Descriptor for every active endpoint on the Local Device must be
- * individually uploaded to the Primary Discovery Cache device via this command
- * to enable cached discovery.\n\n Included in this request is the length of the Simple
- * Descriptor the Local Device wishes to cache and the Simple Descriptor itself.\n\n The
- * endpoint is a field within the Simple Descriptor and is accessed by the Remote
- * Device to manage the discovery cache information for the Local Device.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] active_ep_count Number of End-point List
- * @param[in] ep_list End-point list
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_active_ep_store_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               unsigned char active_ep_count,
-               unsigned char *ep_list,
-               zb_zdo_active_ep_store_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'simple description store request' command.
- * @details The Simple_Desc_store_rsp is provided to notify a Local Device of the request
- * status from a Primary Discovery Cache device.\n\n Included in the response is a status
- * code to notify the Local Device whether the request is successful (the Primary
- * Cache Device has space to store the discovery cache data for the Local Device),
- * the request is not supported (meaning the Remote Device is not a Primary
- * Discovery Cache device), or insufficient space exists.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_PERMITED \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_simple_desc_store_req()
- */
-typedef void (*zb_zdo_simple_desc_store_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'simple description store request' command.
- * @details The Simple_desc_store_req is provided to enable ZigBee end devices on the
- * network to request storage of their list of Simple Descriptors on a Primary
- * Discovery Cache device which has previously received a SUCCESS status from a
- * Discovery_store_req to the same Primary Discovery Cache device.\n\n Note that each
- * Simple Descriptor for every active endpoint on the Local Device must be
- * individually uploaded to the Primary Discovery Cache device via this command
- * to enable cached discovery.\n\n Included in this request is the length of the Simple
- * Descriptor the Local Device wishes to cache and the Simple Descriptor itself. The
- * endpoint is a field within the Simple Descriptor and is accessed by the Remote
- * Device to manage the discovery cache information for the Local Device.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] simpledsc Pointer of simple description structure
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_simple_desc_store_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_simple_desc_h simpledsc,
-               zb_zdo_simple_desc_store_rsp cb,
-               void *user_data);
-
-/**
- * @internal
- * @brief Called after 'simple description remove request' command.
- * @details The Remove_node_cache_rsp is provided to notify a Local Device of the request
- * status from a Primary Discovery Cache device.\n\n Included in the response is a status
- * code to notify the Local Device whether the request is successful (the Primary
- * Cache Device has removed the discovery cache data for the indicated device of
- * interest), or the request is not supported (meaning the Remote Device is not a
- * Primary Discovery Cache device).
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_INSUFFICIENT_SPACE \n
- *                    #ZB_ZDP_NOT_PERMITED \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- * @param[in] user_data user data
- *
- * @see zb_zdo_remove_node_cache_req()
- */
-typedef void (*zb_zdo_remove_node_cache_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'remove node cache request' command.
- * @details The Remove_node_cache_req is provided to enable ZigBee devices on the
- * network to request removal of discovery cache information for a specified ZigBee
- * end device from a Primary Discovery Cache device.\n\n The effect of a successful
- * Remove_node_cache_req is to undo a previously successful Discovery_store_req
- * and additionally remove any cache information stored on behalf of the specified
- * ZigBee end device on the Primary Discovery Cache device.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr16 Network address for device of interest
- * @param[in] addr64 IEEE address for device of interest
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_remove_node_cache_rsp()
- */
-int zb_zdo_remove_node_cache_req(
-               zigbee_h handle,
-               nwk_addr addr16,
-               ieee_addr addr64,
-               zb_zdo_remove_node_cache_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-/**
- * @ingroup CAPI_NETWORK_ZIGBEE_ZDO_NETWORK_MANAGER_MODULE
- * @brief Zigbee provides API for Network Management.
- * @since_tizen 4.0
- *
- * @{
- */
-
-/**
- * @internal
- * @brief Called after 'direct join management request' command.
- * @details The Mgmt_Direct_Join_rsp is generated in response to a Mgmt_Direct_Join_req.
- * If this management command is not supported, a status of NOT_SUPPORTED
- * shall be returned.\n\n Otherwise, the Remote Device shall implement the following
- * processing.\n\n
- * Upon receipt and after support for the Mgmt_Direct_Join_req has been verified,
- * the Remote Device shall execute the NLME-DIRECT-JOIN.request to directly
- * associate the DeviceAddress contained in the Mgmt_Direct_Join_req to the
- * network.\n\n The Mgmt_Direct_Join_rsp shall contain the same status that was
- * contained in the NLME-DIRECT-JOIN.confirm primitive.
- *
- * @since_tizen 4.0
- *
- * @param[in] status #ZB_ZDP_SUCCESS \n
- *                    #ZB_ZDP_NOT_SUPPORTED \n
- *                    #ZB_ZDP_NOT_AUTHORIZED \n
- *                    returned value from NLME-DIRECT-JOIN.confirm primitive \n
- * @param[in] user_data User data
- *
- * @see zb_zdo_mgmt_direct_join_rsp()
- */
-typedef void (*zb_zdo_mgmt_direct_join_rsp)(
-               unsigned char status,
-               void *user_data);
-
-/**
- * @platform
- * @internal
- * @brief Sends 'direct join device management request' command.
- * @details The Mgmt_Direct_Join_req is generated from a Local Device requesting that a
- * Remote Device permit a device designated by DeviceAddress to join the network
- * directly.\n\n The Mgmt_Direct_Join_req is generated by a management application
- * which directs the request to a Remote Device where the NLME-DIRECT-
- * JOIN.request is to be executed using the parameter supplied by
- * Mgmt_Direct_Join_req.
- *
- * @since_tizen 4.0
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/zigbee.admin
- *
- * @param[in] handle The handle of zigbee
- * @param[in] addr64 The IEEE address for designated device to leave
- * @param[in] capability See zb_zdo_mac_capability_field_e in zb_zdo.h header file
- * @param[in] cb Response callback
- * @param[in] user_data user data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #ZIGBEE_ERROR_NONE Successful
- * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #ZIGBEE_ERROR_INVALID_ADDRESS Invalid address
- * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
- * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
- * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
- *
- * @see zb_zdo_mgmt_direct_join_rsp()
- */
-int zb_zdo_mgmt_direct_join_req(
-               zigbee_h handle,
-               ieee_addr addr64,
-               unsigned char capability,
-               zb_zdo_mgmt_direct_join_rsp cb,
-               void *user_data);
-
-/**
- * @}
- */
-
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
-//////////////////////////////////////////////////////////////////////////////////////////
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/zigbee_private.h b/include/zigbee_private.h
new file mode 100644 (file)
index 0000000..07dcd2e
--- /dev/null
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CAPI_NETWORK_ZIGBEE_PRIVATE_H__
+#define __TIZEN_CAPI_NETWORK_ZIGBEE_PRIVATE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <tizen_type.h>
+
+#include <zigbee.h>
+#include <zigbee-zdo_internal.h>
+#include <zigbee-zcl_internal.h>
+
+/**
+ * @file zigbee_private.h
+ */
+
+/**
+ * @ingroup CAPI_NETWORK_ZIGBEE_MODULE
+ * @brief The events for zb_event_cb().
+ *
+ * @since_tizen 4.0
+ */
+typedef enum {
+       ZB_ZDP_UPDATED_NETWORK_NOTIFICATION_EVENT = 0x06, /**< A device updated its network information */
+       ZB_ZDP_BIND_RSP_EVENT = 0x07, /**< Binding end-points result */
+       ZB_ZDP_UNBIND_RSP_EVENT = 0x08, /**< Unbinding end-points result */
+       ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT = 0x11, /**< This event is took place when report attribute command is received */
+       ZB_ZCL_ALARM_EVENT = 0x20, /**< Events related to alarm cluster */
+       ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_ATTRIBUTE_REPORT_EVENT = 0x30, /**< This event will be received after level control cluster attribute changed */
+       ZB_ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_REPORT_EVENT = 0x31, /**< This event will be received after color control cluster X attribute changed */
+       ZB_ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_REPORT_EVENT = 0x32, /**< This event will be received after color control cluster Y attribute changed */
+       ZB_ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_REPORT_EVENT = 0x33, /**< This event will be received after color control cluster hue attribute changed */
+       ZB_ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_REPORT_EVENT = 0x34, /**< This event will be received after color control cluster saturation attribute changed */
+       ZB_ZCL_COLOR_CONTROL_CURRENT_TEMPERATURE_ATTRIBUTE_REPORT_EVENT = 0x35, /**< This event will be received after color control cluster temperature attribute changed */
+       ZB_ZCL_DOOR_LOCK_OPERATIONAL_NOTIFICATION_EVENT = 0x40, /**< This event is received when door-lock operation has been finished */
+       ZB_ZCL_DOOR_LOCK_PROGRAMING_NOTIFICATION_EVENT = 0x41, /**< This event is received when door-lock programming has been changed */
+       ZB_ZCL_SIMPLE_METERING_REMOVE_MIRROR_EVENT = 0x51, /**< This event is used to request the ESP to remove its mirror of Metering */
+       ZB_ZCL_SIMPLE_METERING_REQUEST_MIRROR_EVENT = 0x52, /**< This event is used to request the ESP to mirror Metering Device data */
+} zb_event_ext_e;
+
+/**
+ * @brief Called after getting end-device information.
+ *
+ * @since_tizen 4.0
+ *
+ * @remarks The @a child should not be released.
+ * The @a child can be used only in the callback. To use outside, make a copy
+ *
+ * @param[out] index nth child
+ * @param[out] child handle of a end-device
+ * @param[out] user_data user data
+ *
+ * @return #ZIGBEE_FUNC_CONTINUE to continue iteration, otherwise #ZIGBEE_FUNC_STOP to stop iteration.
+ * @retval #ZIGBEE_FUNC_CONTINUE Continue iteration
+ * @retval #ZIGBEE_FUNC_STOP Stop iteration
+ *
+ * @pre The callback must be registered when using zb_devices_info_foreach_end_device()
+ *
+ * @see zb_foreach_end_dev_info()
+ */
+typedef bool (*zb_end_dev_info_cb)(int index, zb_end_dev_info_h child, void *user_data);
+
+/**
+ * @brief Calls a function for each children end-point of parent.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/zigbee
+ *
+ * @param[in] list handle of end-devices parent
+ * @param[in] cb zb_end_dev_info_cb()
+ * @param[in] user_data user data
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @see zb_end_dev_info_cb()
+ */
+int zb_foreach_end_dev_info(zb_end_dev_info_h *list,
+               zb_end_dev_info_cb cb, void *user_data);
+
+
+/**
+ * @brief Gets the records of the received global command.
+ * @since_tizen 4.0
+ *
+ * @remarks The returned records are managed by the platform and will be released when
+ * caller's stack is released
+ * @remarks The returned records is a variable or a set of variables that represent the
+ * functional state of the cluster. The records are characterized by a name, data type,
+ * range, access type (read/write), and report ability. Attributes are defined to be
+ * mandatory/ optional per cluster. (see more #zb_zcl_global_rec_data_s.)
+ *
+ * @param[in] ev Event data structure
+ * @param[out] records Set of attributes
+ * @param[out] count The number of attributes
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_global_attr_report_records(zb_event_data_h ev,
+       zb_zcl_attr_report_h* records, unsigned char *count);
+
+/**
+ * @brief Gets the alarm count.
+ * @since_tizen 4.0
+ *
+ * @param[in] ev Event data structure
+ * @param[out] count Alarm count
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_ev_get_alarm_count(zb_event_data_h ev, unsigned short* count);
+
+/**
+ * @platform
+ * @internal
+ * @brief Resets chip for the zigbee transceiver.
+ * @details If the Zigbee transceiver works abnormally, this function do HW reset.
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @param[in] handle The handle of zigbee
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ *
+ */
+int zb_hw_reset(zb_zigbee_h handle);
+
+/**
+ * @platform
+ * @internal
+ * @brief Switches channel when an occupied channel is noisy.
+ * @details When noisy, do energy scan and active scan to switch operational channel.
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] channel target channel number to switch
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @see zb_coex_stop()
+ *
+ */
+int zb_coex_start(zb_zigbee_h handle, unsigned char channel);
+
+/**
+ * @platform
+ * @internal
+ * @brief Stops channel switching operation.
+ * @details Halt current operation related to channel switching.
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @param[in] handle The handle of zigbee
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @see zb_coex_start()
+ *
+ */
+int zb_coex_stop(zb_zigbee_h handle);
+
+/**
+ * @platform
+ * @internal
+ * @brief Sets start-up attribute set.
+ * @details In order to ensure interoperability, all ZigBee HA devices should implement
+ * compatible Startup Attribute Sets (SAS). This does not mean that set must be
+ * modifiable through a commissioning cluster, but that the device must internally
+ * implement these stack settings to ensure compatibility and consistent user
+ * experience. The start up set parameters described by the Commissioning cluster
+ * provide a good basis to specify a HA startup set.
+ *
+ * @since_tizen 4.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/zigbee.admin
+ *
+ * @param[in] handle The handle of zigbee
+ * @param[in] pan_id Short address
+ * @param[in] epan_id Usually 00-50-C2-77-10-00-00-00 is the global commissioning EPID
+ * @param[in] channel_mask Channel mask
+ * @param[in] start_control Start control
+ * @param[in] trust_center_addr Trust center addr
+ * @param[in] master_key Master key
+ * @param[in] master_key_len Master key length
+ * @param[in] network_key Network key
+ * @param[in] network_key_len Network key length
+ * @param[in] default_link_key_join Default link key join
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #ZIGBEE_ERROR_NONE Successful
+ * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error
+ * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported
+ */
+int zb_zdo_set_compatible_startup_parameters(
+               zb_zigbee_h handle,
+               zb_nwk_addr pan_id,
+               zb_ieee_addr epan_id,
+               unsigned int channel_mask,
+               unsigned char start_control,
+               zb_ieee_addr trust_center_addr,
+               const unsigned char *master_key,
+               unsigned char master_key_len,
+               const unsigned char *network_key,
+               unsigned char network_key_len,
+               unsigned char default_link_key_join);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIZEN_CAPI_NETWORK_ZIGBEE_PRIVATE_H__ */
index 8cd312d..ce45060 100644 (file)
@@ -27,8 +27,5 @@ CONFIGURE_FILE(${CLIENT_PKG_CONF_FILE}.pc.in ${CLIENT_PKG_CONF_FILE}.pc @ONLY)
 INSTALL(FILES ${CLIENT_PKG_CONF_FILE}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
 FILE(GLOB CLIENT_HEADER ${CMAKE_SOURCE_DIR}/include/*.h)
-INSTALL(FILES ${CLIENT_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR}/${CLIENT})
-FILE(GLOB ZDO_HEADER ${CMAKE_SOURCE_DIR}/include/zdo/*.h)
-INSTALL(FILES ${ZDO_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR}/${CLIENT}/zdo)
-FILE(GLOB ZCL_HEADER ${CMAKE_SOURCE_DIR}/include/zcl/*.h)
-INSTALL(FILES ${ZCL_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR}/${CLIENT}/zcl)
+list(FILTER CLIENT_HEADER EXCLUDE REGEX ".*_private.h$")
+INSTALL(FILES ${CLIENT_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR}/network)
index 00d0bce..7aa7398 100644 (file)
@@ -1,7 +1,7 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}/bin
 libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@/@CLIENT@
+includedir=@INCLUDE_INSTALL_DIR@/network
 
 Name: @CLIENT@
 Description: Network/Wireless zigbee
similarity index 57%
rename from lib/zbl_custom.c
rename to lib/zbl-custom.c
index f8c59be..891f0fc 100644 (file)
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <zb_log.h>
-#include <zb_common.h>
+#include <zb-log.h>
+#include <zb-common.h>
 
 #include "zbl.h"
-#include "zbl_dbus.h"
+#include "zbl-dbus.h"
 #include "zigbee.h"
 
-API int zb_aps_send(zigbee_h handle, nwk_addr addr16, unsigned char aps_frame_ctl,
-               unsigned char src_ep, unsigned char dst_ep, unsigned short cluster_id,
-               unsigned short profile_id, unsigned char zcl_frame_ctl, unsigned short mfg_code,
-               unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
-               zb_aps_send_rsp cb, void *user_data)
+API int zb_aps_send(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char aps_fc,
+       unsigned char src_ep, unsigned char dst_ep, unsigned short clusterid,
+       unsigned short profileid, unsigned char zcl_fc, unsigned short mfg_code,
+       unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
+       zb_aps_send_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        int ret = ZIGBEE_ERROR_NONE;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
-       ret = zbl_aps_send(addr16, aps_frame_ctl, src_ep, dst_ep, cluster_id, profile_id,
-               zcl_frame_ctl, mfg_code, cmd_id, payload_len, payload, cb, user_data);
+       ret = zbl_aps_send(addr16, aps_fc, src_ep, dst_ep, clusterid, profileid,
+               zcl_fc, mfg_code, cmd_id, payload_len, payload, cb, user_data);
        DBG("zbl_aps_send()=0x%X", ret);
        return ret;
 }
 
-API int zb_zcl_send(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned short cluster_id, unsigned char zcl_frame_ctl,
-               unsigned char cmd, unsigned short payload_len, unsigned char *payload,
-               zb_zcl_send_rsp cb, void *user_data)
+API int zb_zcl_send(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, zb_cluster_id clusterid, unsigned char zcl_fc,
+       unsigned char cmd, unsigned short payload_len, unsigned char *payload,
+       zb_zcl_send_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        int ret = ZIGBEE_ERROR_NONE;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
-       ret = zbl_zcl_send(addr16, src_ep, dst_ep, cluster_id, zcl_frame_ctl,
+       ret = zbl_zcl_send(addr16, src_ep, dst_ep, clusterid, zcl_fc,
                                cmd, payload_len, payload, cb, user_data);
        DBG("zbl_zcl_send()=0x%X", ret);
        return ret;
 }
 
-API int zb_send_to_local(zigbee_h handle, unsigned short length, unsigned char *data,
-               zb_send_to_local_rsp cb, void *user_data)
+API int zb_send_to_local(zb_zigbee_h handle, unsigned short length,
+       unsigned char *data, zb_send_to_local_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
similarity index 83%
rename from lib/zbl_dbus.c
rename to lib/zbl-dbus.c
index 04c1f3d..f040020 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zb_log.h>
-#include <zb_type.h>
-#include <zb_utils.h>
-#include <zb_error.h>
-#include <zb_common.h>
-#include <zcl/zb_zcl_type.h>
-#include <zdo/zb_zdo_type.h>
-
 #include "zbl.h"
-#include "zbl_dbus.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
 #define USE_ASYNC_DBUS_CALL
 
@@ -60,7 +53,7 @@ typedef enum {
        /* Service */
        ZBL_SERVICE_FORM_NETWORK = 0,
        ZBL_SERVICE_DISABLE_NETWORK,
-       /* ZDP except Bind */
+       /* ZDO except Bind */
        ZBL_ZDO_NWK_ADDR_REQ,
        ZBL_ZDO_NWK_ADDR_EXT_REQ,
        ZBL_ZDO_ACTIVE_EP_REQ,
@@ -83,7 +76,7 @@ typedef enum {
        /* ZCL Global */
        ZBL_ZCL_GLOBAL_READ_ATTRIBUTE_REQ,
        ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_REQ,
-       ZBL_ZCL_GLOBAL_CONFIGURE_REPORTING_REQ,
+       ZBL_ZCL_GLOBAL_WRITE_CONFIGURE_REPORTING_REQ,
        ZBL_ZCL_GLOBAL_DISCOVER_ATTRIBUTE_REQ,
        ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_STRUCTURED_REQ,
        ZBL_ZCL_GLOBAL_DISCOVER_COMMAND_RECEIVED_REQ,
@@ -444,21 +437,21 @@ static gint _global_compare_func(gconstpointer a, gconstpointer b)
        else if (left_data->ep < right_data->ep)
                return -1;
 
-       if (left_data->cluster_id > right_data->cluster_id)
+       if (left_data->clusterid > right_data->clusterid)
                return 1;
-       else if (left_data->cluster_id < right_data->cluster_id)
+       else if (left_data->clusterid < right_data->clusterid)
                return -1;
 
-       if (left_data->command_id > right_data->command_id)
+       if (left_data->commandid > right_data->commandid)
                return 1;
-       else if (left_data->command_id < right_data->command_id)
+       else if (left_data->commandid < right_data->commandid)
                return -1;
 
-       /* endpoint, cluster_id and command_id are equal */
+       /* endpoint, clusterid and commandid are equal */
        return 0;
 }
 
-static void _zbl_register_global_req(zigbee_h handle, zbl_req_cb_s *container)
+static void _zbl_register_global_req(zb_zigbee_h handle, zbl_req_cb_s *container)
 {
        GList *list = NULL;
        GList *item = NULL;
@@ -480,7 +473,7 @@ static void _zbl_register_global_req(zigbee_h handle, zbl_req_cb_s *container)
                h->global_cmd_req = g_list_append(list, container);
 }
 
-static void _zbl_deregister_global_req(zigbee_h handle, zbl_req_cb_s *container)
+static void _zbl_deregister_global_req(zb_zigbee_h handle, zbl_req_cb_s *container)
 {
        GList *list = NULL;
        GList *item = NULL;
@@ -501,8 +494,8 @@ static void _zbl_deregister_global_req(zigbee_h handle, zbl_req_cb_s *container)
                h->global_cmd_req = g_list_remove(list, container);
 }
 
-static void _zbl_remove_global_req(zigbee_h handle, unsigned char ep,
-       unsigned short cluster_id, unsigned char command_id)
+static void _zbl_remove_global_req(zb_zigbee_h handle, unsigned char ep,
+       unsigned short clusterid, unsigned char commandid)
 {
        GList *head = NULL;
        GList *iter = NULL;
@@ -522,10 +515,10 @@ static void _zbl_remove_global_req(zigbee_h handle, unsigned char ep,
                if (container && container->global_cmd) {
                        zb_event_global_default_rsp_s *data = container->global_cmd;
 
-                       if (data && data->ep == ep && data->cluster_id == cluster_id
-                                       && data->command_id == command_id) {
-                               DBG("  Found: ep[%d] cluster_id[%X] command_id[%X] / sid[%d]",
-                                       ep, cluster_id, command_id, container->sid);
+                       if (data && data->ep == ep && data->clusterid == clusterid
+                                       && data->commandid == commandid) {
+                               DBG("  Found: ep[%d] cluster_id[%X] commandid[%X] / sid[%d]",
+                                       ep, clusterid, commandid, container->sid);
                                ret = container;
                                break;
                        }
@@ -553,36 +546,58 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                const gchar *sender_name, const gchar *object_path, const gchar *interface_name,
                const gchar *signal_name, GVariant *parameters, gpointer user_data)
 {
+       zb_event_data_s *ev = NULL;
        struct zbl_zigbee_s* container = user_data;
-       RETM_IF(NULL == container, "container is null");
-       RETM_IF(NULL == container->event_handler, "event_handler is null");
+
        DBG("%s signal received", signal_name);
 
+       RET_IF(NULL == container);
+       RET_IF(NULL == container->event_handler);
+
+       ev = calloc(1, sizeof(zb_event_data_s));
+       RETM_IF(NULL == ev, "Failed to memory allocation !");
+
        if (g_strcmp0(signal_name, "zigbee_state") == 0) {
                gboolean enabled;
                g_variant_get(parameters, "(b)", &enabled);
 
-               zb_event_data_s ev;
-               ev.data.enable = calloc(1, sizeof(zb_event_enable_s));
-               RETM_IF(NULL == ev.data.enable, "Failed to memory allocation !");
+               ev->data.enable = calloc(1, sizeof(zb_event_enable_s));
+               if (!ev->data.enable) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               ev->data.enable->status = (unsigned char)enabled;
+
+               container->event_handler(0, NULL, ZB_ZDP_ENABLE_EVENT, ev, container->user_data);
+
+               if (ev->data.enable) {
+                       free(ev->data.enable);
+                       ev->data.enable = NULL;
+               }
 
-               ev.data.enable->status = (unsigned char)enabled;
-               container->event_handler(0, NULL, ZB_ZDP_ENABLE_EVENT, ev);
-               free(ev.data.enable);
        } else if (g_strcmp0(signal_name, "form_network_done") == 0) {
-               nwk_addr pan_id;
+               zb_nwk_addr pan_id;
                g_variant_get(parameters, "(q)", &pan_id);
 
-               zb_event_data_s ev;
-               ev.data.form_network = calloc(1, sizeof(zb_event_form_network_s));
-               RETM_IF(NULL == ev.data.form_network, "Failed to memory allocation !");
+               ev->data.form_network = calloc(1, sizeof(zb_event_form_network_s));
+               if (!ev->data.form_network) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               memcpy(&ev->data.form_network->pan_id, &pan_id, sizeof(zb_nwk_addr));
 
-               memcpy(&ev.data.form_network->pan_id, &pan_id, sizeof(nwk_addr));
-               container->event_handler(pan_id, NULL, ZB_ZDP_FORM_NETWORK_DONE, ev);
-               free(ev.data.form_network);
+               container->event_handler(pan_id, NULL, ZB_ZDP_FORM_NETWORK_DONE, ev,
+                       container->user_data);
+
+               if (ev->data.form_network) {
+                       free(ev->data.form_network);
+                       ev->data.form_network = NULL;
+               }
        } else if (g_strcmp0(signal_name, "child_joined") == 0) {
-               nwk_addr addr16;
-               ieee_addr addr64;
+               zb_nwk_addr addr16;
+               zb_ieee_addr addr64;
                unsigned char count;
                unsigned char ep[10];
                unsigned char value;
@@ -592,57 +607,71 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                GVariantIter *iter2 = NULL;
 
                g_variant_get(parameters, "(a(y)ya(y)q)", &iter1, &count, &iter2, &addr16);
-               RETM_IF(NULL == iter1, "Invalid parameter !");
-               RETM_IF(NULL == iter2, "Invalid parameter !");
+               if (!iter1 || !iter2) {
+                       ERR("Invalid parameter !");
+                       goto EXIT_EVENT_HANDLER;
+               }
 
                while (g_variant_iter_loop(iter1, "(y)", &value)) {
-                       addr64[j] = value;
-                       j++;
+                       addr64[j] = value; j++;
                }
                g_variant_iter_free(iter1);
 
                j = 0;
                while (g_variant_iter_loop(iter2, "(y)", &value)) {
-                       ep[j] = value;
-                       j++;
+                       ep[j] = value; j++;
                }
                g_variant_iter_free(iter2);
 
-               zb_event_data_s ev;
-               ev.data.join = calloc(1, sizeof(zb_event_join_s));
-               RETM_IF(NULL == ev.data.join, "Failed to memory allocation !");
+               ev->data.join = calloc(1, sizeof(zb_event_join_s));
+               if (!ev->data.join) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               ev->data.join->count = count;
+               memcpy(ev->data.join->ep, ep, count);
+
+               container->event_handler(addr16, addr64, ZB_ZDP_JOIN_EVENT, ev,
+                       container->user_data);
+
+               if (ev->data.join) {
+                       free(ev->data.join);
+                       ev->data.join = NULL;
+               }
 
-               ev.data.join->count = count;
-               memcpy(ev.data.join->ep, ep, count);
-               container->event_handler(addr16, addr64, ZB_ZDP_JOIN_EVENT, ev);
-               free(ev.data.join);
        } else if (g_strcmp0(signal_name, "child_rejoined") == 0) {
-               ieee_addr addr64;
+               zb_ieee_addr addr64;
                unsigned char value;
 
                int j = 0;
                GVariantIter *iter = NULL;
 
                g_variant_get(parameters, "(a(y))", &iter);
-               RETM_IF(NULL == iter, "Invalid parameter !");
+               if (!iter) {
+                       ERR("Invalid parameter !");
+                       goto EXIT_EVENT_HANDLER;
+               }
 
                while (g_variant_iter_loop(iter, "(y)", &value)) {
-                       addr64[j] = value;
-                       j++;
+                       addr64[j] = value; j++;
                }
                g_variant_iter_free(iter);
 
-               zb_event_data_s ev;
-               memset(&ev, 0, sizeof(zb_event_data_s));
-               container->event_handler(0, addr64, ZB_ZDP_REJOIN_EVENT, ev);
+               container->event_handler(0, addr64, ZB_ZDP_REJOIN_EVENT, ev,
+                       container->user_data);
+
        } else if (g_strcmp0(signal_name, "child_left") == 0) {
                int j = 0;
-               ieee_addr addr64;
+               zb_ieee_addr addr64;
                GVariantIter *iter = NULL;
                unsigned char value, status;
 
                g_variant_get(parameters, "(a(y)y)", &iter, &status);
-               RETM_IF(NULL == iter, "Invalid parameter !");
+               if (!iter) {
+                       ERR("Invalid parameter !");
+                       goto EXIT_EVENT_HANDLER;
+               }
 
                while (g_variant_iter_loop(iter, "(y)", &value)) {
                        addr64[j] = value;
@@ -650,68 +679,95 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                }
                g_variant_iter_free(iter);
 
-               zb_event_data_s ev;
-               ev.data.child_left = calloc(1, sizeof(zb_event_child_left_s));
-               RETM_IF(NULL == ev.data.child_left, "Failed to memory allocation !");
+               ev->data.child_left = calloc(1, sizeof(zb_event_child_left_s));
+               if (!ev->data.child_left) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               ev->data.child_left->status = status;
+
+               container->event_handler(0, addr64, ZB_ZDP_CHILD_LEFT, ev,
+                       container->user_data);
+
+               if (ev->data.child_left) {
+                       free(ev->data.child_left);
+                       ev->data.child_left = NULL;
+               }
 
-               ev.data.child_left->status = status;
-               container->event_handler(0, addr64, ZB_ZDP_CHILD_LEFT, ev);
-               free(ev.data.child_left);
        } else if (g_strcmp0(signal_name, "leave_network_done") == 0) {
-               nwk_addr addr16;
+
+               zb_nwk_addr addr16;
                g_variant_get(parameters, "(q)", &addr16);
 
-               zb_event_data_s ev;
-               memset(&ev, 0, sizeof(zb_event_data_s));
-               container->event_handler(addr16, NULL, ZB_ZDP_LEAVE_DONE_EVENT, ev);
+               container->event_handler(addr16, NULL, ZB_ZDP_LEAVE_DONE_EVENT, ev,
+                       container->user_data);
+
        } else if (!g_strcmp0(signal_name, "zcl_global_default_response")) {
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
-               unsigned short cluster_id;
-               unsigned char command_id;
+               unsigned short clusterid;
+               unsigned char commandid;
                unsigned char status;
 
-               g_variant_get(parameters, "(qyqyy)",  &addr16, &ep, &cluster_id, &command_id, &status);
+               g_variant_get(parameters, "(qyqyy)",
+                       &addr16, &ep, &clusterid, &commandid, &status);
 
-               zb_event_data_s ev;
-               ev.data.global_default_rsp = calloc(1, sizeof(zb_event_global_default_rsp_s));
-               RETM_IF(NULL == ev.data.global_default_rsp, "Failed to memory allocation !");
+               ev->data.global_default_rsp = calloc(1, sizeof(zb_event_global_default_rsp_s));
+               if (!ev->data.global_default_rsp) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
 
-               ev.data.global_default_rsp->ep = ep;
-               ev.data.global_default_rsp->cluster_id = cluster_id;
-               ev.data.global_default_rsp->command_id = command_id;
-               ev.data.global_default_rsp->status = status;
+               ev->data.global_default_rsp->ep = ep;
+               ev->data.global_default_rsp->clusterid = clusterid;
+               ev->data.global_default_rsp->commandid = commandid;
+               ev->data.global_default_rsp->status = status;
 
 #ifdef ZB_FEATURE_GLOBAL_RSP_SYNC
                /* If there is global request already, remove that. */
                if (0x00 != status)
-                       _zbl_remove_global_req(container, ep, cluster_id, command_id);
+                       _zbl_remove_global_req(container, ep, clusterid, commandid);
 #endif
 
-               container->event_handler(addr16, NULL, ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT, ev);
-               free(ev.data.global_default_rsp);
+               container->event_handler(addr16, NULL, ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT, ev,
+                       container->user_data);
+
+               if (ev->data.global_default_rsp) {
+                       free(ev->data.global_default_rsp);
+                       ev->data.global_default_rsp = NULL;
+               }
+
        } else if (!g_strcmp0(signal_name, "alarm_count")) {
                unsigned short alarm_count;
                g_variant_get(parameters, "(q)", &alarm_count);
 
-               zb_event_data_s ev;
-               ev.data.alarm = calloc(1, sizeof(zb_event_alarm_s));
-               RETM_IF(NULL == ev.data.alarm, "Failed to memory allocation !");
+               ev->data.alarm = calloc(1, sizeof(zb_event_alarm_s));
+               if (!ev->data.global_default_rsp) {
+                       ERR("Failed to memory allocation !");
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               ev->data.alarm->count = alarm_count;
 
-               ev.data.alarm->count = alarm_count;
-               container->event_handler(0, NULL, ZB_ZCL_ALARM_EVENT, ev);
-               free(ev.data.alarm);
-       } else if (!g_strcmp0(signal_name, "report_attr_handler_rsp")) {
-               nwk_addr addr16;
+               container->event_handler(0, NULL, ZB_ZCL_ALARM_EVENT, ev, container->user_data);
+
+               if (ev->data.alarm) {
+                       free(ev->data.alarm);
+                       ev->data.alarm = NULL;
+               }
+
+       } else if (!g_strcmp0(signal_name, "report_attr_handler_cb")) {
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned char value;
                unsigned short attrData;
-               unsigned short cluster_id;
+               unsigned short clusterid;
                unsigned char dataType;
                int data_size;
                int dsizeIndex = 0;
                char dSize[3] = {'\0', '\0'};
-               int i = 0, j = 0, records_len;
+               int i = 0, j = 0, count;
                GVariantIter *attr_iter = NULL;
                GVariantIter *dataType_iter = NULL;
                GVariantIter *data_iter = NULL;
@@ -719,30 +775,38 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                struct attribute_report_s **records = NULL;
 
                g_variant_get(parameters, "(qyqaqa(y)a(y)i)",  &addr16, &ep,
-                        &cluster_id, &attr_iter, &dataType_iter, &data_iter, &records_len);
+                        &clusterid, &attr_iter, &dataType_iter, &data_iter, &count);
 
-               RETM_IF(NULL == attr_iter, "Invalid parameter !");
-               RETM_IF(NULL == dataType_iter, "Invalid parameter !");
-               RETM_IF(NULL == data_iter, "Invalid parameter !");
+               if (!attr_iter || !dataType_iter || !data_iter) {
+                       ERR("Invalid parameter !");
+                       goto EXIT_EVENT_HANDLER;
+               }
 
-               records = calloc(records_len, sizeof(struct attribute_report_s*));
-               RETM_IF(NULL == records, "calloc() Fail(%d)", errno);
-               for (j = 0; j < records_len; j++) {
+               records = calloc(count, sizeof(struct attribute_report_s*));
+               if (!records) {
+                       ERR("calloc() Fail(%d)", errno);
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               for (j = 0; j < count; j++) {
                        records[j] = calloc(1, sizeof(struct attribute_report_s));
                        if (NULL == records[j]) {
-                               for (i = 0; i < j; i++)
+                               for (i = 0; i < j; i++) {
                                        free(records[i]);
+                                       records[i] = NULL;
+                               }
                                free(records);
+                               records = NULL;
 
                                g_variant_iter_free(attr_iter);
                                g_variant_iter_free(dataType_iter);
                                g_variant_iter_free(data_iter);
 
                                ERR("calloc() Fail(%d)", errno);
-                               return;
+                               goto EXIT_EVENT_HANDLER;
                        }
                }
-               DBG("record_length %d", records_len);
+               DBG("record_length %d", count);
 
                j = 0;
                while (g_variant_iter_loop(attr_iter, "q", &attrData)
@@ -757,22 +821,28 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                g_variant_iter_free(dataType_iter);
 
                j = 0;
-               while (j < records_len) {
+               while (j < count) {
                        switch (records[j]->type) {
                        /* String */
-                       case ZB_ZCL_OCTAT_STRING:
-                       case ZB_ZCL_CHRACTER_STRING:
+                       case ZB_ZCL_OCTET_STRING:
+                       case ZB_ZCL_CHARACTER_STRING:
                                g_variant_iter_loop(data_iter, "(y)", &value);
                                data_size = value + 1;
                                records[j]->value = calloc(data_size, sizeof(unsigned char));
                                if (NULL == records[j]->value) {
-                                       for (i = 0; i < j; i++)
+                                       for (i = 0; i < j; i++) {
                                                free(records[i]->value);
-                                       for (i = 0; i < records_len; i++)
+                                               records[i]->value = NULL;
+                                       }
+                                       for (i = 0; i < count; i++) {
                                                free(records[i]);
+                                               records[i] = NULL;
+                                       }
                                        free(records);
+                                       records = NULL;
+
                                        ERR("calloc() Fail(%d)", errno);
-                                       return;
+                                       goto EXIT_EVENT_HANDLER;
                                }
                                records[j]->value[dsizeIndex] = value;
                                dsizeIndex++;
@@ -782,8 +852,8 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                                }
                                g_variant_iter_free(data_iter);
                                break;
-                       case ZB_ZCL_LONG_OCTAT_STRING:
-                       case ZB_ZCL_LONG_CHRACTER_STRING:
+                       case ZB_ZCL_LONG_OCTET_STRING:
+                       case ZB_ZCL_LONG_CHARACTER_STRING:
                                g_variant_iter_loop(data_iter, "(y)", &value);
                                dSize[0] = value;
                                g_variant_iter_loop(data_iter, "(y)", &value);
@@ -793,13 +863,19 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                                data_size += 2;
                                records[j]->value = calloc(data_size, sizeof(unsigned char));
                                if (NULL == records[j]->value) {
-                                       for (i = 0; i < j; i++)
+                                       for (i = 0; i < j; i++) {
                                                free(records[i]->value);
-                                       for (i = 0; i < records_len; i++)
+                                               records[i]->value = NULL;
+                                       }
+                                       for (i = 0; i < count; i++) {
                                                free(records[i]);
+                                               records[i] = NULL;
+                                       }
                                        free(records);
+                                       records = NULL;
+
                                        ERR("calloc() Fail(%d)", errno);
-                                       return;
+                                       goto EXIT_EVENT_HANDLER;
                                }
                                records[j]->value[dsizeIndex] = dSize[dsizeIndex];
                                dsizeIndex++;
@@ -821,25 +897,37 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                                ERR("Not supported type = %d", records[i]->type);
                                continue;
                        default:
-                               data_size = zb_get_data_size(records[j]->type);
+                               data_size = zb_zcl_get_data_size(records[j]->type);
                                if (data_size < 0) {
-                                       for (i = 0; i < j; i++)
+                                       for (i = 0; i < j; i++) {
                                                free(records[i]->value);
-                                       for (i = 0; i < records_len; i++)
+                                               records[i]->value = NULL;
+                                       }
+                                       for (i = 0; i < count; i++) {
                                                free(records[i]);
+                                               records[i] = NULL;
+                                       }
                                        free(records);
-                                       ERR("zb_get_data_size() Fail(%d)", data_size);
-                                       return;
+                                       records = NULL;
+
+                                       ERR("zb_zcl_get_data_size() Fail(%d)", data_size);
+                                       goto EXIT_EVENT_HANDLER;
                                }
                                records[j]->value = calloc(data_size, sizeof(unsigned char));
                                if (NULL == records[j]->value) {
-                                       for (i = 0; i < j; i++)
+                                       for (i = 0; i < j; i++) {
                                                free(records[i]->value);
-                                       for (i = 0; i < records_len; i++)
+                                               records[i]->value = NULL;
+                                       }
+                                       for (i = 0; i < count; i++) {
                                                free(records[i]);
+                                               records[i] = NULL;
+                                       }
                                        free(records);
+                                       records = NULL;
+
                                        ERR("calloc() Fail(%d)", errno);
-                                       return;
+                                       goto EXIT_EVENT_HANDLER;
                                }
                                if (data_size != 0xFF) {
                                        for (i = 0; i < data_size; i++) {
@@ -855,78 +943,135 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                        j++;
                }
 
-               zb_event_data_s ev;
-               ev.data.global_attr_report = calloc(1, sizeof(zb_event_global_attr_report_s));
-               if (NULL == ev.data.global_attr_report) {
+               ev->data.global_attr_report = calloc(1, sizeof(zb_event_global_attr_report_s));
+               if (NULL == ev->data.global_attr_report) {
                        ERR("Failed to memory allocation !");
-                       for (j = 0; j < records_len; j++) {
+                       for (j = 0; j < count; j++) {
                                free(records[j]->value);
+                               records[j]->value = NULL;
+                               if (records[j]) {
+                                       free(records[j]);
+                                       records[j] = NULL;
+                               }
+                       }
+                       if (records) {
+                               free(records);
+                               records = NULL;
+                       }
+                       goto EXIT_EVENT_HANDLER;
+               }
+
+               ev->data.global_attr_report->records = records;
+               ev->data.global_attr_report->count = count;
+
+               container->event_handler(addr16, NULL, ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT, ev,
+                       container->user_data);
+               for (j = 0; j < count; j++) {
+                       if (records[j]->value) {
+                               free(records[j]->value);
+                               records[j]->value = NULL;
+                       }
+                       if (records[j]) {
                                free(records[j]);
+                               records[j] = NULL;
                        }
+               }
+               if (records) {
                        free(records);
-                       return;
+                       records = NULL;
                }
-
-               ev.data.global_attr_report->records = records;
-               ev.data.global_attr_report->count = records_len;
-               container->event_handler(addr16, NULL, ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT, ev);
-               for (j = 0; j < records_len; j++) {
-                       free(records[j]->value);
-                       free(records[j]);
+               if (ev->data.global_attr_report) {
+                       free(ev->data.global_attr_report);
+                       ev->data.global_attr_report = NULL;
                }
-               free(records);
-               free(ev.data.global_attr_report);
+
        } else if (!g_strcmp0(signal_name, "status_change_rpt")) {
-               zb_event_data_s ev;
-               nwk_addr addr16;
+
+               zb_nwk_addr addr16;
                unsigned char src_ep;
-               unsigned char extended_status;
+               unsigned char status;
                unsigned short zone_status;
                unsigned short delay;
                unsigned char zone_id;
+
                g_variant_get(parameters, "(qyqyyq)", &addr16, &src_ep, &zone_status,
-                       &extended_status, &zone_id, &delay);
+                       &status, &zone_id, &delay);
                if (0xff == zone_id) {
-                       ev.data.ias_noti = calloc(1, sizeof(zb_event_ias_noti_s));
-                       RETM_IF(NULL == ev.data.ias_noti, "Failed to memory allocation !");
 
-                       ev.data.ias_noti->src_ep = src_ep;
-                       ev.data.ias_noti->zone_status = zone_status;
+                       ev->data.ias_noti = calloc(1, sizeof(zb_event_ias_noti_s));
+                       if (!ev->data.ias_noti) {
+                               ERR("Failed to memory allocation !");
+                               goto EXIT_EVENT_HANDLER;
+                       }
+
+                       ev->data.ias_noti->src_ep = src_ep;
+                       ev->data.ias_noti->zone_status = zone_status;
+
                        container->event_handler(addr16, NULL,
-                               ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT, ev);
+                               ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT, ev,
+                               container->user_data);
+
+                       if (ev->data.ias_noti) {
+                               free(ev->data.ias_noti);
+                               ev->data.ias_noti = NULL;
+                       }
 
-                       free(ev.data.ias_noti);
                } else {
-                       ev.data.ias_extended_noti = calloc(1, sizeof(zb_event_ias_extended_noti_s));
-                       RETM_IF(NULL == ev.data.ias_extended_noti, "Failed to memory allocation !");
-
-                       ev.data.ias_extended_noti->src_ep = src_ep;
-                       ev.data.ias_extended_noti->zone_status = zone_status;
-                       ev.data.ias_extended_noti->extended_status = extended_status;
-                       ev.data.ias_extended_noti->zone_id = zone_id;
-                       ev.data.ias_extended_noti->delay = delay;
+
+                       ev->data.ias_extended_noti = calloc(1, sizeof(zb_event_ias_extended_noti_s));
+                       if (!ev->data.ias_extended_noti) {
+                               ERR("Failed to memory allocation !");
+                               goto EXIT_EVENT_HANDLER;
+                       }
+
+                       ev->data.ias_extended_noti->src_ep = src_ep;
+                       ev->data.ias_extended_noti->zone_status = zone_status;
+                       ev->data.ias_extended_noti->status = status;
+                       ev->data.ias_extended_noti->zone_id = zone_id;
+                       ev->data.ias_extended_noti->delay = delay;
+
                        container->event_handler(addr16, NULL,
-                               ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT, ev);
+                               ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT, ev,
+                               container->user_data);
+
+                       if (ev->data.ias_extended_noti) {
+                               free(ev->data.ias_extended_noti);
+                               ev->data.ias_extended_noti = NULL;
+                       }
 
-                       free(ev.data.ias_extended_noti);
                }
        } else if (!g_strcmp0(signal_name, "enroll_request")) {
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char src_ep;
                unsigned short zone_type;
                unsigned char mfg_code;
-               zb_event_data_s ev;
-               ev.data.ias_enroll_request = calloc(1, sizeof(zb_event_ias_enroll_request_s));
-               RETM_IF(NULL == ev.data.ias_enroll_request, "Failed to memory allocation !");
+
+               ev->data.ias_enroll_request = calloc(1, sizeof(zb_event_ias_enroll_request_s));
+               if (!ev->data.ias_enroll_request) {
+                               ERR("Failed to memory allocation !");
+                               goto EXIT_EVENT_HANDLER;
+                       }
 
                g_variant_get(parameters, "(qyqy)", &addr16, &src_ep, &zone_type, &mfg_code);
-               ev.data.ias_enroll_request->src_ep = src_ep;
-               ev.data.ias_enroll_request->zone_type = zone_type;
-               ev.data.ias_enroll_request->mfg_code = mfg_code;
-               container->event_handler(addr16, NULL, ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT, ev);
-               free(ev.data.ias_enroll_request);
+               ev->data.ias_enroll_request->src_ep = src_ep;
+               ev->data.ias_enroll_request->zone_type = zone_type;
+               ev->data.ias_enroll_request->mfg_code = mfg_code;
+
+               container->event_handler(addr16, NULL, ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT, ev,
+                       container->user_data);
+
+               if (ev->data.ias_enroll_request) {
+                       free(ev->data.ias_enroll_request);
+                       ev->data.ias_enroll_request = NULL;
+               }
        } else
                ERR("Can't handle this signal=%s", signal_name);
+
+EXIT_EVENT_HANDLER:
+       if (ev) {
+               free(ev);
+               ev = NULL;
+       }
        return;
 }
 
@@ -942,15 +1087,15 @@ static void _zbl_dbus_unsubscribe_signal(GList *sub_ids)
        g_list_free(sub_ids);
 }
 
-static int _zbl_dbus_subscribe_signal(zigbee_h handle)
+static int _zbl_dbus_subscribe_signal(zb_zigbee_h handle)
 {
        unsigned int id;
        struct zbl_zigbee_s* h = handle;
 
        /* Section 0. Subscribe Manager signal */
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_MANAGER_INTERFACE,
-                                               "zigbee_state", ZIGBEE_DBUS_OBJPATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
+                       "zigbee_state", ZIGBEE_DBUS_OBJPATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, handle, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(zigbee_state) Fail(%d)", errno);
                return ZIGBEE_ERROR_IO_ERROR;
@@ -960,8 +1105,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
 
        /* Section 1. Subscribe ZDO signal */
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
-                                               "child_joined", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "child_joined", ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(child_rejoined) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -972,8 +1117,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        DBG("subscribed for child_joined signal %d", id);
 
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
-                                               "child_rejoined", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "child_rejoined", ZIGBEE_CONTROL_OBJECT_PATH, NULL,     G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(child_rejoined) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -984,8 +1129,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        DBG("subscribed for child_rejoined signal %d", id);
 
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
-                                               "child_left", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "child_left", ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(child_left) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -996,8 +1141,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        DBG("subscribed for child_left signal %d", id);
 
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
-                                               "leave_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "leave_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
+                       G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(leave_network_done) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -1008,8 +1153,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        DBG("subscribed for leave_network_done signal %d", id);
 
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
-                                               "form_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "form_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(form_network_done) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -1025,7 +1170,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
                ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
                _zbl_signal_handler, h, NULL);
        if (0 == id) {
-               ERR("g_dbus_connection_signal_subscribe(zcl_global_default_response) Fail(%d)\n", errno);
+               ERR("g_dbus_connection_signal_subscribe(zcl_global_default_response) Fail(%d)\n",
+                       errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
                h->dbus_sub_ids = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
@@ -1038,7 +1184,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
                ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
                _zbl_signal_handler, h, NULL);
        if (0 == id) {
-               ERR("g_dbus_connection_signal_subscribe(report_attr_handler_rsp) Fail(%d)\n", errno);
+               ERR("g_dbus_connection_signal_subscribe(report_attr_handler_rsp) Fail(%d)\n",
+                       errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
                h->dbus_sub_ids = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
@@ -1048,8 +1195,8 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
 
        /* Section 2. Subscribe ZCL alarm cluster signal */
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_ZCL_ALARM_INTERFACE,
-                                               "alarm_count", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+                       "alarm_count", ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(alarm_count) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -1060,9 +1207,10 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        DBG("subscribed for alarm_count signal %d", id);
 
        /* Section 3. Subscribe ZCL IAS cluster signal */
-       id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_ZCL_IAS_ZONE_INTERFACE,
-                                       "status_change_rpt", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                       G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+       id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL,
+                       ZIGBEE_ZCL_IAS_ZONE_INTERFACE, "status_change_rpt",
+                       ZIGBEE_CONTROL_OBJECT_PATH, NULL, G_DBUS_CALL_FLAGS_NONE,
+                       _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(status_change_rpt) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -1072,9 +1220,9 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
        h->dbus_sub_ids = g_list_append(h->dbus_sub_ids, GUINT_TO_POINTER(id));
        DBG("subscribed for status_change_rpt signal %d", id);
 
-       id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_ZCL_IAS_ZONE_INTERFACE,
-                                               "enroll_request", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
-                                               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
+       id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL,
+               ZIGBEE_ZCL_IAS_ZONE_INTERFACE, "enroll_request", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
+               G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, h, NULL);
        if (0 == id) {
                ERR("g_dbus_connection_signal_subscribe(enroll_request) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(h->dbus_sub_ids);
@@ -1092,7 +1240,7 @@ static void _zbl_dbus_name_owner_notify(GObject *object, GParamSpec *pspec,
 {
        GDBusProxy *proxy = G_DBUS_PROXY(object);
        gchar *name_owner = g_dbus_proxy_get_name_owner(proxy);
-       zigbee_h handle = (zigbee_h)user_data;
+       zb_zigbee_h handle = (zb_zigbee_h)user_data;
 
        DBG("Name owner notify [%s]", name_owner);
 
@@ -1115,11 +1263,14 @@ static void _zbl_request_cleanup(gpointer data)
 
 #ifdef ZB_FEATURE_GLOBAL_RSP_SYNC
        _zbl_deregister_global_req(container->handle, container);
-       if (container->global_cmd)
+       if (container->global_cmd) {
                free(container->global_cmd);
+               container->global_cmd = NULL;
+       }
 #endif
 
        free(container);
+       container = NULL;
 }
 
 static gboolean _zbl_timeout_cb(gpointer p)
@@ -1141,90 +1292,102 @@ static gboolean _zbl_timeout_cb(gpointer p)
        case ZBL_SERVICE_DISABLE_NETWORK: {
                zb_disable_network_cb cb = container->cb;
                cb(0x0000, container->userdata);
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
-       /* ZDP except Bind */
+       /* ZDO except Bind */
        case ZBL_ZDO_NWK_ADDR_REQ: {
-               zb_zdo_addr_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, NULL, 0, 0, 0, NULL, container->userdata);
+               zb_zdo_addr_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, NULL, 0, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_NWK_ADDR_EXT_REQ: {
-               zb_zdo_addr_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, NULL, 0, 0, 0, NULL, container->userdata);
+               zb_zdo_addr_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, NULL, 0, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_ACTIVE_EP_REQ: {
-               zb_zdo_active_ep_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, 0, 0, NULL, container->userdata);
+               zb_zdo_active_ep_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_SIMPLE_DESC_REQ: {
-               zb_zdo_simple_desc_rsp cb = container->cb;
+               zb_zdo_simple_desc_cb cb = container->cb;
                cb(0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_MATCHED_DESCRIPTOR_REQ: {
-               zb_zdo_match_desc_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, 0, 0, NULL, container->userdata);
+               zb_zdo_match_desc_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_COMPLEX_DESC_REQ: {
-               zb_zdo_complex_desc_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, 0, 0, NULL, container->userdata);
+               zb_zdo_complex_desc_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_MGMT_BIND_REQ: {
-               zb_zdo_mgmt_bind_rsp cb = container->cb;
+               zb_zdo_mgmt_bind_cb cb = container->cb;
                struct zb_zdo_binding_table_s **records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_binding_table_h));
                if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_binding_table_s));
 
-               cb(ZB_ZDP_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
 
-               if (records && records[0])
+               if (records && records[0]) {
                        free(records[0]);
-               if (records)
+                       records[0] = NULL;
+               }
+               if (records) {
                        free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZDO_MGMT_LQI_REQ: {
-               zb_zdo_mgmt_lqi_rsp cb = container->cb;
+               zb_zdo_mgmt_lqi_cb cb = container->cb;
                struct zb_zdo_neighbor_table_desc_s **records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_neighbor_table_desc_h));
                if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_neighbor_table_desc_s));
 
-               cb(ZB_ZDP_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
 
-               if (records && records[0])
+               if (records && records[0]) {
                        free(records[0]);
-               if (records)
+                       records[0] = NULL;
+               }
+               if (records) {
                        free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZDO_MGMT_RTG_REQ: {
-               zb_zdo_mgmt_rtg_rsp cb = container->cb;
+               zb_zdo_mgmt_rtg_cb cb = container->cb;
                struct zb_zdo_routing_table_s **records = NULL;
 
                records = calloc(1, sizeof(zb_zdo_routing_table_h));
                if (records)
                        records[0] = calloc(1, sizeof(struct zb_zdo_routing_table_s));
 
-               cb(ZB_ZDP_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, 0, (void **)records, container->userdata);
 
-               if (records && records[0])
+               if (records && records[0]) {
                        free(records[0]);
-               if (records)
+                       records[0] = NULL;
+               }
+               if (records) {
                        free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZDO_MGMT_NWK_DISC_REQ: {
-               zb_zdo_mgmt_nwk_disc_rsp cb = container->cb;
+               zb_zdo_mgmt_nwk_disc_cb cb = container->cb;
                struct zb_zdo_network_list_record_s **records = NULL;
                records = calloc(1, sizeof(zb_zdo_network_list_record_h));
                if (records)
@@ -1232,118 +1395,123 @@ static gboolean _zbl_timeout_cb(gpointer p)
 
                cb(0, 0, 0, 0, (void **)records, container->userdata);
 
-               if (records && records[0])
+               if (records && records[0]) {
                        free(records[0]);
-               if (records)
+                       records[0] = NULL;
+               }
+               if (records) {
                        free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZDO_MGMT_PERMIT_JOIN_REQ: {
-               zb_zdo_mgmt_permit_joining_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               zb_zdo_mgmt_permit_joining_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
        case ZBL_ZDO_MGMT_LEAVE_REQ: {
-               zb_zdo_mgmt_leave_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               zb_zdo_mgmt_leave_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
        case ZBL_ZDO_NODE_DESC_REQ: {
-               zb_zdo_node_desc_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, 0, NULL, container->userdata);
+               zb_zdo_node_desc_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_POWER_DESC_REQ: {
-               zb_zdo_power_desc_rsp cb = container->cb;
+               zb_zdo_power_desc_cb cb = container->cb;
                cb(0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZDO_USER_DESC_REQ: {
-               zb_zdo_user_desc_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, 0, 0, NULL, container->userdata);
+               zb_zdo_user_desc_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, 0, 0, NULL, container->userdata);
        break;
        }
        case ZBL_ZDO_USER_DESC_SET_REQ: {
-               zb_zdo_user_desc_conf cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               zb_zdo_user_desc_conf_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
-       /* ZDP Bind */
+       /* ZDO Bind */
        case ZBL_ZDO_BIND_REQ: {
-               zb_zdo_bind_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               zb_zdo_bind_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
        case ZBL_ZDO_UNBIND_REQ: {
-               zb_zdo_unbind_rsp cb = container->cb;
-               cb(ZB_ZDP_TIMEOUT, container->userdata);
+               zb_zdo_unbind_cb cb = container->cb;
+               cb(ZB_ZDP_STATUS_TIMEOUT, container->userdata);
        }
        break;
        /* Custom */
        case ZBL_CUSTOM_APS_SEND_REQ: {
-               zb_aps_send_rsp cb = container->cb;
+               zb_aps_send_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, 0, NULL, container->userdata);
        } break;
        case ZBL_CUSTOM_ZCL_SEND_REQ: {
-               zb_zcl_send_rsp cb = container->cb;
+               zb_zcl_send_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_CUSTOM_LOCAL_SEND_REQ: {
-               zb_send_to_local_rsp cb = container->cb;
+               zb_send_to_local_cb cb = container->cb;
                cb(0, NULL, container->userdata);
        }
        break;
        /* ZCL Global */
        case ZBL_ZCL_GLOBAL_READ_ATTRIBUTE_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_attr_read_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_attr_write_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
-       case ZBL_ZCL_GLOBAL_CONFIGURE_REPORTING_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+       case ZBL_ZCL_GLOBAL_WRITE_CONFIGURE_REPORTING_REQ: {
+               zb_zcl_global_config_report_write_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_ATTRIBUTE_REQ: {
-               zb_zcl_global_discover_attr_rsp cb = container->cb;
+               zb_zcl_global_attr_discover_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_STRUCTURED_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_attr_write_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_COMMAND_RECEIVED_REQ: {
-               zb_zcl_global_discover_cmds_rsp cb = container->cb;
+               zb_zcl_global_discover_cmds_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_COMMAND_GENERATED_REQ: {
-               zb_zcl_global_discover_cmds_rsp cb = container->cb;
+               zb_zcl_global_discover_cmds_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_ATTRIBUTE_EXTENDED_REQ: {
-               zb_zcl_global_discover_attr_extended_rsp cb = container->cb;
+               zb_zcl_global_attr_extended_discover_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GLOBAL_READ_CONFIGURE_REPORTING_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_config_report_read_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        /* ZCL Alarm */
        case ZBL_ZCL_ALARM_GET_ALARM_REQ: {
-               zb_zcl_alarm_get_alarm_rsp cb = container->cb;
-               cb(ZB_ZCL_TIMEOUT, 0, ZB_ZCL_UNSUP_CLUSTER_COMMAND, 0, 0, 0, container->userdata);
+               zb_zcl_alarm_get_alarm_cb cb = container->cb;
+               cb(ZB_ZCL_STATUS_TIMEOUT, 0, ZB_ZCL_STATUS_UNSUP_CLUSTER_COMMAND,
+                       0, 0, 0, container->userdata);
        }
        break;
        /* ZCL Doorlock */
@@ -1360,22 +1528,22 @@ static gboolean _zbl_timeout_cb(gpointer p)
        break;
        /* ZCL Group */
        case ZBL_ZCL_GROUP_ADD_GROUP_REQ: {
-               zb_zcl_group_add_group_rsp cb = container->cb;
+               zb_zcl_group_add_group_cb cb = container->cb;
                cb(0, 0, 0, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_GROUP_VIEW_GROUP_REQ: {
-               zb_zcl_group_view_group_rsp cb = container->cb;
+               zb_zcl_group_view_group_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZCL_GROUP_GET_GROUP_MEMBERSHIP_REQ: {
-               zb_zcl_group_get_group_membership_rsp cb = container->cb;
+               zb_zcl_group_get_group_membership_cb cb = container->cb;
                cb(0, 0, 0, 0, NULL, container->userdata);
        }
        break;
        case ZBL_ZCL_GROUP_REMOVE_GROUP_REQ: {
-               zb_zcl_group_remove_group_rsp cb = container->cb;
+               zb_zcl_group_remove_group_cb cb = container->cb;
                cb(0, 0, 0, 0, container->userdata);
        }
        break;
@@ -1393,38 +1561,38 @@ static gboolean _zbl_timeout_cb(gpointer p)
        break;
        /* ZCL Pollcontrol */
        case ZBL_ZCL_POLLCONTROL_SET_POLL_INTERVAL_REQ: {
-               zb_zcl_pollctrl_check_in cb = container->cb;
+               zb_zcl_pollctrl_check_in_cb cb = container->cb;
                cb(0, 0, container->userdata);
        }
        break;
        /* ZCL Scene */
        case ZBL_ZCL_SCENE_ADD_SCENE_REQ: {
-               zb_zcl_scene_add_scene_rsp cb = container->cb;
+               zb_zcl_scene_add_scene_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_SCENE_VIEW_SCENE_REQ: {
-               zb_zcl_scene_view_scene_rsp cb = container->cb;
+               zb_zcl_scene_view_scene_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, 0, NULL, NULL, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_SCENE_REMOVE_SCENE_REQ: {
-               zb_zcl_scene_remove_scene_rsp cb = container->cb;
+               zb_zcl_scene_remove_scene_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_SCENE_STORE_SCENE_REQ: {
-               zb_zcl_scene_store_scene_rsp cb = container->cb;
+               zb_zcl_scene_store_scene_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_SCENE_REMOVE_ALL_SCENE_REQ: {
-               zb_zcl_scene_remove_all_scene_rsp cb = container->cb;
+               zb_zcl_scene_remove_all_scene_cb cb = container->cb;
                cb(0, 0, 0, 0, container->userdata);
        }
        break;
        case ZBL_ZCL_SCENE_GET_SCENE_MEMBERSHIP_REQ: {
-               zb_zcl_scene_get_scene_membership_rsp cb = container->cb;
+               zb_zcl_scene_get_scene_membership_cb cb = container->cb;
                cb(0, 0, 0, 0, 0, 0, NULL, container->userdata);
        }
        break;
@@ -1460,25 +1628,25 @@ static void _zbl_response_cb(GDBusConnection *connection,
                /* Service */
        case ZBL_SERVICE_FORM_NETWORK: {
                zb_form_network_cb cb = container->cb;
-               nwk_addr panid;
+               zb_nwk_addr panid;
                g_variant_get(parameters, "(q)", &panid);
                cb(panid, container->userdata);
        }
        break;
        case ZBL_SERVICE_DISABLE_NETWORK: {
                zb_disable_network_cb cb = container->cb;
-               unsigned char ret = ZB_ZDP_SUCCESS;
+               unsigned char ret = ZB_ZDP_STATUS_SUCCESS;
                g_variant_get(parameters, "(y)", &ret);
                cb(ret, container->userdata);
        }
        break;
-       /* ZDP except Bind */
+       /* ZDO except Bind */
        case ZBL_ZDO_NWK_ADDR_REQ: {
-               zb_zdo_addr_rsp cb = container->cb;
+               zb_zdo_addr_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16;
-               ieee_addr addr64;
+               zb_nwk_addr addr16;
+               zb_ieee_addr addr64;
                unsigned char status;
                unsigned char num;
                unsigned char start_idx;
@@ -1498,11 +1666,11 @@ static void _zbl_response_cb(GDBusConnection *connection,
        }
        break;
        case ZBL_ZDO_NWK_ADDR_EXT_REQ: {
-               zb_zdo_addr_rsp cb = container->cb;
+               zb_zdo_addr_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16;
-               ieee_addr addr64;
+               zb_nwk_addr addr16;
+               zb_ieee_addr addr64;
                unsigned char status;
                unsigned char num;
                unsigned char start_idx;
@@ -1526,10 +1694,10 @@ static void _zbl_response_cb(GDBusConnection *connection,
        }
        break;
        case ZBL_ZDO_ACTIVE_EP_REQ: {
-               zb_zdo_active_ep_rsp cb = container->cb;
+               zb_zdo_active_ep_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char status;
                unsigned char count;
                unsigned char value;
@@ -1549,11 +1717,15 @@ static void _zbl_response_cb(GDBusConnection *connection,
                g_variant_iter_free(ep_iter);
 
                cb(status, addr16, count, ep_list, container->userdata);
-               free(ep_list);
+
+               if (ep_list) {
+                       free(ep_list);
+                       ep_list = NULL;
+               }
        }
        break;
        case ZBL_ZDO_SIMPLE_DESC_REQ: {
-               zb_zdo_simple_desc_rsp cb = container->cb;
+               zb_zdo_simple_desc_cb cb = container->cb;
 
                int j = 0;
                int count;
@@ -1570,7 +1742,7 @@ static void _zbl_response_cb(GDBusConnection *connection,
 
                g_variant_get(parameters, "(qiyyqqyyaqaq)", &addr16, &count,
                                &records->device_ver,
-                               &records->ep, &records->profile_id, &records->device_id,
+                               &records->ep, &records->profileid, &records->deviceid,
                                &records->num_of_in_clusters, &records->num_of_out_clusters,
                                &in_iter, &out_iter);
                if (NULL == in_iter || NULL == out_iter) {
@@ -1608,27 +1780,27 @@ static void _zbl_response_cb(GDBusConnection *connection,
                }
                g_variant_iter_free(out_iter);
 
-               DBG("addr16=0x%x, count=%d, records->ep=%d, records->device_id=0x%x",
-                       addr16, count, records->ep, records->device_id);
+               DBG("addr16=0x%x, count=%d, records->ep=%d, records->deviceid=0x%x",
+                       addr16, count, records->ep, records->deviceid);
                for (j = 0; j < records->num_of_in_clusters; j++)
                        DBG("in_clusters[%d] = 0x%x", j, records->in_clusters[j]);
                for (j = 0; j < records->num_of_out_clusters; j++)
                        DBG("out_clusters[%d] = 0x%x", j, records->out_clusters[j]);
 
                cb(addr16, count, records, container->userdata);
-#if 0
-               free(records->in_clusters);
-               free(records->out_clusters);
-#endif
-               free(records);
+
+               if (records) {
+                       free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZDO_MATCHED_DESCRIPTOR_REQ: {
-               zb_zdo_match_desc_rsp cb = container->cb;
+               zb_zdo_match_desc_cb cb = container->cb;
 
                int j = 0;
                int match_len;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char value;
                unsigned char status;
                GVariantIter *ml_iter = NULL;
@@ -1653,14 +1825,16 @@ static void _zbl_response_cb(GDBusConnection *connection,
 
                cb(status, addr16, match_len, match_list, container->userdata);
 
-               if (match_list)
+               if (match_list) {
                        free(match_list);
+                       match_list = NULL;
+               }
        }
        break;
        case ZBL_ZDO_NODE_DESC_REQ: {
-               zb_zdo_node_desc_rsp cb = container->cb;
+               zb_zdo_node_desc_cb cb = container->cb;
 
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char status;
                struct zb_zdo_node_descriptor_s *desc;
 
@@ -1677,13 +1851,18 @@ static void _zbl_response_cb(GDBusConnection *connection,
                        &desc->maximum_outgoing_transfer_size, &desc->descriptor_capability_field);
 
                cb(status, addr16, desc, container->userdata);
-               free(desc);
+
+               if (desc) {
+                       free(desc);
+                       desc = NULL;
+               }
+
        }
        break;
        case ZBL_ZDO_POWER_DESC_REQ: {
-               zb_zdo_power_desc_rsp cb = container->cb;
+               zb_zdo_power_desc_cb cb = container->cb;
 
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char status;
                struct zb_zdo_node_power_descriptor_s *desc;
 
@@ -1695,14 +1874,18 @@ static void _zbl_response_cb(GDBusConnection *connection,
                                        &desc->current_power_source, &desc->current_power_source_level);
 
                cb(status, addr16, desc, container->userdata);
-               free(desc);
+
+               if (desc) {
+                       free(desc);
+                       desc = NULL;
+               }
        }
        break;
        case ZBL_ZDO_COMPLEX_DESC_REQ: {
-               zb_zdo_complex_desc_rsp cb = container->cb;
+               zb_zdo_complex_desc_cb cb = container->cb;
 
                int length;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char j = 0;
                unsigned char value;
                unsigned char status;
@@ -1728,14 +1911,18 @@ static void _zbl_response_cb(GDBusConnection *connection,
                }
 
                cb(status, addr16, length, complex_desc, container->userdata);
-               free(complex_desc);
+
+               if (complex_desc) {
+                       free(complex_desc);
+                       complex_desc = NULL;
+               }
        }
        break;
        case ZBL_ZDO_USER_DESC_REQ: {
-               zb_zdo_user_desc_rsp cb = container->cb;
+               zb_zdo_user_desc_cb cb = container->cb;
 
                int length;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char j = 0;
                unsigned char value;
                unsigned char status;
@@ -1761,18 +1948,22 @@ static void _zbl_response_cb(GDBusConnection *connection,
                }
 
                cb(status, addr16, length, complex_desc, container->userdata);
-               free(complex_desc);
+
+               if (complex_desc) {
+                       free(complex_desc);
+                       complex_desc = NULL;
+               }
        break;
        }
        case ZBL_ZDO_USER_DESC_SET_REQ: {
-               zb_zdo_user_desc_conf cb = container->cb;
+               zb_zdo_user_desc_conf_cb cb = container->cb;
                unsigned char status;
                g_variant_get(parameters, "(y)", &status);
                cb(status, container->userdata);
        }
        break;
        case ZBL_ZDO_MGMT_BIND_REQ: {
-               zb_zdo_mgmt_bind_rsp cb = container->cb;
+               zb_zdo_mgmt_bind_cb cb = container->cb;
 
                unsigned char status;
                unsigned char value;
@@ -1810,7 +2001,7 @@ static void _zbl_response_cb(GDBusConnection *connection,
 
                for (i = 0; i < binding_table_list_count; i++) {
                        g_variant_iter_loop(rsp_iter, "(ayyqyqayy)", &mac_iter,
-                               &records[i]->src_ep, &records[i]->cluster_id,
+                               &records[i]->src_ep, &records[i]->clusterid,
                                &records[i]->dst_addr_mode, &dst_addr16,
                                &destep_iter, &dst_ep);
                        if (NULL == mac_iter) {
@@ -1853,14 +2044,17 @@ static void _zbl_response_cb(GDBusConnection *connection,
 
 MGMT_NWK_BIND_REQ_OUT:
                for (i = 0; i < binding_table_list_count; i++) {
-                       if (records[i])
+                       if (records[i]) {
                                free(records[i]);
+                               records[i] = NULL;
+                       }
                }
                free(records);
+               records = NULL;
        }
        break;
        case ZBL_ZDO_MGMT_LQI_REQ: {
-               zb_zdo_mgmt_lqi_rsp cb = container->cb;
+               zb_zdo_mgmt_lqi_cb cb = container->cb;
 
                int i = 0;
                int j = 0;
@@ -1930,8 +2124,10 @@ MGMT_NWK_BIND_REQ_OUT:
 MGMT_LQI_REQ_OUT:
                if (records) {
                        for (i = 0; i < neighbor_table_list_count; i++) {
-                               if (records[i])
+                               if (records[i]) {
                                        free(records[i]);
+                                       records[i] = NULL;
+                               }
                        }
                        free(records);
                        records = NULL;
@@ -1939,7 +2135,7 @@ MGMT_LQI_REQ_OUT:
        }
        break;
        case ZBL_ZDO_MGMT_RTG_REQ: {
-               zb_zdo_mgmt_rtg_rsp cb = container->cb;
+               zb_zdo_mgmt_rtg_cb cb = container->cb;
 
                int i;
                unsigned char status;
@@ -1979,14 +2175,17 @@ MGMT_LQI_REQ_OUT:
 
 MGMT_NWK_RTG_REQ_OUT:
                for (i = 0; i < routing_table_list_count; i++) {
-                       if (records[i])
+                       if (records[i]) {
                                free(records[i]);
+                               records[i] = NULL;
+                       }
                }
                free(records);
+               records = NULL;
        }
        break;
        case ZBL_ZDO_MGMT_NWK_DISC_REQ: {
-               zb_zdo_mgmt_nwk_disc_rsp cb = container->cb;
+               zb_zdo_mgmt_nwk_disc_cb cb = container->cb;
                        int i = 0;
                int j = 0;
                unsigned char value;
@@ -2019,8 +2218,10 @@ MGMT_NWK_RTG_REQ_OUT:
                                }
                        }
                        for (i = 0; i < nwk_list_count; i++) {
-                               g_variant_iter_loop(resp_iter, "(ayyyyyyy)", &mac_iter, &records[i]->logical_channel,
-                                       &records[i]->stack_profile, &records[i]->zigbee_version, &records[i]->beacon_order,
+                               g_variant_iter_loop(resp_iter, "(ayyyyyyy)",
+                                       &mac_iter, &records[i]->logical_channel,
+                                       &records[i]->stack_profile, &records[i]->zigbee_version,
+                                       &records[i]->beacon_order,
                                        &records[i]->superframe_order, &records[i]->permit_joining);
                                if (NULL == mac_iter) {
                                        ERR("Invalid parameter !");
@@ -2036,13 +2237,16 @@ MGMT_NWK_RTG_REQ_OUT:
                        g_variant_iter_free(resp_iter);
                }
 
-               cb(status, nwk_count, start_index, nwk_list_count, (void **)records, container->userdata);
+               cb(status, nwk_count, start_index, nwk_list_count,
+                       (void **)records, container->userdata);
 
 MGMT_NWK_DISC_REQ_OUT:
                if (records) {
                        for (i = 0; i < nwk_list_count; i++) {
-                               if (records[i])
+                               if (records[i]) {
                                        free(records[i]);
+                                       records[i] = NULL;
+                               }
                        }
                        free(records);
                        records = NULL;
@@ -2050,29 +2254,29 @@ MGMT_NWK_DISC_REQ_OUT:
        }
        break;
        case ZBL_ZDO_MGMT_PERMIT_JOIN_REQ: {
-               zb_zdo_mgmt_permit_joining_rsp cb = container->cb;
+               zb_zdo_mgmt_permit_joining_cb cb = container->cb;
                unsigned char status;
                g_variant_get(parameters, "(y)", &status);
                cb(status, container->userdata);
        }
        break;
        case ZBL_ZDO_MGMT_LEAVE_REQ: {
-               zb_zdo_mgmt_leave_rsp cb = container->cb;
+               zb_zdo_mgmt_leave_cb cb = container->cb;
                unsigned char status;
                g_variant_get(parameters, "(y)", &status);
                cb(status, container->userdata);
        }
        break;
-       /* ZDP Bind */
+       /* ZDO Bind */
        case ZBL_ZDO_BIND_REQ: {
-               zb_zdo_bind_rsp cb = container->cb;
+               zb_zdo_bind_cb cb = container->cb;
                unsigned char status;
                g_variant_get(parameters, "(y)", &status);
                cb(status, container->userdata);
        }
        break;
        case ZBL_ZDO_UNBIND_REQ: {
-               zb_zdo_unbind_rsp cb = container->cb;
+               zb_zdo_unbind_cb cb = container->cb;
                unsigned char status;
                g_variant_get(parameters, "(y)", &status);
                cb(status, container->userdata);
@@ -2080,13 +2284,13 @@ MGMT_NWK_DISC_REQ_OUT:
        break;
        /* Custom */
        case ZBL_CUSTOM_APS_SEND_REQ: {
-               zb_aps_send_rsp cb = container->cb;
+               zb_aps_send_cb cb = container->cb;
 
                unsigned short addr16;
                unsigned char src_ep;
                unsigned char dst_ep;
-               unsigned short cluster_id;
-               unsigned short profile_id;
+               unsigned short clusterid;
+               unsigned short profileid;
                unsigned short payload_len = 0;
                unsigned char *payload = NULL;
 
@@ -2095,7 +2299,7 @@ MGMT_NWK_DISC_REQ_OUT:
                int i = 0;
 
                g_variant_get(parameters, "(qyyqqqa(y))", &addr16, &src_ep, &dst_ep,
-                               &cluster_id, &profile_id, &payload_len, &payload_iter);
+                               &clusterid, &profileid, &payload_len, &payload_iter);
                RETM_IF(NULL == payload_iter, "Invalid parameter !");
 
                if (payload_len > 0) {
@@ -2108,21 +2312,24 @@ MGMT_NWK_DISC_REQ_OUT:
                                payload[i++] = value;
                }
 
-               cb(addr16, src_ep, dst_ep, cluster_id, profile_id, payload_len, payload,
+               cb(addr16, src_ep, dst_ep, clusterid, profileid, payload_len, payload,
                        container->userdata);
 ZBL_CUSTOM_APS_SEND_REQ_OUT:
                g_variant_iter_free(payload_iter);
-               free(payload);
+               if (payload) {
+                       free(payload);
+                       payload = NULL;
+               }
        }
        break;
        case ZBL_CUSTOM_ZCL_SEND_REQ: {
-               zb_zcl_send_rsp cb = container->cb;
+               zb_zcl_send_cb cb = container->cb;
 
                unsigned short addr16;
                unsigned char src_ep;
                unsigned char dst_ep;
-               unsigned short cluster_id;
-               unsigned short profile_id;
+               unsigned short clusterid;
+               unsigned short profileid;
                unsigned short payload_len = 0;
                unsigned char *payload = NULL;
 
@@ -2131,7 +2338,7 @@ ZBL_CUSTOM_APS_SEND_REQ_OUT:
                int i = 0;
 
                g_variant_get(parameters, "(qyyqqqa(y))", &addr16, &src_ep, &dst_ep,
-                               &cluster_id, &profile_id, &payload_len, &payload_iter);
+                               &clusterid, &profileid, &payload_len, &payload_iter);
                RETM_IF(NULL == payload_iter, "Invalid parameter !");
 
                if (payload_len > 0) {
@@ -2144,15 +2351,18 @@ ZBL_CUSTOM_APS_SEND_REQ_OUT:
                                payload[i++] = value;
                }
 
-               cb(addr16, src_ep, dst_ep, cluster_id, profile_id, payload_len, payload,
+               cb(addr16, src_ep, dst_ep, clusterid, profileid, payload_len, payload,
                        container->userdata);
 ZBL_CUSTOM_ZCL_SEND_REQ_OUT:
                g_variant_iter_free(payload_iter);
-               free(payload);
+               if (payload) {
+                       free(payload);
+                       payload = NULL;
+               }
        }
        break;
        case ZBL_CUSTOM_LOCAL_SEND_REQ: {
-               zb_send_to_local_rsp cb = container->cb;
+               zb_send_to_local_cb cb = container->cb;
 
                unsigned char *data = NULL;
                unsigned short length = 0;
@@ -2177,32 +2387,34 @@ ZBL_CUSTOM_ZCL_SEND_REQ_OUT:
                cb(length, data, container->userdata);
 ZBL_CUSTOM_LOCAL_SEND_REQ_OUT:
                g_variant_iter_free(payload_iter);
-               free(data);
+               if (data) {
+                       free(data);
+                       data = NULL;
+               }
        }
        break;
        /* ZCL Global */
        case ZBL_ZCL_GLOBAL_READ_ATTRIBUTE_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_attr_read_cb cb = container->cb;
 
                int j = 0;
                int isString;
                unsigned char value;
 
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned short attr_id;
-               unsigned short cluster_id;
+               unsigned short clusterid;
                unsigned char status;
                unsigned char type;
-               unsigned short records_len;
+               unsigned short count;
                unsigned char attr_value[128];
 
                GVariantIter *iter = NULL;
                struct read_attribute_status_record_s *records = NULL;
-               zb_global_record_data_s *data;
 
                g_variant_get(parameters, "(qya(y)qqyyqi)",
-                       &addr16, &ep, &iter, &attr_id, &cluster_id, &status, &type, &records_len, &isString);
+                       &addr16, &ep, &iter, &attr_id, &clusterid, &status, &type, &count, &isString);
                RETM_IF(NULL == iter, "Invalid parameter !");
 
                if (!isString) {
@@ -2215,7 +2427,7 @@ ZBL_CUSTOM_LOCAL_SEND_REQ_OUT:
                } else {
                        while (g_variant_iter_loop(iter, "(y)", &value)) {
                                if (j == 0)
-                                       records_len = value;
+                                       count = value;
                                attr_value[j] = value;
                                DBG("attr_value[%d] = 0x%02X", j, value);
                                j++;
@@ -2223,10 +2435,9 @@ ZBL_CUSTOM_LOCAL_SEND_REQ_OUT:
                        g_variant_iter_free(iter);
                }
 
-               data = calloc(1, sizeof(zb_global_record_data_s));
                records = calloc(1, sizeof(struct read_attribute_status_record_s));
 
-               if (!records || !data) {
+               if (!records) {
                        ERR("calloc() Fail(%d)", errno);
                        goto GLOBAL_READ_ATTRIBUTE_REQ_OUT;
                }
@@ -2235,43 +2446,40 @@ ZBL_CUSTOM_LOCAL_SEND_REQ_OUT:
                records->status = status;
                records->type = type;
                records->value = attr_value;
-               data->type = ZB_GLOBAL_READ_ATTR;
-               data->record.read_attr = (void **)&records;
-               data->records_len = records_len;
 
-               cb(addr16, ep, cluster_id, data, records_len, container->userdata);
+               cb(addr16, ep, clusterid, (void **)&records, count, container->userdata);
 
 GLOBAL_READ_ATTRIBUTE_REQ_OUT:
-               if (records)
+               if (records) {
                        free(records);
-               if (data)
-                       free(data);
+                       records = NULL;
+               }
+
        }
        break;
        case ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               zb_zcl_global_attr_write_cb cb = container->cb;
 
                int i = 0;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
-               unsigned short cluster_id;
-               unsigned short attribute_id;
-               int records_len;
+               unsigned short clusterid;
+               unsigned short attributeid;
+               int count;
                unsigned char value;
 
                GVariantIter *stat_iter = NULL;
                GVariantIter *attr_iter = NULL;
                struct write_attribute_status_record_s *records = NULL;
-               zb_global_record_data_s *data;
 
                g_variant_get(parameters, "(qya(y)aqqi)",
-                       &addr16, &ep, &stat_iter, &attr_iter, &cluster_id, &records_len);
+                       &addr16, &ep, &stat_iter, &attr_iter, &clusterid, &count);
                RETM_IF(NULL == stat_iter, "Invalid parameter !");
                RETM_IF(NULL == attr_iter, "Invalid parameter !");
 
-               records = calloc(records_len, sizeof(struct write_attribute_status_record_s));
-               data = calloc(1, sizeof(zb_global_record_data_s));
-               if (!records || !data) {
+               records = calloc(count,
+                       sizeof(struct write_attribute_status_record_s));
+               if (!records) {
                        g_variant_iter_free(stat_iter);
                        g_variant_iter_free(attr_iter);
                        ERR("calloc() Fail(%d)", errno);
@@ -2285,47 +2493,50 @@ GLOBAL_READ_ATTRIBUTE_REQ_OUT:
                g_variant_iter_free(stat_iter);
 
                i = 0;
-               while (g_variant_iter_loop(attr_iter, "q", &attribute_id)) {
-                       records[i].id = attribute_id;
-                       DBG("Attribute Id 0x%04X", attribute_id);
+               while (g_variant_iter_loop(attr_iter, "q", &attributeid)) {
+                       records[i].id = attributeid;
+                       DBG("Attribute Id 0x%04X", attributeid);
                        i++;
                }
                g_variant_iter_free(attr_iter);
 
-               data->type = ZB_GLOBAL_WRITE_ATTR;
-               data->record.write_attr = (void **)&records;
-               data->records_len = records_len;
-
-               cb(addr16, ep, cluster_id, data, records_len, container->userdata);
+               cb(addr16, ep, clusterid, (void **)&records, count, container->userdata);
 
 GLOBAL_WRITE_ATTRIBUTE_REQ_OUT:
-               free(records);
-               free(data);
+               if (records) {
+                       free(records);
+                       records = NULL;
+               }
        }
        break;
-       case ZBL_ZCL_GLOBAL_CONFIGURE_REPORTING_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
-               nwk_addr addr16;
+       case ZBL_ZCL_GLOBAL_WRITE_CONFIGURE_REPORTING_REQ: {
+               int j = 0;
+               int l = 0;
+               int k = 0;
+               int rec_len;
+
                unsigned char ep;
-               unsigned short cluster_id;
+               unsigned short clusterid;
                unsigned short attIdVal;
                unsigned char value;
-               int j = 0, l = 0, k = 0, rec_len;
+
                GVariantIter *stat_iter = NULL;
                GVariantIter *attr_iter = NULL;
                GVariantIter *dir_iter = NULL;
+
+               zb_nwk_addr addr16;
+               zb_zcl_global_config_report_write_cb cb = container->cb;
                struct reporting_configuration_response_record_s *records = NULL;
-               zb_global_record_data_s *data;
 
                g_variant_get(parameters, "(a(y)aqa(y)qiqy)",
-                       &stat_iter, &attr_iter, &dir_iter, &cluster_id, &rec_len, &addr16, &ep);
+                       &stat_iter, &attr_iter, &dir_iter, &clusterid, &rec_len, &addr16, &ep);
                RETM_IF(NULL == stat_iter, "Invalid parameter !");
                RETM_IF(NULL == attr_iter, "Invalid parameter !");
                RETM_IF(NULL == dir_iter, "Invalid parameter !");
 
-               records = calloc(rec_len, sizeof(struct reporting_configuration_response_record_s));
-               data = calloc(1, sizeof(zb_global_record_data_s));
-               if (!data || !records) {
+               records = calloc(rec_len,
+                       sizeof(struct reporting_configuration_response_record_s));
+               if (!records) {
                        g_variant_iter_free(stat_iter);
                        g_variant_iter_free(attr_iter);
                        g_variant_iter_free(dir_iter);
@@ -2341,59 +2552,65 @@ GLOBAL_WRITE_ATTRIBUTE_REQ_OUT:
                g_variant_iter_free(stat_iter);
 
                while (g_variant_iter_loop(attr_iter, "q", &attIdVal)) {
-                       if (records[l].status != ZB_ZCL_SUCCESS)
+                       if (records[l].status != ZB_ZCL_STATUS_SUCCESS)
                                records[l].id = attIdVal;
                        l++;
                }
                g_variant_iter_free(attr_iter);
 
                while (g_variant_iter_loop(dir_iter, "(y)", &value)) {
-                       if (records[k].status != ZB_ZCL_SUCCESS)
+                       if (records[k].status != ZB_ZCL_STATUS_SUCCESS)
                                records[k].dir = value;
                        k++;
                }
                g_variant_iter_free(dir_iter);
 
-               data->type = ZB_GLOBAL_CONFIG_REPORT;
-               data->record.report_config_rsp = (void **)&records;
-               data->records_len = rec_len;
-
-               cb(addr16, ep, cluster_id, data, rec_len, container->userdata);
+               cb(addr16, ep, clusterid, (void **)&records, rec_len, container->userdata);
 
 GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
-               free(records);
-               free(data);
+               if (records) {
+                       free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_ATTRIBUTE_REQ: {
-               zb_zcl_global_discover_attr_rsp cb = container->cb;
-               nwk_addr addr16;
-               unsigned char ep;
-               struct discover_attribute_info_record_s **records = NULL;
 
-               int records_len;
-               unsigned short cluster_id;
-               unsigned short attribute_id;
+               int j = 0;
+               int l = 0;
+               int count;
+               unsigned short clusterid;
+               unsigned short attributeid;
                unsigned char value;
-               int j = 0, l = 0;
                int discovery_complete;
+
                GVariantIter *stat_iter = NULL;
                GVariantIter *attr_iter = NULL;
 
+               zb_nwk_addr addr16;
+               unsigned char ep;
+
+               zb_zcl_global_attr_discover_cb cb = container->cb;
+               struct discover_attribute_info_record_s **records = NULL;
+
                g_variant_get(parameters, "(qya(y)aqqii)",  &addr16, &ep, &stat_iter,
-                                               &attr_iter, &cluster_id, &records_len, &discovery_complete);
+                                               &attr_iter, &clusterid, &count, &discovery_complete);
                RETM_IF(NULL == stat_iter, "Invalid parameter !");
                RETM_IF(NULL == attr_iter, "Invalid parameter !");
 
-               records = calloc(records_len, sizeof(discover_attr_info_record_h));
+               records = calloc(count, sizeof(zb_zcl_discover_attr_info_record_h));
                RETM_IF(NULL == records, "calloc() Fail(%d)", errno);
-               for (j = 0; j < records_len; j++) {
+               for (j = 0; j < count; j++) {
                        records[j] = calloc(1, sizeof(struct discover_attribute_info_record_s));
                        if (NULL == records[j]) {
                                ERR("calloc() Fail(%d)", errno);
-                               for (l = 0; l < j; l++)
+                               for (l = 0; l < j; l++) {
                                        free(records[l]);
+                                       records[l] = NULL;
+                               }
                                free(records);
+                               records = NULL;
+
                                g_variant_iter_free(stat_iter);
                                g_variant_iter_free(attr_iter);
                                return;
@@ -2408,43 +2625,52 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                }
                g_variant_iter_free(stat_iter);
 
-               while (g_variant_iter_loop(attr_iter, "q", &attribute_id)) {
-                       records[l]->id = attribute_id;
-                       DBG("Attribute Id 0x%04X", attribute_id);
+               while (g_variant_iter_loop(attr_iter, "q", &attributeid)) {
+                       records[l]->id = attributeid;
+                       DBG("Attribute Id 0x%04X", attributeid);
                        l++;
                }
                g_variant_iter_free(attr_iter);
 
-               cb(addr16, ep, cluster_id, discovery_complete, (void *)records, records_len,
+               cb(addr16, ep, clusterid, discovery_complete, (void *)records, count,
                        container->userdata);
 
-               for (j = 0; j < records_len; j++)
-                       free(records[j]);
-               free(records);
+               for (j = 0; j < count; j++) {
+                       if (records[j]) {
+                               free(records[j]);
+                               records[j] = NULL;
+                       }
+               }
+               if (records) {
+                       free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GLOBAL_WRITE_ATTRIBUTE_STRUCTURED_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
+               /* CAUTION: Currently we don't support this command */
+               zb_zcl_global_attr_write_cb cb = container->cb;
                cb(0, 0, 0, NULL, 0, container->userdata);
        }
        break;
        /* GLOBAL_DISCOVER_COMMAND_RECEIVED and GLOBAL_DISCOVER_COMMAND_GENERATED should be handled as same way */
        case ZBL_ZCL_GLOBAL_DISCOVER_COMMAND_RECEIVED_REQ:
        case ZBL_ZCL_GLOBAL_DISCOVER_COMMAND_GENERATED_REQ: {
-               zb_zcl_global_discover_cmds_rsp cb = container->cb;
-
-               nwk_addr addr16;
-               unsigned char ep;
 
                int j = 0;
                char value;
-               unsigned short cluster_id;
+               unsigned short clusterid;
                unsigned short cmd_len;
                unsigned char *cmd_data;
                unsigned char discoveryComplete;
+
                GVariantIter *cmd_iter = NULL;
 
-               g_variant_get(parameters, "(a(y)qqqyy)", &cmd_iter, &cluster_id, &cmd_len,
+               unsigned char ep;
+               zb_nwk_addr addr16;
+               zb_zcl_global_discover_cmds_cb cb = container->cb;
+
+               g_variant_get(parameters, "(a(y)qqqyy)", &cmd_iter, &clusterid, &cmd_len,
                        &addr16, &ep, &discoveryComplete);
                RETM_IF(NULL == cmd_iter, "Invalid parameter !");
 
@@ -2462,18 +2688,19 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                }
                g_variant_iter_free(cmd_iter);
 
-               cb(addr16, ep, cluster_id, discoveryComplete, cmd_data, cmd_len, container->userdata);
-               free(cmd_data);
+               cb(addr16, ep, clusterid, discoveryComplete, cmd_data, cmd_len,
+                       container->userdata);
+               if (cmd_data) {
+                       free(cmd_data);
+                       cmd_data = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GLOBAL_DISCOVER_ATTRIBUTE_EXTENDED_REQ: {
-               zb_zcl_global_discover_attr_extended_rsp cb = container->cb;
-               nwk_addr addr16;
-               unsigned char ep;
 
                int i = 0;
                int j = 0;
-               unsigned short cluster_id;
+               unsigned short clusterid;
                unsigned char t_value;
                unsigned char ac_value;
 
@@ -2483,26 +2710,33 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                GVariantIter *attr_iter = NULL;
                GVariantIter *type_iter = NULL;
                GVariantIter *ac_iter = NULL;
+
+               unsigned char ep;
+               zb_nwk_addr addr16;
                struct extended_attribute_infomation_s **records = NULL;
+               zb_zcl_global_attr_extended_discover_cb cb = container->cb;
 
                DBG("Will get the value now");
 
                g_variant_get(parameters, "(aqa(y)a(y)qqqyy)", &attr_iter, &type_iter, &ac_iter,
-                       &cluster_id, &rec_len, &addr16, &ep, &discoveryComplete);
+                       &clusterid, &rec_len, &addr16, &ep, &discoveryComplete);
                RETM_IF(NULL == attr_iter, "Invalid parameter !");
                RETM_IF(NULL == type_iter, "Invalid parameter !");
                RETM_IF(NULL == ac_iter, "Invalid parameter !");
 
                DBG("records length 0x%04X", rec_len);
 
-               records = calloc(rec_len, sizeof(extended_attr_info_h));
+               records = calloc(rec_len, sizeof(zb_zcl_extended_attr_info_h));
                RETM_IF(NULL == records, "calloc() Fail(%d)", errno);
                for (j = 0; j < rec_len; j++) {
                        records[j] = calloc(1, sizeof(struct extended_attribute_infomation_s));
                        if (NULL == records[j]) {
-                               for (i = 0; i < j; i++)
+                               for (i = 0; i < j; i++) {
                                        free(records[i]);
+                                       records[i] = NULL;
+                               }
                                free(records);
+                               records = NULL;
 
                                g_variant_iter_free(attr_iter);
                                g_variant_iter_free(type_iter);
@@ -2529,18 +2763,22 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                g_variant_iter_free(type_iter);
                g_variant_iter_free(ac_iter);
 
-               cb(addr16, ep, cluster_id, discoveryComplete, (void *)records, rec_len, container->userdata);
+               cb(addr16, ep, clusterid, discoveryComplete, (void *)records, rec_len,
+                       container->userdata);
 
-               for (j = 0; j < rec_len; j++)
-                       free(records[j]);
-               free(records);
+               for (j = 0; j < rec_len; j++) {
+                       if (records[j]) {
+                               free(records[j]);
+                               records[j] = NULL;
+                       }
+               }
+               if (records) {
+                       free(records);
+                       records = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GLOBAL_READ_CONFIGURE_REPORTING_REQ: {
-               zb_zcl_global_rsp cb = container->cb;
-               nwk_addr addr16;
-               unsigned char ep;
-               unsigned short cluster_id;
 
                int i = 0;
                int j = 0;
@@ -2549,17 +2787,22 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                unsigned char *data_size = NULL;
                unsigned char *change = NULL;
                unsigned short record_length;
+
                GVariantIter *resp_iter = NULL;
                GVariantIter *data_iter = NULL;
 
+               zb_nwk_addr addr16;
+               unsigned char ep;
+               unsigned short clusterid;
+               zb_zcl_global_attr_read_cb cb = container->cb;
+
                struct reporting_configuration_record_s **records = NULL;
-               zb_global_record_data_s *data = NULL;
 
                g_variant_get(parameters, "(qyqqa(yyqyqqayq))",
-                       &addr16, &ep, &cluster_id, &record_length, &resp_iter);
+                       &addr16, &ep, &clusterid, &record_length, &resp_iter);
                RETM_IF(NULL == resp_iter, "Invalid parameter !");
 
-               records = calloc(record_length, sizeof(report_config_record_h));
+               records = calloc(record_length, sizeof(zb_zcl_reporting_config_record_h));
                RETM_IF(NULL == records, "calloc() Fail(%d)", errno);
 
                for (i = 0; i < record_length; i++) {
@@ -2569,8 +2812,7 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                                goto GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT;
                        }
                }
-               data = calloc(1, sizeof(zb_global_record_data_s));
-               if (!data || !records) {
+               if (!records) {
                        ERR("calloc() Fail(%d)", errno);
                        goto GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT;
                }
@@ -2593,8 +2835,8 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                        }
 
                        if (records[i]->dir != ZCL_REPORTING_DIRECTION_REPORTED &&
-                               (zb_get_analog_or_discret(records[i]->type) == DATA_TYPE_ANALOG)) {
-                               data_size[i] = zb_get_data_size(records[j]->type);
+                               (zb_zcl_get_analog_or_discret(records[i]->type) == ZB_ZCL_DATA_TYPE_ANALOG)) {
+                               data_size[i] = zb_zcl_get_data_size(records[j]->type);
                                j = 0;
                                if (data_size[i] != 0xff) {
                                        change = calloc(data_size[i]+1, sizeof(unsigned char));
@@ -2618,39 +2860,49 @@ GLOBAL_CONFIGURE_REPORTING_REQ_OUT:
                }
                g_variant_iter_free(resp_iter);
 
-               data->type = ZB_GLOBAL_READ_REPORT_CONFIG;
-               data->record.report_config = (void **)records;
-               data->records_len = record_length;
-
-               cb(addr16, ep, cluster_id, data, record_length, container->userdata);
+               cb(addr16, ep, clusterid, (void **)records, record_length, container->userdata);
 
 GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT:
-               free(data_size);
-               free(status);
+               if (data_size) {
+                       free(data_size);
+                       data_size = NULL;
+               }
+               if (status) {
+                       free(status);
+                       status = NULL;
+               }
+
                for (i = 0; i < record_length; i++) {
-                       if (records[i] && records[i]->change)
+                       if (records[i] && records[i]->change) {
                                free(records[i]->change);
-                       if (records[i])
+                               records[i]->change = NULL;
+                       }
+                       if (records[i]) {
                                free(records[i]);
+                               records[i] = NULL;
+                       }
+               }
+               if (records) {
+                       free(records);
+                       records = NULL;
                }
-               free(records);
-               free(data);
        }
        break;
        /* ZCL Alarm */
        case ZBL_ZCL_ALARM_GET_ALARM_REQ: {
-               zb_zcl_alarm_get_alarm_rsp cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep = 0;
                unsigned char status = 0;
                unsigned char alarm_code = 0;
-               unsigned short cluster_id = 0;
+               unsigned short clusterid = 0;
                unsigned int time_stamp = 0;
 
+               zb_zcl_alarm_get_alarm_cb cb = container->cb;
+
                g_variant_get(parameters, "(qyyyqu)", &addr16, &ep, &status, &alarm_code,
-                                       &cluster_id, &time_stamp);
-               cb(addr16, ep, status, alarm_code, cluster_id, time_stamp, container->userdata);
+                                       &clusterid, &time_stamp);
+               cb(addr16, ep, status, alarm_code, clusterid, time_stamp, container->userdata);
        }
        break;
        /* ZCL Doorlock */
@@ -2665,9 +2917,9 @@ GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT:
        break;
        /* ZCL Group */
        case ZBL_ZCL_GROUP_ADD_GROUP_REQ: {
-               zb_zcl_group_add_group_rsp cb = container->cb;
+               zb_zcl_group_add_group_cb cb = container->cb;
 
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2677,10 +2929,10 @@ GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT:
        }
        break;
        case ZBL_ZCL_GROUP_VIEW_GROUP_REQ: {
-               zb_zcl_group_view_group_rsp cb = container->cb;
+               zb_zcl_group_view_group_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned char value;
                unsigned char status;
@@ -2727,15 +2979,17 @@ GLOBAL_READ_CONFIGURE_REPORTING_REQ_OUT:
                cb(addr16, ep, status, group_id, group_name, container->userdata);
 
 GROUP_VIEW_GROUP_REQ_OUT:
-               if (group_name)
+               if (group_name) {
                        free(group_name);
+                       group_name = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GROUP_GET_GROUP_MEMBERSHIP_REQ: {
-               zb_zcl_group_get_group_membership_rsp cb = container->cb;
+               zb_zcl_group_get_group_membership_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned short gl_value;
                unsigned char capacity;
@@ -2764,13 +3018,16 @@ GROUP_VIEW_GROUP_REQ_OUT:
 
                cb(addr16, ep, capacity, group_count, grouplist, container->userdata);
 
-               free(grouplist);
+               if (grouplist) {
+                       free(grouplist);
+                       grouplist = NULL;
+               }
        }
        break;
        case ZBL_ZCL_GROUP_REMOVE_GROUP_REQ: {
-               zb_zcl_group_remove_group_rsp cb = container->cb;
+               zb_zcl_group_remove_group_cb cb = container->cb;
 
-               nwk_addr addr16;
+               zb_nwk_addr addr16;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2784,7 +3041,7 @@ GROUP_VIEW_GROUP_REQ_OUT:
        case ZBL_ZCL_IDENTIFY_QUERY_REQ: {
                zb_zcl_identify_query_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned short identify_time = 0;
                g_variant_get(parameters, "(qq)", &addr16, &identify_time);
 
@@ -2798,9 +3055,9 @@ GROUP_VIEW_GROUP_REQ_OUT:
        break;
        /* ZCL Pollcontrol */
        case ZBL_ZCL_POLLCONTROL_SET_POLL_INTERVAL_REQ: {
-               zb_zcl_pollctrl_check_in cb = container->cb;
+               zb_zcl_pollctrl_check_in_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep = 0;
 
                g_variant_get(parameters, "(qy)", &addr16, &ep);
@@ -2809,9 +3066,9 @@ GROUP_VIEW_GROUP_REQ_OUT:
        break;
        /* ZCL Scene */
        case ZBL_ZCL_SCENE_ADD_SCENE_REQ: {
-               zb_zcl_scene_add_scene_rsp cb = container->cb;
+               zb_zcl_scene_add_scene_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2822,11 +3079,11 @@ GROUP_VIEW_GROUP_REQ_OUT:
        }
        break;
        case ZBL_ZCL_SCENE_VIEW_SCENE_REQ: {
-               zb_zcl_scene_view_scene_rsp cb = container->cb;
+               zb_zcl_scene_view_scene_cb cb = container->cb;
 
                int j = 0;
                int len;
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2887,14 +3144,21 @@ GROUP_VIEW_GROUP_REQ_OUT:
                                extendedFieldSets, ext_len, container->userdata);
 
 SCENE_VIEW_SCENE_REQ_OUT:
-               free(scene_name);
-               free(extendedFieldSets);
+               if (scene_name) {
+                       free(scene_name);
+                       scene_name = NULL;
+               }
+
+               if (extendedFieldSets) {
+                       free(extendedFieldSets);
+                       extendedFieldSets = NULL;
+               }
        }
        break;
        case ZBL_ZCL_SCENE_REMOVE_SCENE_REQ: {
-               zb_zcl_scene_remove_scene_rsp cb = container->cb;
+               zb_zcl_scene_remove_scene_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2905,9 +3169,9 @@ SCENE_VIEW_SCENE_REQ_OUT:
        }
        break;
        case ZBL_ZCL_SCENE_STORE_SCENE_REQ: {
-               zb_zcl_scene_store_scene_rsp cb = container->cb;
+               zb_zcl_scene_store_scene_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2918,9 +3182,9 @@ SCENE_VIEW_SCENE_REQ_OUT:
        }
        break;
        case ZBL_ZCL_SCENE_REMOVE_ALL_SCENE_REQ: {
-               zb_zcl_scene_remove_all_scene_rsp cb = container->cb;
+               zb_zcl_scene_remove_all_scene_cb cb = container->cb;
 
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2930,10 +3194,10 @@ SCENE_VIEW_SCENE_REQ_OUT:
        }
        break;
        case ZBL_ZCL_SCENE_GET_SCENE_MEMBERSHIP_REQ: {
-               zb_zcl_scene_get_scene_membership_rsp cb = container->cb;
+               zb_zcl_scene_get_scene_membership_cb cb = container->cb;
 
                int j = 0;
-               nwk_addr addr16 = 0;
+               zb_nwk_addr addr16 = 0;
                unsigned char ep;
                unsigned char status;
                unsigned short group_id;
@@ -2961,7 +3225,10 @@ SCENE_VIEW_SCENE_REQ_OUT:
 
                cb(addr16, ep, status, capacity, group_id, scene_count, scene_list, container->userdata);
 SCENE_GET_SCENE_MEMBERSHIP_REQ_OUT:
-               free(scene_list);
+               if (scene_list) {
+                       free(scene_list);
+                       scene_list = NULL;
+               }
        }
        break;
        /* ZCL Thermostat */
@@ -3000,7 +3267,7 @@ static int _check_zigbee_privilege()
        return result;
 }
 
-int zbl_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
+int zbl_set_event_cb(zb_zigbee_h handle, zb_event_cb event_handler)
 {
        struct zbl_zigbee_s *h = handle;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -3008,7 +3275,7 @@ int zbl_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
        return ZIGBEE_ERROR_NONE;
 }
 
-int zbl_enable(zigbee_h handle)
+int zbl_enable(zb_zigbee_h handle)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -3109,7 +3376,7 @@ int zbl_hw_reset(void)
        return result;
 }
 
-int zbl_get_network_info(ieee_addr addr64, nwk_addr *nodeid, nwk_addr *panid,
+int zbl_get_network_info(zb_ieee_addr addr64, zb_nwk_addr *nodeid, zb_nwk_addr *panid,
                unsigned char *channel, unsigned char *tx_power)
 {
        GVariant *variant = NULL;
@@ -3117,8 +3384,8 @@ int zbl_get_network_info(ieee_addr addr64, nwk_addr *nodeid, nwk_addr *panid,
        GError *dbus_err = NULL;
        int result = ZIGBEE_ERROR_NONE;
 
-       nwk_addr _nodeid;
-       nwk_addr _panid;
+       zb_nwk_addr _nodeid;
+       zb_nwk_addr _panid;
        unsigned char _radio_channel;
        unsigned char _radio_tx_power;
        unsigned char value;
@@ -3176,7 +3443,7 @@ int zbl_get_network_info(ieee_addr addr64, nwk_addr *nodeid, nwk_addr *panid,
        return result;
 }
 
-int zbl_get_controller_mac_address(ieee_addr addr64)
+int zbl_get_controller_mac_address(zb_ieee_addr addr64)
 {
        GVariant *variant = NULL;
        GVariantIter *iter = NULL;
@@ -3221,7 +3488,7 @@ int zbl_get_controller_mac_address(ieee_addr addr64)
        return result;
 }
 
-int zbl_get_cluster_list(ieee_addr eui64, unsigned char endpoint,
+int zbl_get_cluster_list(zb_ieee_addr eui64, unsigned char endpoint,
                unsigned char *in_cluster_count, unsigned short in_cluster_list[],
                unsigned char *out_cluster_count, unsigned short out_cluster_list[])
 {
@@ -3300,7 +3567,7 @@ int zbl_get_cluster_list(ieee_addr eui64, unsigned char endpoint,
        return ret;
 }
 
-int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char list[])
+int zbl_get_endpoint_list(zb_ieee_addr eui64, unsigned char *count, unsigned char list[])
 {
        GVariant *variant = NULL;
        GVariantBuilder *mac_builder = NULL;
@@ -3366,7 +3633,7 @@ int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char l
        return ret;
 }
 
-int zbl_api_get_node_type(ieee_addr eui64, unsigned char *node_type)
+int zbl_api_get_node_type(zb_ieee_addr eui64, unsigned char *node_type)
 {
        GVariant *variant = NULL;
        GVariantBuilder *mac_builder = NULL;
@@ -3411,7 +3678,7 @@ int zbl_api_get_node_type(ieee_addr eui64, unsigned char *node_type)
        return result;
 }
 
-int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
+int zbl_get_all_device_info(zb_end_dev_info_h **dev_list, unsigned char* num)
 {
        int i = 0;
        int j = 0;
@@ -3444,16 +3711,21 @@ int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
 
                DBG("ret = [0x%x]", result);
 
-               list = calloc(MAX_DEVICE_LIST+1, sizeof(zb_end_device_info_h));
+               list = calloc(MAX_DEVICE_LIST+1, sizeof(zb_end_dev_info_h));
                RETV_IF(NULL == list, ZIGBEE_ERROR_OUT_OF_MEMORY);
                for (i = 0; i < MAX_DEVICE_LIST && list; i++) {
                        list[i] = calloc(1, sizeof(struct zb_end_device_info_s));
                        if (NULL == list[i]) {
                                for (j = 0; j < i; j++) {
-                                       if (list[j])
+                                       if (list[j]) {
                                                free(list[j]);
+                                               list[j] = NULL;
+                                       }
+                               }
+                               if (list) {
+                                       free(list);
+                                       list = NULL;
                                }
-                               free(list);
                                g_variant_unref(variant);
                                return ZIGBEE_ERROR_OUT_OF_MEMORY;
                        }
@@ -3465,10 +3737,15 @@ int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
                        if (NULL == mac_iter || NULL == endpoint_iter) {
                                ERR("Invalid parameter !");
                                for (j = 0; j <= MAX_DEVICE_LIST; j++) {
-                                       if (list[j])
+                                       if (list[j]) {
                                                free(list[j]);
+                                               list[j] = NULL;
+                                       }
+                               }
+                               if (list) {
+                                       free(list);
+                                       list = NULL;
                                }
-                               free(list);
                                g_variant_iter_free(iter);
                                if (NULL != mac_iter)
                                        g_variant_iter_free(mac_iter);
@@ -3506,7 +3783,7 @@ int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
                        }
                        g_variant_iter_free(mac_iter);
 
-                       memcpy(list[i]->addr64, node_mac_address, sizeof(ieee_addr));
+                       memcpy(list[i]->addr64, node_mac_address, sizeof(zb_ieee_addr));
                        DBG("Node MAC Addr : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
                                node_mac_address[0], node_mac_address[1], node_mac_address[2],
                                node_mac_address[3], node_mac_address[4], node_mac_address[5],
@@ -3596,7 +3873,7 @@ int zbl_coex_stop(void)
        return result;
 }
 
-int zbl_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
+int zbl_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -3619,6 +3896,7 @@ int zbl_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -3649,7 +3927,7 @@ int zbl_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
        return result;
 }
 
-int zbl_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_data)
+int zbl_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -3674,6 +3952,7 @@ int zbl_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_da
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -3704,7 +3983,7 @@ int zbl_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_da
        return result;
 }
 
-int zbl_leave_device(ieee_addr addr64, bool remove_children, bool rejoin)
+int zbl_leave_device(zb_ieee_addr addr64, bool remove_children, bool rejoin)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -3786,8 +4065,8 @@ int zbl_permit_join(unsigned char duration, bool broadcast)
        return result;
 }
 
-int zbl_nwk_addr_req(zigbee_h handle, ieee_addr addr64, unsigned char request_type,
-       unsigned char start_idx, zb_zdo_addr_rsp cb, void *user_data)
+int zbl_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64, unsigned char request_type,
+       unsigned char start_idx, zb_zdo_addr_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -3815,6 +4094,7 @@ int zbl_nwk_addr_req(zigbee_h handle, ieee_addr addr64, unsigned char request_ty
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -3858,7 +4138,7 @@ int zbl_nwk_addr_req(zigbee_h handle, ieee_addr addr64, unsigned char request_ty
        return result;
 }
 
-int zbl_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
+int zbl_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
                void *user_data)
 {
        int sub_id, to;
@@ -3885,6 +4165,7 @@ int zbl_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -3915,7 +4196,7 @@ int zbl_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
        return result;
 }
 
-int zbl_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
+int zbl_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
                void *user_data)
 {
        int sub_id, to;
@@ -3942,6 +4223,7 @@ int zbl_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -3972,8 +4254,8 @@ int zbl_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
        return result;
 }
 
-int zbl_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zdo_simple_desc_rsp cb, void *user_data)
+int zbl_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+               zb_zdo_simple_desc_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -3999,6 +4281,7 @@ int zbl_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4029,18 +4312,16 @@ int zbl_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-#ifdef ZB_SUPPORT_PRIORITY_5
-int zbl_extended_simple_desc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_extended_simple_desc_rsp cb, void *user_data)
+int zbl_extended_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_extended_simple_desc_cb cb, void *user_data)
 {
        return ZIGBEE_ERROR_NOT_SUPPORTED;
 }
-#endif /* ZB_SUPPORT_PRIORITY_5 */
 
-int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned short profile_id, unsigned char num_in_clusters,
+int zbl_match_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+               unsigned short profileid, unsigned char num_in_clusters,
                unsigned short *in_clusters, unsigned char num_out_clusters,
-               unsigned short *out_clusters, zb_zdo_match_desc_rsp cb, void *user_data)
+               unsigned short *out_clusters, zb_zdo_match_desc_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4072,6 +4353,7 @@ int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4095,7 +4377,7 @@ int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
        g_variant_builder_unref(outcl_builder);
 
        variant = g_dbus_proxy_call_sync(zdo_dev_proxy, "matched_descriptor_req",
-               g_variant_new("(qqy@aqy@aq)", addr16, profile_id, num_in_clusters,
+               g_variant_new("(qqy@aqy@aq)", addr16, profileid, num_in_clusters,
                incl_variant, num_out_clusters, outcl_variant),
                G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
@@ -4117,7 +4399,7 @@ int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
        return result;
 }
 
-int zbl_node_desc_req(nwk_addr addr16, zb_zdo_node_desc_rsp cb, void *user_data)
+int zbl_node_desc_req(zb_nwk_addr addr16, zb_zdo_node_desc_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4143,6 +4425,7 @@ int zbl_node_desc_req(nwk_addr addr16, zb_zdo_node_desc_rsp cb, void *user_data)
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4173,7 +4456,8 @@ int zbl_node_desc_req(nwk_addr addr16, zb_zdo_node_desc_rsp cb, void *user_data)
        return result;
 }
 
-int zbl_power_desc_req(nwk_addr addr16, zb_zdo_power_desc_rsp cb,      void *user_data)
+int zbl_power_desc_req(zb_nwk_addr addr16, zb_zdo_power_desc_cb cb,
+       void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4197,6 +4481,7 @@ int zbl_power_desc_req(nwk_addr addr16, zb_zdo_power_desc_rsp cb, void *user_dat
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4227,7 +4512,8 @@ int zbl_power_desc_req(nwk_addr addr16, zb_zdo_power_desc_rsp cb, void *user_dat
        return result;
 }
 
-int zbl_complex_desc_req(nwk_addr addr16, zb_zdo_complex_desc_rsp cb, void *user_data)
+int zbl_complex_desc_req(zb_nwk_addr addr16, zb_zdo_complex_desc_cb cb,
+       void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4251,6 +4537,7 @@ int zbl_complex_desc_req(nwk_addr addr16, zb_zdo_complex_desc_rsp cb, void *user
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4281,7 +4568,7 @@ int zbl_complex_desc_req(nwk_addr addr16, zb_zdo_complex_desc_rsp cb, void *user
        return result;
 }
 
-int zbl_user_desc_req(nwk_addr addr16, zb_zdo_user_desc_rsp cb, void *user_data)
+int zbl_user_desc_req(zb_nwk_addr addr16, zb_zdo_user_desc_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4305,6 +4592,7 @@ int zbl_user_desc_req(nwk_addr addr16, zb_zdo_user_desc_rsp cb, void *user_data)
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4338,8 +4626,8 @@ int zbl_user_desc_req(nwk_addr addr16, zb_zdo_user_desc_rsp cb, void *user_data)
 #define MAX_USER_DESC_SIZE 0x10
 #define USER_DESC_COMMAND_SIZE 20
 
-int zbl_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
-               unsigned char *user_desc, zb_zdo_user_desc_conf cb, void *user_data)
+int zbl_user_desc_set(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char len,
+       unsigned char *user_desc, zb_zdo_user_desc_conf_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4369,6 +4657,7 @@ int zbl_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4407,8 +4696,8 @@ int zbl_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
        return result;
 }
 
-int zbl_device_annce(zigbee_h handle, nwk_addr addr16, ieee_addr addr64,
-               unsigned char capability)
+int zbl_device_annce(zb_zigbee_h handle, zb_nwk_addr addr16, zb_ieee_addr addr64,
+       unsigned char capability)
 {
        int result = ZIGBEE_ERROR_NONE;
        GError *dbus_err = NULL;
@@ -4454,10 +4743,10 @@ int zbl_device_annce(zigbee_h handle, nwk_addr addr16, ieee_addr addr64,
        return result;
 }
 
-int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
-               unsigned char src_ep, unsigned short cluster_id, ieee_addr dst_addr64,
-               unsigned char type, nwk_addr group_addr, unsigned char dst_ep,
-               zb_zdo_bind_rsp cb, void *user_data)
+int zbl_bind_req(zb_nwk_addr dst_addr16, zb_ieee_addr src_addr64,
+       unsigned char src_ep, unsigned short clusterid, zb_ieee_addr dst_addr64,
+       unsigned char type, zb_nwk_addr group_addr, unsigned char dst_ep,
+       zb_zdo_bind_cb cb, void *user_data)
 {
        int i;
        int sub_id, to;
@@ -4487,6 +4776,7 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4499,7 +4789,7 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
        src_addr64_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
 
        if (src_addr64) {
-               for (i = sizeof(ieee_addr) - 1 ; i >= 0; i--)
+               for (i = sizeof(zb_ieee_addr) - 1 ; i >= 0; i--)
                        g_variant_builder_add(src_addr64_builder, "(y)", src_addr64[i]);
        }
        src_addr64_variant = g_variant_builder_end(src_addr64_builder);
@@ -4507,7 +4797,7 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
 
        dst_addr64_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (dst_addr64) {
-               for (i = sizeof(ieee_addr) - 1 ; i >= 0; i--)
+               for (i = sizeof(zb_ieee_addr) - 1 ; i >= 0; i--)
                        g_variant_builder_add(dst_addr64_builder, "(y)", dst_addr64[i]);
        }
        dst_addr64_variant = g_variant_builder_end(dst_addr64_builder);
@@ -4515,7 +4805,7 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
 
        variant = g_dbus_proxy_call_sync(zdo_bind_proxy, "bind_req",
                g_variant_new("(q@a(y)yq@a(y)yqy)", dst_addr16, src_addr64_variant, src_ep,
-                                               cluster_id, dst_addr64_variant, type, group_addr, dst_ep),
+                                               clusterid, dst_addr64_variant, type, group_addr, dst_ep),
                G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -4536,10 +4826,10 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
        return result;
 }
 
-int zbl_unbind_req(nwk_addr dst_addr16,
-               ieee_addr src_addr64, unsigned char src_ep, unsigned short cluster_id,
-               ieee_addr dst_addr64, unsigned char type, nwk_addr group_addr,
-               unsigned char dst_ep, zb_zdo_unbind_rsp cb, void *user_data)
+int zbl_unbind_req(zb_nwk_addr dst_addr16,
+       zb_ieee_addr src_addr64, unsigned char src_ep, unsigned short clusterid,
+       zb_ieee_addr dst_addr64, unsigned char type, zb_nwk_addr group_addr,
+       unsigned char dst_ep, zb_zdo_unbind_cb cb, void *user_data)
 {
        int i;
        int sub_id, to;
@@ -4569,6 +4859,7 @@ int zbl_unbind_req(nwk_addr dst_addr16,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4580,7 +4871,7 @@ int zbl_unbind_req(nwk_addr dst_addr16,
 
        src_addr64_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (src_addr64) {
-               for (i = sizeof(ieee_addr) - 1 ; i >= 0; i--)
+               for (i = sizeof(zb_ieee_addr) - 1 ; i >= 0; i--)
                        g_variant_builder_add(src_addr64_builder, "(y)", src_addr64[i]);
        }
        src_addr64_variant = g_variant_builder_end(src_addr64_builder);
@@ -4588,7 +4879,7 @@ int zbl_unbind_req(nwk_addr dst_addr16,
 
        dst_addr64_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
        if (dst_addr64) {
-               for (i = sizeof(ieee_addr) - 1 ; i >= 0; i--)
+               for (i = sizeof(zb_ieee_addr) - 1 ; i >= 0; i--)
                        g_variant_builder_add(dst_addr64_builder, "(y)", dst_addr64[i]);
        }
        dst_addr64_variant = g_variant_builder_end(dst_addr64_builder);
@@ -4596,7 +4887,7 @@ int zbl_unbind_req(nwk_addr dst_addr16,
 
        variant = g_dbus_proxy_call_sync(zdo_bind_proxy, "unbind_req",
                g_variant_new("(q@a(y)yq@a(y)yqy)", dst_addr16, src_addr64_variant, src_ep,
-                                               cluster_id, dst_addr64_variant, type, group_addr, dst_ep),
+                                               clusterid, dst_addr64_variant, type, group_addr, dst_ep),
                G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -4617,9 +4908,9 @@ int zbl_unbind_req(nwk_addr dst_addr16,
        return result;
 }
 
-int zbl_mgmt_nwk_disc_req(nwk_addr addr16, unsigned int scan_channels,
+int zbl_mgmt_nwk_disc_req(zb_nwk_addr addr16, unsigned int scan_channels,
        unsigned char scan_duration, unsigned char scan_count, unsigned char start_idx,
-       zb_zdo_mgmt_nwk_disc_rsp cb, void *user_data)
+       zb_zdo_mgmt_nwk_disc_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4645,6 +4936,7 @@ int zbl_mgmt_nwk_disc_req(nwk_addr addr16, unsigned int scan_channels,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4677,7 +4969,7 @@ int zbl_mgmt_nwk_disc_req(nwk_addr addr16, unsigned int scan_channels,
 }
 
 int zbl_mgmt_nwk_update_req(unsigned int scan_channels, unsigned char scan_duration,
-       unsigned char scan_count, unsigned char nwk_update_id, nwk_addr nwk_manager_addr)
+       unsigned char scan_count, unsigned char nwk_update_id, zb_nwk_addr nwk_manager_addr)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -4710,8 +5002,8 @@ int zbl_mgmt_nwk_update_req(unsigned int scan_channels, unsigned char scan_durat
        return result;
 }
 
-int zbl_mgmt_lqi_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_lqi_rsp cb, void *user_data)
+int zbl_mgmt_lqi_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_lqi_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4737,6 +5029,7 @@ int zbl_mgmt_lqi_req(nwk_addr addr16, unsigned char start_idx,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4768,8 +5061,8 @@ int zbl_mgmt_lqi_req(nwk_addr addr16, unsigned char start_idx,
        return result;
 }
 
-int zbl_mgmt_rtg_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_rtg_rsp cb, void *user_data)
+int zbl_mgmt_rtg_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_rtg_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4795,6 +5088,7 @@ int zbl_mgmt_rtg_req(nwk_addr addr16, unsigned char start_idx,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4826,8 +5120,8 @@ int zbl_mgmt_rtg_req(nwk_addr addr16, unsigned char start_idx,
        return result;
 }
 
-int zbl_mgmt_bind_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_bind_rsp cb, void *user_data)
+int zbl_mgmt_bind_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_bind_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4853,6 +5147,7 @@ int zbl_mgmt_bind_req(nwk_addr addr16, unsigned char start_idx,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4884,8 +5179,8 @@ int zbl_mgmt_bind_req(nwk_addr addr16, unsigned char start_idx,
        return result;
 }
 
-int zbl_mgmt_leave_device(ieee_addr addr64, unsigned char remove_children,
-               unsigned rejoin, zb_zdo_mgmt_leave_rsp cb, void *user_data)
+int zbl_mgmt_leave_device(zb_ieee_addr addr64, unsigned char remove_children,
+       unsigned rejoin, zb_zdo_mgmt_leave_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4912,6 +5207,7 @@ int zbl_mgmt_leave_device(ieee_addr addr64, unsigned char remove_children,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -4955,8 +5251,8 @@ int zbl_mgmt_leave_device(ieee_addr addr64, unsigned char remove_children,
        return result;
 }
 
-int zbl_mgmt_permit_joining_req(nwk_addr addr16, unsigned char duration,
-               unsigned char tc_significance, zb_zdo_mgmt_permit_joining_rsp cb, void *user_data)
+int zbl_mgmt_permit_joining_req(zb_nwk_addr addr16, unsigned char duration,
+       unsigned char tc_significance, zb_zdo_mgmt_permit_joining_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -4980,6 +5276,7 @@ int zbl_mgmt_permit_joining_req(nwk_addr addr16, unsigned char duration,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5011,10 +5308,11 @@ int zbl_mgmt_permit_joining_req(nwk_addr addr16, unsigned char duration,
        return result;
 }
 
-int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src_ep,
-       unsigned char dst_ep, unsigned short cluster_id, unsigned short profile_id,
-       unsigned char zcl_frame_ctl, unsigned short mfg_code, unsigned char cmd_id,
-       unsigned short payload_len, unsigned char *payload, zb_aps_send_rsp cb, void *user_data)
+int zbl_aps_send(zb_nwk_addr addr16, unsigned char aps_fc,
+       unsigned char src_ep, unsigned char dst_ep, unsigned short clusterid,
+       unsigned short profileid, unsigned char zcl_fc, unsigned short mfg_code,
+       unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
+       zb_aps_send_cb cb, void *user_data)
 {
        int sub_id, to, i;
        zbl_req_cb_s *container;
@@ -5040,6 +5338,7 @@ int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5058,8 +5357,9 @@ int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src
        g_variant_builder_unref(payload_builder);
 
        variant = g_dbus_proxy_call_sync(custom_gproxy, "aps_send",
-               g_variant_new("(qyyyqqyqyq@a(y))", addr16, aps_frame_ctl, src_ep, dst_ep, cluster_id,
-               profile_id, zcl_frame_ctl, mfg_code, cmd_id, payload_len, payload_variant),
+               g_variant_new("(qyyyqqyqyq@a(y))", addr16, aps_fc, src_ep, dst_ep,
+               clusterid, profileid, zcl_fc, mfg_code, cmd_id, payload_len,
+               payload_variant),
                G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -5080,10 +5380,10 @@ int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src
        return result;
 }
 
-int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned short cluster_id, unsigned char zcl_frame_ctl, unsigned char cmd,
-               unsigned short payload_len, unsigned char *payload,
-               zb_zcl_send_rsp cb, void *user_data)
+int zbl_zcl_send(zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned short clusterid, unsigned char zcl_fc, unsigned char cmd,
+       unsigned short payload_len, unsigned char *payload,
+       zb_zcl_send_cb cb, void *user_data)
 {
        int sub_id, to, i;
        zbl_req_cb_s *container;
@@ -5109,6 +5409,7 @@ int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5127,7 +5428,7 @@ int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
        g_variant_builder_unref(payload_builder);
 
        variant = g_dbus_proxy_call_sync(custom_gproxy, "zcl_send",
-               g_variant_new("(qyyqyyq@a(y))", addr16, src_ep, dst_ep, cluster_id, zcl_frame_ctl,
+               g_variant_new("(qyyqyyq@a(y))", addr16, src_ep, dst_ep, clusterid, zcl_fc,
                cmd, payload_len, payload_variant), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -5149,7 +5450,7 @@ int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
 }
 
 int zbl_send_to_local(unsigned short length, unsigned char *data,
-               zb_send_to_local_rsp cb, void *user_data)
+       zb_send_to_local_cb cb, void *user_data)
 {
        int sub_id, to, i;
        zbl_req_cb_s *container;
@@ -5175,6 +5476,7 @@ int zbl_send_to_local(unsigned short length, unsigned char *data,
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5214,9 +5516,9 @@ int zbl_send_to_local(unsigned short length, unsigned char *data,
        return result;
 }
 
-int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest_ep,
-       unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned short *attribute_ids,
-       int attribute_ids_len, zb_zcl_global_rsp cb, void *user_data)
+int zbl_read_attr_req(zb_zigbee_h handle, unsigned short addr16, unsigned char dest_ep,
+       unsigned char zcl_fc, unsigned short clusterid, unsigned short *attribute_ids,
+       int attribute_ids_len, zb_zcl_global_attr_read_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -5251,6 +5553,7 @@ int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
                free(container);
+               container = NULL;
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5266,12 +5569,13 @@ int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest
                g_source_remove(container->tid);
                container->tid = 0;
                free(container);
+               container = NULL;
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dest_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_READ_ATTRIBUTES_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_READ_ATTRIBUTES;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -5289,7 +5593,8 @@ int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "read_attributes_req",
                g_variant_new("(@a(y)iqqyy)", attr_variant, attribute_ids_len,
-               addr16, cluster_id, zcl_frame_ctl, dest_ep), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
+               addr16, clusterid, zcl_fc, dest_ep), G_DBUS_CALL_FLAGS_NONE, to,
+               NULL, &dbus_err);
 
        if (!variant) {
                ERR("Failed to get 'read_attributes_req' [%s]", dbus_err->message);
@@ -5309,10 +5614,10 @@ int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest
        return result;
 }
 
-int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **data, int records_len, zb_zcl_global_rsp cb,
-               void *user_data)
+int zbl_write_attr_req(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
+       void **data, int count, zb_zcl_global_attr_write_cb cb,
+       void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -5346,32 +5651,41 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        unsigned short *dataSize = NULL;
        unsigned char *writeAttribute = NULL;
 
-       isString = calloc(records_len + 1, sizeof(unsigned char));
+       isString = calloc(count + 1, sizeof(unsigned char));
        RETVM_IF(NULL == isString, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
-       dataSize = calloc(records_len + 1, sizeof(unsigned short));
+       dataSize = calloc(count + 1, sizeof(unsigned short));
        if (NULL == dataSize) {
                ERR("calloc() Fail(%d)", errno);
-               free(isString);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("Records Length %d", records_len);
+       DBG("Records Length %d", count);
+
+       while (j < count) {
+               dataSize[j] = zb_zcl_get_data_size((*records)[j].type);
 
-       while (j < records_len) {
-               dataSize[j] = zb_get_data_size((*records)[j].type);
                if (0xff != dataSize[j]) {
+
                        isString[j] = 0;
                        size_of_allo = size_of_allo + (dataSize[j] + 3);
+
                } else {
                        if ((*records)[j].value) {
-                               if ((*records)[j].type == ZB_ZCL_CHRACTER_STRING
-                                       || (*records)[j].type == ZB_ZCL_OCTAT_STRING) {
+                               if ((*records)[j].type == ZB_ZCL_CHARACTER_STRING
+                                       || (*records)[j].type == ZB_ZCL_OCTET_STRING) {
+
                                                isString[j] = 1;
                                                dataSize[j] = (*records)[j].value[0];
                                                size_of_allo = size_of_allo + (dataSize[j] + 3 + 1);
-                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTAT_STRING
-                                       || (*records)[j].type == ZB_ZCL_LONG_CHRACTER_STRING) {
+
+                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTET_STRING
+                                       || (*records)[j].type == ZB_ZCL_LONG_CHARACTER_STRING) {
+
                                        isString[j] = 2;
                                        dSize[0] = (*records)[j].value[0];
                                        dSize[1] = (*records)[j].value[1];
@@ -5389,13 +5703,19 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        writeAttribute = calloc(size_of_allo + 1, sizeof(unsigned char));
        if (NULL == writeAttribute) {
                ERR("Couldn't Allocate Memory");
-               free(isString);
-               free(dataSize);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
        j = 0;
-       while (j < records_len && writeAttributeIndex < size_of_allo) {
+       while (j < count && writeAttributeIndex < size_of_allo) {
                writeAttribute[writeAttributeIndex++] = ((*records)[j].id) & 0xff;
                writeAttribute[writeAttributeIndex++] = (((*records)[j].id) >> 8) & 0xff;
                writeAttribute[writeAttributeIndex++] = (*records)[j].type;
@@ -5419,9 +5739,18 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        container = calloc(1, sizeof(zbl_req_cb_s));
        if (NULL == container) {
                ERR("calloc() Fail(%d)", errno);
-               free(isString);
-               free(dataSize);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
@@ -5433,10 +5762,22 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(isString);
-               free(dataSize);
-               free(container);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5451,16 +5792,28 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
-               free(isString);
-               free(dataSize);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_WRITE_ATTRIBUTES_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_WRITE_ATTRIBUTES;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -5471,12 +5824,21 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "write_attributes_req",
                g_variant_new("(@a(y)iqqyyy)", rec_variant, writeAttributeIndex, addr16,
-               cluster_id, zcl_frame_ctl, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
+               clusterid, zcl_fc, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
                to, NULL, &dbus_err);
 
-       free(isString);
-       free(dataSize);
-       free(writeAttribute);
+       if (isString) {
+               free(isString);
+               isString = NULL;
+       }
+       if (dataSize) {
+               free(dataSize);
+               dataSize = NULL;
+       }
+       if (writeAttribute) {
+               free(writeAttribute);
+               writeAttribute = NULL;
+       }
 
        if (!variant) {
                ERR("Failed to get 'write_attributes_req' [%s]", dbus_err->message);
@@ -5496,10 +5858,10 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        return result;
 }
 
-int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **data, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+int zbl_wattr_undivided_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **data, int count,
+       zb_zcl_global_attr_write_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -5533,32 +5895,32 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
        unsigned short *dataSize = NULL;
        unsigned char *writeAttribute = NULL;
 
-       isString = calloc(records_len + 1, sizeof(unsigned char));
+       isString = calloc(count + 1, sizeof(unsigned char));
        RETVM_IF(NULL == isString, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
-       dataSize = calloc(records_len + 1, sizeof(unsigned short));
+       dataSize = calloc(count + 1, sizeof(unsigned short));
        if (NULL == dataSize) {
                ERR("calloc() Fail(%d)", errno);
                free(isString);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("Records Length %d", records_len);
+       DBG("Records Length %d", count);
 
-       while (j < records_len) {
-               dataSize[j] = zb_get_data_size((*records)[j].type);
+       while (j < count) {
+               dataSize[j] = zb_zcl_get_data_size((*records)[j].type);
                if (0xff != dataSize[j]) {
                        isString[j] = 0;
                        size_of_allo = size_of_allo + (dataSize[j] + 3);
                } else {
                        if ((*records)[j].value) {
-                               if ((*records)[j].type == ZB_ZCL_CHRACTER_STRING
-                                       || (*records)[j].type == ZB_ZCL_OCTAT_STRING) {
+                               if ((*records)[j].type == ZB_ZCL_CHARACTER_STRING
+                                       || (*records)[j].type == ZB_ZCL_OCTET_STRING) {
                                                isString[j] = 1;
                                                dataSize[j] = (*records)[j].value[0];
                                                size_of_allo = size_of_allo + (dataSize[j] + 3 + 1);
-                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTAT_STRING
-                                       || (*records)[j].type == ZB_ZCL_LONG_CHRACTER_STRING) {
+                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTET_STRING
+                                       || (*records)[j].type == ZB_ZCL_LONG_CHARACTER_STRING) {
                                        isString[j] = 2;
                                        dSize[0] = (*records)[j].value[0];
                                        dSize[1] = (*records)[j].value[1];
@@ -5576,13 +5938,19 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
        writeAttribute = calloc(size_of_allo + 1, sizeof(unsigned char));
        if (NULL == writeAttribute) {
                ERR("Couldn't Allocate Memory");
-               free(isString);
-               free(dataSize);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
        j = 0;
-       while (j < records_len && writeAttributeIndex < size_of_allo) {
+       while (j < count && writeAttributeIndex < size_of_allo) {
                writeAttribute[writeAttributeIndex++] = ((*records)[j].id) & 0xff;
                writeAttribute[writeAttributeIndex++] = (((*records)[j].id) >> 8) & 0xff;
                writeAttribute[writeAttributeIndex++] = (*records)[j].type;
@@ -5606,9 +5974,18 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
        container = calloc(1, sizeof(zbl_req_cb_s));
        if (NULL == container) {
                ERR("calloc() Fail(%d)", errno);
-               free(isString);
-               free(dataSize);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
@@ -5620,10 +5997,22 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(isString);
-               free(dataSize);
-               free(container);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5638,16 +6027,28 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
-               free(isString);
-               free(dataSize);
-               free(writeAttribute);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
+               if (writeAttribute) {
+                       free(writeAttribute);
+                       writeAttribute = NULL;
+               }
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_WRITE_ATTRIBUTES_UNDIVIDED;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -5658,12 +6059,21 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "write_attributes_undivided_req",
                g_variant_new("(@a(y)iqqyyy)", rec_variant, writeAttributeIndex, addr16,
-               cluster_id, zcl_frame_ctl, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
+               clusterid, zcl_fc, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
                to, NULL, &dbus_err);
 
-       free(isString);
-       free(dataSize);
-       free(writeAttribute);
+       if (isString) {
+               free(isString);
+               isString = NULL;
+       }
+       if (dataSize) {
+               free(dataSize);
+               dataSize = NULL;
+       }
+       if (writeAttribute) {
+               free(writeAttribute);
+               writeAttribute = NULL;
+       }
 
        if (!variant) {
                ERR("Failed to get 'write_attributes_undivided_req' [%s]", dbus_err->message);
@@ -5683,9 +6093,9 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
        return result;
 }
 
-int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **data, int records_len)
+int zbl_wattr_req_no_cb(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+               unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
+               void **data, int count)
 {
        int result = ZIGBEE_ERROR_NONE;
        GError *dbus_err = NULL;
@@ -5696,7 +6106,7 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == zcl_global_proxy, ZIGBEE_ERROR_IO_ERROR);
 
-       DBG("zbl_wattr_req_no_rsp()");
+       DBG("zbl_wattr_req_no_cb()");
 
        GVariantBuilder *rec_builder = NULL;
        GVariant *rec_variant = NULL;
@@ -5712,32 +6122,35 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        unsigned short *dataSize = NULL;
        unsigned char *writeAttribute = NULL;
 
-       isString = calloc(records_len + 1, sizeof(unsigned char));
+       isString = calloc(count + 1, sizeof(unsigned char));
        RETVM_IF(NULL == isString, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
-       dataSize = calloc(records_len + 1, sizeof(unsigned short));
+       dataSize = calloc(count + 1, sizeof(unsigned short));
        if (NULL == dataSize) {
                ERR("calloc() Fail(%d)", errno);
-               free(isString);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
-       DBG("Records Length %d", records_len);
+       DBG("Records Length %d", count);
 
-       while (j < records_len) {
-               dataSize[j] = zb_get_data_size((*records)[j].type);
+       while (j < count) {
+               dataSize[j] = zb_zcl_get_data_size((*records)[j].type);
                if (0xff != dataSize[j]) {
                        isString[j] = 0;
                        size_of_allo = size_of_allo + (dataSize[j] + 3);
                } else {
                        if ((*records)[j].value) {
-                               if ((*records)[j].type == ZB_ZCL_CHRACTER_STRING
-                                       || (*records)[j].type == ZB_ZCL_OCTAT_STRING) {
+                               if ((*records)[j].type == ZB_ZCL_CHARACTER_STRING
+                                       || (*records)[j].type == ZB_ZCL_OCTET_STRING) {
                                                isString[j] = 1;
                                                dataSize[j] = (*records)[j].value[0];
                                                size_of_allo = size_of_allo + (dataSize[j] + 3 + 1);
-                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTAT_STRING
-                                       || (*records)[j].type == ZB_ZCL_LONG_CHRACTER_STRING) {
+                               } else if ((*records)[j].type == ZB_ZCL_LONG_OCTET_STRING
+                                       || (*records)[j].type == ZB_ZCL_LONG_CHARACTER_STRING) {
                                        isString[j] = 2;
                                        dSize[0] = (*records)[j].value[0];
                                        dSize[1] = (*records)[j].value[1];
@@ -5755,13 +6168,19 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        writeAttribute = calloc(size_of_allo + 1, sizeof(unsigned char));
        if (NULL == writeAttribute) {
                ERR("Couldn't Allocate Memory");
-               free(isString);
-               free(dataSize);
+               if (isString) {
+                       free(isString);
+                       isString = NULL;
+               }
+               if (dataSize) {
+                       free(dataSize);
+                       dataSize = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
 
        j = 0;
-       while (j < records_len && writeAttributeIndex < size_of_allo) {
+       while (j < count && writeAttributeIndex < size_of_allo) {
                writeAttribute[writeAttributeIndex++] = ((*records)[j].id) & 0xff;
                writeAttribute[writeAttributeIndex++] = (((*records)[j].id) >> 8) & 0xff;
                writeAttribute[writeAttributeIndex++] = (*records)[j].type;
@@ -5784,13 +6203,21 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "write_attributes_no_resp",
                g_variant_new("(@a(y)iqqyyy)", rec_variant, writeAttributeIndex, addr16,
-               cluster_id, zcl_frame_ctl, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
+               clusterid, zcl_fc, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE,
                -1, NULL, &dbus_err);
 
-       free(isString);
-       free(dataSize);
-       free(writeAttribute);
-
+       if (isString) {
+               free(isString);
+               isString = NULL;
+       }
+       if (dataSize) {
+               free(dataSize);
+               dataSize = NULL;
+       }
+       if (writeAttribute) {
+               free(writeAttribute);
+               writeAttribute = NULL;
+       }
        if (!variant) {
                ERR("Failed to get 'write_attributes_no_rep' [%s]", dbus_err->message);
                if (strstr(dbus_err->message, "AccessDenied"))
@@ -5809,10 +6236,10 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
        return result;
 }
 
-int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **data, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+int zbl_write_config_report(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **data, int count,
+       zb_zcl_global_config_report_write_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -5831,7 +6258,7 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
        int i = 0;
        int j = 0;
        int len = 0;
-       int count = 0;
+       int payload_len = 0;
 
        GVariantBuilder *rec_builder = NULL;
        GVariant *rec_variant = NULL;
@@ -5839,7 +6266,7 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == zcl_global_proxy, ZIGBEE_ERROR_IO_ERROR);
 
-       DBG("zbl_configure_reporting()");
+       DBG("zbl_write_config_report()");
 
        container = calloc(1, sizeof(zbl_req_cb_s));
        RETVM_IF(NULL == container, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
@@ -5852,13 +6279,16 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
        container->cb = cb;
        container->sid = sub_id;
-       container->cid = ZBL_ZCL_GLOBAL_CONFIGURE_REPORTING_REQ;
+       container->cid = ZBL_ZCL_GLOBAL_WRITE_CONFIGURE_REPORTING_REQ;
        container->tid = g_timeout_add_seconds(to, _zbl_timeout_cb, container);
        container->userdata = user_data;
 #ifdef ZB_FEATURE_GLOBAL_RSP_SYNC
@@ -5867,13 +6297,16 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_CONFIGURE_REPORTING_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_CONFIGURE_REPORTING;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -5883,33 +6316,33 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
 #endif
 
        rec_builder = g_variant_builder_new(G_VARIANT_TYPE("a(y)"));
-       for (i = 0; i < records_len; i++) {
+       for (i = 0; i < count; i++) {
                g_variant_builder_add(rec_builder, "(y)", (*records)[i].dir);
                DBG("dir = 0x%02X", (*records)[i].dir);
-               count += sizeof((*records)[i].dir);
+               payload_len += sizeof((*records)[i].dir);
                g_variant_builder_add(rec_builder, "(y)", (*records)[i].id & 0xff);
                g_variant_builder_add(rec_builder, "(y)", ((*records)[i].id >> 8) & 0xff);
                DBG("id = 0x%04X", (*records)[i].id);
-               count += sizeof((*records)[i].id);
+               payload_len += sizeof((*records)[i].id);
                g_variant_builder_add(rec_builder, "(y)", (*records)[i].type);
-               count += sizeof((*records)[i].type);
+               payload_len += sizeof((*records)[i].type);
                DBG("type = 0x%04X", (*records)[i].type);
                g_variant_builder_add(rec_builder, "(y)", (*records)[i].min_i & 0xff);
                g_variant_builder_add(rec_builder, "(y)", ((*records)[i].min_i >> 8) & 0xff);
                DBG("min_i = 0x%04X", (*records)[i].min_i);
-               count += sizeof((*records)[i].min_i);
+               payload_len += sizeof((*records)[i].min_i);
                g_variant_builder_add(rec_builder, "(y)", (*records)[i].max_i & 0xff);
                g_variant_builder_add(rec_builder, "(y)", ((*records)[i].max_i >> 8) & 0xff);
                DBG("max_i = 0x%04X", (*records)[i].max_i);
-               count += sizeof((*records)[i].max_i);
+               payload_len += sizeof((*records)[i].max_i);
 
-               len = zb_get_data_size((*records)[i].type);
-               count += len;
+               len = zb_zcl_get_data_size((*records)[i].type);
+               payload_len += len;
                DBG("change length = %d", len);
-               DBG("payload length = %d", count);
+               DBG("payload length = %d", payload_len);
 
                for (j = 0; j < len && (*records)[i].change+j; j++) {
-                       DBG("records[%d]->value[%d] = %d", i, j, (*records)[i].change[j]);
+                       DBG("records[%d]->change[%d] = %d", i, j, (*records)[i].change[j]);
                        g_variant_builder_add(rec_builder, "(y)", (*records)[i].change[j]);
                }
 
@@ -5918,8 +6351,8 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
        g_variant_builder_unref(rec_builder);
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "configure_reporting_req",
-               g_variant_new("(@a(y)qqqyyy)", rec_variant, count, addr16, cluster_id,
-               zcl_frame_ctl, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
+               g_variant_new("(@a(y)qqqyyy)", rec_variant, count, addr16, clusterid,
+               zcl_fc, src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
                ERR("Failed to get 'configure_reporting_req' [%s]", dbus_err->message);
@@ -5939,10 +6372,10 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
        return result;
 }
 
-int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **data, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+int zbl_read_config_report(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **data, int count,
+       zb_zcl_global_config_report_read_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -5969,7 +6402,7 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == zcl_global_proxy, ZIGBEE_ERROR_IO_ERROR);
 
-       DBG("zbl_read_configure_reporting()");
+       DBG("zbl_config_report_read()");
 
        container = calloc(1, sizeof(zbl_req_cb_s));
        RETVM_IF(NULL == container, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
@@ -5982,7 +6415,10 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -5997,13 +6433,16 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_READ_REPORTING_CONFIGURATION;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -6012,14 +6451,14 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
        _zbl_register_global_req(handle, container);
 #endif
 
-       DBG("Records Length %d", records_len);
+       DBG("Records Length %d", count);
        /**
         * According to zcl spec
         * Memory needed for the read_reporting_configured_frame.
         * 1 byte(direction) + 2 bytes(AttributeId)
         *  = 3 bytes/variable
         */
-       while (j < records_len) {
+       while (j < count) {
                size_of_allo = size_of_allo + 3;
                j++;
        }
@@ -6031,11 +6470,14 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
                g_dbus_connection_signal_unsubscribe(gdbus_conn, container->sid);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        j = 0;
-       while (j < records_len && idx < size_of_allo) {
+       while (j < count && idx < size_of_allo) {
                read_attributes[idx++] = (*records)[j].dir;
                read_attributes[idx++] = (*records)[j].id & 0xff;
                read_attributes[idx++] = (*records)[j].id >> 8 & 0xff;
@@ -6054,10 +6496,13 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
        g_variant_builder_unref(rec_builder);
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "read_configure_reporting",
-               g_variant_new("(@a(y)qqqyyy)", rec_variant, idx, addr16, cluster_id, zcl_frame_ctl,
+               g_variant_new("(@a(y)qqqyyy)", rec_variant, idx, addr16, clusterid, zcl_fc,
                src_ep, dst_ep), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
-       free(read_attributes);
+       if (read_attributes) {
+               free(read_attributes);
+               read_attributes = NULL;
+       }
 
        if (!variant) {
                ERR("Failed to get 'read_configure_reporting' [%s]", dbus_err->message);
@@ -6077,10 +6522,10 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
        return result;
 }
 
-int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char src_ep,
-               unsigned char dest_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
+int zbl_discover_attr_req(zb_zigbee_h handle, unsigned short addr16, unsigned char src_ep,
+               unsigned char dest_ep, unsigned char zcl_fc, unsigned short clusterid,
                unsigned short start_id, unsigned char max_attribute_ids,
-               zb_zcl_global_discover_attr_rsp cb, void *user_data)
+               zb_zcl_global_attr_discover_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -6109,7 +6554,10 @@ int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -6124,13 +6572,16 @@ int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dest_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_DISCOVER_ATTRIBUTES;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -6141,7 +6592,7 @@ int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "discover_attributes",
                g_variant_new("(qyyqqy)",
-               addr16, dest_ep, zcl_frame_ctl, cluster_id, start_id, max_attribute_ids),
+               addr16, dest_ep, zcl_fc, clusterid, start_id, max_attribute_ids),
                G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -6162,9 +6613,10 @@ int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char
        return result;
 }
 
-int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data)
+int zbl_discover_cmds_gen(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
+       unsigned char start_command_id, unsigned char max_command_ids,
+       zb_zcl_global_discover_cmds_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -6193,7 +6645,10 @@ int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -6208,13 +6663,16 @@ int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_DISCOVER_COMMANDS_GENERATED;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -6224,7 +6682,7 @@ int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 #endif
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "discover_commands_generated",
-               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_frame_ctl, cluster_id,
+               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_fc, clusterid,
                start_command_id, max_command_ids), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -6245,9 +6703,10 @@ int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
        return result;
 }
 
-int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data)
+int zbl_discover_cmds_recv(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned char start_command_id,
+       unsigned char max_command_ids, zb_zcl_global_discover_cmds_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -6276,7 +6735,10 @@ int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_e
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -6291,13 +6753,16 @@ int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_e
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_DISCOVER_COMMANDS_RECEIVED;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -6307,7 +6772,7 @@ int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_e
 #endif
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "discover_commands_received",
-               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_frame_ctl, cluster_id,
+               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_fc, clusterid,
                start_command_id, max_command_ids), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -6328,10 +6793,10 @@ int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_e
        return result;
 }
 
-int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-       unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
+int zbl_discover_attr_ext(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
        unsigned short start_id, unsigned char max_attribute_ids,
-       zb_zcl_global_discover_attr_extended_rsp cb, void *user_data)
+       zb_zcl_global_attr_extended_discover_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -6360,7 +6825,10 @@ int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -6375,13 +6843,16 @@ int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
                g_dbus_connection_signal_unsubscribe(gdbus_conn, sub_id);
                g_source_remove(container->tid);
                container->tid = 0;
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                ERR("calloc() Fail(%d)", errno);
                return ZIGBEE_ERROR_OUT_OF_MEMORY;
        }
        global_req->ep = dst_ep;
-       global_req->cluster_id = cluster_id;
-       global_req->command_id = ZB_ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID;
+       global_req->clusterid = clusterid;
+       global_req->commandid = ZB_ZCL_CMD_DISCOVER_ATTRIBUTES_EXTENDED;
 
        container->global_cmd = global_req;
        container->handle = handle;
@@ -6391,7 +6862,7 @@ int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 #endif
 
        variant = g_dbus_proxy_call_sync(zcl_global_proxy, "discover_attributes_extended",
-               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_frame_ctl, cluster_id, start_id,
+               g_variant_new("(qyyqqy)", addr16, dst_ep, zcl_fc, clusterid, start_id,
                max_attribute_ids), G_DBUS_CALL_FLAGS_NONE, to, NULL, &dbus_err);
 
        if (!variant) {
@@ -6412,8 +6883,8 @@ int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
        return result;
 }
 
-int zbl_reset_alarm(nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
-               unsigned short cluster_id)
+int zbl_reset_alarm(zb_nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
+               unsigned short clusterid)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -6423,7 +6894,7 @@ int zbl_reset_alarm(nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
        RETV_IF(NULL == alarm_gproxy, ZIGBEE_ERROR_IO_ERROR);
 
        variant = g_dbus_proxy_call_sync(alarm_gproxy, "reset_alarm",
-               g_variant_new("(qyyq)", addr16, ep, alarm_code, cluster_id),
+               g_variant_new("(qyyq)", addr16, ep, alarm_code, clusterid),
                G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
 
        if (!variant) {
@@ -6444,7 +6915,7 @@ int zbl_reset_alarm(nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
        return result;
 }
 
-int zbl_reset_all_alarm(nwk_addr addr16, unsigned char ep)
+int zbl_reset_all_alarm(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -6474,7 +6945,7 @@ int zbl_reset_all_alarm(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_get_alarm(nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_rsp cb,
+int zbl_get_alarm(zb_nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_cb cb,
                void *user_data)
 {
        int sub_id, to;
@@ -6499,7 +6970,10 @@ int zbl_get_alarm(nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_rsp
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -6530,7 +7004,7 @@ int zbl_get_alarm(nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_rsp
        return result;
 }
 
-int zbl_reset_all_alarm_log(nwk_addr addr16, unsigned char ep)
+int zbl_reset_all_alarm_log(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -6560,7 +7034,7 @@ int zbl_reset_all_alarm_log(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_ccontrol_move_to_hue(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_to_hue(zb_nwk_addr addr16, unsigned char ep,
                unsigned char hue, unsigned char direction,
                unsigned short transition_time)
 {
@@ -6594,7 +7068,7 @@ int zbl_ccontrol_move_to_hue(nwk_addr addr16, unsigned char ep,
 }
 
 
-int zbl_ccontrol_move_hue(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_hue(zb_nwk_addr addr16, unsigned char ep,
                unsigned char move_mode, unsigned char rate)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -6626,7 +7100,7 @@ int zbl_ccontrol_move_hue(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_step_hue(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_step_hue(zb_nwk_addr addr16, unsigned char ep,
                unsigned char step_mode, unsigned char step_size,
                unsigned char transition_time)
 {
@@ -6659,7 +7133,7 @@ int zbl_ccontrol_step_hue(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_to_saturation(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_to_saturation(zb_nwk_addr addr16, unsigned char ep,
                unsigned char saturation, unsigned short transition_time)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -6691,7 +7165,7 @@ int zbl_ccontrol_move_to_saturation(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_saturation(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_saturation(zb_nwk_addr addr16, unsigned char ep,
                unsigned char move_mode, unsigned char rate)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -6723,7 +7197,7 @@ int zbl_ccontrol_move_saturation(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_step_saturation(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_step_saturation(zb_nwk_addr addr16, unsigned char ep,
                unsigned char step_mode, unsigned char step_size,
                unsigned char transition_time)
 {
@@ -6756,7 +7230,7 @@ int zbl_ccontrol_step_saturation(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_to_hue_and_saturation(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_to_hue_and_saturation(zb_nwk_addr addr16, unsigned char ep,
                unsigned char hue, unsigned char saturation,
                unsigned short transition_time)
 {
@@ -6789,7 +7263,7 @@ int zbl_ccontrol_move_to_hue_and_saturation(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_to_color(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_to_color(zb_nwk_addr addr16, unsigned char ep,
                unsigned short color_x, unsigned short color_y,
                unsigned short transition_time)
 {
@@ -6822,7 +7296,7 @@ int zbl_ccontrol_move_to_color(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_color(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_color(zb_nwk_addr addr16, unsigned char ep,
                unsigned short rate_x, unsigned short rate_y)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -6854,7 +7328,7 @@ int zbl_ccontrol_move_color(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_step_color(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_step_color(zb_nwk_addr addr16, unsigned char ep,
                unsigned short step_x, unsigned short step_y,
                unsigned short transition_time)
 {
@@ -6887,7 +7361,7 @@ int zbl_ccontrol_step_color(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_ccontrol_move_to_color_temperature(nwk_addr addr16, unsigned char ep,
+int zbl_ccontrol_move_to_color_temperature(zb_nwk_addr addr16, unsigned char ep,
                unsigned short color_temperature,
                unsigned short transition_time)
 {
@@ -6920,7 +7394,7 @@ int zbl_ccontrol_move_to_color_temperature(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_reset_factory_default(nwk_addr addr16, unsigned char ep)
+int zbl_reset_factory_default(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -6950,7 +7424,7 @@ int zbl_reset_factory_default(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_identify(nwk_addr addr16, unsigned char dst_ep, unsigned short identify_time)
+int zbl_identify(zb_nwk_addr addr16, unsigned char dst_ep, unsigned short identify_time)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -6981,7 +7455,7 @@ int zbl_identify(nwk_addr addr16, unsigned char dst_ep, unsigned short identify_
        return result;
 }
 
-int zbl_identify_query(nwk_addr addr16, unsigned char dst_ep,
+int zbl_identify_query(zb_nwk_addr addr16, unsigned char dst_ep,
                zb_zcl_identify_query_cb cb, void *user_data)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7006,7 +7480,10 @@ int zbl_identify_query(nwk_addr addr16, unsigned char dst_ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7037,8 +7514,8 @@ int zbl_identify_query(nwk_addr addr16, unsigned char dst_ep,
        return result;
 }
 
-int zbl_add_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               const char *group_name, zb_zcl_group_add_group_rsp cb, void *user_data)
+int zbl_add_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+               const char *group_name, zb_zcl_group_add_group_cb cb, void *user_data)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7066,7 +7543,10 @@ int zbl_add_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7106,8 +7586,8 @@ int zbl_add_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               zb_zcl_group_view_group_rsp cb, void *user_data)
+int zbl_view_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+               zb_zcl_group_view_group_cb cb, void *user_data)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7131,7 +7611,10 @@ int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7163,9 +7646,9 @@ int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
+int zbl_group_get_group_membership(zb_nwk_addr addr16, unsigned char ep,
                unsigned char group_count, unsigned short *group_list,
-               zb_zcl_group_get_group_membership_rsp cb, void *user_data)
+               zb_zcl_group_get_group_membership_cb cb, void *user_data)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7194,7 +7677,10 @@ int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7234,8 +7720,8 @@ int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_remove_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               zb_zcl_group_remove_group_rsp cb, void *user_data)
+int zbl_remove_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+               zb_zcl_group_remove_group_cb cb, void *user_data)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7259,7 +7745,10 @@ int zbl_remove_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7290,7 +7779,7 @@ int zbl_remove_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_remove_all_group(nwk_addr addr16, unsigned char ep)
+int zbl_remove_all_group(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7322,7 +7811,7 @@ int zbl_remove_all_group(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_add_group_if_identifying(nwk_addr addr16, unsigned char ep,
+int zbl_add_group_if_identifying(zb_nwk_addr addr16, unsigned char ep,
                unsigned short group_id, const char *group_name)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7366,7 +7855,7 @@ int zbl_add_group_if_identifying(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_level_control_move_to_level(nwk_addr addr16, unsigned char ep,
+int zbl_level_control_move_to_level(zb_nwk_addr addr16, unsigned char ep,
                unsigned char level, unsigned short transition_time)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7400,7 +7889,7 @@ int zbl_level_control_move_to_level(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_level_control_move(nwk_addr addr16, unsigned char ep,
+int zbl_level_control_move(zb_nwk_addr addr16, unsigned char ep,
                unsigned char move_mode, unsigned char rate)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7434,7 +7923,7 @@ int zbl_level_control_move(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_level_control_step(nwk_addr addr16, unsigned char ep,
+int zbl_level_control_step(zb_nwk_addr addr16, unsigned char ep,
                unsigned char step_mode, unsigned char step_size,
                unsigned short transition_time)
 {
@@ -7469,7 +7958,7 @@ int zbl_level_control_step(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_level_control_stop(nwk_addr addr16, unsigned char ep)
+int zbl_level_control_stop(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7501,7 +7990,7 @@ int zbl_level_control_stop(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_level_control_move_to_level_with_on_off(nwk_addr addr16,
+int zbl_level_control_move_to_level_with_on_off(zb_nwk_addr addr16,
                unsigned char ep, unsigned char level, unsigned short transition_time)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7535,7 +8024,7 @@ int zbl_level_control_move_to_level_with_on_off(nwk_addr addr16,
        return result;
 }
 
-int zbl_level_control_move_with_on_off(nwk_addr addr16, unsigned char ep,
+int zbl_level_control_move_with_on_off(zb_nwk_addr addr16, unsigned char ep,
                unsigned char move_mode, unsigned char rate)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7569,7 +8058,7 @@ int zbl_level_control_move_with_on_off(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_level_control_step_with_on_off(nwk_addr addr16, unsigned char ep,
+int zbl_level_control_step_with_on_off(zb_nwk_addr addr16, unsigned char ep,
                unsigned char step_mode, unsigned char step_size,
                unsigned short transition_time)
 {
@@ -7604,7 +8093,7 @@ int zbl_level_control_step_with_on_off(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_onoff_set(nwk_addr addr16, unsigned char ep, unsigned char on_off_type)
+int zbl_onoff_set(zb_nwk_addr addr16, unsigned char ep, unsigned char on_off_type)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7635,7 +8124,7 @@ int zbl_onoff_set(nwk_addr addr16, unsigned char ep, unsigned char on_off_type)
        return result;
 }
 
-int zbl_zone_enroll_response(nwk_addr addr16, unsigned char dst_ep,
+int zbl_zone_enroll_response(zb_nwk_addr addr16, unsigned char dst_ep,
                unsigned char enroll_response_code, unsigned char zone_id)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7667,7 +8156,7 @@ int zbl_zone_enroll_response(nwk_addr addr16, unsigned char dst_ep,
        return result;
 }
 
-int zbl_pollcontrol_check_in_response(nwk_addr addr16, unsigned char ep,
+int zbl_pollcontrol_check_in_response(zb_nwk_addr addr16, unsigned char ep,
                unsigned char start_fast_polling, unsigned short fast_poll_timeout)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -7699,7 +8188,7 @@ int zbl_pollcontrol_check_in_response(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_pollcontrol_fast_poll_stop(nwk_addr addr16, unsigned char ep)
+int zbl_pollcontrol_fast_poll_stop(zb_nwk_addr addr16, unsigned char ep)
 {
        int result = ZIGBEE_ERROR_NONE;
        GVariant *variant = NULL;
@@ -7729,8 +8218,8 @@ int zbl_pollcontrol_fast_poll_stop(nwk_addr addr16, unsigned char ep)
        return result;
 }
 
-int zbl_pollcontrol_set_long_poll_interval(nwk_addr addr16, unsigned char ep,
-       unsigned int new_long_poll_interval, zb_zcl_pollctrl_check_in cb, void *user_data)
+int zbl_pollcontrol_set_long_poll_interval(zb_nwk_addr addr16, unsigned char ep,
+       unsigned int new_long_poll_interval, zb_zcl_pollctrl_check_in_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -7755,7 +8244,10 @@ int zbl_pollcontrol_set_long_poll_interval(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7787,8 +8279,8 @@ int zbl_pollcontrol_set_long_poll_interval(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_pollcontrol_set_short_poll_interval(nwk_addr addr16, unsigned char ep,
-       unsigned int new_short_poll_interval, zb_zcl_pollctrl_check_in cb, void *user_data)
+int zbl_pollcontrol_set_short_poll_interval(zb_nwk_addr addr16, unsigned char ep,
+       unsigned int new_short_poll_interval, zb_zcl_pollctrl_check_in_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -7813,7 +8305,10 @@ int zbl_pollcontrol_set_short_poll_interval(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7845,10 +8340,10 @@ int zbl_pollcontrol_set_short_poll_interval(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_add_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
+int zbl_add_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
        unsigned char scene_id, unsigned short transition_time, const char *scene_name,
        unsigned short ext_field_len, const char *extension_field_sets,
-       zb_zcl_scene_add_scene_rsp cb, void *user_data)
+       zb_zcl_scene_add_scene_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -7879,7 +8374,10 @@ int zbl_add_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7930,8 +8428,8 @@ int zbl_add_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_view_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id, zb_zcl_scene_view_scene_rsp cb, void *user_data)
+int zbl_view_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id, zb_zcl_scene_view_scene_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -7955,7 +8453,10 @@ int zbl_view_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -7987,8 +8488,8 @@ int zbl_view_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_remove_scene(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_remove_scene_rsp cb,
+int zbl_remove_scene(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_remove_scene_cb cb,
        void *user_data)
 {
        int sub_id, to;
@@ -8013,7 +8514,10 @@ int zbl_remove_scene(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -8045,8 +8549,8 @@ int zbl_remove_scene(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_remove_all_scene(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, zb_zcl_scene_remove_all_scene_rsp cb, void *user_data)
+int zbl_remove_all_scene(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, zb_zcl_scene_remove_all_scene_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -8071,7 +8575,10 @@ int zbl_remove_all_scene(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -8103,8 +8610,8 @@ int zbl_remove_all_scene(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_store_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id, zb_zcl_scene_store_scene_rsp cb, void *user_data)
+int zbl_store_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id, zb_zcl_scene_store_scene_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -8128,7 +8635,10 @@ int zbl_store_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -8160,7 +8670,7 @@ int zbl_store_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
        return result;
 }
 
-int zbl_recall_scene(nwk_addr addr16, unsigned char ep,        unsigned short group_id,
+int zbl_recall_scene(zb_nwk_addr addr16, unsigned char ep,     unsigned short group_id,
        unsigned char scene_id)
 {
        int result = ZIGBEE_ERROR_NONE;
@@ -8192,8 +8702,8 @@ int zbl_recall_scene(nwk_addr addr16, unsigned char ep,   unsigned short group_id,
        return result;
 }
 
-int zbl_get_scene_membership(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, zb_zcl_scene_get_scene_membership_rsp cb, void *user_data)
+int zbl_get_scene_membership(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, zb_zcl_scene_get_scene_membership_cb cb, void *user_data)
 {
        int sub_id, to;
        zbl_req_cb_s *container;
@@ -8218,7 +8728,10 @@ int zbl_get_scene_membership(nwk_addr addr16, unsigned char ep,
 
        if (0 == sub_id) {
                ERR("g_dbus_connection_signal_subscribe() Fail");
-               free(container);
+               if (container) {
+                       free(container);
+                       container = NULL;
+               }
                return ZIGBEE_ERROR_IO_ERROR;
        }
 
@@ -8250,7 +8763,7 @@ int zbl_get_scene_membership(nwk_addr addr16, unsigned char ep,
        return result;
 }
 
-int zbl_thermostat_adjust_setpoint(nwk_addr addr16, unsigned char ep, unsigned char mode,
+int zbl_thermostat_adjust_setpoint(zb_nwk_addr addr16, unsigned char ep, unsigned char mode,
        unsigned char amount)
 {
        int result = ZIGBEE_ERROR_IO_ERROR;
@@ -8282,7 +8795,7 @@ int zbl_thermostat_adjust_setpoint(nwk_addr addr16, unsigned char ep, unsigned c
        return result;
 }
 
-int zbl_dbus_start(zigbee_h handle)
+int zbl_dbus_start(zb_zigbee_h handle)
 {
        FN_CALL;
 
@@ -8393,7 +8906,7 @@ int zbl_dbus_start(zigbee_h handle)
        return ZIGBEE_ERROR_NONE;
 }
 
-int zbl_dbus_stop(zigbee_h handle)
+int zbl_dbus_stop(zb_zigbee_h handle)
 {
        struct zbl_zigbee_s *h = handle;
        DBG("zbl_dbus_stop()");
diff --git a/lib/zbl-dbus.h b/lib/zbl-dbus.h
new file mode 100644 (file)
index 0000000..eebe438
--- /dev/null
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__
+#define __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__
+
+#include <gio/gio.h>
+
+#include "zb-common.h"
+
+#include "zbl.h"
+#include "zbl-dbus.h"
+
+int zbl_dbus_start(zb_zigbee_h handle);
+int zbl_dbus_stop(zb_zigbee_h handle);
+GDBusConnection* zbl_dbus_get_object(void);
+int zbl_dbus_get_timeout(GDBusProxy *proxy);
+int zbl_check_privilege();
+
+int zbl_enable(zb_zigbee_h handle);
+int zbl_set_event_cb(zb_zigbee_h handle, zb_event_cb event_handler);
+int zbl_disable(void);
+int zbl_hw_reset(void);
+int zbl_coex_start(unsigned char channel);
+int zbl_coex_stop(void);
+int zbl_get_network_info(zb_ieee_addr addr64, zb_nwk_addr *nodeid,
+       zb_nwk_addr *panid, unsigned char *channel, unsigned char *tx_power);
+int zbl_get_controller_mac_address(zb_ieee_addr addr64);
+int zbl_get_cluster_list(zb_ieee_addr eui64, unsigned char endpoint,
+       unsigned char *in_cluster_count, unsigned short in_cluster_list[],
+       unsigned char *out_cluster_count, unsigned short out_cluster_list[]);
+int zbl_get_endpoint_list(zb_ieee_addr eui64, unsigned char *count,
+       unsigned char list[]);
+int zbl_get_all_device_info(zb_end_dev_info_h **dev_list, unsigned char* num);
+int zbl_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data);
+int zbl_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb,
+       void *user_data);
+int zbl_leave_device(zb_ieee_addr addr64, bool remove_children, bool rejoin);
+int zbl_permit_join(unsigned char duration, bool broadcast);
+
+int zbl_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64,
+       unsigned char request_type, unsigned char start_idx, zb_zdo_addr_cb cb,
+       void *user_data);
+int zbl_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
+       void *user_data);
+int zbl_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
+       void *user_data);
+int zbl_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       zb_zdo_simple_desc_cb cb, void *user_data);
+int zbl_match_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned short profileid, unsigned char num_in_clusters,
+       unsigned short *in_clusters, unsigned char num_out_clusters,
+       unsigned short *out_clusters, zb_zdo_match_desc_cb cb, void *user_data);
+int zbl_device_annce(zb_zigbee_h handle, zb_nwk_addr addr16, zb_ieee_addr addr64,
+       unsigned char capability);
+
+int zbl_node_desc_req(zb_nwk_addr addr16, zb_zdo_node_desc_cb cb, void *user_data);
+int zbl_power_desc_req(zb_nwk_addr addr16, zb_zdo_power_desc_cb cb,
+       void *user_data);
+int zbl_complex_desc_req(zb_nwk_addr addr16, zb_zdo_complex_desc_cb cb,
+       void *user_data);
+int zbl_user_desc_req(zb_nwk_addr addr16, zb_zdo_user_desc_cb cb, void *user_data);
+int zbl_user_desc_set(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char len,
+       unsigned char *user_desc, zb_zdo_user_desc_conf_cb cb, void *user_data);
+int zbl_bind_req(zb_nwk_addr dst_addr16, zb_ieee_addr src_addr64,
+       unsigned char src_ep, unsigned short clusterid, zb_ieee_addr dst_addr64,
+       unsigned char type, zb_nwk_addr group_addr, unsigned char dst_ep, zb_zdo_bind_cb cb,
+       void *user_data);
+int zbl_unbind_req(zb_nwk_addr dst_addr16, zb_ieee_addr src_addr64,
+       unsigned char src_ep, unsigned short clusterid, zb_ieee_addr dst_addr64,
+       unsigned char type, zb_nwk_addr group_addr, unsigned char dst_ep,
+       zb_zdo_unbind_cb cb, void *user_data);
+int zbl_mgmt_nwk_disc_req(zb_nwk_addr addr16, unsigned int scan_channels,
+       unsigned char scan_duration, unsigned char scan_count, unsigned char start_idx,
+       zb_zdo_mgmt_nwk_disc_cb cb, void *user_data);
+int zbl_mgmt_nwk_update_req(unsigned int scan_channels,
+       unsigned char scan_duration, unsigned char scan_count, unsigned char nwk_update_id,
+       zb_nwk_addr nwk_manager_addr);
+int zbl_mgmt_lqi_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_lqi_cb cb, void *user_data);
+int zbl_mgmt_rtg_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_rtg_cb cb, void *user_data);
+int zbl_mgmt_bind_req(zb_nwk_addr addr16, unsigned char start_idx,
+       zb_zdo_mgmt_bind_cb cb, void *user_data);
+int zbl_mgmt_leave_device(zb_ieee_addr addr64, unsigned char remove_children,
+       unsigned rejoin, zb_zdo_mgmt_leave_cb cb, void *user_data);
+int zbl_mgmt_permit_joining_req(zb_nwk_addr addr16, unsigned char duration,
+       unsigned char tc_significance, zb_zdo_mgmt_permit_joining_cb cb, void *user_data);
+
+/* Custom Commands */
+int zbl_aps_send(zb_nwk_addr addr16, unsigned char aps_fc,
+       unsigned char src_ep, unsigned char dst_ep, unsigned short clusterid,
+       unsigned short profileid, unsigned char zcl_fc, unsigned short mfg_code,
+       unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
+       zb_aps_send_cb cb, void *user_data);
+int zbl_zcl_send(zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned short clusterid, unsigned char zcl_fc, unsigned char cmd,
+       unsigned short payload_len, unsigned char *payload,
+       zb_zcl_send_cb cb, void *user_data);
+int zbl_send_to_local(unsigned short length, unsigned char *data,
+               zb_send_to_local_cb cb, void *user_data);
+
+/* ZCL Global Commands */
+int zbl_read_attr_req(zb_zigbee_h handle, unsigned short addr16, unsigned char dest_ep,
+       unsigned char zcl_fc, unsigned short clusterid, unsigned short *attribute_ids,
+       int attribute_ids_len, zb_zcl_global_attr_read_cb cb, void *user_data);
+int zbl_write_attr_req(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
+       void **records,
+       int count, zb_zcl_global_attr_write_cb cb, void *user_data);
+int zbl_wattr_undivided_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **records, int count,
+       zb_zcl_global_attr_write_cb cb, void *user_data);
+int zbl_wattr_req_no_cb(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char src_ep,
+       unsigned char dst_ep, unsigned char zcl_fc, unsigned short clusterid,
+       void **records, int count);
+int zbl_write_config_report(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **records, int count,
+       zb_zcl_global_config_report_write_cb cb, void *user_data);
+int zbl_read_config_report(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, void **records, int count,
+       zb_zcl_global_config_report_read_cb cb, void *user_data);
+int zbl_discover_attr_req(zb_zigbee_h handle, unsigned short addr16,
+       unsigned char src_ep, unsigned char dest_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned short start_id, unsigned char max_attribute_ids,
+               zb_zcl_global_attr_discover_cb cb, void *user_data);
+int zbl_discover_cmds_gen(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned char start_command_id,
+       unsigned char max_command_ids, zb_zcl_global_discover_cmds_cb cb, void *user_data);
+int zbl_discover_cmds_recv(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned char start_command_id,
+       unsigned char max_command_ids, zb_zcl_global_discover_cmds_cb cb, void *user_data);
+int zbl_discover_attr_ext(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned short start_id, unsigned char max_attribute_ids,
+       zb_zcl_global_attr_extended_discover_cb cb, void *user_data);
+
+/* ZCL Alarm Cluster */
+int zbl_reset_alarm(zb_nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
+       unsigned short clusterid);
+int zbl_reset_all_alarm(zb_nwk_addr addr16, unsigned char ep);
+int zbl_get_alarm(zb_nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_cb cb,
+       void *user_data);
+int zbl_reset_all_alarm_log(zb_nwk_addr addr16, unsigned char ep);
+
+/* ZCL Color Control Cluster */
+int zbl_ccontrol_move_to_hue(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char hue, unsigned char direction, unsigned short transition_time);
+int zbl_ccontrol_move_hue(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char move_mode, unsigned char rate);
+int zbl_ccontrol_step_hue(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char step_mode, unsigned char step_size, unsigned char transition_time);
+int zbl_ccontrol_move_to_saturation(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char saturation, unsigned short transition_time);
+int zbl_ccontrol_move_saturation(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char move_mode, unsigned char rate);
+int zbl_ccontrol_step_saturation(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char step_mode, unsigned char step_size, unsigned char transition_time);
+int zbl_ccontrol_move_to_hue_and_saturation(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char hue, unsigned char saturation, unsigned short transition_time);
+int zbl_ccontrol_move_to_color(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short color_x, unsigned short color_y, unsigned short transition_time);
+int zbl_ccontrol_move_color(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short rate_x, unsigned short rate_y);
+int zbl_ccontrol_step_color(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short step_x, unsigned short step_y, unsigned short transition_time);
+int zbl_ccontrol_move_to_color_temperature(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short color_temperature, unsigned short transition_time);
+
+/* ZCL Basic Cluster */
+int zbl_reset_factory_default(zb_nwk_addr addr16, unsigned char ep);
+
+/* ZCL Identity Cluster */
+int zbl_identify(zb_nwk_addr addr16, unsigned char dst_ep, unsigned short identify_time);
+int zbl_identify_query(zb_nwk_addr addr16, unsigned char dst_ep,
+       zb_zcl_identify_query_cb cb, void *user_data);
+
+/* ZCL Group Cluster */
+int zbl_add_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       const char *group_name, zb_zcl_group_add_group_cb cb, void *user_data);
+int zbl_view_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       zb_zcl_group_view_group_cb cb, void *user_data);
+int zbl_group_get_group_membership(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char group_count, unsigned short *group_list,
+       zb_zcl_group_get_group_membership_cb cb, void *user_data);
+int zbl_remove_group(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       zb_zcl_group_remove_group_cb cb, void *user_data);
+int zbl_remove_all_group(zb_nwk_addr addr16, unsigned char ep);
+int zbl_add_group_if_identifying(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, const char *group_name);
+
+/* ZCL Level Control Cluster */
+int zbl_level_control_move_to_level(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char level, unsigned short transition_time);
+int zbl_level_control_move(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char move_mode, unsigned char rate);
+int zbl_level_control_step(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char step_mode, unsigned char step_size, unsigned short transition_time);
+int zbl_level_control_stop(zb_nwk_addr addr16, unsigned char ep);
+int zbl_level_control_move_to_level_with_on_off(zb_nwk_addr addr16,
+       unsigned char ep, unsigned char level, unsigned short transition_time);
+int zbl_level_control_move_with_on_off(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char move_mode, unsigned char rate);
+int zbl_level_control_step_with_on_off(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char step_mode, unsigned char step_size, unsigned short transition_time);
+
+/* ZCL On/Off Cluster */
+int zbl_onoff_set(zb_nwk_addr addr16, unsigned char ep, unsigned char on_off_type);
+int zbl_zone_enroll_response(zb_nwk_addr addr16, unsigned char dst_ep,
+       unsigned char enroll_response_code, unsigned char zone_id);
+
+/* Poll-control Cluster */
+int zbl_pollcontrol_check_in_response(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char start_fast_polling, unsigned short fast_poll_timeout);
+int zbl_pollcontrol_fast_poll_stop(zb_nwk_addr addr16, unsigned char ep);
+int zbl_pollcontrol_set_long_poll_interval(zb_nwk_addr addr16, unsigned char ep,
+       unsigned int new_long_poll_interval, zb_zcl_pollctrl_check_in_cb cb, void *user_data);
+int zbl_pollcontrol_set_short_poll_interval(zb_nwk_addr addr16, unsigned char ep,
+       unsigned int new_short_poll_interval, zb_zcl_pollctrl_check_in_cb cb, void *user_data);
+
+/* Scene Cluster */
+int zbl_add_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id, unsigned short transition_time, const char *scene_name,
+       unsigned short ext_field_len, const char *extension_field_sets,
+       zb_zcl_scene_add_scene_cb cb, void *user_data);
+int zbl_view_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id, zb_zcl_scene_view_scene_cb cb, void *user_data);
+int zbl_remove_scene(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_remove_scene_cb cb,
+       void *user_data);
+int zbl_remove_all_scene(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, zb_zcl_scene_remove_all_scene_cb cb, void *user_data);
+int zbl_store_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id, zb_zcl_scene_store_scene_cb cb, void *user_data);
+int zbl_recall_scene(zb_nwk_addr addr16, unsigned char ep, unsigned short group_id,
+       unsigned char scene_id);
+int zbl_get_scene_membership(zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, zb_zcl_scene_get_scene_membership_cb cb, void *user_data);
+
+/* Thermostat Cluster */
+int zbl_thermostat_adjust_setpoint(zb_nwk_addr addr16, unsigned char ep,
+       unsigned char mode, unsigned char amount);
+
+#endif /* __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__ */
similarity index 75%
rename from lib/zbl_zcl_alarm.c
rename to lib/zbl-zcl-alarm.c
index b58b660..905cb42 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_alarm_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_alarm_reset_alarm(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned char alarm_code, unsigned short cluster_id)
+API int zb_zcl_alarm_reset_alarm(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned char alarm_code, zb_cluster_id clusterid)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -32,12 +27,12 @@ API int zb_zcl_alarm_reset_alarm(zigbee_h handle, nwk_addr addr16, unsigned char
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
 
-       ret = zbl_reset_alarm(addr16, ep, alarm_code, cluster_id);
+       ret = zbl_reset_alarm(addr16, ep, alarm_code, clusterid);
        return ret;
 }
 
-API int zb_zcl_alarm_reset_all_alarm(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep)
+API int zb_zcl_alarm_reset_all_alarm(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -50,8 +45,8 @@ API int zb_zcl_alarm_reset_all_alarm(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_alarm_get_alarm(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zcl_alarm_get_alarm_rsp cb, void *user_data)
+API int zb_zcl_alarm_get_alarm(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       zb_zcl_alarm_get_alarm_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -64,8 +59,8 @@ API int zb_zcl_alarm_get_alarm(zigbee_h handle, nwk_addr addr16, unsigned char e
        return ret;
 }
 
-API int zb_zcl_alarm_reset_all_alarm_log(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep)
+API int zb_zcl_alarm_reset_all_alarm_log(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -77,3 +72,4 @@ API int zb_zcl_alarm_reset_all_alarm_log(zigbee_h handle, nwk_addr addr16,
        ret = zbl_reset_all_alarm_log(addr16, ep);
        return ret;
 }
+
similarity index 83%
rename from lib/zbl_zcl_basic.c
rename to lib/zbl-zcl-basic.c
index 110aef6..d46187b 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_basic_reset_factory_default(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep)
+API int zb_zcl_basic_reset_factory_default(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 72%
rename from lib/zbl_zcl_color_control.c
rename to lib/zbl-zcl-color-control.c
index 0069a30..1668cdc 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_color_control_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_ccontrol_move_to_hue(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char hue, unsigned char direction,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_move_to_hue(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char hue, unsigned char direction,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -37,8 +32,8 @@ API int zb_zcl_ccontrol_move_to_hue(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_hue(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char move_mode, unsigned char rate)
+API int zb_zcl_ccontrol_move_hue(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char move_mode, unsigned char rate)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -51,9 +46,9 @@ API int zb_zcl_ccontrol_move_hue(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_step_hue(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char step_mode, unsigned char step_size,
-               unsigned char transition_time)
+API int zb_zcl_ccontrol_step_hue(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char step_mode, unsigned char step_size,
+       unsigned char transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -66,9 +61,9 @@ API int zb_zcl_ccontrol_step_hue(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_to_saturation(zigbee_h handle,
-               nwk_addr addr16, unsigned char ep, unsigned char saturation,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_move_to_saturation(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char ep, unsigned char saturation,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -81,8 +76,8 @@ API int zb_zcl_ccontrol_move_to_saturation(zigbee_h handle,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_saturation(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char move_mode, unsigned char rate)
+API int zb_zcl_ccontrol_move_saturation(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char move_mode, unsigned char rate)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -95,9 +90,9 @@ API int zb_zcl_ccontrol_move_saturation(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_step_saturation(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char step_mode, unsigned char step_size,
-               unsigned char transition_time)
+API int zb_zcl_ccontrol_step_saturation(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char step_mode, unsigned char step_size,
+       unsigned char transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -110,9 +105,9 @@ API int zb_zcl_ccontrol_step_saturation(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_to_hue_and_saturation(zigbee_h handle,
-               nwk_addr addr16, unsigned char ep, unsigned char hue, unsigned char saturation,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_move_to_hue_and_saturation(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char ep, unsigned char hue, unsigned char saturation,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -125,9 +120,9 @@ API int zb_zcl_ccontrol_move_to_hue_and_saturation(zigbee_h handle,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_to_color(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short color_x, unsigned short color_y,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_move_to_color(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short color_x, unsigned short color_y,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -140,8 +135,8 @@ API int zb_zcl_ccontrol_move_to_color(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_color(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short rate_x, unsigned short rate_y)
+API int zb_zcl_ccontrol_move_color(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short rate_x, unsigned short rate_y)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -154,9 +149,9 @@ API int zb_zcl_ccontrol_move_color(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_step_color(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short step_x, unsigned short step_y,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_step_color(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short step_x, unsigned short step_y,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -169,9 +164,9 @@ API int zb_zcl_ccontrol_step_color(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_ccontrol_move_to_color_temperature(zigbee_h handle,
-               nwk_addr addr16, unsigned char ep, unsigned short color_temperature,
-               unsigned short transition_time)
+API int zb_zcl_ccontrol_move_to_color_temperature(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char ep, unsigned short color_temperature,
+       unsigned short transition_time)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 52%
rename from lib/zbl_zcl_global_commands.c
rename to lib/zbl-zcl-global-cmd.c
index 5dd8f11..1a57b89 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_global_commands.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_utils.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
+
+/* For test */
+#define ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA 0
 
-API int zb_zcl_global_read_attr(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, unsigned short *attribute_ids, int attribute_ids_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_read(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned short *attribute_ids, int attribute_ids_len,
+       zb_zcl_global_attr_read_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -36,33 +33,34 @@ API int zb_zcl_global_read_attr(zigbee_h handle, nwk_addr addr16,
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == attribute_ids, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0 == attribute_ids_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_read_attr_req(handle, addr16, dst_ep, zcl_frame_ctl, cluster_id, attribute_ids,
-                       attribute_ids_len, cb, user_data);
+       ret = zbl_read_attr_req(handle, addr16, dst_ep, zcl_fc, clusterid,
+                       attribute_ids, attribute_ids_len, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_write_attr(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, write_attr_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_read_structured(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_read_structured_attr_record_h *records,
+       int count, zb_zcl_global_attr_read_cb cb, void *user_data)
 {
-       int ret;
+#if (0 == ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA)
+       return ZIGBEE_ERROR_NOT_SUPPORTED;
+#endif
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_write_attr_req(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, records, records_len, cb, user_data);
-       return ret;
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zcl_global_write_attr_undivided(zigbee_h handle,
-               nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, write_attr_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_write(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_write_attr_record_h *records, int count,
+       zb_zcl_global_attr_write_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -71,15 +69,17 @@ API int zb_zcl_global_write_attr_undivided(zigbee_h handle,
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_wattr_undivided_req(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, records, records_len, cb, user_data);
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_write_attr_req(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, records, count, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_write_attr_no_rsp(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, write_attr_record_h *records, int records_len)
+API int zb_zcl_global_attr_write_undivided(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned char zcl_fc, unsigned short clusterid,
+       zb_zcl_write_attr_record_h *records, int count,
+       zb_zcl_global_attr_write_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -88,34 +88,34 @@ API int zb_zcl_global_write_attr_no_rsp(zigbee_h handle, nwk_addr addr16,
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_wattr_req_no_rsp(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, records, records_len);
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_wattr_undivided_req(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, records, count, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_config_report(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, report_config_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_write_structured(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_write_attr_structured_record_h *records,
+       int count, zb_zcl_global_attr_write_cb cb, void *user_data)
 {
-       int ret;
+#if (0 == ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA)
+       return ZIGBEE_ERROR_NOT_SUPPORTED;
+#endif
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_configure_reporting(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, records, records_len, cb, user_data);
-       return ret;
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zcl_global_read_config_report(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, read_report_config_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_write_no_rsp(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_write_attr_record_h *records, int count)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -124,16 +124,16 @@ API int zb_zcl_global_read_config_report(zigbee_h handle, nwk_addr addr16,
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_read_configure_reporting(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, records, records_len, cb, user_data);
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_wattr_req_no_cb(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, records, count);
        return ret;
 }
 
-API int zb_zcl_global_discover_attr(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, unsigned short start_id, unsigned char max_attribute_ids,
-               zb_zcl_global_discover_attr_rsp cb, void *user_data)
+API int zb_zcl_global_config_report_write(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_reporting_config_record_h *records, int count,
+       zb_zcl_global_config_report_write_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -141,53 +141,51 @@ API int zb_zcl_global_discover_attr(zigbee_h handle, nwk_addr addr16,
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_discover_attr_req(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, start_id, max_attribute_ids, cb, user_data);
+       RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_write_config_report(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, records, count, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_read_attr_structured(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, read_structured_attr_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_config_report_read(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, zb_zcl_read_report_config_record_h *records,
+       int count, zb_zcl_global_config_report_read_cb cb, void *user_data)
 {
-#if (0 == ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA)
-       return ZIGBEE_ERROR_NOT_SUPPORTED;
-#endif
+       int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
        RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       return ZIGBEE_ERROR_NONE;
+       RETV_IF(0 == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_read_config_report(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, records, count, cb, user_data);
+       return ret;
 }
 
-API int zb_zcl_global_write_attr_structured(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, write_attr_structured_record_h *records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data)
+API int zb_zcl_global_attr_discover(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_fc,
+       unsigned short clusterid, unsigned short start_id, unsigned char max_attribute_ids,
+       zb_zcl_global_attr_discover_cb cb, void *user_data)
 {
-#if (0 == ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA)
-       return ZIGBEE_ERROR_NOT_SUPPORTED;
-#endif
+       int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == records_len, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       return ZIGBEE_ERROR_NONE;
+       ret = zbl_discover_attr_req(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, start_id, max_attribute_ids, cb, user_data);
+       return ret;
 }
 
-API int zb_zcl_global_discover_cmds_received(zigbee_h handle,
-               nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data)
+API int zb_zcl_global_discover_cmds_received(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned char zcl_fc, unsigned short clusterid, unsigned char start_command_id,
+       unsigned char max_command_ids, zb_zcl_global_discover_cmds_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -195,15 +193,15 @@ API int zb_zcl_global_discover_cmds_received(zigbee_h handle,
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_discover_cmds_recv(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, start_command_id, max_command_ids, cb, user_data);
+       ret = zbl_discover_cmds_recv(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, start_command_id, max_command_ids, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_discover_cmds_generated(zigbee_h handle,
-               nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data)
+API int zb_zcl_global_discover_cmds_generated(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned char zcl_fc, unsigned short clusterid, unsigned char start_command_id,
+       unsigned char max_command_ids, zb_zcl_global_discover_cmds_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -211,16 +209,16 @@ API int zb_zcl_global_discover_cmds_generated(zigbee_h handle,
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_discover_cmds_gen(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, start_command_id, max_command_ids, cb, user_data);
+       ret = zbl_discover_cmds_gen(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, start_command_id, max_command_ids, cb, user_data);
        return ret;
 }
 
-API int zb_zcl_global_discover_attr_extended(zigbee_h handle,
-               nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned short start_id,
-               unsigned char max_attribute_ids, zb_zcl_global_discover_attr_extended_rsp cb,
-               void *user_data)
+API int zb_zcl_global_attr_extended_discover(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
+       unsigned char zcl_fc, unsigned short clusterid, unsigned short start_id,
+       unsigned char max_attribute_ids, zb_zcl_global_attr_extended_discover_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -228,7 +226,7 @@ API int zb_zcl_global_discover_attr_extended(zigbee_h handle,
        RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_discover_attr_ext(handle, addr16, src_ep, dst_ep, zcl_frame_ctl,
-                       cluster_id, start_id, max_attribute_ids, cb, user_data);
+       ret = zbl_discover_attr_ext(handle, addr16, src_ep, dst_ep, zcl_fc,
+                       clusterid, start_id, max_attribute_ids, cb, user_data);
        return ret;
 }
similarity index 72%
rename from lib/zbl_zcl_groups.c
rename to lib/zbl-zcl-groups.c
index 519067e..ae54a92 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_groups_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_group_add_group(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, char *group_name,
-               zb_zcl_group_add_group_rsp cb, void *user_data)
+API int zb_zcl_group_add_group(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, char *group_name,
+       zb_zcl_group_add_group_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -37,9 +32,9 @@ API int zb_zcl_group_add_group(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_group_view_group(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, zb_zcl_group_view_group_rsp cb,
-               void *user_data)
+API int zb_zcl_group_view_group(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, zb_zcl_group_view_group_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -51,9 +46,9 @@ API int zb_zcl_group_view_group(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_group_get_group_membership(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char group_count, unsigned short *group_list,
-               zb_zcl_group_get_group_membership_rsp cb, void *user_data)
+API int zb_zcl_group_get_group_membership(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char group_count, unsigned short *group_list,
+       zb_zcl_group_get_group_membership_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -66,9 +61,9 @@ API int zb_zcl_group_get_group_membership(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_group_remove_group(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, zb_zcl_group_remove_group_rsp cb,
-               void *user_data)
+API int zb_zcl_group_remove_group(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, zb_zcl_group_remove_group_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -80,8 +75,8 @@ API int zb_zcl_group_remove_group(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_group_remove_all_group(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep)
+API int zb_zcl_group_remove_all_group(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -93,8 +88,8 @@ API int zb_zcl_group_remove_all_group(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_group_add_group_if_identifying(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, const char *group_name)
+API int zb_zcl_group_add_group_if_identifying(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, const char *group_name)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 78%
rename from lib/zbl_zcl_identify.c
rename to lib/zbl-zcl-identify.c
index 4c08406..984c725 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_identify_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_identify(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned short identify_time)
+API int zb_zcl_identify(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned short identify_time)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -35,8 +30,8 @@ API int zb_zcl_identify(zigbee_h handle, nwk_addr addr16, unsigned char ep,
        return ret;
 }
 
-API int zb_zcl_identify_query(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zcl_identify_query_cb cb, void *user_data)
+API int zb_zcl_identify_query(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       zb_zcl_identify_query_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 77%
rename from lib/zbl_zcl_isa_zone.c
rename to lib/zbl-zcl-isa-zone.c
index 2dd6e7c..8d8aa66 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_ias_zone_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_zone_enroll_response(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char enroll_response_code, unsigned char zone_id)
+API int zb_zcl_zone_enroll_response(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char enroll_response_code, unsigned char zone_id)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 74%
rename from lib/zbl_zcl_level_control.c
rename to lib/zbl-zcl-level-control.c
index 13a6483..24022a9 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_levelctrl_move_to_level(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char level, unsigned short transition_time)
+API int zb_zcl_levelctrl_move_to_level(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char level, unsigned short transition_time)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -35,8 +31,8 @@ API int zb_zcl_levelctrl_move_to_level(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_levelctrl_move(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char move_mode, unsigned char rate)
+API int zb_zcl_levelctrl_move(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char move_mode, unsigned char rate)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -49,8 +45,8 @@ API int zb_zcl_levelctrl_move(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_levelctrl_step(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned char step_mode, unsigned char step_size, unsigned short transition_time)
+API int zb_zcl_levelctrl_step(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned char step_mode, unsigned char step_size, unsigned short transition_time)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -63,7 +59,7 @@ API int zb_zcl_levelctrl_step(zigbee_h handle, nwk_addr addr16, unsigned char ep
        return ret;
 }
 
-API int zb_zcl_levelctrl_stop(zigbee_h handle, nwk_addr addr16, unsigned char ep)
+API int zb_zcl_levelctrl_stop(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -76,8 +72,8 @@ API int zb_zcl_levelctrl_stop(zigbee_h handle, nwk_addr addr16, unsigned char ep
        return ret;
 }
 
-API int zb_zcl_levelctrl_move_to_level_with_on_off(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char level, unsigned short transition_time)
+API int zb_zcl_levelctrl_move_to_level_with_on_off(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char level, unsigned short transition_time)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -90,8 +86,8 @@ API int zb_zcl_levelctrl_move_to_level_with_on_off(zigbee_h handle, nwk_addr add
        return ret;
 }
 
-API int zb_zcl_levelctrl_move_with_on_off(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char move_mode, unsigned char rate)
+API int zb_zcl_levelctrl_move_with_on_off(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char move_mode, unsigned char rate)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -104,9 +100,9 @@ API int zb_zcl_levelctrl_move_with_on_off(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_levelctrl_step_with_on_off(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char step_mode, unsigned char step_size,
-               unsigned short transition_time)
+API int zb_zcl_levelctrl_step_with_on_off(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char step_mode, unsigned char step_size,
+       unsigned short transition_time)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 81%
rename from lib/zbl_zcl_on_off.c
rename to lib/zbl-zcl-on-off.c
index 935b212..3999c56 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_onoff_control(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zcl_onoff_e on_off_type)
+API int zb_zcl_on_off_control(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       zb_zcl_on_off_e on_off_type)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 73%
rename from lib/zbl_zcl_poll_control.c
rename to lib/zbl-zcl-poll-control.c
index cd461b2..27e634a 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_poll_control_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_pollctrl_check_in_response(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char start_fast_polling,
-               unsigned short fast_poll_timeout)
+API int zb_zcl_pollctrl_check_in_response(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char start_fast_polling, unsigned short fast_poll_timeout)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -37,8 +31,8 @@ API int zb_zcl_pollctrl_check_in_response(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_pollctrl_fast_poll_stop(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep)
+API int zb_zcl_pollctrl_fast_poll_stop(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -50,9 +44,9 @@ API int zb_zcl_pollctrl_fast_poll_stop(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_pollctrl_set_long_poll_interval(zigbee_h handle,
-               nwk_addr addr16, unsigned char ep, unsigned int new_long_poll_interval,
-               zb_zcl_pollctrl_check_in cb, void *user_data)
+API int zb_zcl_pollctrl_set_long_poll_interval(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char ep, unsigned int new_long_poll_interval,
+       zb_zcl_pollctrl_check_in_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -65,9 +59,9 @@ API int zb_zcl_pollctrl_set_long_poll_interval(zigbee_h handle,
        return ret;
 }
 
-API int zb_zcl_pollctrl_set_short_poll_interval(zigbee_h handle,
-               nwk_addr addr16, unsigned char ep, unsigned int new_short_poll_interval,
-               zb_zcl_pollctrl_check_in cb, void *user_data)
+API int zb_zcl_pollctrl_set_short_poll_interval(zb_zigbee_h handle,
+       zb_nwk_addr addr16, unsigned char ep, unsigned int new_short_poll_interval,
+       zb_zcl_pollctrl_check_in_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 69%
rename from lib/zbl_zcl_scenes.c
rename to lib/zbl-zcl-scenes.c
index cbfdd0e..190f6df 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_scenes_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_scene_add_scene(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned short group_id, unsigned char scene_id, unsigned short transition_time,
-               const char *scene_name, unsigned short ext_field_len,
-               const char *extension_field_sets, zb_zcl_scene_add_scene_rsp cb, void *user_data)
+API int zb_zcl_scene_add_scene(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, unsigned char scene_id, unsigned short transition_time,
+       const char *scene_name, unsigned short ext_field_len,
+       const char *extension_field_sets, zb_zcl_scene_add_scene_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -40,9 +35,9 @@ API int zb_zcl_scene_add_scene(zigbee_h handle, nwk_addr addr16, unsigned char e
        return ret;
 }
 
-API int zb_zcl_scene_view_scene(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned short group_id, unsigned char scene_id, zb_zcl_scene_view_scene_rsp cb,
-               void *user_data)
+API int zb_zcl_scene_view_scene(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_view_scene_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -54,9 +49,9 @@ API int zb_zcl_scene_view_scene(zigbee_h handle, nwk_addr addr16, unsigned char
        return ret;
 }
 
-API int zb_zcl_scene_remove_scene(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, unsigned char scene_id,
-               zb_zcl_scene_remove_scene_rsp cb, void *user_data)
+API int zb_zcl_scene_remove_scene(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, unsigned char scene_id,
+       zb_zcl_scene_remove_scene_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -68,9 +63,9 @@ API int zb_zcl_scene_remove_scene(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_scene_remove_all_scene(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, zb_zcl_scene_remove_all_scene_rsp cb,
-               void *user_data)
+API int zb_zcl_scene_remove_all_scene(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, zb_zcl_scene_remove_all_scene_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -82,9 +77,9 @@ API int zb_zcl_scene_remove_all_scene(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_scene_store_scene(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               unsigned short group_id, unsigned char scene_id, zb_zcl_scene_store_scene_rsp cb,
-               void *user_data)
+API int zb_zcl_scene_store_scene(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_store_scene_cb cb,
+       void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -96,8 +91,8 @@ API int zb_zcl_scene_store_scene(zigbee_h handle, nwk_addr addr16, unsigned char
        return ret;
 }
 
-API int zb_zcl_scene_recall_scene(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id, unsigned char scene_id)
+API int zb_zcl_scene_recall_scene(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id, unsigned char scene_id)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -109,9 +104,9 @@ API int zb_zcl_scene_recall_scene(zigbee_h handle, nwk_addr addr16,
        return ret;
 }
 
-API int zb_zcl_scene_get_scene_membership(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned short group_id,
-               zb_zcl_scene_get_scene_membership_rsp cb, void *user_data)
+API int zb_zcl_scene_get_scene_membership(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned short group_id,
+       zb_zcl_scene_get_scene_membership_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
similarity index 79%
rename from lib/zbl_zcl_thermostat.c
rename to lib/zbl-zcl-thermostat.c
index 4ec843b..09edcd5 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_thermostat_cluster.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zcl_thermostat_adjust_setpoint(zigbee_h handle, nwk_addr addr16,
-               unsigned char ep, unsigned char mode, unsigned char amount)
+API int zb_zcl_thermostat_adjust_setpoint(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char ep, unsigned char mode, unsigned char amount)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
diff --git a/lib/zbl-zcl.c b/lib/zbl-zcl.c
new file mode 100644 (file)
index 0000000..6fe67b6
--- /dev/null
@@ -0,0 +1,1408 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <glib.h>
+#include <error.h>
+#include <stdlib.h>
+
+#include "zbl.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
+
+#define ZB_GUARD_CHAR 1
+#define ZB_ZCL_OCTET_SIZE 1
+#define ZB_ZCL_LONG_OCTET_SIZE 2
+
+API int zb_read_attr_status_record_create(
+       zb_zcl_read_attr_status_record_h *handle)
+{
+       zb_zcl_read_attr_status_record_h simple = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       simple = calloc(1, sizeof(struct read_attribute_status_record_s));
+       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       *handle = simple;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_clone(zb_zcl_read_attr_status_record_h src,
+       zb_zcl_read_attr_status_record_h *dst)
+{
+       struct read_attribute_status_record_s *srcs = src;
+       struct read_attribute_status_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct read_attribute_status_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct read_attribute_status_record_s));
+       desc->value = calloc(1, zb_zcl_get_data_size(srcs->type));
+       RETVM_IF(NULL == desc->value, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       memcpy(desc->value, srcs->value, zb_zcl_get_data_size(srcs->type));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_read_attr_status_record_destroy(
+       zb_zcl_read_attr_status_record_h handle)
+{
+       struct read_attribute_status_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->value)
+               free(h->value);
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_get_id(
+       zb_zcl_read_attr_status_record_h handle, unsigned short* id)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_set_id(
+       zb_zcl_read_attr_status_record_h handle, unsigned short id)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_get_status(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e* status)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = h->status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_set_status(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_status_e status)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->status = status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_get_type(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e *type)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *type = h->type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_set_type(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e type)
+{
+       struct read_attribute_status_record_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 >= zb_zcl_get_data_size(type), ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->type = type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_get_value(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e* type,
+       unsigned char** value, int* count)
+{
+       int len = -1;
+       struct read_attribute_status_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->value, ZIGBEE_ERROR_NO_DATA);
+
+       len = zb_zcl_get_data_size(h->type);
+       if (0 < len) {
+
+               *value = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == *value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*value, h->value, len);
+               *type = h->type;
+               *count = len;
+
+       } else if (ZB_ZCL_OCTET_STRING == h->type || ZB_ZCL_CHARACTER_STRING == h->type) {
+
+               len = h->value[0];
+
+               *value = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == *value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*value, h->value + ZB_ZCL_OCTET_SIZE, len);
+
+               *type = h->type;
+               *count = len;
+
+       } else if (ZB_ZCL_LONG_OCTET_STRING == h->type || ZB_ZCL_LONG_CHARACTER_STRING == h->type) {
+
+               len = h->value[0] & 0xff;
+               len |= (h->value[1] << 8) & 0xff00 ;
+
+               *value = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == *value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*value, h->value + ZB_ZCL_LONG_OCTET_SIZE, len);
+
+               *type = h->type;
+               *count = len;
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_attr_status_record_set_value(
+       zb_zcl_read_attr_status_record_h handle, zb_zcl_data_type_e type,
+       unsigned char* value, int count)
+{
+       int len = -1;
+       struct read_attribute_status_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       len = zb_zcl_get_data_size(type);
+       if (0 < len) {
+
+               h->value = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(h->value, value, len);
+               h->type = type;
+
+       } else if (ZB_ZCL_OCTET_STRING == type || ZB_ZCL_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+
+               h->value[0] = count;
+               memcpy(h->value + ZB_ZCL_OCTET_SIZE, value + ZB_ZCL_OCTET_SIZE, count);
+
+       } else if (ZB_ZCL_LONG_OCTET_STRING == type || ZB_ZCL_LONG_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_LONG_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+
+               h->value[0] = count & 0xff;
+               h->value[1] = (count >> 8) & 0xff ;
+               memcpy(h->value + ZB_ZCL_LONG_OCTET_SIZE, value, len);
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_create(zb_zcl_discover_attr_info_record_h *handle)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       zb_zcl_discover_attr_info_record_h simple = NULL;
+
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       simple = calloc(1, sizeof(struct discover_attribute_info_record_s));
+       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = simple;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_clone(zb_zcl_discover_attr_info_record_h src,
+       zb_zcl_discover_attr_info_record_h *dst)
+{
+       struct discover_attribute_info_record_s *srcs = src;
+       struct discover_attribute_info_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct discover_attribute_info_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct discover_attribute_info_record_s));
+
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_destroy(zb_zcl_discover_attr_info_record_h handle)
+{
+       struct discover_attribute_info_record_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_get_id(
+       zb_zcl_discover_attr_info_record_h handle, unsigned short *id)
+{
+       struct discover_attribute_info_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_set_id(
+       zb_zcl_discover_attr_info_record_h handle, unsigned short id)
+{
+       struct discover_attribute_info_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_get_type(
+       zb_zcl_discover_attr_info_record_h handle, zb_zcl_data_type_e *type)
+{
+       struct discover_attribute_info_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *type = h->type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discover_attr_info_set_type(
+       zb_zcl_discover_attr_info_record_h handle, zb_zcl_data_type_e type)
+{
+       struct discover_attribute_info_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 >= zb_zcl_get_data_size(type), ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->type = type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_create(zb_zcl_write_attr_record_h *handle)
+{
+       zb_zcl_write_attr_record_h t = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct write_attribute_record_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       *handle = t;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_clone(zb_zcl_write_attr_record_h src,
+       zb_zcl_write_attr_record_h *dst)
+{
+       struct write_attribute_record_s *srcs = src;
+       struct write_attribute_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct write_attribute_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct write_attribute_record_s));
+
+       desc->value = calloc(1, zb_zcl_get_data_size(srcs->type));
+       RETVM_IF(NULL == desc->value, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc->value, srcs->value, zb_zcl_get_data_size(srcs->type));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_destroy(zb_zcl_write_attr_record_h handle)
+{
+       struct write_attribute_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->value) {
+               free(h->value);
+               h->value = NULL;
+       }
+       free(h);
+       h = NULL;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_set_id(zb_zcl_write_attr_record_h handle,
+       unsigned short id)
+{
+       struct write_attribute_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_set_type(zb_zcl_write_attr_record_h handle,
+       zb_zcl_data_type_e type)
+{
+       struct write_attribute_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 >= zb_zcl_get_data_size(type), ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->type = type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_record_set_value(zb_zcl_write_attr_record_h handle,
+       zb_zcl_data_type_e type, unsigned char* value, int count)
+{
+       int len = -1;
+
+       struct write_attribute_record_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->value) {
+               free(h->value);
+               h->value = NULL;
+       }
+
+       len = zb_zcl_get_data_size(type);
+       if (0 < len) {
+
+               h->value = calloc(len + ZB_GUARD_CHAR , sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(h->value, value, count);
+               h->type = type;
+
+       } else if (ZB_ZCL_OCTET_STRING == type || ZB_ZCL_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               /* The first 1 byte indicate invalid or length of string */
+               h->value[0] = value[0] & 0xff;
+               memcpy(h->value + ZB_ZCL_OCTET_SIZE, value, count);
+
+       } else if (ZB_ZCL_LONG_OCTET_STRING == type || ZB_ZCL_LONG_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_LONG_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+
+               /* The first 2 byte indicate invalid or length of string */
+               h->value[0] = count & 0xff;
+               h->value[1] = (count >> 8) & 0xff ;
+
+               memcpy(h->value + ZB_ZCL_LONG_OCTET_SIZE, value, count);
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_create(zb_zcl_write_attr_status_record_h *handle)
+{
+       zb_zcl_write_attr_status_record_h simple = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       simple = calloc(1, sizeof(struct write_attribute_status_record_s));
+       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = simple;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_clone(zb_zcl_write_attr_status_record_h src,
+       zb_zcl_write_attr_status_record_h *dst)
+{
+       struct write_attribute_status_record_s *srcs = src;
+       struct write_attribute_status_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct write_attribute_status_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct write_attribute_status_record_s));
+
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_destroy(zb_zcl_write_attr_status_record_h handle)
+{
+       struct write_attribute_status_record_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_get_status(
+       zb_zcl_write_attr_status_record_h handle, zb_zcl_status_e *status)
+{
+       struct write_attribute_status_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = h->status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_set_status(zb_zcl_write_attr_status_record_h handle,
+       zb_zcl_status_e status)
+{
+       struct write_attribute_status_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->status = status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_get_id(zb_zcl_write_attr_status_record_h handle,
+       unsigned short *id)
+{
+       struct write_attribute_status_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_write_attr_status_set_id(zb_zcl_write_attr_status_record_h handle,
+       unsigned short id)
+{
+       struct write_attribute_status_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_create(zb_zcl_reporting_config_record_h *handle)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       zb_zcl_reporting_config_record_h t = NULL;
+
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct reporting_configuration_record_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = t;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_clone(zb_zcl_reporting_config_record_h src,
+       zb_zcl_reporting_config_record_h *dst)
+{
+       struct reporting_configuration_record_s *srcs = src;
+       struct reporting_configuration_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct reporting_configuration_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct reporting_configuration_record_s));
+
+       desc->change = calloc(1, zb_zcl_get_data_size(srcs->type));
+       RETVM_IF(NULL == desc->change, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc->change, srcs->change, zb_zcl_get_data_size(srcs->type));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_destroy(zb_zcl_reporting_config_record_h handle)
+{
+       struct reporting_configuration_record_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->change)
+               free(h->change);
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_dir(zb_zcl_reporting_config_record_h handle,
+       zb_zcl_fc_direction_e *dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dir, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *dir = h->dir;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_dir(zb_zcl_reporting_config_record_h handle,
+       zb_zcl_fc_direction_e dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       if (dir == ZB_ZCL_CLIENT_TO_SERVER)
+               h->dir = 0x00 ;
+       else
+               h->dir = 0x01;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_id(zb_zcl_reporting_config_record_h handle,
+       unsigned short *id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_id(zb_zcl_reporting_config_record_h handle,
+       unsigned short id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       h->id = id ;
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_report_config_record_get_type(
+       zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e *type)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *type = h->type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_min_interval(
+       zb_zcl_reporting_config_record_h handle, unsigned short *min_i)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == min_i, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *min_i = h->min_i;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_min_interval(
+       zb_zcl_reporting_config_record_h handle, unsigned short min_i)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       h->min_i = min_i;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_max_interval(
+       zb_zcl_reporting_config_record_h handle, unsigned short *max_i)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == max_i, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *max_i = h->max_i;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_max_interval(
+       zb_zcl_reporting_config_record_h handle, unsigned short max_i)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       h->max_i = max_i;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_timeout(
+       zb_zcl_reporting_config_record_h handle, unsigned short *to)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == to, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *to = h->to;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_timeout(
+       zb_zcl_reporting_config_record_h handle, unsigned short to)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       h->to = to;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_get_change(
+       zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e *type,
+       unsigned char **value, int *count)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       int len = -1;
+       unsigned char *temp = NULL;
+       int data_type = ZB_ZCL_DATA_TYPE_NONE;
+
+       struct reporting_configuration_record_s *h = handle;
+
+       NOT_USED(data_type);
+
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->change, ZIGBEE_ERROR_NO_DATA);
+
+       len = zb_zcl_get_data_size(h->type);
+       data_type = zb_zcl_get_analog_or_discret(h->type);
+       if (0 < len /* && ZB_ZCL_DATA_TYPE_ANALOG == data_type */) {
+
+               temp = calloc(len, sizeof(char));
+               RETV_IF(NULL == temp, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(value, h->change, len);
+               *type = h->type;
+               *count = len;
+               *value = temp;
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_record_set_change(
+       zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e type, unsigned char *value)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       int len = -1;
+       int data_type = ZB_ZCL_DATA_TYPE_NONE;
+
+       struct reporting_configuration_record_s *h = handle;
+
+       NOT_USED(data_type);
+
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       if (h->change)
+               free(h->change);
+
+       len = zb_zcl_get_data_size(type);
+       data_type = zb_zcl_get_analog_or_discret(type);
+
+       if (0 < len /* && ZB_ZCL_DATA_TYPE_ANALOG == data_type */) {
+               h->change = calloc(len + 1, sizeof(unsigned char));
+               RETV_IF(NULL == h->change, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(h->change, value, len);
+               h->type = type;
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_create(
+       zb_zcl_read_report_config_record_h *handle)
+{
+       zb_zcl_read_report_config_record_h t = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct read_reporting_configuration_record_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = t;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_clone(
+       zb_zcl_read_report_config_record_h src, zb_zcl_read_report_config_record_h *dst)
+{
+       struct read_reporting_configuration_record_s *srcs = src;
+       struct read_reporting_configuration_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct read_reporting_configuration_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct read_reporting_configuration_record_s));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_destroy(
+       zb_zcl_read_report_config_record_h handle)
+{
+       struct read_reporting_configuration_record_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_set_dir(
+       zb_zcl_read_report_config_record_h handle, zb_zcl_fc_direction_e dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct read_reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (dir == ZB_ZCL_CLIENT_TO_SERVER)
+               h->dir = 0x00;
+       else
+               h->dir = 0x01;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_get_dir(
+       zb_zcl_read_report_config_record_h handle, zb_zcl_fc_direction_e *dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct read_reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *dir = h->dir;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_set_id(
+       zb_zcl_read_report_config_record_h handle, unsigned short id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct read_reporting_configuration_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_read_report_config_record_get_id(
+       zb_zcl_read_report_config_record_h handle, unsigned short *id)
+{
+       struct read_reporting_configuration_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_create(
+       zb_zcl_report_config_response_record_h *handle)
+{
+       zb_zcl_report_config_response_record_h t = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct reporting_configuration_response_record_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = t;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_clone(
+       zb_zcl_report_config_response_record_h src,
+       zb_zcl_report_config_response_record_h *dst)
+{
+       struct reporting_configuration_response_record_s *srcs = src;
+       struct reporting_configuration_response_record_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct reporting_configuration_response_record_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct reporting_configuration_response_record_s));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_destroy(
+       zb_zcl_report_config_response_record_h handle)
+{
+       struct reporting_configuration_response_record_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_get_status(
+       zb_zcl_report_config_response_record_h handle, zb_zcl_status_e *status)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = h->status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_set_status(
+       zb_zcl_report_config_response_record_h handle, zb_zcl_status_e status)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->status = status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_get_dir(
+       zb_zcl_report_config_response_record_h handle, zb_zcl_fc_direction_e *dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dir, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *dir = h->dir;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_set_dir(
+       zb_zcl_report_config_response_record_h handle, zb_zcl_fc_direction_e dir)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->dir = dir;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_get_id(
+       zb_zcl_report_config_response_record_h handle, unsigned short *id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_report_config_response_record_set_id(
+       zb_zcl_report_config_response_record_h handle, unsigned short id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct reporting_configuration_response_record_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_create(zb_zcl_attr_report_h *handle)
+{
+       zb_zcl_attr_report_h t = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct attribute_report_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = t;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_clone(zb_zcl_attr_report_h src, zb_zcl_attr_report_h *dst)
+{
+       struct attribute_report_s *srcs = src;
+       struct attribute_report_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct attribute_report_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct attribute_report_s));
+
+       desc->value = calloc(1, zb_zcl_get_data_size(srcs->type));
+       RETVM_IF(NULL == desc->value, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc->value, srcs->value, zb_zcl_get_data_size(srcs->type));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_destroy(zb_zcl_attr_report_h handle)
+{
+       struct attribute_report_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->value)
+               free(h->value);
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_get_id(zb_zcl_attr_report_h handle, unsigned short *id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct attribute_report_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_set_id(zb_zcl_attr_report_h handle, unsigned short id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct attribute_report_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_get_type(zb_zcl_attr_report_h handle,
+       zb_zcl_data_type_e *type)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct attribute_report_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *type = h->type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_set_type(zb_zcl_attr_report_h handle,
+       zb_zcl_data_type_e type)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct attribute_report_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->type = type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_get_value(zb_zcl_attr_report_h handle,
+       zb_zcl_data_type_e* type, unsigned char** value, int* count)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       int len = -1;
+       unsigned char *temp = NULL;
+       struct attribute_report_s *h = handle;
+
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->value, ZIGBEE_ERROR_NO_DATA);
+
+       len = zb_zcl_get_data_size(h->type);
+       if (0 < len) {
+
+               temp = calloc(len, sizeof(unsigned char));
+               RETV_IF(NULL == temp, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(temp, h->value, len);
+               *type = h->type;
+               *count = len;
+               *value = temp;
+
+       } else if (ZB_ZCL_OCTET_STRING == h->type || ZB_ZCL_CHARACTER_STRING == h->type) {
+
+               len = h->value[0];
+               temp = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == temp, ZIGBEE_ERROR_OUT_OF_MEMORY);
+
+               memcpy(temp, h->value + ZB_ZCL_OCTET_SIZE, len);
+               *type = h->type;
+               *count = len;
+               *value = temp;
+
+       } else if (ZB_ZCL_LONG_OCTET_STRING == h->type || ZB_ZCL_LONG_CHARACTER_STRING == h->type) {
+
+               len = h->value[0] & 0xff;
+               len |= (h->value[1] << 8) & 0xff00 ;
+
+               temp = calloc(len + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == temp, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*value, h->value + ZB_ZCL_LONG_OCTET_SIZE, len);
+
+               *type = h->type;
+               *count = len;
+               *value = temp;
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_attr_report_set_value(zb_zcl_attr_report_h handle,
+       zb_zcl_data_type_e type, unsigned char* value, int count)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       int len = -1;
+       struct attribute_report_s *h = handle;
+
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       if (h->value) {
+               free(h->value);
+               h->value = NULL;
+       }
+
+       len = zb_zcl_get_data_size(type);
+       if (0 < len) {
+
+               h->value = calloc(len + ZB_GUARD_CHAR , sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(h->value, value, count);
+               h->type = type;
+
+       } else if (ZB_ZCL_OCTET_STRING == type || ZB_ZCL_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               /* The first 1 byte indicate invalid or length of string */
+               h->value[0] = value[0] & 0xff;
+               memcpy(h->value + ZB_ZCL_OCTET_SIZE, value, count);
+
+       } else if (ZB_ZCL_LONG_OCTET_STRING == type || ZB_ZCL_LONG_CHARACTER_STRING == type) {
+
+               h->value = calloc(count + ZB_ZCL_LONG_OCTET_SIZE + ZB_GUARD_CHAR, sizeof(char));
+               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
+
+               /* The first 2 byte indicate invalid or length of string */
+               h->value[0] = count & 0xff;
+               h->value[1] = (count >> 8) & 0xff ;
+
+               memcpy(h->value + ZB_ZCL_LONG_OCTET_SIZE, value, count);
+
+       } else {
+               return ZIGBEE_ERROR_NOT_SUPPORTED;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+/**
+ * @brief Format of the Selector Field
+ *
+ * @since_tizen 4.0
+ */
+struct selector_s {
+       unsigned char indicator; /**< number of index */
+       unsigned short *index; /**< index list */
+};
+
+/**
+ * @brief Stcuture for reading attribute
+ *
+ * @since_tizen 4.0
+ */
+struct read_structured_attribute_record_s {
+       unsigned short id; /**< attribute identifier */
+       struct selector_s *selector; /**< selector format */
+};
+
+/**
+ * @brief Format of the Write Attribute Record Field
+ *
+ * @since_tizen 4.0
+ */
+struct write_attribute_structured_status_record_s {
+       unsigned char status; /**< status */
+       unsigned short id; /**< identifier */
+       struct selector_s selector; /**< selector */
+};
+
+/**
+ * @brief Format of the Write Attribute Record Field
+ *
+ * @since_tizen 4.0
+ */
+struct write_attribute_structured_record_s {
+       unsigned short id; /**< attribute identifier */
+       struct selector_s selector;
+       unsigned char type; /**< attribute data type */
+       unsigned char *value; /**< data value */; /**< attribute value */
+};
+
+API int zb_extended_attr_info_create(zb_zcl_extended_attr_info_h *handle)
+{
+       zb_zcl_extended_attr_info_h t = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct extended_attribute_infomation_s));
+       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = t;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_clone(zb_zcl_extended_attr_info_h src,
+       zb_zcl_extended_attr_info_h *dst)
+{
+       struct extended_attribute_infomation_s *srcs = src;
+       struct extended_attribute_infomation_s *desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct extended_attribute_infomation_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, srcs, sizeof(struct extended_attribute_infomation_s));
+
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_destroy(zb_zcl_extended_attr_info_h handle)
+{
+       struct extended_attribute_infomation_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_get_id(zb_zcl_extended_attr_info_h handle,
+       unsigned short *id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *id = h->id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_set_id(zb_zcl_extended_attr_info_h handle,
+       unsigned short id)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->id = id;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_get_type(zb_zcl_extended_attr_info_h handle,
+       zb_zcl_data_type_e *type)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *type = h->type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_set_type(zb_zcl_extended_attr_info_h handle,
+       zb_zcl_data_type_e type)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 >= zb_zcl_get_data_size(type), ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->type = type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_get_acl(zb_zcl_extended_attr_info_h handle,
+       zb_zcl_acl_type_e *acl)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == acl, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *acl = h->acl;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_extended_attr_info_set_acl(zb_zcl_extended_attr_info_h handle,
+       zb_zcl_acl_type_e acl)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       struct extended_attribute_infomation_s *h = handle;
+       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->acl = acl;
+       return ZIGBEE_ERROR_NONE;
+}
+
similarity index 63%
rename from lib/zbl_zdo_bind_mgr.c
rename to lib/zbl-zdo-bind-mgr.c
index 6112c8d..53f359d 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-#include <zdo/zb_zdo_bind_mgr.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zdo_bind_req(zigbee_h handle, nwk_addr dst_addr16,
-               ieee_addr src_addr64, unsigned char src_ep, unsigned short cluster_id,
-               ieee_addr dst_addr64, unsigned char type, nwk_addr group_addr,
-               unsigned char dst_ep, zb_zdo_bind_rsp cb, void *user_data)
+API int zb_zdo_bind_req(zb_zigbee_h handle, zb_nwk_addr dst_addr16,
+       zb_ieee_addr src_addr64, unsigned char src_ep, zb_cluster_id clusterid,
+       zb_ieee_addr dst_addr64, unsigned char type, zb_nwk_addr group_addr,
+       unsigned char dst_ep, zb_zdo_bind_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -35,15 +29,15 @@ API int zb_zdo_bind_req(zigbee_h handle, nwk_addr dst_addr16,
        RETV_IF(NULL == src_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == dst_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_bind_req(dst_addr16, src_addr64, src_ep, cluster_id, dst_addr64, type,
+       ret = zbl_bind_req(dst_addr16, src_addr64, src_ep, clusterid, dst_addr64, type,
                group_addr, dst_ep, cb, user_data);
        return ret;
 }
 
-API int zb_zdo_unbind_req(zigbee_h handle, nwk_addr dst_addr16,
-               ieee_addr src_addr64, unsigned char src_ep, unsigned short cluster_id,
-               ieee_addr dst_addr64, unsigned char type, nwk_addr group_addr,
-               unsigned char dst_ep, zb_zdo_unbind_rsp cb, void *user_data)
+API int zb_zdo_unbind_req(zb_zigbee_h handle, zb_nwk_addr dst_addr16,
+       zb_ieee_addr src_addr64, unsigned char src_ep, zb_cluster_id clusterid,
+       zb_ieee_addr dst_addr64, unsigned char type, zb_nwk_addr group_addr,
+       unsigned char dst_ep, zb_zdo_unbind_cb cb, void *user_data)
 {
        int ret;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -52,7 +46,7 @@ API int zb_zdo_unbind_req(zigbee_h handle, nwk_addr dst_addr16,
        RETV_IF(NULL == src_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == dst_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       ret = zbl_unbind_req(dst_addr16, src_addr64, src_ep, cluster_id, dst_addr64, type,
+       ret = zbl_unbind_req(dst_addr16, src_addr64, src_ep, clusterid, dst_addr64, type,
                group_addr, dst_ep, cb, user_data);
        return ret;
 }
diff --git a/lib/zbl-zdo-dev-disc.c b/lib/zbl-zdo-dev-disc.c
new file mode 100644 (file)
index 0000000..4902c81
--- /dev/null
@@ -0,0 +1,874 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "zbl.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
+
+API int zb_zdo_nwk_addr_req(zb_zigbee_h handle, zb_ieee_addr addr64,
+       zb_zdp_req_type_e request_type, unsigned char start_idx, zb_zdo_addr_cb cb,
+       void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 != request_type && 1 != request_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_nwk_addr_req(handle, addr64, request_type, start_idx, cb,
+               user_data);
+       return ret;
+}
+
+API int zb_zdo_ieee_addr_req(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_addr_cb cb,
+       void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_ieee_addr_req(handle, addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_active_ep(zb_zigbee_h handle, zb_nwk_addr addr16, zb_zdo_active_ep_cb cb,
+       void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_active_ep(handle, addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char ep,
+       zb_zdo_simple_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_simple_desc_req(handle, addr16, ep, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_extended_simple_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_extended_simple_desc_cb cb, void *user_data)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_zdo_match_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned short profileid, unsigned char num_in_clusters,
+       unsigned short *in_clusters, unsigned char num_out_clusters,
+       unsigned short *out_clusters, zb_zdo_match_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == num_in_clusters && 0 == num_out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_match_desc_req(handle, addr16, profileid, num_in_clusters,
+               in_clusters, num_out_clusters, out_clusters, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_node_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_zdo_node_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_node_desc_req(addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_power_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_zdo_power_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_power_desc_req(addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_complex_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_zdo_complex_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_complex_desc_req(addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_user_desc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_zdo_user_desc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_user_desc_req(addr16, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_user_desc_set(zb_zigbee_h handle, zb_nwk_addr addr16, unsigned char len,
+       unsigned char *user_desc, zb_zdo_user_desc_conf_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
+       RETV_IF(NULL == user_desc, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ret = zbl_user_desc_set(handle, addr16, len, user_desc, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_device_annce(zb_zigbee_h handle, zb_nwk_addr addr16, zb_ieee_addr addr64,
+       unsigned char capability)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr16 || 0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
+       ret = zbl_device_annce(handle, addr16, addr64, capability);
+       return ret;
+}
+
+API int zb_simple_desc_create(zb_zdo_simple_desc_h *handle)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       zb_zdo_simple_desc_h desc = NULL;
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       desc = calloc(1, sizeof(struct zb_zdo_simple_desc_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = desc;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_clone(zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h *dst)
+{
+       zb_zdo_simple_desc_h desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct zb_zdo_simple_desc_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct zb_zdo_simple_desc_s));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, unsigned char *ep)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *ep = h->ep;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, unsigned char ep)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->ep = ep;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
+       unsigned short *profileid)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == profileid, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *profileid = h->profileid;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_profile_id(zb_zdo_simple_desc_h handle,
+       unsigned short profileid)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->profileid = profileid;
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
+       unsigned short *deviceid)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == deviceid, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *deviceid = h->deviceid;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
+       unsigned short deviceid)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->deviceid = deviceid;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
+       unsigned short *device_ver)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == device_ver, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *device_ver = h->device_ver;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
+       unsigned short device_ver)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->device_ver = device_ver;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
+       unsigned char *num_of_in_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == num_of_in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *num_of_in_clusters = h->num_of_in_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
+       unsigned char num_of_in_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->num_of_in_clusters = num_of_in_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
+       unsigned char *num_of_out_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == num_of_out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *num_of_out_clusters = h->num_of_out_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
+       unsigned char num_of_out_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->num_of_out_clusters = num_of_out_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
+       unsigned short **in_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *in_clusters = h->in_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
+       unsigned short *in_clusters, int num)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(num < 1 || num > MAX_ENDPOINT_CLUSTERS, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(h->in_clusters, in_clusters, 2 * num);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
+       unsigned short **out_clusters)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *out_clusters = h->out_clusters;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
+       unsigned short *out_clusters, int num)
+{
+       struct zb_zdo_simple_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(num < 1 || num > MAX_ENDPOINT_CLUSTERS, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(h->out_clusters, out_clusters, 2 * num);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_create(zb_zdo_node_power_descriptor_h *handle)
+{
+       zb_zdo_node_power_descriptor_h desc = NULL;
+
+       CHECK_ZIGBEE_PRIVILEGE();
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct zb_zdo_node_power_descriptor_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_clone(zb_zdo_node_power_descriptor_h src,
+       zb_zdo_node_power_descriptor_h *dst)
+{
+       zb_zdo_node_power_descriptor_h desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct zb_zdo_node_power_descriptor_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct zb_zdo_node_power_descriptor_s));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_destroy(zb_zdo_node_power_descriptor_h handle)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_get_current_power_mode(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_cur_pwr_mode_e* current_power_mode)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == current_power_mode, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *current_power_mode = h->current_power_mode;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_set_current_power_mode(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_cur_pwr_mode_e current_power_mode)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b11 < current_power_mode, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->current_power_mode = current_power_mode;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_get_available_power_sources(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_type_e* available_power_sources)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == available_power_sources, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *available_power_sources = h->available_power_sources;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_set_available_power_sources(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_type_e available_power_sources)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b111 < available_power_sources, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->available_power_sources = available_power_sources;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_get_current_power_source(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_type_e* current_power_source)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == current_power_source, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *current_power_source = h->current_power_source;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_set_current_power_source(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_type_e current_power_source)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b111 < current_power_source, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->current_power_source = current_power_source;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_get_current_power_source_level(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_level_e* current_power_source_level)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == current_power_source_level, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *current_power_source_level = h->current_power_source_level;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_power_desc_set_current_power_source_level(
+       zb_zdo_node_power_descriptor_h handle, zb_zdp_pwr_src_level_e current_power_source_level)
+{
+       struct zb_zdo_node_power_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->current_power_source_level = current_power_source_level;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_create(zb_zdo_node_descriptor_h *handle)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       zb_zdo_node_descriptor_h desc = NULL;
+
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       desc = calloc(1, sizeof(struct zb_zdo_node_descriptor_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = desc;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_clone(zb_zdo_node_descriptor_h src,
+       zb_zdo_node_descriptor_h *dst)
+{
+       struct zb_zdo_node_descriptor_s* desc = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       desc = calloc(1, sizeof(struct zb_zdo_node_descriptor_s));
+       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(desc, src, sizeof(struct zb_zdo_node_descriptor_s));
+       *dst = desc;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
+       unsigned char* logical_type)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == logical_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *logical_type = h->logical_type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
+       unsigned char logical_type)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b11 < logical_type, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->logical_type = logical_type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_complex_desciptor_available(
+       zb_zdo_node_descriptor_h handle, unsigned char* complex_desciptor_available)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == complex_desciptor_available, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *complex_desciptor_available = h->complex_desciptor_available;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_complex_descriptor_available(
+       zb_zdo_node_descriptor_h handle, unsigned char complex_desciptor_available)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x01 < complex_desciptor_available, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->complex_desciptor_available = complex_desciptor_available;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_user_descriptor_available(
+       zb_zdo_node_descriptor_h handle, unsigned char* user_descriptor_available)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == user_descriptor_available, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *user_descriptor_available = h->user_descriptor_available;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_user_descriptor_available(
+       zb_zdo_node_descriptor_h handle, unsigned char user_descriptor_available)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x01 < user_descriptor_available, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->user_descriptor_available = user_descriptor_available;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_aps_flags(zb_zdo_node_descriptor_h handle,
+       unsigned char* aps_flags)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == aps_flags, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *aps_flags = h->aps_flags;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_aps_flags(zb_zdo_node_descriptor_h handle,
+       unsigned char aps_flags)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b111 < aps_flags, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->aps_flags = aps_flags;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_frequency_band(zb_zdo_node_descriptor_h handle,
+       unsigned char* frequency_band)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == frequency_band, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *frequency_band = h->frequency_band;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_frequency_band(zb_zdo_node_descriptor_h handle,
+       unsigned char frequency_band)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0b1111 < frequency_band, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->frequency_band = frequency_band;
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_node_desc_get_mac_capability_flags(zb_zdo_node_descriptor_h handle,
+       unsigned char* mac_capability_flags)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == mac_capability_flags, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *mac_capability_flags = h->mac_capability_flags;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_mac_capability_flags(zb_zdo_node_descriptor_h handle,
+       unsigned char mac_capability_flags)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->mac_capability_flags = mac_capability_flags;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_manufacturer_code(zb_zdo_node_descriptor_h handle,
+       unsigned short* manufacturer_code)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == manufacturer_code, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *manufacturer_code = h->manufacturer_code;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_manufacturer_code(zb_zdo_node_descriptor_h handle,
+       unsigned short manufacturer_code)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h->manufacturer_code = manufacturer_code;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
+       unsigned char* maximum_buffer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == maximum_buffer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *maximum_buffer_size = h->maximum_buffer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
+       unsigned char maximum_buffer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x7f < maximum_buffer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->maximum_buffer_size = maximum_buffer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_maximum_incoming_transfer_size(
+       zb_zdo_node_descriptor_h handle, unsigned short* maximum_incoming_transfer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == maximum_incoming_transfer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *maximum_incoming_transfer_size = h->maximum_incoming_transfer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_maximum_incoming_transfer_size(
+       zb_zdo_node_descriptor_h handle, unsigned short maximum_incoming_transfer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x7fff < maximum_incoming_transfer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->maximum_incoming_transfer_size = maximum_incoming_transfer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_server_mask(zb_zdo_node_descriptor_h handle,
+       unsigned short* server_mask)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == server_mask, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *server_mask = h->server_mask;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_server_mask(zb_zdo_node_descriptor_h handle,
+       unsigned short server_mask)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x7f < server_mask, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->server_mask = server_mask;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_maximum_outgoing_transfer_size(
+       zb_zdo_node_descriptor_h handle, unsigned short* maximum_outgoing_transfer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == maximum_outgoing_transfer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *maximum_outgoing_transfer_size = h->maximum_outgoing_transfer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_maximum_outgoing_transfer_size(
+       zb_zdo_node_descriptor_h handle, unsigned short maximum_outgoing_transfer_size)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x7fff < maximum_outgoing_transfer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->maximum_outgoing_transfer_size = maximum_outgoing_transfer_size;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_get_descriptor_capability_field(
+       zb_zdo_node_descriptor_h handle, unsigned short* descriptor_capability_field)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == descriptor_capability_field, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *descriptor_capability_field = h->descriptor_capability_field;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_node_desc_set_descriptor_capability_field(
+       zb_zdo_node_descriptor_h handle, unsigned short descriptor_capability_field)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0x11 < descriptor_capability_field, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
+       h->descriptor_capability_field = descriptor_capability_field;
+       return ZIGBEE_ERROR_NONE;
+}
+
diff --git a/lib/zbl-zdo-nwk-mgr.c b/lib/zbl-zdo-nwk-mgr.c
new file mode 100644 (file)
index 0000000..97e323f
--- /dev/null
@@ -0,0 +1,498 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "zbl.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
+
+API int zb_zdo_mgmt_nwk_disc_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned int scan_channels, unsigned char scan_duration, unsigned char scan_count,
+       unsigned char start_idx, zb_zdo_mgmt_nwk_disc_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       ret = zbl_mgmt_nwk_disc_req(addr16, scan_channels, scan_duration, scan_count,
+               start_idx, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_lqi_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_mgmt_lqi_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       ret = zbl_mgmt_lqi_req(addr16, start_idx, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_rtg_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_mgmt_rtg_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       ret = zbl_mgmt_rtg_req(addr16, start_idx, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_bind_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_mgmt_bind_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       ret = zbl_mgmt_bind_req(addr16, start_idx, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_leave_req(zb_zigbee_h handle, zb_ieee_addr addr64,
+       bool remove_children, bool rejoin, zb_zdo_mgmt_leave_cb cb,
+       void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
+       ret = zbl_mgmt_leave_device(addr64, remove_children, rejoin, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_direct_join_req(zb_zigbee_h handle, zb_ieee_addr addr64,
+       unsigned char capability, zb_zdo_mgmt_direct_join_cb cb, void *user_data)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_zdo_mgmt_permit_joining_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char duration, unsigned char tc_significance,
+       zb_zdo_mgmt_permit_joining_cb cb, void *user_data)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       ret = zbl_mgmt_permit_joining_req(addr16, duration, tc_significance, cb, user_data);
+       return ret;
+}
+
+API int zb_zdo_mgmt_cache_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       unsigned char start_idx, zb_zdo_mgmt_cache_cb cb, void *user_data)
+{
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_zdo_mgmt_nwk_update_req(zb_zigbee_h handle, unsigned int scan_channels,
+       unsigned char scan_duration, unsigned char scan_count, unsigned char nwk_update_id,
+       zb_nwk_addr nwk_manager_addr)
+{
+       int ret;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
+       RETV_IF(0 == nwk_manager_addr, ZIGBEE_ERROR_INVALID_ADDRESS);
+       ret = zbl_mgmt_nwk_update_req(scan_channels, scan_duration, scan_count, nwk_update_id,
+               nwk_manager_addr);
+       return ret;
+}
+
+API int zb_network_list_record_get_extended_pan_id(
+       zb_zdo_network_list_record_h handle, zb_ieee_addr extended_pan_id)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(extended_pan_id, h->extended_pan_id, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_logical_channel(
+       zb_zdo_network_list_record_h handle, unsigned char* logical_channel)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == logical_channel, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *logical_channel = h->logical_channel;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_zigbee_version(
+       zb_zdo_network_list_record_h handle, unsigned char* zigbee_version)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zigbee_version, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *zigbee_version = h->zigbee_version;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_stack_profile(
+       zb_zdo_network_list_record_h handle, unsigned char* stack_profile)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == stack_profile, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *stack_profile = h->stack_profile;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_beacon_order(
+       zb_zdo_network_list_record_h handle, unsigned char* beacon_order)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == beacon_order, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *beacon_order = h->beacon_order;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_superframe_order(
+       zb_zdo_network_list_record_h handle, unsigned char* superframe_order)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == superframe_order, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *superframe_order = h->superframe_order;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_network_list_record_get_permit_joining(
+       zb_zdo_network_list_record_h handle, unsigned char* permit_joining)
+{
+       struct zb_zdo_network_list_record_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *permit_joining = h->permit_joining;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_extended_pan_id(
+       zb_zdo_neighbor_table_desc_h handle, zb_ieee_addr extended_pan_id)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(extended_pan_id, h->extended_pan_id, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_ieee_addr(
+       zb_zdo_neighbor_table_desc_h handle, zb_ieee_addr addr64)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(addr64, h->addr64, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_nwk_addr(
+       zb_zdo_neighbor_table_desc_h handle, zb_nwk_addr* addr16)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *addr16 = h->addr16;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_device_type(
+       zb_zdo_neighbor_table_desc_h handle, unsigned char* device_type)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == device_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *device_type = h->device_type;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_rx_on_when_idle(
+       zb_zdo_neighbor_table_desc_h handle, unsigned char* rx_on_when_idle)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == rx_on_when_idle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *rx_on_when_idle = h->rx_on_when_idle;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_relationship(
+       zb_zdo_neighbor_table_desc_h handle, unsigned char* releationship)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == releationship, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *releationship = h->relationship;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_permit_joining(
+       zb_zdo_neighbor_table_desc_h handle, unsigned char* permit_joining)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *permit_joining = h->permit_joining;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_depth(
+       zb_zdo_neighbor_table_desc_h handle, unsigned char* depth)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == depth, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *depth = h->depth;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_neighbor_table_desc_get_lqi(zb_zdo_neighbor_table_desc_h handle,
+       unsigned char* lqi)
+{
+       struct zb_zdo_neighbor_table_desc_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == lqi, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *lqi = h->lqi;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
+       zb_nwk_addr* dst_addr)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *dst_addr = h->dst_addr;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
+       zb_zdp_status_e *status)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = h->status;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_memory_constrained(
+       zb_zdo_routing_table_h handle, unsigned char *memory_constrained)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == memory_constrained, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *memory_constrained = h->memory_constrained;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
+       unsigned char *many_to_one)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == many_to_one, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *many_to_one = h->many_to_one;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_route_record_required(
+       zb_zdo_routing_table_h handle, unsigned char *route_record_required)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == route_record_required, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *route_record_required = h->route_record_required;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_routing_table_get_next_hop_addr(
+       zb_zdo_routing_table_h handle, zb_nwk_addr *next_hop_addr)
+{
+       struct zb_zdo_routing_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == next_hop_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *next_hop_addr = h->next_hop_addr;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_src_addr(zb_zdo_binding_table_h handle,
+       zb_ieee_addr src_addr)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == src_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(src_addr, h->src_addr64, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_src_ep(zb_zdo_binding_table_h handle,
+       unsigned char* src_ep)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *src_ep = h->src_ep;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_cluster_id(zb_zdo_binding_table_h handle,
+       unsigned short *clusterid)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == clusterid, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *clusterid = h->clusterid;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_dst_addr_mode(zb_zdo_binding_table_h handle,
+       unsigned char* dst_addr_mode)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst_addr_mode, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *dst_addr_mode = h->dst_addr_mode;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_dst_addr16(zb_zdo_binding_table_h handle,
+       zb_nwk_addr* addr16)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *addr16 = h->dst_addr16;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_dst_addr64(zb_zdo_binding_table_h handle,
+       zb_ieee_addr addr64)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(addr64, h->dst_addr64, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_binding_table_get_dst_ep(zb_zdo_binding_table_h handle,
+       unsigned char* dst_ep)
+{
+       struct zb_zdo_binding_table_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *dst_ep = h->dst_ep;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discovery_cache_get_ieee_addr(zb_zdo_discovery_cache_h handle,
+       zb_ieee_addr addr64)
+{
+       struct zb_zdo_discovery_cache_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(addr64, h->addr64, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_discovery_cache_get_nwk_addr(zb_zdo_discovery_cache_h handle,
+       zb_nwk_addr* addr16)
+{
+       struct zb_zdo_discovery_cache_s *h = handle;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *addr16 = h->addr16;
+       return ZIGBEE_ERROR_NONE;
+}
+
+
similarity index 63%
rename from lib/zbl_zdo_svc_disc.c
rename to lib/zbl-zdo-svc-disc.c
index 9316b39..65cd5f7 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-#include <zdo/zb_zdo_dev_disc.h>
-
 #include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
-
-#ifdef ZB_SUPPORT_PRIORITY_5
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_zdo_system_server_discover_req(zigbee_h handle,
-               unsigned short server_mask, zb_zdo_system_server_discover_rsp cb, void *user_data)
+API int zb_zdo_system_server_discover_req(zb_zigbee_h handle,
+       unsigned short server_mask, zb_zdo_system_server_discover_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -34,8 +26,8 @@ API int zb_zdo_system_server_discover_req(zigbee_h handle,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_find_node_cache_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_find_node_cache_rsp cb, void *user_data)
+API int zb_zdo_find_node_cache_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_find_node_cache_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -44,8 +36,8 @@ API int zb_zdo_find_node_cache_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_discovery_cache_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_discovery_cache_rsp cb, void *user_data)
+API int zb_zdo_discovery_cache_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_discovery_cache_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -55,10 +47,10 @@ API int zb_zdo_discovery_cache_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_discovery_store_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, unsigned char node_desc_size, unsigned char power_desc_size,
-               unsigned char active_ep_size, unsigned char simple_desc_count,
-               unsigned char *simple_desc_list, zb_zdo_discovery_store_rsp cb, void *user_data)
+API int zb_zdo_discovery_store_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, unsigned char node_desc_size, unsigned char power_desc_size,
+       unsigned char active_ep_size, unsigned char simple_desc_count,
+       unsigned char *simple_desc_list, zb_zdo_discovery_store_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -69,9 +61,9 @@ API int zb_zdo_discovery_store_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_node_desc_store_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_node_descriptor_h nodedsc, zb_zdo_node_desc_store_rsp cb,
-               void *user_data)
+API int zb_zdo_node_desc_store_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_node_descriptor_h nodedsc, zb_zdo_node_desc_store_cb cb,
+       void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -82,9 +74,9 @@ API int zb_zdo_node_desc_store_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_power_desc_store_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_node_power_descriptor_h powerdsc,
-               zb_zdo_power_desc_store_rsp cb, void *user_data)
+API int zb_zdo_power_desc_store_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_node_power_descriptor_h powerdsc,
+       zb_zdo_power_desc_store_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -92,9 +84,9 @@ API int zb_zdo_power_desc_store_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_active_ep_store_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, unsigned char active_ep_count, unsigned char *ep_list,
-               zb_zdo_active_ep_store_rsp cb, void *user_data)
+API int zb_zdo_active_ep_store_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, unsigned char active_ep_count, unsigned char *ep_list,
+       zb_zdo_active_ep_store_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -105,9 +97,9 @@ API int zb_zdo_active_ep_store_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_simple_desc_store_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_simple_desc_h simpledsc, zb_zdo_simple_desc_store_rsp cb,
-               void *user_data)
+API int zb_zdo_simple_desc_store_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_simple_desc_h simpledsc, zb_zdo_simple_desc_store_cb cb,
+       void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -118,8 +110,8 @@ API int zb_zdo_simple_desc_store_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_zdo_remove_node_cache_req(zigbee_h handle, nwk_addr addr16,
-               ieee_addr addr64, zb_zdo_remove_node_cache_rsp cb, void *user_data)
+API int zb_zdo_remove_node_cache_req(zb_zigbee_h handle, zb_nwk_addr addr16,
+       zb_ieee_addr addr64, zb_zdo_remove_node_cache_cb cb, void *user_data)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -129,5 +121,3 @@ API int zb_zdo_remove_node_cache_req(zigbee_h handle, nwk_addr addr16,
        return ZIGBEE_ERROR_NONE;
 }
 
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
diff --git a/lib/zbl-zdo.c b/lib/zbl-zdo.c
new file mode 100644 (file)
index 0000000..e66e8a6
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <glib.h>
+
+#include "zbl.h"
+#include "zb-log.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
+
+API int zb_end_dev_info_get_list(zb_zigbee_h handle, int *count,
+       zb_end_dev_info_h **list)
+{
+       int ret;
+       unsigned char cnt;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == list, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       ret = zbl_get_all_device_info(list, &cnt);
+       *count = cnt;
+       return ret;
+}
+
+API int zb_end_dev_get_endpoint_list(zb_zigbee_h handle, zb_ieee_addr addr64,
+       unsigned char *count, unsigned char **ep_list)
+{
+       int ret;
+       unsigned char cnt = 0;
+       unsigned char eplist[MAX_ENDPOINT_CLUSTERS] = {0, };
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == ep_list, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       ret = zbl_get_endpoint_list(addr64, &cnt, eplist);
+       *count = cnt;
+       if (cnt > 0) {
+               *ep_list = calloc(cnt + 1, sizeof(unsigned char));
+               RETV_IF(NULL == *ep_list, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*ep_list, eplist, cnt);
+       }
+       return ret;
+}
+
+API int zb_end_dev_info_get_cluster_list(zb_zigbee_h handle, zb_ieee_addr addr64,
+       unsigned char ep, unsigned char *in_cluster_count, unsigned short **in_cluster_list,
+       unsigned char *out_cluster_count, unsigned short **out_cluster_list)
+{
+       int ret;
+       unsigned char in_cnt = 0;
+       unsigned char out_cnt = 0;
+       unsigned short in_clusters[MAX_ENDPOINT_CLUSTERS] = {0, };
+       unsigned short out_clusters[MAX_ENDPOINT_CLUSTERS] = {0, };
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == in_cluster_count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == in_cluster_list, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == out_cluster_count, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == out_cluster_list, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       ret = zbl_get_cluster_list(addr64, ep, &in_cnt, in_clusters,
+                       &out_cnt, out_clusters);
+       *in_cluster_count = in_cnt;
+       if (in_cnt > 0) {
+               *in_cluster_list = calloc(in_cnt + 1, sizeof(unsigned short));
+               RETV_IF(NULL == *in_cluster_list, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*in_cluster_list, in_clusters, in_cnt * sizeof(unsigned short));
+       }
+       *out_cluster_count = out_cnt;
+       if (out_cnt > 0) {
+               *out_cluster_list = calloc(out_cnt + 1, sizeof(unsigned short));
+               RETV_IF(NULL == *out_cluster_list, ZIGBEE_ERROR_OUT_OF_MEMORY);
+               memcpy(*out_cluster_list, out_clusters, out_cnt * sizeof(unsigned short));
+       }
+
+       return ret;
+}
+
+API int zb_foreach_end_dev_info(zb_end_dev_info_h *list,
+       zb_end_dev_info_cb cb, void *user_data)
+{
+       int index = 0;
+       GList *cur = NULL;
+       struct zb_end_device_info_s *real = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == list, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       cur = (GList *)list;
+       while (cur) {
+               GList *next = cur->next;
+               real = cur->data;
+               if (ZIGBEE_FUNC_STOP == cb(index, (zb_end_dev_info_h)real->list, user_data))
+                       break;
+               index++;
+               cur = next;
+       }
+
+       return ZIGBEE_ERROR_NONE;
+
+}
+
+API int zb_end_dev_info_create(zb_end_dev_info_h *handle)
+{
+       struct zb_zdo_node_descriptor_s* h = NULL;
+
+       CHECK_ZIGBEE_PRIVILEGE();
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       h = calloc(1, sizeof(struct zb_end_device_info_s));
+       RETVM_IF(NULL == handle, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+       *handle = h;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_clone(zb_end_dev_info_h src, zb_end_dev_info_h *dst)
+{
+       struct zb_end_device_info_s *dev = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       dev = calloc(1, sizeof(struct zb_end_device_info_s));
+       RETVM_IF(NULL == dev, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(dev, src, sizeof(struct zb_zdo_node_descriptor_s));
+       *dst = dev;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_destroy(zb_end_dev_info_h handle)
+{
+       struct zb_zdo_node_descriptor_s* h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       free(h);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_network_address(zb_end_dev_info_h handle,
+       zb_nwk_addr *addr16)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *addr16 = h->addr16;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_ieee_address(zb_end_dev_info_h handle,
+       zb_ieee_addr addr64)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       memcpy(addr64, h->addr64, sizeof(zb_ieee_addr));
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_num_of_ep(zb_end_dev_info_h handle,
+       unsigned char *count)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *count = h->num_of_ep;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_ep_list(zb_end_dev_info_h handle, unsigned char **ep_list)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == ep_list, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *ep_list = calloc(h->num_of_ep, sizeof(unsigned char));
+       RETVM_IF(NULL == *ep_list, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
+
+       memcpy(*ep_list, h->ep, h->num_of_ep);
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_mac_capability(zb_end_dev_info_h handle,
+       zb_zdp_mac_capability_field_e *capability)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == capability, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
+
+       *capability = h->capability;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_alternative_pan_coordinator(zb_end_dev_info_h handle,
+       zb_zdp_do_pan_coordinator_e *can_do_it)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == can_do_it, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
+
+       *can_do_it = h->capability & ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR ? 1 : 0;
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_device_id(zb_end_dev_info_h handle, unsigned char ep,
+       unsigned short *deviceid)
+{
+       int i;
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == deviceid, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->desc, ZIGBEE_ERROR_NO_DATA);
+
+       for (i = 0; i < h->num_of_ep; i++) {
+               RETV_IF(NULL == h->desc[i], ZIGBEE_ERROR_NO_DATA);
+               if (h->desc[i]->ep == ep) {
+                       *deviceid = h->desc[i]->deviceid;
+                       return ZIGBEE_ERROR_NONE;
+               }
+       }
+       return ZIGBEE_ERROR_NO_DATA;
+}
+
+API int zb_end_dev_info_get_profile_id(zb_end_dev_info_h handle, unsigned char ep,
+       unsigned short *profileid)
+{
+       int i;
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == profileid, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == h->desc, ZIGBEE_ERROR_NO_DATA);
+
+       for (i = 0; i < h->num_of_ep; i++) {
+               RETV_IF(NULL == h->desc[i], ZIGBEE_ERROR_NO_DATA);
+               if (h->desc[i]->ep == ep) {
+                       *profileid = h->desc[i]->profileid;
+                       return ZIGBEE_ERROR_NONE;
+               }
+       }
+       return ZIGBEE_ERROR_NO_DATA;
+}
+
+API int zb_end_dev_info_get_power_source(zb_end_dev_info_h handle,
+       zb_zdp_power_e *power_src)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == power_src, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
+
+       *power_src = h->capability & ZB_ZDP_POWER_SOURCE ? 1 : 0;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_end_dev_info_get_security_capabilty(zb_end_dev_info_h handle,
+       zb_zdp_security_cap_e*sec_capability)
+{
+       struct zb_end_device_info_s *h = handle;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == sec_capability, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
+
+       *sec_capability = h->capability & ZB_ZDP_SECURITY_CAPABILITY ? 1 : 0;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
index c6145cd..a8c9931 100644 (file)
--- a/lib/zbl.c
+++ b/lib/zbl.c
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <zb_log.h>
-#include <zb_common.h>
 
 #include "zbl.h"
-#include "zbl_dbus.h"
-#include "zigbee.h"
-#include "zigbee_internal.h"
+#include "zbl-dbus.h"
+#include "zb-common.h"
 
-API int zb_create(zigbee_h *handle)
+API int zb_ev_get_enable_status(zb_event_data_h ev, zb_error_e* status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_enable_s *enable = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       enable = event->data.enable;
+       RETV_IF(NULL == enable, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = enable->status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_ev_get_form_network_panid(zb_event_data_h ev, zb_nwk_addr* pan_id)
+{
+       zb_event_data_s *event = ev;
+       zb_event_form_network_s *form_network = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       form_network = event->data.form_network;
+       RETV_IF(NULL == form_network, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *pan_id = form_network->pan_id;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_ev_get_join_count(zb_event_data_h ev, unsigned char* count)
+{
+       zb_event_data_s *event = ev;
+       zb_event_join_s *join = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       join = event->data.join;
+       RETV_IF(NULL == join, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *count = join->count;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_join_ep(zb_event_data_h ev, unsigned char** ep)
+{
+       zb_event_data_s *event = ev;
+       zb_event_join_s *join = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       join = event->data.join;
+       RETV_IF(NULL == join, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *ep = calloc(join->count, sizeof(unsigned char));
+       if (NULL == *ep) {
+               ERR("Couldn't Allocate Memory");
+               return ZIGBEE_ERROR_OUT_OF_MEMORY;
+       }
+       memcpy(*ep, join->ep, join->count);
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_child_left_status(zb_event_data_h ev, zb_error_e* status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_child_left_s *child_left = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       child_left = event->data.child_left;
+       RETV_IF(NULL == child_left, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = child_left->status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_global_default_rsp_ep(zb_event_data_h ev, unsigned char* ep)
+{
+       zb_event_data_s *event = ev;
+       zb_event_global_default_rsp_s *global_default_rsp = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       global_default_rsp = event->data.global_default_rsp;
+       RETV_IF(NULL == global_default_rsp, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *ep = global_default_rsp->ep;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_global_default_rsp_cluster_id(zb_event_data_h ev,
+       unsigned short* clusterid)
+{
+       zb_event_data_s *event = ev;
+       zb_event_global_default_rsp_s *global_default_rsp = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       global_default_rsp = event->data.global_default_rsp;
+       RETV_IF(NULL == global_default_rsp, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == clusterid, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *clusterid = global_default_rsp->clusterid;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_global_default_rsp_command_id(zb_event_data_h ev,
+       unsigned char* commandid)
+{
+       zb_event_data_s *event = ev;
+       zb_event_global_default_rsp_s *global_default_rsp = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       global_default_rsp = event->data.global_default_rsp;
+       RETV_IF(NULL == global_default_rsp, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == commandid, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *commandid = global_default_rsp->commandid;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_global_default_rsp_status(zb_event_data_h ev,
+       zb_zcl_status_e* status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_global_default_rsp_s *global_default_rsp = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       global_default_rsp = event->data.global_default_rsp;
+       RETV_IF(NULL == global_default_rsp, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = global_default_rsp->status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+/* Need to be test, because we don't know things send this reports to coordinator */
+API int zb_ev_get_global_attr_report_records(zb_event_data_h ev,
+       zb_zcl_attr_report_h* records, unsigned char *count)
+{
+       zb_event_data_s *event = ev;
+       zb_event_global_attr_report_s *global_attr_repor = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       global_attr_repor = event->data.global_attr_report;
+       RETV_IF(NULL == global_attr_repor, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == records, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *records = global_attr_repor->records;
+       *count = global_attr_repor->count;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_alarm_count(zb_event_data_h ev, unsigned short* count)
+{
+       zb_event_data_s *event = ev;
+       zb_event_alarm_s *alarm = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       alarm = event->data.alarm;
+       RETV_IF(NULL == alarm, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *count = alarm->count;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_enroll_request_src_ep(zb_event_data_h ev, unsigned char* src_ep)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_enroll_request_s* ias_enroll_request = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_enroll_request = event->data.ias_enroll_request;
+       RETV_IF(NULL == ias_enroll_request, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *src_ep = ias_enroll_request->src_ep;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_enroll_request_zone_type(zb_event_data_h ev,
+       unsigned short* zone_type)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_enroll_request_s* ias_enroll_request = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_enroll_request = event->data.ias_enroll_request;
+       RETV_IF(NULL == ias_enroll_request, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zone_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *zone_type = ias_enroll_request->zone_type;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_enroll_request_mfg_code(zb_event_data_h ev,
+       unsigned char* mfg_code)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_enroll_request_s* ias_enroll_request = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_enroll_request = event->data.ias_enroll_request;
+       RETV_IF(NULL == ias_enroll_request, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == mfg_code, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *mfg_code = ias_enroll_request->mfg_code;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+
+API int zb_ev_get_ias_noti_src_ep(zb_event_data_h ev, unsigned char* src_ep)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_noti_s* ias_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_noti = event->data.ias_noti;
+       RETV_IF(NULL == ias_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *src_ep = ias_noti->src_ep;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_noti_zone_status(zb_event_data_h ev,
+       unsigned short* zone_status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_noti_s* ias_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_noti = event->data.ias_noti;
+       RETV_IF(NULL == ias_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zone_status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *zone_status = ias_noti->zone_status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_ext_noti_src_ep(zb_event_data_h ev, unsigned char* src_ep)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_extended_noti_s* ias_extended_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_extended_noti = event->data.ias_extended_noti;
+       RETV_IF(NULL == ias_extended_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *src_ep = ias_extended_noti->src_ep;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_ext_noti_status(zb_event_data_h ev, unsigned char* status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_extended_noti_s* ias_extended_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_extended_noti = event->data.ias_extended_noti;
+       RETV_IF(NULL == ias_extended_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *status = ias_extended_noti->status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_ext_noti_zone_status(zb_event_data_h ev,
+       unsigned short* zone_status)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_extended_noti_s* ias_extended_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_extended_noti = event->data.ias_extended_noti;
+       RETV_IF(NULL == ias_extended_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zone_status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *zone_status = ias_extended_noti->zone_status;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_ext_noti_delay(zb_event_data_h ev, unsigned short* delay)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_extended_noti_s* ias_extended_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_extended_noti = event->data.ias_extended_noti;
+       RETV_IF(NULL == ias_extended_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == delay, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *delay = ias_extended_noti->delay;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_ev_get_ias_ext_noti_zone_id(zb_event_data_h ev, unsigned char* zone_id)
+{
+       zb_event_data_s *event = ev;
+       zb_event_ias_extended_noti_s* ias_extended_noti = NULL;
+
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
+       RETV_IF(NULL == ev, ZIGBEE_ERROR_INVALID_PARAMETER);
+       ias_extended_noti = event->data.ias_extended_noti;
+       RETV_IF(NULL == ias_extended_noti, ZIGBEE_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == zone_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
+       *zone_id = ias_extended_noti->zone_id;
+
+       return ZIGBEE_ERROR_NONE;
+}
+
+API int zb_create(zb_zigbee_h *handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       zigbee_h h = calloc(1, sizeof(struct zbl_zigbee_s));
+       zb_zigbee_h h = calloc(1, sizeof(struct zbl_zigbee_s));
        RETVM_IF(NULL == h, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
        *handle = h;
 
@@ -47,7 +419,7 @@ API int zb_create(zigbee_h *handle)
        return ret;
 }
 
-API int zb_destroy(zigbee_h handle)
+API int zb_destroy(zb_zigbee_h handle)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -56,7 +428,7 @@ API int zb_destroy(zigbee_h handle)
        return ZIGBEE_ERROR_NONE;
 }
 
-API int zb_enable(zigbee_h handle)
+API int zb_enable(zb_zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -67,7 +439,7 @@ API int zb_enable(zigbee_h handle)
        return ret;
 }
 
-API int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
+API int zb_set_event_cb(zb_zigbee_h handle, zb_event_cb event_handler)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -78,7 +450,7 @@ API int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
        return ret;
 }
 
-API int zb_disable(zigbee_h handle)
+API int zb_disable(zb_zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -89,7 +461,7 @@ API int zb_disable(zigbee_h handle)
        return ret;
 }
 
-API int zb_hw_reset(zigbee_h handle)
+API int zb_hw_reset(zb_zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -100,7 +472,7 @@ API int zb_hw_reset(zigbee_h handle)
        return ret;
 }
 
-API int zb_coex_start(zigbee_h handle, unsigned char channel)
+API int zb_coex_start(zb_zigbee_h handle, unsigned char channel)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -111,7 +483,7 @@ API int zb_coex_start(zigbee_h handle, unsigned char channel)
        return ret;
 }
 
-API int zb_coex_stop(zigbee_h handle)
+API int zb_coex_stop(zb_zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -122,7 +494,7 @@ API int zb_coex_stop(zigbee_h handle)
        return ret;
 }
 
-API int zb_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
+API int zb_form_network(zb_zigbee_h handle, zb_form_network_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -133,7 +505,7 @@ API int zb_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
        return ret;
 }
 
-API int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_data)
+API int zb_disable_network(zb_zigbee_h handle, zb_disable_network_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -144,7 +516,7 @@ API int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user
        return ret;
 }
 
-API int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, bool rejoin)
+API int zb_leave_device(zb_zigbee_h handle, zb_ieee_addr addr, bool remove_children, bool rejoin)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -156,7 +528,7 @@ API int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, b
        return ret;
 }
 
-API int zb_permit_join(zigbee_h handle, unsigned char timeout)
+API int zb_permit_join(zb_zigbee_h handle, unsigned char timeout)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -167,7 +539,7 @@ API int zb_permit_join(zigbee_h handle, unsigned char timeout)
        return ret;
 }
 
-API int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64)
+API int zb_get_controller_mac_address(zb_zigbee_h handle, zb_ieee_addr addr64)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -179,8 +551,8 @@ API int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64)
        return ret;
 }
 
-API int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid,
-               nwk_addr *panid, unsigned char *channel, unsigned char *tx_power)
+API int zb_get_network_info(zb_zigbee_h handle, zb_ieee_addr addr64, zb_nwk_addr *nodeid,
+               zb_nwk_addr *panid, unsigned char *channel, unsigned char *tx_power)
 {
        int ret = ZIGBEE_ERROR_NONE;
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
@@ -192,7 +564,7 @@ API int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid,
        return ret;
 }
 
-API int zb_device_list_free(zb_end_device_info_h *list)
+API int zb_end_dev_info_list_free(zb_end_dev_info_h *list)
 {
        int i = 0, j = 0;
        struct zb_end_device_info_s **plist = (struct zb_end_device_info_s **)list;
index b2fb080..a404dff 100644 (file)
--- a/lib/zbl.h
+++ b/lib/zbl.h
 #define API __attribute__((visibility("default")))
 
 struct zbl_zigbee_s {
-       GList *dbus_sub_ids;
-       zb_event_cb event_handler;
+       GList *dbus_sub_ids; /**< subsrcibed dbus signal id */
+       zb_event_cb event_handler; /**< event handler */
 #ifdef ZB_FEATURE_GLOBAL_RSP_SYNC
-       GList *global_cmd_req;
+       GList *global_cmd_req; /**< list of global command requests */
 #endif
+       void *user_data; /**< use data */
 };
 
 #endif /* TIZEN_NETWORK_ZIGBEE_LIBRARY_H__ */
diff --git a/lib/zbl_dbus.h b/lib/zbl_dbus.h
deleted file mode 100644 (file)
index 577d70e..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__
-#define __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__
-
-#include <gio/gio.h>
-
-#include <zigbee.h>
-#include <zigbee_internal.h>
-#include <zb_type.h>
-
-int zbl_dbus_start(zigbee_h handle);
-int zbl_dbus_stop(zigbee_h handle);
-GDBusConnection* zbl_dbus_get_object(void);
-int zbl_dbus_get_timeout(GDBusProxy *proxy);
-int zbl_check_privilege();
-
-int zbl_enable(zigbee_h handle);
-int zbl_set_event_cb(zigbee_h handle, zb_event_cb event_handler);
-int zbl_disable(void);
-int zbl_hw_reset(void);
-int zbl_coex_start(unsigned char channel);
-int zbl_coex_stop(void);
-int zbl_get_network_info(ieee_addr addr64, nwk_addr *nodeid, nwk_addr *panid,
-               unsigned char *channel, unsigned char *tx_power);
-int zbl_get_controller_mac_address(ieee_addr addr64);
-int zbl_get_cluster_list(ieee_addr eui64, unsigned char endpoint,
-               unsigned char *in_cluster_count, unsigned short in_cluster_list[],
-               unsigned char *out_cluster_count, unsigned short out_cluster_list[]);
-int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char list[]);
-int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num);
-int zbl_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data);
-int zbl_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_data);
-int zbl_leave_device(ieee_addr addr64, bool remove_children, bool rejoin);
-int zbl_permit_join(unsigned char duration, bool broadcast);
-int zbl_nwk_addr_req(zigbee_h handle, ieee_addr addr64, unsigned char request_type,
-       unsigned char start_idx, zb_zdo_addr_rsp cb, void *user_data);
-int zbl_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
-               void *user_data);
-int zbl_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
-               void *user_data);
-int zbl_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zdo_simple_desc_rsp cb, void *user_data);
-int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned short profile_id, unsigned char num_in_clusters,
-               unsigned short *in_clusters, unsigned char num_out_clusters,
-               unsigned short *out_clusters, zb_zdo_match_desc_rsp cb, void *user_data);
-int zbl_device_annce(zigbee_h handle, nwk_addr addr16, ieee_addr addr64,
-               unsigned char capability);
-
-int zbl_node_desc_req(nwk_addr addr16, zb_zdo_node_desc_rsp cb, void *user_data);
-int zbl_power_desc_req(nwk_addr addr16, zb_zdo_power_desc_rsp cb,      void *user_data);
-int zbl_complex_desc_req(nwk_addr addr16, zb_zdo_complex_desc_rsp cb, void *user_data);
-int zbl_user_desc_req(nwk_addr addr16, zb_zdo_user_desc_rsp cb, void *user_data);
-int zbl_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
-               unsigned char *user_desc, zb_zdo_user_desc_conf cb, void *user_data);
-int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
-               unsigned char src_ep, unsigned short cluster_id, ieee_addr dst_addr64,
-               unsigned char type, nwk_addr group_addr, unsigned char dst_ep, zb_zdo_bind_rsp cb,
-               void *user_data);
-int zbl_unbind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
-               unsigned char src_ep, unsigned short cluster_id, ieee_addr dst_addr64,
-               unsigned char type, nwk_addr group_addr, unsigned char dst_ep,
-               zb_zdo_unbind_rsp cb, void *user_data);
-int zbl_mgmt_nwk_disc_req(nwk_addr addr16, unsigned int scan_channels,
-       unsigned char scan_duration, unsigned char scan_count, unsigned char start_idx,
-       zb_zdo_mgmt_nwk_disc_rsp cb, void *user_data);
-int zbl_mgmt_nwk_update_req(unsigned int scan_channels, unsigned char scan_duration,
-       unsigned char scan_count, unsigned char nwk_update_id, nwk_addr nwk_manager_addr);
-int zbl_mgmt_lqi_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_lqi_rsp cb, void *user_data);
-int zbl_mgmt_rtg_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_rtg_rsp cb, void *user_data);
-int zbl_mgmt_bind_req(nwk_addr addr16, unsigned char start_idx,
-               zb_zdo_mgmt_bind_rsp cb, void *user_data);
-int zbl_mgmt_leave_device(ieee_addr addr64, unsigned char remove_children,
-               unsigned rejoin, zb_zdo_mgmt_leave_rsp cb, void *user_data);
-int zbl_mgmt_permit_joining_req(nwk_addr addr16, unsigned char duration,
-               unsigned char tc_significance, zb_zdo_mgmt_permit_joining_rsp cb, void *user_data);
-
-/* Custom Commands */
-int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src_ep,
-               unsigned char dst_ep, unsigned short cluster_id, unsigned short profile_id,
-               unsigned char zcl_frame_ctl, unsigned short mfg_code,  unsigned char cmd_id,
-               unsigned short payload_len, unsigned char *payload, zb_aps_send_rsp cb, void *user_data);
-int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned short cluster_id, unsigned char zcl_frame_ctl, unsigned char cmd,
-               unsigned short payload_len, unsigned char *payload,
-               zb_zcl_send_rsp cb, void *user_data);
-int zbl_send_to_local(unsigned short length, unsigned char *data,
-               zb_send_to_local_rsp cb, void *user_data);
-
-/* ZCL Global Commands */
-int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned short *attribute_ids,
-               int attribute_ids_len, zb_zcl_global_rsp cb, void *user_data);
-int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, void **records,
-               int records_len, zb_zcl_global_rsp cb, void *user_data);
-int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data);
-int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **records, int records_len);
-int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16,
-               unsigned char src_ep, unsigned char dst_ep, unsigned char zcl_frame_ctl,
-               unsigned short cluster_id, void **records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data);
-int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
-               unsigned char dst_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               void **records, int records_len,
-               zb_zcl_global_rsp cb, void *user_data);
-int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char src_ep,
-               unsigned char dest_ep, unsigned char zcl_frame_ctl, unsigned short cluster_id,
-               unsigned short start_id, unsigned char max_attribute_ids,
-               zb_zcl_global_discover_attr_rsp cb, void *user_data);
-int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data);
-int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned char start_command_id,
-               unsigned char max_command_ids, zb_zcl_global_discover_cmds_rsp cb, void *user_data);
-int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned char zcl_frame_ctl, unsigned short cluster_id, unsigned short start_id,
-               unsigned char max_attribute_ids, zb_zcl_global_discover_attr_extended_rsp cb,
-               void *user_data);
-
-/* ZCL Alarm Cluster */
-int zbl_reset_alarm(nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
-               unsigned short cluster_id);
-int zbl_reset_all_alarm(nwk_addr addr16, unsigned char ep);
-int zbl_get_alarm(nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_rsp cb,
-               void *user_data);
-int zbl_reset_all_alarm_log(nwk_addr addr16, unsigned char ep);
-
-/* ZCL Color Control Cluster */
-int zbl_ccontrol_move_to_hue(nwk_addr addr16, unsigned char ep,
-               unsigned char hue, unsigned char direction,
-               unsigned short transition_time);
-int zbl_ccontrol_move_hue(nwk_addr addr16, unsigned char ep,
-               unsigned char move_mode, unsigned char rate);
-int zbl_ccontrol_step_hue(nwk_addr addr16, unsigned char ep,
-               unsigned char step_mode, unsigned char step_size,
-               unsigned char transition_time);
-int zbl_ccontrol_move_to_saturation(nwk_addr addr16, unsigned char ep,
-               unsigned char saturation, unsigned short transition_time);
-int zbl_ccontrol_move_saturation(nwk_addr addr16, unsigned char ep,
-               unsigned char move_mode, unsigned char rate);
-int zbl_ccontrol_step_saturation(nwk_addr addr16, unsigned char ep,
-               unsigned char step_mode, unsigned char step_size,
-               unsigned char transition_time);
-int zbl_ccontrol_move_to_hue_and_saturation(nwk_addr addr16, unsigned char ep,
-               unsigned char hue, unsigned char saturation,
-               unsigned short transition_time);
-int zbl_ccontrol_move_to_color(nwk_addr addr16, unsigned char ep,
-               unsigned short color_x, unsigned short color_y,
-               unsigned short transition_time);
-int zbl_ccontrol_move_color(nwk_addr addr16, unsigned char ep,
-               unsigned short rate_x, unsigned short rate_y);
-int zbl_ccontrol_step_color(nwk_addr addr16, unsigned char ep,
-               unsigned short step_x, unsigned short step_y,
-               unsigned short transition_time);
-int zbl_ccontrol_move_to_color_temperature(nwk_addr addr16, unsigned char ep,
-               unsigned short color_temperature,
-               unsigned short transition_time);
-
-/* ZCL Basic Cluster */
-int zbl_reset_factory_default(nwk_addr addr16, unsigned char ep);
-
-/* ZCL Identity Cluster */
-int zbl_identify(nwk_addr addr16, unsigned char dst_ep, unsigned short identify_time);
-int zbl_identify_query(nwk_addr addr16, unsigned char dst_ep,
-               zb_zcl_identify_query_cb cb, void *user_data);
-
-/* ZCL Group Cluster */
-int zbl_add_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               const char *group_name, zb_zcl_group_add_group_rsp cb, void *user_data);
-int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               zb_zcl_group_view_group_rsp cb, void *user_data);
-int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
-               unsigned char group_count, unsigned short *group_list,
-               zb_zcl_group_get_group_membership_rsp cb, void *user_data);
-int zbl_remove_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-               zb_zcl_group_remove_group_rsp cb, void *user_data);
-int zbl_remove_all_group(nwk_addr addr16, unsigned char ep);
-int zbl_add_group_if_identifying(nwk_addr addr16, unsigned char ep,
-               unsigned short group_id, const char *group_name);
-
-/* ZCL Level Control Cluster */
-int zbl_level_control_move_to_level(nwk_addr addr16, unsigned char ep,
-               unsigned char level, unsigned short transition_time);
-int zbl_level_control_move(nwk_addr addr16, unsigned char ep,
-               unsigned char move_mode, unsigned char rate);
-int zbl_level_control_step(nwk_addr addr16, unsigned char ep,
-               unsigned char step_mode, unsigned char step_size,
-               unsigned short transition_time);
-int zbl_level_control_stop(nwk_addr addr16, unsigned char ep);
-int zbl_level_control_move_to_level_with_on_off(nwk_addr addr16,
-               unsigned char ep, unsigned char level, unsigned short transition_time);
-int zbl_level_control_move_with_on_off(nwk_addr addr16, unsigned char ep,
-               unsigned char move_mode, unsigned char rate);
-int zbl_level_control_step_with_on_off(nwk_addr addr16, unsigned char ep,
-               unsigned char step_mode, unsigned char step_size,
-               unsigned short transition_time);
-
-/* ZCL On/Off Cluster */
-int zbl_onoff_set(nwk_addr addr16, unsigned char ep, unsigned char on_off_type);
-int zbl_zone_enroll_response(nwk_addr addr16, unsigned char dst_ep,
-               unsigned char enroll_response_code, unsigned char zone_id);
-
-/* Poll-control Cluster */
-int zbl_pollcontrol_check_in_response(nwk_addr addr16, unsigned char ep,
-               unsigned char start_fast_polling, unsigned short fast_poll_timeout);
-int zbl_pollcontrol_fast_poll_stop(nwk_addr addr16, unsigned char ep);
-int zbl_pollcontrol_set_long_poll_interval(nwk_addr addr16, unsigned char ep,
-       unsigned int new_long_poll_interval, zb_zcl_pollctrl_check_in cb, void *user_data);
-int zbl_pollcontrol_set_short_poll_interval(nwk_addr addr16, unsigned char ep,
-       unsigned int new_short_poll_interval, zb_zcl_pollctrl_check_in cb, void *user_data);
-
-/* Scene Cluster */
-int zbl_add_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id, unsigned short transition_time, const char *scene_name,
-       unsigned short ext_field_len, const char *extension_field_sets,
-       zb_zcl_scene_add_scene_rsp cb, void *user_data);
-int zbl_view_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id, zb_zcl_scene_view_scene_rsp cb, void *user_data);
-int zbl_remove_scene(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, unsigned char scene_id, zb_zcl_scene_remove_scene_rsp cb,
-       void *user_data);
-int zbl_remove_all_scene(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, zb_zcl_scene_remove_all_scene_rsp cb, void *user_data);
-int zbl_store_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id, zb_zcl_scene_store_scene_rsp cb, void *user_data);
-int zbl_recall_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
-       unsigned char scene_id);
-int zbl_get_scene_membership(nwk_addr addr16, unsigned char ep,
-       unsigned short group_id, zb_zcl_scene_get_scene_membership_rsp cb, void *user_data);
-
-/* Thermostat Cluster */
-int zbl_thermostat_adjust_setpoint(nwk_addr addr16, unsigned char ep, unsigned char mode,
-       unsigned char amount);
-
-#endif /* __TIZEN_NETWORK_ZIGBEE_LIBRARY_DBUS_H__ */
diff --git a/lib/zbl_zcl.c b/lib/zbl_zcl.c
deleted file mode 100644 (file)
index e14772a..0000000
+++ /dev/null
@@ -1,1910 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <glib.h>
-#include <error.h>
-#include <stdlib.h>
-
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zcl/zb_zcl_type.h>
-#include <zcl/zb_zcl_attribute_type.h>
-
-#include "zbl.h"
-#include "zbl_dbus.h"
-#include "zb_log.h"
-#include "zb_common.h"
-#include "zcl/zb_zcl_type.h"
-
-#define ZB_GUARD_CHAR 1
-#define ZB_ZCL_OCTAT_SIZE 1
-#define ZB_ZCL_LONG_OCTAT_SIZE 2
-
-API const char* zb_get_zcl_error_message(int id)
-{
-       const char* status_name = NULL;
-
-       switch (id) {
-       case ZB_ZCL_SUCCESS:
-               status_name = "ZB_ZCL_SUCCESS";
-               break;
-       case ZB_ZCL_FAILURE:
-               status_name = "ZB_ZCL_FAILURE";
-               break;
-       case ZB_ZCL_NOT_AUTHORIZED:
-               status_name = "ZB_ZCL_NOT_AUTHORIZED";
-               break;
-       case ZB_ZCL_RESERVED_FIELD_NOT_ZERO:
-               status_name = "ZB_ZCL_RESERVED_FIELD_NOT_ZERO";
-               break;
-       case ZB_ZCL_MALFORMED_COMMAND:
-               status_name = "ZB_ZCL_MALFORMED_COMMAND";
-               break;
-       case ZB_ZCL_UNSUP_CLUSTER_COMMAND:
-               status_name = "ZB_ZCL_UNSUP_CLUSTER_COMMAND";
-               break;
-       case ZB_ZCL_UNSUP_GENERAL_COMMAND:
-               status_name = "ZB_ZCL_UNSUP_GENERAL_COMMAND";
-               break;
-       case ZB_ZCL_UNSUP_MANUF_CLUSTER_COMMAND:
-               status_name = "ZB_ZCL_UNSUP_MANUF_CLUSTER_COMMAND";
-               break;
-       case ZB_ZCL_UNSUP_MANUF_GENERAL_COMMAND:
-               status_name = "ZB_ZCL_UNSUP_MANUF_GENERAL_COMMAND";
-               break;
-       case ZB_ZCL_INVALID_FIELD:
-               status_name = "ZB_ZCL_INVALID_FIELD";
-               break;
-       case ZB_ZCL_UNSUPPORTED_ATTRIBUTE:
-               status_name = "ZB_ZCL_SUCCESS";
-               break;
-       case ZB_ZCL_INVALID_VALUE:
-               status_name = "ZB_ZCL_INVALID_VALUE";
-               break;
-       case ZB_ZCL_READ_ONLY:
-               status_name = "ZB_ZCL_READ_ONLY";
-               break;
-       case ZB_ZCL_INSUFFICIENT_SPACE:
-               status_name = "ZB_ZCL_INSUFFICIENT_SPACE";
-               break;
-       case ZB_ZCL_DUPLICATE_EXISTS:
-               status_name = "ZB_ZCL_INSUFFICIENT_SPACE";
-               break;
-       case ZB_ZCL_NOT_FOUND:
-               status_name = "ZB_ZCL_NOT_FOUND";
-               break;
-       case ZB_ZCL_UNREPORTABLE_ATTRIBUTE:
-               status_name = "ZB_ZCL_UNREPORTABLE_ATTRIBUTE";
-               break;
-       case ZB_ZCL_INVALID_DATA_TYPE:
-               status_name = "ZB_ZCL_INVALID_DATA_TYPE";
-               break;
-       case ZB_ZCL_INVALID_SELECTOR:
-               status_name = "ZB_ZCL_INVALID_SELECTOR";
-               break;
-       case ZB_ZCL_WRITE_ONLY:
-               status_name = "ZB_ZCL_WRITE_ONLY";
-               break;
-       case ZB_ZCL_INCONSISTENT_STARTUP_STATE:
-               status_name = "ZB_ZCL_INCONSISTENT_STARTUP_STATE";
-               break;
-       case ZB_ZCL_DEFINED_OUT_OF_BAND:
-               status_name = "ZB_ZCL_DEFINED_OUT_OF_BAND";
-               break;
-       case ZB_ZCL_INCONSISTENT:
-               status_name = "ZB_ZCL_INCONSISTENT";
-               break;
-       case ZB_ZCL_ACTION_DENIED:
-               status_name = "ZB_ZCL_ACTION_DENIED";
-               break;
-       case ZB_ZCL_TIMEOUT:
-               status_name = "ZB_ZCL_TIMEOUT";
-               break;
-       case ZB_ZCL_ABORT:
-               status_name = "ZB_ZCL_ABORT";
-               break;
-       case ZB_ZCL_INVALID_IMAGE:
-               status_name = "ZB_ZCL_INVALID_IMAGE";
-               break;
-       case ZB_ZCL_WAIT_FOR_DATA:
-               status_name = "ZB_ZCL_WAIT_FOR_DATA";
-               break;
-       case ZB_ZCL_NO_IMAGE_AVAILABLE:
-               status_name = "ZB_ZCL_NO_IMAGE_AVAILABLE";
-               break;
-       case ZB_ZCL_REQUIRE_MORE_IMAGE:
-               status_name = "ZB_ZCL_REQUIRE_MORE_IMAGE";
-               break;
-       default:
-               status_name = "ZB_ZCL_UNDEFINED";
-               break;
-       }
-
-       return status_name;
-}
-
-API const char* zb_get_cluster_name(int id)
-{
-       const char* clust_name = NULL;
-
-       switch (id) {
-       case ZB_ZCL_BASIC_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BASIC";
-               break;
-       case ZB_ZCL_POWER_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POWER_CONFIG";
-               break;
-       case ZB_ZCL_DEVICE_TEMP_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEVICE_TEMP";
-               break;
-       case ZB_ZCL_IDENTIFY_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IDENTIFY";
-               break;
-       case ZB_ZCL_GROUPS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GROUPS";
-               break;
-       case ZB_ZCL_SCENES_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SCENES";
-               break;
-       case ZB_ZCL_ON_OFF_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ON_OFF";
-               break;
-       case ZB_ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ON_OFF_SWITCH_CONFIG";
-               break;
-       case ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_LEVEL_CONTROL";
-               break;
-       case ZB_ZCL_ALARM_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ALARM";
-               break;
-       case ZB_ZCL_TIME_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TIME";
-               break;
-       case ZB_ZCL_RSSI_LOCATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_RSSI_LOCATION";
-               break;
-       case ZB_ZCL_BINARY_INPUT_BASIC_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BINARY_INPUT_BASIC";
-               break;
-       case ZB_ZCL_COMMISSIONING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_COMMISSIONING";
-               break;
-       case ZB_ZCL_PARTITION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PARTITION";
-               break;
-       case ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID:
-               clust_name = "ZB_ZCL_OTA_BOOTLOAD";
-               break;
-       case ZB_ZCL_POWER_PROFILE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POWER_PROFILE";
-               break;
-       case ZB_ZCL_APPLIANCE_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_CONTROL";
-               break;
-       case ZB_ZCL_POLL_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POLL_CONTROL";
-               break;
-       case ZB_ZCL_SHADE_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SHADE_CONFIG";
-               break;
-       case ZB_ZCL_DOOR_LOCK_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DOOR_LOCK";
-               break;
-       case ZB_ZCL_WINDOW_COVERING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_WINDOW_COVERING";
-               break;
-       case ZB_ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PUMP_CONFIG_CONTROL";
-               break;
-       case ZB_ZCL_THERMOSTAT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_THERMOSTAT";
-               break;
-       case ZB_ZCL_FAN_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_FAN_CONTROL";
-               break;
-       case ZB_ZCL_DEHUMID_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEHUMID_CONTROL";
-               break;
-       case ZB_ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_THERMOSTAT_UI_CONFIG";
-               break;
-       case ZB_ZCL_COLOR_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_COLOR_CONTROL";
-               break;
-       case ZB_ZCL_BALLAST_CONFIGURATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BALLAST_CONFIGURATION";
-               break;
-       case ZB_ZCL_ILLUM_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ILLUM_MEASUREMENT";
-               break;
-       case ZB_ZCL_ILLUM_LEVEL_SENSING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ILLUM_LEVEL_SENSING";
-               break;
-       case ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TEMP_MEASUREMENT";
-               break;
-       case ZB_ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PRESSURE_MEASUREMENT";
-               break;
-       case ZB_ZCL_FLOW_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_FLOW_MEASUREMENT";
-               break;
-       case ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT";
-               break;
-       case ZB_ZCL_OCCUPANCY_SENSING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_OCCUPANCY_SENSING";
-               break;
-       case ZB_ZCL_IAS_ZONE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_ZONE";
-               break;
-       case ZB_ZCL_IAS_ACE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_ACE";
-               break;
-       case ZB_ZCL_IAS_WD_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_WD";
-               break;
-       case ZB_ZCL_GENERIC_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GENERIC_TUNNEL";
-               break;
-       case ZB_ZCL_BACNET_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BACNET_PROTOCOL_TUNNEL";
-               break;
-       case ZB_ZCL_11073_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_11073_PROTOCOL_TUNNEL";
-               break;
-       case ZB_ZCL_ISO7816_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ISO7816_PROTOCOL_TUNNEL";
-               break;
-       case ZB_ZCL_PRICE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PRICE";
-               break;
-       case ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL";
-               break;
-       case ZB_ZCL_SIMPLE_METERING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SIMPLE_METERING";
-               break;
-       case ZB_ZCL_MESSAGING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_MESSAGING";
-               break;
-       case ZB_ZCL_TUNNELING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TUNNELING";
-               break;
-       case ZB_ZCL_PREPAYMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PREPAYMENT";
-               break;
-       case ZB_ZCL_ENERGY_MANAGEMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ENERGY_MANAGEMENT";
-               break;
-       case ZB_ZCL_TOU_CALENDAR_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TOU_CALENDAR";
-               break;
-       case ZB_ZCL_DEVICE_MANAGEMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEVICE_MANAGEMENT8";
-               break;
-       case ZB_ZCL_EVENTS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_EVENTS";
-               break;
-       case ZB_ZCL_MDU_PAIRING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_MDU_PAIRING";
-               break;
-       case ZB_ZCL_KEY_ESTABLISHMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_KEY_ESTABLISHMENT";
-               break;
-       case ZB_ZCL_INFORMATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_INFORMATION";
-               break;
-       case ZB_ZCL_DATA_SHARING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_SHARING";
-               break;
-       case ZB_ZCL_GAMING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GAMING";
-               break;
-       case ZB_ZCL_DATA_RATE_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_RATE_CONTROL";
-               break;
-       case ZB_ZCL_VOICE_OVER_ZIGBEE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_VOICE_OVER_ZIGBEE";
-               break;
-       case ZB_ZCL_CHATTING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_CHATTING";
-               break;
-       case ZB_ZCL_PAYMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PAYMENT";
-               break;
-       case ZB_ZCL_BILLING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BILLING";
-               break;
-       case ZB_ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_IDENTIFICATION";
-               break;
-       case ZB_ZCL_METER_IDENTIFICATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_RATE_CONTROL";
-               break;
-       case ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT";
-               break;
-       case ZB_ZCL_APPLIANCE_STATISTICS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_STATISTICS";
-               break;
-       case ZB_ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ELECTRICAL_MEASUREMENT";
-               break;
-       case ZB_ZCL_DIAGNOSTICS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DIAGNOSTICS";
-               break;
-       case ZB_ZCL_ZLL_COMMISSIONING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ZLL_COMMISSIONING0";
-               break;
-       default:
-               clust_name = "UNDEFINED_CLUSTER";
-               break;
-       }
-
-       return clust_name;
-}
-
-typedef struct _attr_type_size {
-       unsigned char type;
-       unsigned char size;
-} AttrTypeSize;
-
-static AttrTypeSize attribute_sizes[] = {
-       {ZB_ZCL_NO_DATA_ATTRIBUTE_TYPE, 0},
-       {ZB_ZCL_8_BIT_DATA, 1},
-       {ZB_ZCL_16_BIT_DATA, 2},
-       {ZB_ZCL_24_BIT_DATA, 3},
-       {ZB_ZCL_32_BIT_DATA, 4},
-       {ZB_ZCL_40_BIT_DATA, 5},
-       {ZB_ZCL_48_BIT_DATA, 6},
-       {ZB_ZCL_56_BIT_DATA, 7},
-       {ZB_ZCL_64_BIT_DATA, 8},
-       {ZB_ZCL_BOOLEAN, 1},
-       {ZB_ZCL_8_BIT_BITMAP, 1},
-       {ZB_ZCL_16_BIT_BITMAP, 2},
-       {ZB_ZCL_24_BIT_BITMAP, 3},
-       {ZB_ZCL_32_BIT_BITMAP, 4},
-       {ZB_ZCL_40_BIT_BITMAP, 5},
-       {ZB_ZCL_48_BIT_BITMAP, 6},
-       {ZB_ZCL_56_BIT_BITMAP, 7},
-       {ZB_ZCL_64_BIT_BITMAP, 8},
-       {ZB_ZCL_UNSIGNED_8_BIT_INTEGER, 1},
-       {ZB_ZCL_UNSIGNED_16_BIT_INTEGER, 2},
-       {ZB_ZCL_UNSIGNED_24_BIT_INTEGER, 3},
-       {ZB_ZCL_UNSIGNED_32_BIT_INTEGER, 4},
-       {ZB_ZCL_UNSIGNED_40_BIT_INTEGER, 5},
-       {ZB_ZCL_UNSIGNED_48_BIT_INTEGER, 6},
-       {ZB_ZCL_UNSIGNED_56_BIT_INTEGER, 7},
-       {ZB_ZCL_UNSIGNED_64_BIT_INTEGER, 8},
-       {ZB_ZCL_SIGNED_8_BIT_INTEGER, 1},
-       {ZB_ZCL_SIGNED_16_BIT_INTEGER, 2},
-       {ZB_ZCL_SIGNED_24_BIT_INTEGER, 3},
-       {ZB_ZCL_SIGNED_32_BIT_INTEGER, 4},
-       {ZB_ZCL_SIGNED_40_BIT_INTEGER, 5},
-       {ZB_ZCL_SIGNED_48_BIT_INTEGER, 6},
-       {ZB_ZCL_SIGNED_56_BIT_INTEGER, 7},
-       {ZB_ZCL_SIGNED_64_BIT_INTEGER, 8},
-       {ZB_ZCL_8_BIT_ENUMERATION, 1},
-       {ZB_ZCL_16_BIT_ENUMERATION, 2},
-       {ZB_ZCL_SEMI_PRECISION, 2},
-       {ZB_ZCL_SINGLE_PRECISION, 4},
-       {ZB_ZCL_DOUBLE_PRECISION, 8},
-       {ZB_ZCL_TIME_OF_DAY, 4},
-       {ZB_ZCL_DATE, 4},
-       {ZB_ZCL_UTC_TIME, 4},
-       {ZB_ZCL_CLUSTER_ID, 2},
-       {ZB_ZCL_ATTRIBUTE_ID, 2},
-       {ZB_ZCL_BACNET_OID, 4},
-       {ZB_ZCL_IEEE_ADDRESS, 8},
-       {ZB_ZCL_128_BIT_SECURITY_KEY, 16},
-};
-
-static unsigned char analog_discrete_thresholds[] = {
-       0x07, DATA_TYPE_NONE,
-       0x1F, DATA_TYPE_DISCRETE,
-       0x2F, DATA_TYPE_ANALOG,
-       0x37, DATA_TYPE_DISCRETE,
-       0x3F, DATA_TYPE_ANALOG,
-       0x57, DATA_TYPE_DISCRETE,
-       0xDF, DATA_TYPE_NONE,
-       0xE7, DATA_TYPE_ANALOG,
-       0xFF, DATA_TYPE_NONE
-};
-
-API int zb_get_analog_or_discret(unsigned char type)
-{
-       int index = 0;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       unsigned char var = analog_discrete_thresholds[index];
-
-       while (var < type && var < 0xFF) {
-               index += 2;
-               var = analog_discrete_thresholds[index];
-       }
-
-       return analog_discrete_thresholds[index+1];
-}
-
-API int zb_get_data_size(zb_zcl_data_type_e type)
-{
-       int i;
-       int count;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       count = (int)(sizeof(attribute_sizes) / 2);
-       for (i = 0; i < count; i++) {
-               if (attribute_sizes[i].type == type)
-                       return attribute_sizes[i].size;
-       }
-       return -1;
-}
-
-API int zb_create_read_attr_status_record(read_attr_status_record_h *handle)
-{
-       read_attr_status_record_h simple = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       simple = calloc(1, sizeof(struct read_attribute_status_record_s));
-       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-
-       *handle = simple;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_read_attr_status_record(read_attr_status_record_h handle)
-{
-       struct read_attribute_status_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned short* id)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned short id)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_status_from_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char* status)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *status = h->status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_status_to_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char status)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->status = status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_type_from_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char *type)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *type = h->type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char type)
-{
-       struct read_attribute_status_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_value_from_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char type, zb_value_h value)
-{
-       int len = -1;
-       struct zb_value_s *v = value;
-       struct read_attribute_status_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->value, ZIGBEE_ERROR_NO_DATA);
-
-       len = zb_get_data_size(type);
-       if (0 < len) {
-               memcpy(v->val, h->value, len);
-               v->size = len;
-               v->type = type;
-       } else if (ZB_ZCL_OCTAT_STRING == type || ZB_ZCL_CHRACTER_STRING == type) {
-               if (v->str) {
-                       if (v->str->v)
-                               free(v->str->v);
-                       free(v->str);
-               }
-               v->str = calloc(1, sizeof(struct attribute_str_s));
-               RETV_IF(NULL == v->str, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               v->str->n = *h->value;
-               /* The first 1 byte indicate invalid or length of string */
-               if (0xff == v->str->n) {
-                       free(v->str);
-                       return ZIGBEE_ERROR_NO_DATA;
-               }
-               v->str->v = calloc(v->str->n + ZB_GUARD_CHAR, sizeof(char));
-               if (NULL == v->str->v) {
-                       free(v->str);
-                       return ZIGBEE_ERROR_OUT_OF_MEMORY;
-               }
-               memcpy(v->str->v, h->value + ZB_ZCL_OCTAT_SIZE, v->str->n);
-
-               v->type = type;
-               v->size = v->str->n;
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == type || ZB_ZCL_LONG_CHRACTER_STRING == type) {
-               if (v->wstr) {
-                       if (v->wstr->v)
-                               free(v->wstr->v);
-                       free(v->wstr);
-               }
-               v->wstr = calloc(1, sizeof(struct attribute_wstr_s));
-               RETV_IF(NULL == v->wstr, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               v->wstr->n = *(h->value+1) << 8 | *h->value;
-               /* The first 2 byte indicate invalid or length of string */
-               if (0xffff == v->wstr->n) {
-                       free(v->wstr);
-                       return ZIGBEE_ERROR_NO_DATA;
-               }
-               v->wstr->v = calloc(v->wstr->n + ZB_GUARD_CHAR, sizeof(char));
-               if (NULL == v->wstr->v) {
-                       free(v->wstr);
-                       return ZIGBEE_ERROR_OUT_OF_MEMORY;
-               }
-               memcpy(v->wstr->v, h->value + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->n);
-
-               v->type = type;
-               v->size = v->wstr->n;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_value_to_read_attr_status_record(read_attr_status_record_h handle,
-               unsigned char type, zb_value_h value)
-{
-       int len = -1;
-       struct zb_value_s *v = value;
-       struct read_attribute_status_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-
-       len = zb_get_data_size(type);
-       if (0 < len) {
-               h->value = calloc(len + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->value, v->val, len);
-       } else if (ZB_ZCL_OCTAT_STRING == type || ZB_ZCL_CHRACTER_STRING == type) {
-               RETV_IF(NULL == v->str, ZIGBEE_ERROR_NO_DATA);
-               h->value = calloc(v->str->n + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               h->value[0] = v->str->n;
-               memcpy(h->value + ZB_ZCL_OCTAT_SIZE, v->str->v + ZB_ZCL_OCTAT_SIZE, v->str->n);
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == type || ZB_ZCL_LONG_CHRACTER_STRING == type) {
-               RETV_IF(NULL == v->wstr, ZIGBEE_ERROR_NO_DATA);
-               h->value = calloc(v->wstr->n + ZB_ZCL_LONG_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               h->value[0] = v->wstr->n & 0xff;
-               h->value[1] = (v->wstr->n >> 8) & 0xff ;
-               memcpy(h->value + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->v + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->n);
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_value(zb_value_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       zb_value_h simple = NULL;
-
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       simple = calloc(1, sizeof(struct zb_value_s));
-       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = simple;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_value(zb_value_h handle)
-{
-       struct zb_value_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->str) {
-               if (h->str->v)
-                       free(h->str->v);
-               free(h->str);
-       }
-       if (h->wstr) {
-               if (h->wstr->v)
-                       free(h->wstr->v);
-               free(h->wstr);
-       }
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_value(zb_value_h handle, unsigned char type, unsigned char *value,
-               int count)
-{
-       int len = -1;
-       struct zb_value_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       len = zb_get_data_size(type);
-       if (0 < len) {
-               memcpy(h->val, value, len);
-               h->size = len;
-               h->type = type;
-       } else if (ZB_ZCL_OCTAT_STRING == type || ZB_ZCL_CHRACTER_STRING == type) {
-               if (h->str) {
-                       if (h->str->v)
-                               free(h->str->v);
-                       free(h->str);
-               }
-               /* string size exception case */
-               RETV_IF(0xff - 1 < count, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-               h->str = malloc(sizeof(struct attribute_str_s));
-               RETV_IF(NULL == h->str, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               h->str->n = count;
-               /* The first 1 byte indicate invalid or length of string */
-               h->str->v = calloc(h->str->n + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->str->v, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->str->v, value + ZB_ZCL_OCTAT_SIZE, h->str->n);
-
-               h->type = type;
-               h->size = count;
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == type || ZB_ZCL_LONG_CHRACTER_STRING == type) {
-               if (h->wstr) {
-                       if (h->wstr->v)
-                               free(h->wstr->v);
-                       free(h->wstr);
-               }
-               /* 2 byte string size exception case */
-               RETV_IF(0xffff - 1 < count, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-               h->wstr = malloc(sizeof(struct attribute_wstr_s));
-               RETV_IF(NULL == h->wstr, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               h->wstr->n = count;
-               /* The first 2 byte indicate invalid or length of string */
-               h->wstr->v = calloc(h->wstr->n + ZB_ZCL_LONG_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(wchar_t));
-               RETV_IF(NULL == h->wstr->v, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->wstr->v, value + ZB_ZCL_LONG_OCTAT_SIZE, h->wstr->n);
-
-               h->type = type;
-               h->size = count;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_value(zb_value_h handle, unsigned char *type, unsigned char **value,
-               int *count)
-{
-       int len = -1;
-       unsigned char *s = NULL;
-       struct zb_value_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       len = zb_get_data_size(h->type);
-       if (0 < len) {
-               s = calloc(h->size + ZB_GUARD_CHAR , sizeof(char));
-               RETV_IF(NULL == s, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(s, h->val, len);
-               *count = len;
-       } else if (ZB_ZCL_OCTAT_STRING == h->type || ZB_ZCL_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == h->str, ZIGBEE_ERROR_NO_DATA);
-               s = calloc(h->str->n + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == s, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(s, h->str->v + ZB_ZCL_OCTAT_SIZE, h->str->n);
-               *count = h->str->n;
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == h->type || ZB_ZCL_LONG_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == h->wstr, ZIGBEE_ERROR_NO_DATA);
-               s = calloc(h->wstr->n + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == s, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(s, h->wstr->v + ZB_ZCL_LONG_OCTAT_SIZE, h->wstr->n);
-               *count = h->wstr->n;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       *type = h->type;
-       *value = s;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_discover_attr_info(discover_attr_info_record_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       discover_attr_info_record_h simple = NULL;
-
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       simple = calloc(1, sizeof(struct discover_attribute_info_record_s));
-       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = simple;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_discover_attr_info(discover_attr_info_record_h handle)
-{
-       struct discover_attribute_info_record_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned short *id)
-{
-       struct discover_attribute_info_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned short id)
-{
-       struct discover_attribute_info_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_type_from_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned char *type)
-{
-       struct discover_attribute_info_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *type = h->type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_discover_attr_info(
-               discover_attr_info_record_h handle,
-               unsigned char type)
-{
-       struct discover_attribute_info_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_write_attr_record(
-               write_attr_record_h *handle)
-{
-       write_attr_record_h t = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct write_attribute_record_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-
-       *handle = t;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_write_attr_record(write_attr_record_h handle)
-{
-       struct write_attribute_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_write_attr_record(write_attr_record_h handle,
-               unsigned short id)
-{
-       struct write_attribute_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_write_attr_record(write_attr_record_h handle,
-               unsigned char type)
-{
-       struct write_attribute_record_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_buf_to_write_attr_record(write_attr_record_h handle,
-       unsigned char type, unsigned char *value, int count)
-{
-       int len = -1;
-       struct write_attribute_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-
-       len = zb_get_data_size(type);
-       if (0 < len) {
-               h->value = calloc(count + ZB_GUARD_CHAR , sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->value, value, count);
-       } else if (ZB_ZCL_OCTAT_STRING == type || ZB_ZCL_CHRACTER_STRING == type) {
-               h->value = calloc(count + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 1 byte indicate invalid or length of string */
-               h->value[0] = count & 0xff;
-               memcpy(h->value + ZB_ZCL_OCTAT_SIZE, value + ZB_ZCL_OCTAT_SIZE, count);
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == h->type || ZB_ZCL_LONG_CHRACTER_STRING == h->type) {
-               h->value = calloc(count + ZB_ZCL_LONG_OCTAT_SIZE  + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 2 byte indicate invalid or length of string */
-               h->value[0] = count & 0xff;
-               h->value[1] = (count >> 8) & 0xff ;
-               memcpy(h->value + ZB_ZCL_LONG_OCTAT_SIZE, value + ZB_ZCL_LONG_OCTAT_SIZE, count);
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_value_to_write_attr_record(write_attr_record_h handle, zb_value_h value)
-{
-       int len = -1;
-
-       struct zb_value_s *v = value;
-       struct write_attribute_record_s* h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-
-       len = zb_get_data_size(v->type);
-       if (0 < len) {
-               h->value = calloc(v->size + ZB_GUARD_CHAR , sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->value, v->val, v->size);
-               h->type = v->type;
-       } else if (ZB_ZCL_OCTAT_STRING == h->type || ZB_ZCL_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == v->str, ZIGBEE_ERROR_NO_DATA);
-               /* 1 byte string size exception case */
-               RETV_IF(0xff - 1 < v->str->n, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-               h->value = calloc(v->str->n + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 1 byte indicate invalid or length of string */
-               h->value[0] = v->str->n & 0xff;
-               memcpy(h->value + ZB_ZCL_OCTAT_SIZE, v->str->v + ZB_ZCL_OCTAT_SIZE, v->str->n);
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == h->type || ZB_ZCL_LONG_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == v->wstr, ZIGBEE_ERROR_NO_DATA);
-               /* 2 byte string size exception case */
-               RETV_IF(0xffff - 1 < v->wstr->n, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-               h->value = calloc(v->wstr->n + ZB_ZCL_LONG_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 2 byte indicate invalid or length of string */
-               h->value[0] = v->wstr->n & 0xff;
-               h->value[1] = (v->wstr->n >> 8) & 0xff ;
-               memcpy(h->value + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->v + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->n);
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_write_attr_status(write_attr_status_record_h *handle)
-{
-       write_attr_status_record_h simple = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       simple = calloc(1, sizeof(struct write_attribute_status_record_s));
-       RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = simple;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_write_attr_status(write_attr_status_record_h handle)
-{
-       struct write_attribute_status_record_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_status_from_write_attr_status(write_attr_status_record_h handle,
-               unsigned char *status)
-{
-       struct write_attribute_status_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *status = h->status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_status_to_write_attr_status(write_attr_status_record_h handle,
-               unsigned char status)
-{
-       struct write_attribute_status_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->status = status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_write_attr_status(write_attr_status_record_h handle,
-               unsigned short *id)
-{
-       struct write_attribute_status_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_write_attr_status(write_attr_status_record_h handle,
-               unsigned short id)
-{
-       struct write_attribute_status_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_report_config_record(report_config_record_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       report_config_record_h t = NULL;
-
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct reporting_configuration_record_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = t;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_report_config_record(report_config_record_h handle)
-{
-       struct reporting_configuration_record_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->change)
-               free(h->change);
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_dir_from_report_config_record(report_config_record_h handle,
-               unsigned char *dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dir, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *dir = h->dir;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_dir_to_report_config_record(report_config_record_h handle,
-               unsigned char dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       if (dir == ZB_ZCL_CLIENT_TO_SERVER)
-               h->dir = 0x00 ;
-       else
-               h->dir = 0x01;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_report_config_record(report_config_record_h handle,
-               unsigned short *id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_report_config_record(report_config_record_h handle,
-               unsigned short id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       h->id = id ;
-       return ZIGBEE_ERROR_NONE;
-}
-
-
-API int zb_get_type_from_report_config_record(report_config_record_h handle,
-               unsigned char *type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *type = h->type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_report_config_record(report_config_record_h handle,
-               unsigned char type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-
-API int zb_get_min_i_from_report_config_record(report_config_record_h handle,
-               unsigned short *min_i)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == min_i, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *min_i = h->min_i;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_min_i_to_report_config_record(report_config_record_h handle,
-               unsigned short min_i)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       h->min_i = min_i;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_max_i_from_report_config_record(report_config_record_h handle,
-               unsigned short *max_i)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == max_i, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *max_i = h->max_i;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_max_i_to_report_config_record(report_config_record_h handle,
-               unsigned short max_i)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       h->max_i = max_i;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_timeout_from_report_config_record(report_config_record_h handle,
-               unsigned short *to)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == to, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *to = h->to;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_timeout_to_report_config_record(report_config_record_h handle,
-               unsigned short to)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       h->to = to;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_change_from_report_config_record1(report_config_record_h handle,
-               zb_value_h value)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-       int data_type = DATA_TYPE_NONE;
-       struct zb_value_s *v = value;
-       struct reporting_configuration_record_s *h = handle;
-
-       NOT_USED(data_type);
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->change, ZIGBEE_ERROR_NO_DATA);
-
-       len = zb_get_data_size(h->type);
-       data_type = zb_get_analog_or_discret(h->type);
-       if (0 < len /* && DATA_TYPE_ANALOG == data_type */) {
-               memcpy(v->val, h->change, len);
-               v->type = h->type;
-               v->size = len;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_change_to_report_config_record1(report_config_record_h handle,
-               zb_value_h value)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-       int data_type = DATA_TYPE_NONE;
-
-       struct zb_value_s *v = value;
-       struct reporting_configuration_record_s *h = handle;
-
-       NOT_USED(data_type);
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->change)
-               free(h->change);
-
-       len = zb_get_data_size(v->type);
-       data_type = zb_get_analog_or_discret(v->type);
-       if (0 < len /* && DATA_TYPE_ANALOG == data_type */) {
-               h->change = calloc(len + 1, sizeof(char));
-               RETVM_IF(NULL == h->change, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-               memcpy(h->change, v->val, len);
-               h->type = v->type;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_change_from_report_config_record2(report_config_record_h handle,
-               unsigned char *type, unsigned char **value, int *size)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-       int data_type = DATA_TYPE_NONE;
-       unsigned char *t = NULL;
-
-       struct reporting_configuration_record_s *h = handle;
-
-       NOT_USED(data_type);
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->change, ZIGBEE_ERROR_NO_DATA);
-
-       len = zb_get_data_size(h->type);
-       data_type = zb_get_analog_or_discret(h->type);
-       if (0 < len /* && DATA_TYPE_ANALOG == data_type */) {
-               t = calloc(len + 1, sizeof(char));
-               RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-               memcpy(t, h->change, len);
-               *value = t;
-               *type = h->type;
-               *size = len;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-API int zb_set_change_to_report_config_record2(
-               report_config_record_h handle, unsigned char type, unsigned char *value)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-       int data_type = DATA_TYPE_NONE;
-
-       struct reporting_configuration_record_s *h = handle;
-
-       NOT_USED(data_type);
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       if (h->change)
-               free(h->change);
-
-       len = zb_get_data_size(type);
-       data_type = zb_get_analog_or_discret(type);
-
-       if (0 < len /* && DATA_TYPE_ANALOG == data_type */) {
-               h->change = calloc(len + 1, sizeof(unsigned char));
-               RETVM_IF(NULL == h->change, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-               memcpy(h->change, value, len);
-               h->type = type;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_change_from_report_config_record3(report_config_record_h handle,
-               unsigned char *type, unsigned char *value, int *size)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-       int data_type = DATA_TYPE_NONE;
-
-       struct reporting_configuration_record_s *h = handle;
-
-       NOT_USED(data_type);
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == value, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->change, ZIGBEE_ERROR_NO_DATA);
-
-       len = zb_get_data_size(h->type);
-       data_type = zb_get_analog_or_discret(h->type);
-       if (0 < len /* && DATA_TYPE_ANALOG == data_type */) {
-               memcpy(value, h->change, len);
-               *type = h->type;
-               *size = len;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_read_report_config_record(read_report_config_record_h *handle)
-{
-       read_report_config_record_h t = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct read_reporting_configuration_record_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = t;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_read_report_config_record(read_report_config_record_h handle)
-{
-       struct read_reporting_configuration_record_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_dir_to_read_report_config_record(read_report_config_record_h handle,
-               unsigned char dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct read_reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (dir == ZB_ZCL_CLIENT_TO_SERVER)
-               h->dir = 0x00;
-       else
-               h->dir = 0x01;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_dir_from_read_report_config_record(read_report_config_record_h handle,
-               unsigned char *dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct read_reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *dir = h->dir;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_read_report_config_record(read_report_config_record_h handle,
-               unsigned short id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct read_reporting_configuration_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_read_report_config_record(read_report_config_record_h handle,
-               unsigned short *id)
-{
-       struct read_reporting_configuration_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_report_config_response_record(
-               report_config_response_record_h *handle)
-{
-       report_config_response_record_h t = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct reporting_configuration_response_record_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = t;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_report_config_response_record(
-               report_config_response_record_h handle)
-{
-       struct reporting_configuration_response_record_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_status_from_report_config_response_record(
-               report_config_response_record_h handle, unsigned char *status)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *status = h->status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_status_to_report_config_response_record(
-               report_config_response_record_h handle, unsigned char status)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->status = status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_dir_from_report_config_response_record(
-               report_config_response_record_h handle, unsigned char *dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dir, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *dir = h->dir;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_dir_to_report_config_response_record(
-               report_config_response_record_h handle, unsigned char dir)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->dir = dir;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_report_config_response_record(
-       report_config_response_record_h handle, unsigned short *id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_report_config_response_record(
-       report_config_response_record_h handle, unsigned short id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct reporting_configuration_response_record_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_create_attr_report(attr_report_h *handle)
-{
-       attr_report_h t = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct attribute_report_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = t;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_attr_report(attr_report_h handle)
-{
-       struct attribute_report_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_attr_report(attr_report_h handle, unsigned short *id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct attribute_report_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_attr_report(attr_report_h handle, unsigned short id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct attribute_report_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_type_from_attr_report(attr_report_h handle, unsigned char *type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct attribute_report_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *type = h->type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_attr_report(attr_report_h handle, unsigned char type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct attribute_report_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_value_from_attr_report(attr_report_h handle, zb_value_h value)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-
-       struct zb_value_s *v = value;
-       struct attribute_report_s *h = handle;
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->value, ZIGBEE_ERROR_NO_DATA);
-
-       len = zb_get_data_size(h->type);
-       if (0 < len) {
-               memcpy(v->val, h->value, len);
-               v->size = len;
-               v->type = h->type;
-       } else if (ZB_ZCL_OCTAT_STRING == h->type || ZB_ZCL_CHRACTER_STRING == h->type) {
-               if (v->str) {
-                       if (v->str->v)
-                               free(v->str->v);
-                       free(v->str);
-               }
-               v->str = calloc(1, sizeof(struct attribute_str_s));
-               RETV_IF(NULL == v->str, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               v->str->n = *h->value;
-               /* The first 1 byte indicate invalid or length of string */
-               if (0xff == v->str->n) {
-                       free(v->str);
-                       return ZIGBEE_ERROR_NO_DATA;
-               }
-               v->str->v = calloc(v->str->n + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               if (NULL == v->str->v) {
-                       free(v->str);
-                       return ZIGBEE_ERROR_OUT_OF_MEMORY;
-               }
-               memcpy(v->str->v, h->value + ZB_ZCL_OCTAT_SIZE, v->str->n);
-
-               v->type = h->type;
-               v->size = v->str->n;
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == h->type || ZB_ZCL_LONG_CHRACTER_STRING == h->type) {
-               if (v->wstr) {
-                       if (v->wstr->v)
-                               free(v->wstr->v);
-                       free(v->wstr);
-               }
-               v->wstr = calloc(1, sizeof(struct attribute_wstr_s));
-               RETV_IF(NULL == v->wstr, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               v->wstr->n = *(h->value+1) << 8 | *h->value;
-               /* The first 2 byte indicate invalid or length of string */
-               if (0xffff == v->wstr->n) {
-                       free(v->wstr);
-                       return ZIGBEE_ERROR_NO_DATA;
-               }
-               v->wstr->v = calloc(v->wstr->n + ZB_ZCL_LONG_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               if (NULL == v->wstr->v) {
-                       free(v->wstr);
-                       return ZIGBEE_ERROR_OUT_OF_MEMORY;
-               }
-               memcpy(v->wstr->v, h->value + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->n);
-
-               v->type = h->type;
-               v->size = v->wstr->n;
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_value_to_attr_report(attr_report_h handle, zb_value_h value)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       int len = -1;
-
-       struct zb_value_s *v = value;
-       struct attribute_report_s *h = handle;
-
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == v, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       if (h->value)
-               free(h->value);
-
-       len = zb_get_data_size(v->type);
-       if (0 < len) {
-               h->value = calloc(v->size + ZB_GUARD_CHAR , sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               memcpy(h->value, v->val, v->size);
-               h->type = v->type;
-       } else if (ZB_ZCL_OCTAT_STRING == h->type || ZB_ZCL_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == v->str, ZIGBEE_ERROR_NO_DATA);
-               h->value = calloc(v->str->n + ZB_ZCL_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 1 byte indicate invalid or length of string */
-               h->value[0] = v->str->n & 0xff;
-               memcpy(h->value + ZB_ZCL_OCTAT_SIZE, v->str->v + ZB_ZCL_OCTAT_SIZE, v->str->n);
-       } else if (ZB_ZCL_LONG_OCTAT_STRING == h->type || ZB_ZCL_LONG_CHRACTER_STRING == h->type) {
-               RETV_IF(NULL == v->wstr, ZIGBEE_ERROR_NO_DATA);
-               h->value = calloc(v->wstr->n + ZB_ZCL_LONG_OCTAT_SIZE + ZB_GUARD_CHAR, sizeof(char));
-               RETV_IF(NULL == h->value, ZIGBEE_ERROR_OUT_OF_MEMORY);
-               /* The first 2 byte indicate invalid or length of string */
-               h->value[0] = v->wstr->n & 0xff;
-               h->value[1] = (v->wstr->n >> 8) & 0xff ;
-               memcpy(h->value + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->v + ZB_ZCL_LONG_OCTAT_SIZE, v->wstr->n);
-       } else
-               return ZIGBEE_ERROR_NOT_SUPPORTED;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-
-/**
- * @brief Format of the Selector Field
- *
- * @since_tizen 4.0
- */
-struct selector_s {
-       unsigned char indicator; /**< number of index */
-       unsigned short *index; /**< index list */
-};
-
-/**
- * @brief Stcuture for reading attribute
- *
- * @since_tizen 4.0
- */
-struct read_structured_attribute_record_s {
-       unsigned short id; /**< attribute identifier */
-       struct selector_s *selector; /**< selector format */
-};
-
-/**
- * @brief Format of the Write Attribute Record Field
- *
- * @since_tizen 4.0
- */
-struct write_attribute_structured_status_record_s {
-       unsigned char status; /**< status */
-       unsigned short id; /**< identifier */
-       struct selector_s selector; /**< selector */
-};
-
-/**
- * @brief Format of the Write Attribute Record Field
- *
- * @since_tizen 4.0
- */
-struct write_attribute_structured_record_s {
-       unsigned short id; /**< attribute identifier */
-       struct selector_s selector;
-       unsigned char type; /**< attribute data type */
-       unsigned char *value; /**< data value */; /**< attribute value */
-};
-
-API int zb_create_extended_attr_info(extended_attr_info_h *handle)
-{
-       extended_attr_info_h t = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       t = calloc(1, sizeof(struct extended_attribute_infomation_s));
-       RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = t;
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_destroy_extended_attr_info(extended_attr_info_h handle)
-{
-       struct extended_attribute_infomation_s *h = handle;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_id_from_extended_attr_info(extended_attr_info_h handle,
-               unsigned short *id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *id = h->id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_id_to_extended_attr_info(extended_attr_info_h handle,
-               unsigned short id)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->id = id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_type_from_extended_attr_info(extended_attr_info_h handle,
-               unsigned char *type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *type = h->type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_type_to_extended_attr_info(extended_attr_info_h handle,
-               unsigned char type)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->type = type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_acl_from_extended_attr_info(extended_attr_info_h handle,
-               unsigned char *acl)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == acl, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *acl = h->acl;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_set_acl_to_extended_attr_info(extended_attr_info_h handle,
-               unsigned char acl)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-
-       struct extended_attribute_infomation_s *h = handle;
-       RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->acl = acl;
-       return ZIGBEE_ERROR_NONE;
-}
-
diff --git a/lib/zbl_zdo.c b/lib/zbl_zdo.c
deleted file mode 100644 (file)
index 8d51099..0000000
+++ /dev/null
@@ -1,1381 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <glib.h>
-#include <error.h>
-#include <stdlib.h>
-
-#include <zb_ha.h>
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-
-#include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
-
-#define CASE_TO_STR(x) case x: return #x;
-
-API const char* zb_zdo_get_error_message(int id)
-{
-       switch (id) {
-       CASE_TO_STR(ZB_ZDP_SUCCESS)
-       CASE_TO_STR(ZB_ZDP_INV_REQUESTTYPE)
-       CASE_TO_STR(ZB_ZDP_DEVICE_NOT_FOUND)
-       CASE_TO_STR(ZB_ZDP_INVALID_EP)
-       CASE_TO_STR(ZB_ZDP_NOT_ACTIVE)
-       CASE_TO_STR(ZB_ZDP_NOT_SUPPORTED)
-       CASE_TO_STR(ZB_ZDP_TIMEOUT)
-       CASE_TO_STR(ZB_ZDP_NO_MATCH)
-       CASE_TO_STR(ZB_ZDP_NO_ENTRY)
-       CASE_TO_STR(ZB_ZDP_NO_DESCRIPTOR)
-       CASE_TO_STR(ZB_ZDP_INSUFFICIENT_SPACE)
-       CASE_TO_STR(ZB_ZDP_NOT_PERMITED)
-       CASE_TO_STR(ZB_ZDP_TABLE_FULL)
-       CASE_TO_STR(ZB_ZDP_NOT_AUTHORIZED)
-       CASE_TO_STR(ZB_ZDP_DEVICE_BINDING_TABLE_FULL)
-       default :
-               return "ZB_ZDP_UNKNOWN";
-       }
-}
-
-API const char* zb_get_profile_id_string(int profile_id)
-{
-       switch (profile_id) {
-       CASE_TO_STR(ZB_PROFILE_HOME_AUTOMATION)
-       default :
-               return "ZB_UNKNOWN_PROFILE";
-       }
-}
-
-API const char* zb_get_device_id_string(int device_id)
-{
-       switch (device_id) {
-       /* General devices */
-       CASE_TO_STR(ZB_HA_ON_OFF_SWITCH)
-       CASE_TO_STR(ZB_HA_LEVEL_CONTROL_SWITCH)
-       CASE_TO_STR(ZB_HA_ON_OFF_OUTPUT)
-       CASE_TO_STR(ZB_HA_LEVEL_CONTROLLABLE_OUTPUT)
-       CASE_TO_STR(ZB_HA_SCENE_SELECOTOR)
-       CASE_TO_STR(ZB_HA_CONFIGURATION_TOOL)
-       CASE_TO_STR(ZB_HA_REMOTE_CONTROL)
-       CASE_TO_STR(ZB_HA_COMBINED_INTERFACE)
-       CASE_TO_STR(ZB_HA_RANGE_EXTENDER)
-       CASE_TO_STR(ZB_HA_MAINS_POWER_OUTLET)
-       CASE_TO_STR(ZB_HA_DOOR_LOCK)
-       CASE_TO_STR(ZB_HA_DOOR_LOCK_CONTROLLER)
-       CASE_TO_STR(ZB_HA_SIMPLE_SENSOR)
-       CASE_TO_STR(ZB_HA_CONSUMPTION_AWARENESS_DEVICE)
-       CASE_TO_STR(ZB_HA_HOME_GATEWAY)
-       CASE_TO_STR(ZB_HA_SMART_PLUG)
-       CASE_TO_STR(ZB_HA_WHITE_GOODS)
-       CASE_TO_STR(ZB_HA_METER_INTERFACE)
-       /* Lighting devices */
-       CASE_TO_STR(ZB_HA_ON_OFF_LIGHT)
-       CASE_TO_STR(ZB_HA_DIMMABLE_LIGHT)
-       CASE_TO_STR(ZB_HA_COLOR_DIMMABLE_LIGHT)
-       CASE_TO_STR(ZB_HA_ON_OFF_LIGHT_SWITCH)
-       CASE_TO_STR(ZB_HA_DIMMER_SWITCH)
-       CASE_TO_STR(ZB_HA_COLOR_DIMMER_SWITCH)
-       CASE_TO_STR(ZB_HA_LIGHT_SENSOR)
-       CASE_TO_STR(ZB_HA_OCUPANCY_SENSOR)
-       /* Closures devices */
-       CASE_TO_STR(ZB_HA_SHADE)
-       CASE_TO_STR(ZB_HA_SHADE_CONTROLLER)
-       CASE_TO_STR(ZB_HA_WINDOW_COVERING_DEVICE)
-       CASE_TO_STR(ZB_HA_WINDOW_COVERING_CONTROLLER)
-       /* HVAC devices */
-       CASE_TO_STR(ZB_HA_HEATING_COOLLING_UNIT)
-       CASE_TO_STR(ZB_HA_THERMOSTAT)
-       CASE_TO_STR(ZB_HA_TEMPERATURE_SENSOR)
-       CASE_TO_STR(ZB_HA_PUMP)
-       CASE_TO_STR(ZB_HA_PUMP_CONTROLLER)
-       CASE_TO_STR(ZB_HA_PRESSURE_SENSOR)
-       CASE_TO_STR(ZB_HA_FLOW_SENSOR)
-       CASE_TO_STR(ZB_HA_MINI_SPLIT_AC)
-       /* Intruder Alarms system */
-       CASE_TO_STR(ZB_HA_IAS_CONTROL_AND_INDICATING_EQUIPMENT)
-       CASE_TO_STR(ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT)
-       CASE_TO_STR(ZB_HA_IAS_ZONE)
-       default :
-               return "ZB_HA_UNKNOWN_DEVICE";
-       }
-}
-
-API int zb_simple_desc_create(zb_zdo_simple_desc_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       zb_zdo_simple_desc_h desc = NULL;
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       desc = calloc(1, sizeof(struct zb_zdo_simple_desc_s));
-       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = desc;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_copy(zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h dst)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(dst, src, sizeof(struct zb_zdo_simple_desc_s));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, unsigned char *ep)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == ep, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *ep = h->ep;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, unsigned char ep)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->ep = ep;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
-               unsigned short *profile_id)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == profile_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *profile_id = h->profile_id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_profile_id(zb_zdo_simple_desc_h handle,
-               unsigned short profile_id)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->profile_id = profile_id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-
-API int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
-               unsigned short *device_id)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == device_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *device_id = h->device_id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
-               unsigned short device_id)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->device_id = device_id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
-               unsigned short *device_ver)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == device_ver, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *device_ver = h->device_ver;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
-               unsigned short device_ver)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->device_ver = device_ver;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
-               unsigned char *num_of_in_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == num_of_in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *num_of_in_clusters = h->num_of_in_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
-               unsigned char num_of_in_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->num_of_in_clusters = num_of_in_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
-               unsigned char *num_of_out_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == num_of_out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *num_of_out_clusters = h->num_of_out_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
-               unsigned char num_of_out_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->num_of_out_clusters = num_of_out_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
-               unsigned short **in_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *in_clusters = h->in_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
-               unsigned short *in_clusters, int num)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(num < 1 || num > MAX_ENDPOINT_CLUSTERS, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(h->in_clusters, in_clusters, 2 * num);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
-               unsigned short **out_clusters)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *out_clusters = h->out_clusters;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
-               unsigned short *out_clusters, int num)
-{
-       struct zb_zdo_simple_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(num < 1 || num > MAX_ENDPOINT_CLUSTERS, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(h->out_clusters, out_clusters, 2 * num);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_all_device_list(zigbee_h handle, int *count, zb_end_device_info_h **list)
-{
-       int ret;
-       unsigned char cnt;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == list, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       ret = zbl_get_all_device_info(list, &cnt);
-       *count = cnt;
-       return ret;
-}
-
-API int zb_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *count,
-               unsigned char *ep_list)
-{
-       int ret;
-       unsigned char cnt = 0;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == ep_list, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       ret = zbl_get_endpoint_list(addr64, &cnt, ep_list);
-       *count = cnt;
-       return ret;
-}
-
-API int zb_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep,
-               unsigned char *in_cluster_count, unsigned short *in_cluster_list,
-               unsigned char *out_cluster_count, unsigned short *out_cluster_list)
-{
-       int ret;
-       unsigned char in_cnt = 0;
-       unsigned char out_cnt = 0;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == in_cluster_count, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == in_cluster_list, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == out_cluster_count, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == out_cluster_list, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       ret = zbl_get_cluster_list(addr64, ep, &in_cnt, in_cluster_list,
-                       &out_cnt, out_cluster_list);
-       *in_cluster_count = in_cnt;
-       *out_cluster_count = out_cnt;
-
-       return ret;
-}
-
-API int zb_devices_info_foreach_end_device(zb_end_device_info_h *list,
-               zb_end_device_cb cb, void *user_data)
-{
-       int index = 0;
-       GList *cur = NULL;
-       struct zb_end_device_info_s *real = NULL;
-
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == list, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       cur = (GList *)list;
-       while (cur) {
-               GList *next = cur->next;
-               real = cur->data;
-               if (ZIGBEE_FUNC_STOP == cb(index, (zb_end_device_info_h)real->list, user_data))
-                       break;
-               index++;
-               cur = next;
-       }
-
-       return ZIGBEE_ERROR_NONE;
-
-}
-
-API int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *addr16 = h->addr16;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(addr64, h->addr64, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *count)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *count = h->num_of_ep;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == ep_list, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(ep_list, h->ep, h->num_of_ep);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_mac_capability(zb_end_device_info_h handle, unsigned char *capability)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == capability, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
-
-       *capability = h->capability;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle,
-               unsigned char *can_do_it)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == can_do_it, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
-
-       *can_do_it = h->capability & ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR ? 1 : 0;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep,
-               unsigned short *device_id)
-{
-       int i;
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == device_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->desc, ZIGBEE_ERROR_NO_DATA);
-
-       for (i = 0; i < h->num_of_ep; i++) {
-               RETV_IF(NULL == h->desc[i], ZIGBEE_ERROR_NO_DATA);
-               if (h->desc[i]->ep == ep) {
-                       *device_id = h->desc[i]->device_id;
-                       return ZIGBEE_ERROR_NONE;
-               }
-       }
-       return ZIGBEE_ERROR_NO_DATA;
-}
-
-API int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep,
-               unsigned short *profile_id)
-{
-       int i;
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == profile_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->desc, ZIGBEE_ERROR_NO_DATA);
-
-       for (i = 0; i < h->num_of_ep; i++) {
-               RETV_IF(NULL == h->desc[i], ZIGBEE_ERROR_NO_DATA);
-               if (h->desc[i]->ep == ep) {
-                       *profile_id = h->desc[i]->profile_id;
-                       return ZIGBEE_ERROR_NONE;
-               }
-       }
-       return ZIGBEE_ERROR_NO_DATA;
-}
-
-API int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == power_src, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
-
-       *power_src = h->capability & ZB_ZDP_POWER_SOURCE ? 1 : 0;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_get_security_capabilty(zb_end_device_info_h handle,
-               unsigned char *sec_capability)
-{
-       struct zb_end_device_info_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == sec_capability, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == h->capability, ZIGBEE_ERROR_NO_DATA);
-
-       *sec_capability = h->capability & ZB_ZDP_SECURITY_CAPABILITY ? 1 : 0;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_create(zb_zdo_node_power_descriptor_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       zb_zdo_node_power_descriptor_h desc = NULL;
-
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       desc = calloc(1, sizeof(struct zb_zdo_node_power_descriptor_s));
-       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = desc;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_copy(zb_zdo_node_power_descriptor_h src,
-               zb_zdo_node_power_descriptor_h dst)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(dst, src, sizeof(struct zb_zdo_node_power_descriptor_s));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_destroy(zb_zdo_node_power_descriptor_h handle)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_get_current_power_mode(
-               zb_zdo_node_power_descriptor_h handle,
-               unsigned char* current_power_mode)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == current_power_mode, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *current_power_mode = h->current_power_mode;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_set_current_power_mode(
-               zb_zdo_node_power_descriptor_h handle, unsigned char current_power_mode)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b11 < current_power_mode, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->current_power_mode = current_power_mode;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_get_available_power_sources(
-               zb_zdo_node_power_descriptor_h handle, unsigned char* available_power_sources)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == available_power_sources, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *available_power_sources = h->available_power_sources;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_set_available_power_sources(
-               zb_zdo_node_power_descriptor_h handle, unsigned char available_power_sources)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b111 < available_power_sources, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->available_power_sources = available_power_sources;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_get_current_power_source(
-               zb_zdo_node_power_descriptor_h handle, unsigned char* current_power_source)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == current_power_source, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *current_power_source = h->current_power_source;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_set_current_power_source(
-               zb_zdo_node_power_descriptor_h handle, unsigned char current_power_source)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b111 < current_power_source, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->current_power_source = current_power_source;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_get_current_power_source_level(
-               zb_zdo_node_power_descriptor_h handle, unsigned char* current_power_source_level)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == current_power_source_level, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *current_power_source_level = h->current_power_source_level;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_power_desc_set_current_power_source_level(
-               zb_zdo_node_power_descriptor_h handle, unsigned char current_power_source_level)
-{
-       struct zb_zdo_node_power_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->current_power_source_level = current_power_source_level;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_create(zb_zdo_node_descriptor_h *handle)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       zb_zdo_node_descriptor_h desc = NULL;
-
-       CHECK_ZIGBEE_PRIVILEGE();
-
-       desc = calloc(1, sizeof(struct zb_zdo_node_descriptor_s));
-       RETVM_IF(NULL == desc, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
-       *handle = desc;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_copy(zb_zdo_node_descriptor_h src,
-               zb_zdo_node_descriptor_h dst)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == src, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(dst, src, sizeof(struct zb_zdo_node_descriptor_s));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       free(h);
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
-               unsigned char* logical_type)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == logical_type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *logical_type = h->logical_type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
-               unsigned char logical_type)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b11 < logical_type, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->logical_type = logical_type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_complex_desciptor_available(
-               zb_zdo_node_descriptor_h handle, unsigned char* complex_desciptor_available)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == complex_desciptor_available, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *complex_desciptor_available = h->complex_desciptor_available;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_complex_descriptor_available(
-               zb_zdo_node_descriptor_h handle, unsigned char complex_desciptor_available)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x01 < complex_desciptor_available, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->complex_desciptor_available = complex_desciptor_available;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_user_descriptor_available(
-               zb_zdo_node_descriptor_h handle, unsigned char* user_descriptor_available)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == user_descriptor_available, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *user_descriptor_available = h->user_descriptor_available;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_user_descriptor_available(
-               zb_zdo_node_descriptor_h handle, unsigned char user_descriptor_available)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x01 < user_descriptor_available, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->user_descriptor_available = user_descriptor_available;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_aps_flags(zb_zdo_node_descriptor_h handle,
-               unsigned char* aps_flags)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == aps_flags, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *aps_flags = h->aps_flags;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_aps_flags(zb_zdo_node_descriptor_h handle,
-               unsigned char aps_flags)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b111 < aps_flags, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->aps_flags = aps_flags;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_frequency_band(zb_zdo_node_descriptor_h handle,
-               unsigned char* frequency_band)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == frequency_band, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *frequency_band = h->frequency_band;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_frequency_band(zb_zdo_node_descriptor_h handle,
-               unsigned char frequency_band)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0b1111 < frequency_band, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->frequency_band = frequency_band;
-       return ZIGBEE_ERROR_NONE;
-}
-
-
-API int zb_node_desc_get_mac_capability_flags(zb_zdo_node_descriptor_h handle,
-               unsigned char* mac_capability_flags)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == mac_capability_flags, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *mac_capability_flags = h->mac_capability_flags;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_mac_capability_flags(zb_zdo_node_descriptor_h handle,
-               unsigned char mac_capability_flags)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->mac_capability_flags = mac_capability_flags;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_manufacturer_code(zb_zdo_node_descriptor_h handle,
-               unsigned short* manufacturer_code)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == manufacturer_code, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *manufacturer_code = h->manufacturer_code;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_manufacturer_code(zb_zdo_node_descriptor_h handle,
-               unsigned short manufacturer_code)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       h->manufacturer_code = manufacturer_code;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
-               unsigned char* maximum_buffer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == maximum_buffer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *maximum_buffer_size = h->maximum_buffer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
-               unsigned char maximum_buffer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x7f < maximum_buffer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->maximum_buffer_size = maximum_buffer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_maximum_incoming_transfer_size(
-               zb_zdo_node_descriptor_h handle, unsigned short* maximum_incoming_transfer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == maximum_incoming_transfer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *maximum_incoming_transfer_size = h->maximum_incoming_transfer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_maximum_incoming_transfer_size(
-               zb_zdo_node_descriptor_h handle, unsigned short maximum_incoming_transfer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x7fff < maximum_incoming_transfer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->maximum_incoming_transfer_size = maximum_incoming_transfer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_server_mask(zb_zdo_node_descriptor_h handle,
-               unsigned short* server_mask)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == server_mask, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *server_mask = h->server_mask;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_server_mask(zb_zdo_node_descriptor_h handle,
-               unsigned short server_mask)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x7f < server_mask, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->server_mask = server_mask;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_maximum_outgoing_transfer_size(
-               zb_zdo_node_descriptor_h handle, unsigned short* maximum_outgoing_transfer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == maximum_outgoing_transfer_size, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *maximum_outgoing_transfer_size = h->maximum_outgoing_transfer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_maximum_outgoing_transfer_size(
-               zb_zdo_node_descriptor_h handle, unsigned short maximum_outgoing_transfer_size)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x7fff < maximum_outgoing_transfer_size, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->maximum_outgoing_transfer_size = maximum_outgoing_transfer_size;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_get_descriptor_capability_field(
-               zb_zdo_node_descriptor_h handle, unsigned short* descriptor_capability_field)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == descriptor_capability_field, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *descriptor_capability_field = h->descriptor_capability_field;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_node_desc_set_descriptor_capability_field(
-               zb_zdo_node_descriptor_h handle, unsigned short descriptor_capability_field)
-{
-       struct zb_zdo_node_descriptor_s* h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0x11 < descriptor_capability_field, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
-
-       h->descriptor_capability_field = descriptor_capability_field;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_extended_pan_id(
-               zb_zdo_network_list_record_h handle, ieee_addr extended_pan_id)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(extended_pan_id, h->extended_pan_id, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_logical_channel(
-               zb_zdo_network_list_record_h handle, unsigned char* logical_channel)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == logical_channel, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *logical_channel = h->logical_channel;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_zigbee_version(
-               zb_zdo_network_list_record_h handle, unsigned char* zigbee_version)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zigbee_version, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *zigbee_version = h->zigbee_version;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_stack_profile(
-               zb_zdo_network_list_record_h handle, unsigned char* stack_profile)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == stack_profile, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *stack_profile = h->stack_profile;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_beacon_order(
-               zb_zdo_network_list_record_h handle, unsigned char* beacon_order)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == beacon_order, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *beacon_order = h->beacon_order;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_superframe_order(
-               zb_zdo_network_list_record_h handle, unsigned char* superframe_order)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == superframe_order, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *superframe_order = h->superframe_order;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_network_list_record_get_permit_joining(
-               zb_zdo_network_list_record_h handle, unsigned char* permit_joining)
-{
-       struct zb_zdo_network_list_record_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *permit_joining = h->permit_joining;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_extended_pan_id(
-               zb_zdo_neighbor_table_desc_h handle, ieee_addr extended_pan_id)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(extended_pan_id, h->extended_pan_id, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_ieee_addr(
-               zb_zdo_neighbor_table_desc_h handle, ieee_addr addr64)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == h->addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(addr64, h->addr64, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_nwk_addr(
-               zb_zdo_neighbor_table_desc_h handle, nwk_addr* addr16)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *addr16 = h->addr16;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_device_type(
-               zb_zdo_neighbor_table_desc_h handle, unsigned char* device_type)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == device_type, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *device_type = h->device_type;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_rx_on_when_idle(
-               zb_zdo_neighbor_table_desc_h handle, unsigned char* rx_on_when_idle)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == rx_on_when_idle, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *rx_on_when_idle = h->rx_on_when_idle;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_relationship(
-               zb_zdo_neighbor_table_desc_h handle, unsigned char* releationship)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == releationship, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *releationship = h->relationship;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_permit_joining(
-               zb_zdo_neighbor_table_desc_h handle, unsigned char* permit_joining)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *permit_joining = h->permit_joining;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_depth(
-               zb_zdo_neighbor_table_desc_h handle, unsigned char* depth)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == depth, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *depth = h->depth;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_neighbor_table_desc_get_lqi(zb_zdo_neighbor_table_desc_h handle,
-               unsigned char* lqi)
-{
-       struct zb_zdo_neighbor_table_desc_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == lqi, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *lqi = h->lqi;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
-               nwk_addr* dst_addr)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *dst_addr = h->dst_addr;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
-               unsigned char *status)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *status = h->status;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_memory_constrained(
-               zb_zdo_routing_table_h handle, unsigned char *memory_constrained)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == memory_constrained, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *memory_constrained = h->memory_constrained;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
-               unsigned char *many_to_one)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == many_to_one, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *many_to_one = h->many_to_one;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_route_record_required(
-               zb_zdo_routing_table_h handle, unsigned char *route_record_required)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == route_record_required, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *route_record_required = h->route_record_required;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_routing_table_get_next_hop_addr(
-               zb_zdo_routing_table_h handle, nwk_addr *next_hop_addr)
-{
-       struct zb_zdo_routing_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == next_hop_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *next_hop_addr = h->next_hop_addr;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_src_addr(zb_zdo_binding_table_h handle,
-               ieee_addr src_addr)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == src_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(src_addr, h->src_addr64, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_src_ep(zb_zdo_binding_table_h handle,
-               unsigned char* src_ep)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *src_ep = h->src_ep;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_cluster_id(zb_zdo_binding_table_h handle,
-               unsigned short *cluster_id)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == cluster_id, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *cluster_id = h->cluster_id;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_dst_addr_mode(zb_zdo_binding_table_h handle,
-               unsigned char* dst_addr_mode)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst_addr_mode, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *dst_addr_mode = h->dst_addr_mode;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_dst_addr16(zb_zdo_binding_table_h handle,
-               nwk_addr* addr16)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *addr16 = h->dst_addr16;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_dst_addr64(zb_zdo_binding_table_h handle,
-               ieee_addr addr64)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(addr64, h->dst_addr64, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_binding_table_get_dst_ep(zb_zdo_binding_table_h handle,
-               unsigned char* dst_ep)
-{
-       struct zb_zdo_binding_table_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == dst_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *dst_ep = h->dst_ep;
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_discovery_cache_get_ieee_addr(zb_zdo_discovery_cache_h handle,
-               ieee_addr addr64)
-{
-       struct zb_zdo_discovery_cache_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       memcpy(addr64, h->addr64, sizeof(ieee_addr));
-       return ZIGBEE_ERROR_NONE;
-}
-
-API int zb_discovery_cache_get_nwk_addr(zb_zdo_discovery_cache_h handle,
-               nwk_addr* addr16)
-{
-       struct zb_zdo_discovery_cache_s *h = handle;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
-
-       *addr16 = h->addr16;
-       return ZIGBEE_ERROR_NONE;
-}
diff --git a/lib/zbl_zdo_dev_disc.c b/lib/zbl_zdo_dev_disc.c
deleted file mode 100644 (file)
index f0bf4df..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-#include <zdo/zb_zdo_dev_disc.h>
-
-#include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
-
-API int zb_zdo_nwk_addr_req(zigbee_h handle, ieee_addr addr64,
-               unsigned char request_type, unsigned char start_idx, zb_zdo_addr_rsp cb,
-               void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 != request_type && 1 != request_type, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_nwk_addr_req(handle, addr64, request_type, start_idx, cb,
-               user_data);
-       return ret;
-}
-
-API int zb_zdo_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
-               void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_ieee_addr_req(handle, addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
-               void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_active_ep(handle, addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
-               zb_zdo_simple_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_simple_desc_req(handle, addr16, ep, cb, user_data);
-       return ret;
-}
-
-#ifdef ZB_SUPPORT_PRIORITY_5
-API int zb_zdo_extended_simple_desc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_extended_simple_desc_rsp cb, void *user_data)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       return ZIGBEE_ERROR_NONE;
-}
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
-API int zb_zdo_match_desc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned short profile_id, unsigned char num_in_clusters,
-               unsigned short *in_clusters, unsigned char num_out_clusters,
-               unsigned short *out_clusters, zb_zdo_match_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(0 == num_in_clusters && 0 == num_out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_match_desc_req(handle, addr16, profile_id, num_in_clusters,
-               in_clusters, num_out_clusters, out_clusters, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_node_desc_req(zigbee_h handle, nwk_addr addr16,
-               zb_zdo_node_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_node_desc_req(addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_power_desc_req(zigbee_h handle, nwk_addr addr16,
-               zb_zdo_power_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_power_desc_req(addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_complex_desc_req(zigbee_h handle, nwk_addr addr16,
-               zb_zdo_complex_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_complex_desc_req(addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_user_desc_req(zigbee_h handle, nwk_addr addr16,
-               zb_zdo_user_desc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == cb, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_user_desc_req(addr16, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
-               unsigned char *user_desc, zb_zdo_user_desc_conf cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16, ZIGBEE_ERROR_INVALID_ADDRESS);
-       RETV_IF(NULL == user_desc, ZIGBEE_ERROR_INVALID_PARAMETER);
-       ret = zbl_user_desc_set(handle, addr16, len, user_desc, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_device_annce(zigbee_h handle, nwk_addr addr16, ieee_addr addr64,
-               unsigned char capability)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr16 || 0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
-       ret = zbl_device_annce(handle, addr16, addr64, capability);
-       return ret;
-}
-
diff --git a/lib/zbl_zdo_nwk_mgr.c b/lib/zbl_zdo_nwk_mgr.c
deleted file mode 100644 (file)
index 3a32c4b..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <zb_type.h>
-#include <zb_error.h>
-#include <zdo/zb_zdo_type.h>
-#include <zdo/zb_zdo_nwk_mgr.h>
-
-#include "zbl.h"
-#include "zb_log.h"
-#include "zbl_dbus.h"
-#include "zb_common.h"
-
-API int zb_zdo_mgmt_nwk_disc_req(zigbee_h handle, nwk_addr addr16,
-               unsigned int scan_channels, unsigned char scan_duration, unsigned char scan_count,
-               unsigned char start_idx, zb_zdo_mgmt_nwk_disc_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       ret = zbl_mgmt_nwk_disc_req(addr16, scan_channels, scan_duration, scan_count,
-               start_idx, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_mgmt_lqi_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_mgmt_lqi_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       ret = zbl_mgmt_lqi_req(addr16, start_idx, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_mgmt_rtg_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_mgmt_rtg_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       ret = zbl_mgmt_rtg_req(addr16, start_idx, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_mgmt_bind_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_mgmt_bind_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       ret = zbl_mgmt_bind_req(addr16, start_idx, cb, user_data);
-       return ret;
-}
-
-API int zb_zdo_mgmt_leave_req(zigbee_h handle, ieee_addr addr64,
-               bool remove_children, bool rejoin, zb_zdo_mgmt_leave_rsp cb,
-               void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
-       ret = zbl_mgmt_leave_device(addr64, remove_children, rejoin, cb, user_data);
-       return ret;
-}
-
-#ifdef ZB_SUPPORT_PRIORITY_5
-API int zb_zdo_mgmt_direct_join_req(zigbee_h handle, ieee_addr addr64,
-               unsigned char capability, zb_zdo_mgmt_direct_join_rsp cb, void *user_data)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == addr64, ZIGBEE_ERROR_INVALID_ADDRESS);
-       return ZIGBEE_ERROR_NONE;
-}
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
-API int zb_zdo_mgmt_permit_joining_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char duration, unsigned char tc_significance,
-               zb_zdo_mgmt_permit_joining_rsp cb, void *user_data)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       ret = zbl_mgmt_permit_joining_req(addr16, duration, tc_significance, cb, user_data);
-       return ret;
-}
-
-#ifdef ZB_SUPPORT_PRIORITY_5
-API int zb_zdo_mgmt_cache_req(zigbee_h handle, nwk_addr addr16,
-               unsigned char start_idx, zb_zdo_mgmt_cache_rsp cb, void *user_data)
-{
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       return ZIGBEE_ERROR_NONE;
-}
-#endif /* ZB_SUPPORT_PRIORITY_5 */
-
-API int zb_zdo_mgmt_nwk_update_req(zigbee_h handle, unsigned int scan_channels,
-       unsigned char scan_duration, unsigned char scan_count, unsigned char nwk_update_id,
-       nwk_addr nwk_manager_addr)
-{
-       int ret;
-       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
-       RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
-       RETV_IF(0 == nwk_manager_addr, ZIGBEE_ERROR_INVALID_ADDRESS);
-       ret = zbl_mgmt_nwk_update_req(scan_channels, scan_duration, scan_count, nwk_update_id,
-               nwk_manager_addr);
-       return ret;
-}
-
index 7e298ca..542b38f 100644 (file)
@@ -1,5 +1,3 @@
-%define project_name zigbee
-
 Name:          capi-network-zigbee
 Summary:       Network Zigbee Service in Tizen CAPI
 Version:       0.0.1
@@ -56,13 +54,11 @@ rm -rf %{buildroot}/BUILD/%{name}
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 %license LICENSE.APLv2
-%{_libdir}/lib%{project_name}.so.*
+%attr(644,-,-) %{_libdir}/lib%{name}.so.*
 %{_bindir}/test-zigbee
 
 %files devel
 %defattr(-,root,root,-)
-%{_libdir}/lib%{project_name}.so
+%attr(644,-,-) %{_libdir}/lib%{name}.so
 %{_libdir}/pkgconfig/%{name}.pc
-%{_includedir}/%{project_name}/*.h
-%{_includedir}/%{project_name}/zdo/*.h
-%{_includedir}/%{project_name}/zcl/*.h
+%{_includedir}/network/*.h
index 8894093..68a2630 100644 (file)
@@ -1,3 +1,4 @@
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/)
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
 SET(test "test-zigbee")
 
@@ -19,21 +20,22 @@ SET(NEW_SOURCES
        main.c
        menu.c
        custom.c
-       zcl_cluster_alarm.c
-       zcl_cluster_basic.c
-       zcl_cluster_colorctrl.c
-       zcl_cluster_group.c
-       zcl_cluster_identity.c
-       zcl_cluster_ias_zone.c
-       zcl_cluster_levelctrl.c
-       zcl_cluster_onoff.c
-       zcl_cluster_pollctrl.c
-       zcl_cluster_scene.c
-       zcl_cluster_thermostat.c
-       zcl_global_cmd.c
-       zdo_binding.c
-       zdo_device.c
-       zdo_network.c
+       zcl-alarm.c
+       zcl-basic.c
+       zcl-color-ctrl.c
+       zcl-group.c
+       zcl-identity.c
+       zcl-ias-zone.c
+       zcl-level-ctrl.c
+       zcl-on-off.c
+       zcl-poll-ctrl.c
+       zcl-scene.c
+       zcl-thermostat.c
+       zcl-global-cmd.c
+       zdo-binding.c
+       zdo-device.c
+       zdo-network.c
+       ../common/zb-utils.c
 )
 
 # test-zigbee
index 83b3846..19b1841 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-#include <zigbee_internal.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 
-void _zb_aps_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned short cluster_id, unsigned short profile_id, unsigned short payload_len,
-               unsigned char *payload, void *user_data)
+void _zb_aps_send_cb(zb_nwk_addr addr16, zb_end_point src_ep, zb_end_point dst_ep,
+       zb_cluster_id clusterid, zb_profile_id profileid, unsigned short payload_len,
+       unsigned char *payload, void *user_data)
 {
        unsigned short i = 0;
-       msgp("\n_zb_aps_send_rsp()");
+       msgp("\n_zb_aps_send_cb()");
        msg("  src_ep      : 0x%X", src_ep);
        msg("  dst_ep      : 0x%X", dst_ep);
-       msg("  cluster_id  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  profile_id  : 0x%04X", profile_id);
+       msg("  cluster_id  : 0x%04X (%s)", clusterid, zb_zcl_get_cluster_id_str(clusterid));
+       msg("  profile_id  : 0x%04X", profileid);
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
        msgn("      ");
@@ -50,16 +47,16 @@ void _zb_aps_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msgn("\n");
 }
 
-void _zb_zcl_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
-               unsigned short cluster_id, unsigned short profile_id, unsigned short payload_len,
-               unsigned char *payload, void *user_data)
+void _zb_zcl_send_cb(zb_nwk_addr addr16, zb_end_point src_ep, zb_end_point dst_ep,
+       zb_cluster_id clusterid, zb_profile_id profileid, unsigned short payload_len,
+       unsigned char *payload, void *user_data)
 {
        unsigned short i = 0;
-       msgp("\n_zb_zcl_send_rsp()");
+       msgp("\n_zb_zcl_send_cb()");
        msg("  src_ep      : 0x%X", src_ep);
        msg("  dst_ep      : 0x%X", dst_ep);
-       msg("  cluster_id  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  profile_id  : 0x%04X", profile_id);
+       msg("  cluster_id  : 0x%04X (%s)", clusterid, zb_zcl_get_cluster_id_str(clusterid));
+       msg("  profile_id  : 0x%04X", profileid);
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
        msgn("      ");
@@ -68,10 +65,11 @@ void _zb_zcl_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msgn("\n");
 }
 
-void _zb_send_to_local_rsp(unsigned short length, unsigned char *data, void *user_data)
+void _zb_send_to_local_cb(unsigned short length, unsigned char *data,
+       void *user_data)
 {
        unsigned short i = 0;
-       msgp("\n_zb_send_to_local_rsp()");
+       msgp("\n_zb_send_to_local_cb()");
        msg("  length : 0x%04X", length);
        msg("  data : ");
        msgn("      ");
@@ -83,21 +81,24 @@ void _zb_send_to_local_rsp(unsigned short length, unsigned char *data, void *use
 static int run_aps_send(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
-       unsigned char aps_frame_ctl = ZB_APS_DELIVERY_UNICAST | ZB_APS_NO_ACK_REQUEST;
-       unsigned char src_ep = 1;
-       unsigned char dst_ep = 1;
-       unsigned short cluster_id = 0xFC05;
-       unsigned short profile_id = 0xFC01;
-       unsigned char zcl_frame_ctl = ZB_ZCL_FC_GLOBALLY_USED | ZB_ZCL_CLIENT_TO_SERVER |
-                                                               ZB_ZCL_FC_NOT_MANUFACTURER | ZB_ZCL_DISABLE_DEFAULT_RESPONSE;
+       zb_aps_frame_ctl aps_fc = ZB_APS_DELIVERY_UNICAST |
+               ZB_APS_NO_ACK_REQUEST;
+       zb_end_point src_ep = 1;
+       zb_end_point dst_ep = 1;
+       zb_cluster_id clusterid = 0xFC05;
+       zb_profile_id profileid = 0xFC01;
+       zb_zcl_frame_ctl zcl_fc = ZB_ZCL_FC_GLOBALLY_USED |
+               ZB_ZCL_CLIENT_TO_SERVER |
+               ZB_ZCL_FC_NOT_MANUFACTURER |
+               ZB_ZCL_DEFAULT_RESPONSE_DISABLED;
        unsigned short mfg_code = 0x110A;
        unsigned char cmd_id = 0x01;
        unsigned short payload_len = 4;
        unsigned char payload[4] = { 0x00, 0x01, 0x02, 0x03 };
 
-       ret = zb_aps_send(handle, dest_addr16, aps_frame_ctl, src_ep, dst_ep,
-                               cluster_id, profile_id, zcl_frame_ctl, mfg_code,
-                               cmd_id, payload_len, payload, _zb_aps_send_rsp, NULL);
+       ret = zb_aps_send(handle, dest_addr16, aps_fc, src_ep, dst_ep,
+                               clusterid, profileid, zcl_fc, mfg_code,
+                               cmd_id, payload_len, payload, _zb_aps_send_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_aps_send(0x%X) - FAILED!!!", ret);
                return RET_FAILURE;
@@ -112,17 +113,19 @@ static int run_aps_send(MManager *mm, struct menu_data *menu)
 static int run_zcl_send(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
-       unsigned char src_ep = 2;
-       unsigned char dst_ep = 2;
-       unsigned short cluster_id = 0x0000;
-       unsigned char zcl_frame_ctl = ZB_ZCL_FC_GLOBALLY_USED | ZB_ZCL_CLIENT_TO_SERVER |
-                                                               ZB_ZCL_FC_NOT_MANUFACTURER | ZB_ZCL_DISABLE_DEFAULT_RESPONSE;
+       zb_end_point src_ep = 2;
+       zb_end_point dst_ep = 2;
+       zb_cluster_id clusterid = 0x0000;
+       zb_zcl_frame_ctl zcl_fc = ZB_ZCL_FC_GLOBALLY_USED |
+               ZB_ZCL_CLIENT_TO_SERVER |
+               ZB_ZCL_FC_NOT_MANUFACTURER |
+               ZB_ZCL_DEFAULT_RESPONSE_DISABLED;
        unsigned char cmd = 0x0;
        unsigned short payload_len = 4;
        unsigned char payload[4] = { 0x00, 0x01, 0x02, 0x03 };
 
-       ret = zb_zcl_send(handle, dest_addr16, src_ep, dst_ep, cluster_id,
-                               zcl_frame_ctl, cmd, payload_len, payload, _zb_zcl_send_rsp, NULL);
+       ret = zb_zcl_send(handle, dest_addr16, src_ep, dst_ep, clusterid,
+                               zcl_fc, cmd, payload_len, payload, _zb_zcl_send_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zcl_send(0x%X) - FAILED!!!", ret);
                return RET_FAILURE;
@@ -140,7 +143,7 @@ static int run_send_to_local(MManager *mm, struct menu_data *menu)
        unsigned short length = 4;
        unsigned char data[4] = { 0x00, 0x01, 0x02, 0x03 };
 
-       ret = zb_send_to_local(handle, length, data, _zb_send_to_local_rsp, NULL);
+       ret = zb_send_to_local(handle, length, data, _zb_send_to_local_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_send_to_local(0x%X) - FAILED!!!", ret);
                return RET_FAILURE;
index 24cb084..87ac927 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-#include <zigbee_internal.h>
-
 #include "main.h"
 #include "menu.h"
 
-zigbee_h handle;
+zb_zigbee_h handle;
 
 extern struct menu_data menu_zdo_binding[];
 extern struct menu_data menu_zdo_device[];
@@ -46,22 +43,22 @@ static char data_pj_timeout[MENU_DATA_SIZE + 1] = "90";
 static char data_choose_target[MENU_DATA_SIZE + 1] = "0";
 static char data_dest_addr16[MENU_DATA_SIZE + 1] = "";
 
-nwk_addr panid = 0x615F;
-ieee_addr co_addr64 = { 0xD0, 0x52, 0xA8, 0xA9, 0x8F, 0xB7, 0x00, 0x01 };
+zb_nwk_addr panid = 0x615F;
+zb_ieee_addr co_addr64 = { 0xD0, 0x52, 0xA8, 0xA9, 0x8F, 0xB7, 0x00, 0x01 };
 
-nwk_addr  st_addr16 = 0x708B;
-ieee_addr st_addr64 = { 0x00, 0x0D, 0x6F, 0x00, 0x04, 0x2B, 0xBE, 0x14 };
+zb_nwk_addr  st_addr16 = 0x708B;
+zb_ieee_addr st_addr64 = { 0x00, 0x0D, 0x6F, 0x00, 0x04, 0x2B, 0xBE, 0x14 };
 
-nwk_addr  sj_addr16 = 0x4756;
-ieee_addr sj_addr64 = { 0x24, 0xFD, 0x5B, 0x00, 0x01, 0x01, 0x86, 0xB6 };
+zb_nwk_addr  sj_addr16 = 0x4756;
+zb_ieee_addr sj_addr64 = { 0x24, 0xFD, 0x5B, 0x00, 0x01, 0x01, 0x86, 0xB6 };
 
-nwk_addr  dest_addr16 = 0x1D1A;
-ieee_addr dest_addr64 = { 0x00, 0x12, 0x4B, 0x00, 0x02, 0xF2, 0x58, 0x5B };
+zb_nwk_addr  dest_addr16 = 0x1D1A;
+zb_ieee_addr dest_addr64 = { 0x00, 0x12, 0x4B, 0x00, 0x02, 0xF2, 0x58, 0x5B };
 
 simple_desc_s st_ep1, st_ep2, st_ep3, st_ep4, sj_ep1;
 simple_desc_s dimmer_ep1, s_thermostat_ep1, huebulb_ep1;
 
-zb_end_device_info_h *target_list = NULL;
+zb_end_dev_info_h *target_list = NULL;
 int target_list_count;
 
 static const char* zb_event_str[] = {
@@ -141,164 +138,193 @@ static void _init_endpoints()
 {
        /* Samjin power outlet EP1 */
        sj_ep1.ep = 1;
-       sj_ep1.profile_id = 0x0104;
-       sj_ep1.device_id = 0x0002;
+       sj_ep1.profileid = 0x0104;
+       sj_ep1.deviceid = 0x0002;
        sj_ep1.num_of_in_clusters = 7;
        sj_ep1.num_of_out_clusters = 1;
        /* In clusters : 0000 0003 0004 0005 0006 0009 0B04 0B05 */
-       sj_ep1.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       sj_ep1.in_clusters[1] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       sj_ep1.in_clusters[2] = ZB_ZCL_GROUPS_CLUSTER_ID;
-       sj_ep1.in_clusters[3] = ZB_ZCL_SCENES_CLUSTER_ID;
-       sj_ep1.in_clusters[4] = ZB_ZCL_ON_OFF_CLUSTER_ID;
-       sj_ep1.in_clusters[5] = ZB_ZCL_ALARM_CLUSTER_ID;
-       sj_ep1.in_clusters[6] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
+       sj_ep1.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       sj_ep1.in_clusters[1] = ZB_ZCL_CLUSTER_IDENTIFY;
+       sj_ep1.in_clusters[2] = ZB_ZCL_CLUSTER_GROUPS;
+       sj_ep1.in_clusters[3] = ZB_ZCL_CLUSTER_SCENES;
+       sj_ep1.in_clusters[4] = ZB_ZCL_CLUSTER_ON_OFF;
+       sj_ep1.in_clusters[5] = ZB_ZCL_CLUSTER_ALARM;
+       sj_ep1.in_clusters[6] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
        /* Out clusters : 0019 */
-       /*unsigned short sj_out_clusters[] = { ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID };*/
+       /*unsigned short sj_out_clusters[] = { ZB_ZCL_CLUSTER_ID_OTA_BOOTLOAD };*/
 
        /* SmartThings open/close sensor EP1 */
        st_ep1.ep = 1;
-       st_ep1.profile_id = 0x0104;
-       st_ep1.device_id = 0x0402;
+       st_ep1.profileid = 0x0104;
+       st_ep1.deviceid = 0x0402;
        st_ep1.num_of_in_clusters = 7;
        st_ep1.num_of_out_clusters = 1;
-       st_ep1.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       st_ep1.in_clusters[1] = ZB_ZCL_POWER_CONFIG_CLUSTER_ID;
-       st_ep1.in_clusters[2] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       st_ep1.in_clusters[3] = ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID;
-       st_ep1.in_clusters[4] = ZB_ZCL_IAS_ZONE_CLUSTER_ID;
-       st_ep1.in_clusters[5] = ZB_ZCL_POLL_CONTROL_CLUSTER_ID;
-       st_ep1.in_clusters[6] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
-       st_ep1.out_clusters[0] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;
+       st_ep1.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       st_ep1.in_clusters[1] = ZB_ZCL_CLUSTER_POWER_CONFIG;
+       st_ep1.in_clusters[2] = ZB_ZCL_CLUSTER_IDENTIFY;
+       st_ep1.in_clusters[3] = ZB_ZCL_CLUSTER_TEMP_MEASUREMENT;
+       st_ep1.in_clusters[4] = ZB_ZCL_CLUSTER_IAS_ZONE;
+       st_ep1.in_clusters[5] = ZB_ZCL_CLUSTER_POLL_CONTROL;
+       st_ep1.in_clusters[6] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
+       st_ep1.out_clusters[0] = ZB_ZCL_CLUSTER_OTA_BOOTLOAD;
 
        /* SmartThings open/close sensor EP2 */
        st_ep2.ep = 2;
-       st_ep2.profile_id = 0xC2DF;
-       st_ep2.device_id = 0x000C;
+       st_ep2.profileid = 0xC2DF;
+       st_ep2.deviceid = 0x000C;
        st_ep2.num_of_in_clusters = 4;
        st_ep2.num_of_out_clusters = 1;
-       st_ep2.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       st_ep2.in_clusters[1] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       st_ep2.in_clusters[2] = ZB_ZCL_SCENES_CLUSTER_ID;
+       st_ep2.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       st_ep2.in_clusters[1] = ZB_ZCL_CLUSTER_IDENTIFY;
+       st_ep2.in_clusters[2] = ZB_ZCL_CLUSTER_SCENES;
        st_ep2.in_clusters[3] = 0xFC0F;
-       st_ep2.out_clusters[0] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
+       st_ep2.out_clusters[0] = ZB_ZCL_CLUSTER_IDENTIFY;
 
        /* SmartThings Motion Sensor EP1 */
        st_ep3.ep = 1;
-       st_ep3.profile_id = 0x0104;
-       st_ep3.device_id = 0x0402;
+       st_ep3.profileid = 0x0104;
+       st_ep3.deviceid = 0x0402;
        st_ep3.num_of_in_clusters = 7;
        st_ep3.num_of_out_clusters = 1;
-       st_ep3.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       st_ep3.in_clusters[1] = ZB_ZCL_POWER_CONFIG_CLUSTER_ID;
-       st_ep3.in_clusters[2] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       st_ep3.in_clusters[3] = ZB_ZCL_POLL_CONTROL_CLUSTER_ID;
-       st_ep3.in_clusters[4] = ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID;
-       st_ep3.in_clusters[5] = ZB_ZCL_IAS_ZONE_CLUSTER_ID;
-       st_ep3.in_clusters[6] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
-       st_ep3.out_clusters[0] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;
+       st_ep3.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       st_ep3.in_clusters[1] = ZB_ZCL_CLUSTER_POWER_CONFIG;
+       st_ep3.in_clusters[2] = ZB_ZCL_CLUSTER_IDENTIFY;
+       st_ep3.in_clusters[3] = ZB_ZCL_CLUSTER_POLL_CONTROL;
+       st_ep3.in_clusters[4] = ZB_ZCL_CLUSTER_TEMP_MEASUREMENT;
+       st_ep3.in_clusters[5] = ZB_ZCL_CLUSTER_IAS_ZONE;
+       st_ep3.in_clusters[6] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
+       st_ep3.out_clusters[0] = ZB_ZCL_CLUSTER_OTA_BOOTLOAD;
 
        /* SmartThings Motion Sensor EP2 */
        st_ep4.ep = 2;
-       st_ep4.profile_id = 0xC2DF;
-       st_ep4.device_id = 0x0107;
+       st_ep4.profileid = 0xC2DF;
+       st_ep4.deviceid = 0x0107;
        st_ep4.num_of_in_clusters = 5;
        st_ep4.num_of_out_clusters = 1;
-       st_ep4.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       st_ep4.in_clusters[1] = ZB_ZCL_POWER_CONFIG_CLUSTER_ID;
-       st_ep4.in_clusters[2] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       st_ep4.in_clusters[3] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
+       st_ep4.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       st_ep4.in_clusters[1] = ZB_ZCL_CLUSTER_POWER_CONFIG;
+       st_ep4.in_clusters[2] = ZB_ZCL_CLUSTER_IDENTIFY;
+       st_ep4.in_clusters[3] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
        st_ep4.in_clusters[4] = 0xFC46;
-       st_ep4.out_clusters[0] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;
+       st_ep4.out_clusters[0] = ZB_ZCL_CLUSTER_OTA_BOOTLOAD;
 
        /* Things Simulator - GE_ZigBeeDimmer */
        dimmer_ep1.ep = 1;
-       dimmer_ep1.profile_id = 0x0104;
-       dimmer_ep1.device_id = 0xffff;
+       dimmer_ep1.profileid = 0x0104;
+       dimmer_ep1.deviceid = 0xffff;
        dimmer_ep1.num_of_in_clusters = 7;
        dimmer_ep1.num_of_out_clusters = 1;
-       dimmer_ep1.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       dimmer_ep1.in_clusters[1] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       dimmer_ep1.in_clusters[2] = ZB_ZCL_GROUPS_CLUSTER_ID;
-       dimmer_ep1.in_clusters[3] = ZB_ZCL_SCENES_CLUSTER_ID;
-       dimmer_ep1.in_clusters[4] = ZB_ZCL_ON_OFF_CLUSTER_ID;
-       dimmer_ep1.in_clusters[5] = ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID;
-       dimmer_ep1.in_clusters[6] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
-       /*dimmer_ep1.in_clusters[7] = ZB_ZCL_SIMPLE_METERING_CLUSTER_ID;*/
-       dimmer_ep1.out_clusters[0] = ZB_ZCL_TIME_CLUSTER_ID;
-       /*dimmer_ep1.out_clusters[1] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;*/
+       dimmer_ep1.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       dimmer_ep1.in_clusters[1] = ZB_ZCL_CLUSTER_IDENTIFY;
+       dimmer_ep1.in_clusters[2] = ZB_ZCL_CLUSTER_GROUPS;
+       dimmer_ep1.in_clusters[3] = ZB_ZCL_CLUSTER_SCENES;
+       dimmer_ep1.in_clusters[4] = ZB_ZCL_CLUSTER_ON_OFF;
+       dimmer_ep1.in_clusters[5] = ZB_ZCL_CLUSTER_LEVEL_CONTROL;
+       dimmer_ep1.in_clusters[6] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
+       /*dimmer_ep1.in_clusters[7] = ZB_ZCL_CLUSTER_ID_SIMPLE_METERING;*/
+       dimmer_ep1.out_clusters[0] = ZB_ZCL_CLUSTER_TIME;
+       /*dimmer_ep1.out_clusters[1] = ZB_ZCL_CLUSTER_ID_OTA_BOOTLOAD;*/
 
        /* Things Simulator - CentraLite_Thermostat */
        s_thermostat_ep1.ep = 1;
-       s_thermostat_ep1.profile_id = 0x0104;
-       s_thermostat_ep1.device_id = 0xffff;
+       s_thermostat_ep1.profileid = 0x0104;
+       s_thermostat_ep1.deviceid = 0xffff;
        s_thermostat_ep1.num_of_in_clusters = 8;
        s_thermostat_ep1.num_of_out_clusters = 2;
-       s_thermostat_ep1.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[1] = ZB_ZCL_POWER_CONFIG_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[2] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[3] = ZB_ZCL_POLL_CONTROL_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[4] = ZB_ZCL_THERMOSTAT_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[5] = ZB_ZCL_FAN_CONTROL_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[6] = ZB_ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID;
-       s_thermostat_ep1.in_clusters[7] = ZB_ZCL_DIAGNOSTICS_CLUSTER_ID;
-       s_thermostat_ep1.out_clusters[0] = ZB_ZCL_TIME_CLUSTER_ID;
-       s_thermostat_ep1.out_clusters[1] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;
+       s_thermostat_ep1.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       s_thermostat_ep1.in_clusters[1] = ZB_ZCL_CLUSTER_POWER_CONFIG;
+       s_thermostat_ep1.in_clusters[2] = ZB_ZCL_CLUSTER_IDENTIFY;
+       s_thermostat_ep1.in_clusters[3] = ZB_ZCL_CLUSTER_POLL_CONTROL;
+       s_thermostat_ep1.in_clusters[4] = ZB_ZCL_CLUSTER_THERMOSTAT;
+       s_thermostat_ep1.in_clusters[5] = ZB_ZCL_CLUSTER_FAN_CONTROL;
+       s_thermostat_ep1.in_clusters[6] = ZB_ZCL_CLUSTER_THERMOSTAT_UI_CONFIG;
+       s_thermostat_ep1.in_clusters[7] = ZB_ZCL_CLUSTER_DIAGNOSTICS;
+       s_thermostat_ep1.out_clusters[0] = ZB_ZCL_CLUSTER_TIME;
+       s_thermostat_ep1.out_clusters[1] = ZB_ZCL_CLUSTER_OTA_BOOTLOAD;
 
        /* Things Simulator - Zigbee_HueBulb */
        huebulb_ep1.ep = 1;
-       huebulb_ep1.profile_id = 0x0104;
-       huebulb_ep1.device_id = 0xffff;
+       huebulb_ep1.profileid = 0x0104;
+       huebulb_ep1.deviceid = 0xffff;
        huebulb_ep1.num_of_in_clusters = 8;
        huebulb_ep1.num_of_out_clusters = 1;
-       huebulb_ep1.in_clusters[0] = ZB_ZCL_BASIC_CLUSTER_ID;
-       huebulb_ep1.in_clusters[1] = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       huebulb_ep1.in_clusters[2] = ZB_ZCL_GROUPS_CLUSTER_ID;
-       huebulb_ep1.in_clusters[3] = ZB_ZCL_SCENES_CLUSTER_ID;
-       huebulb_ep1.in_clusters[4] = ZB_ZCL_ON_OFF_CLUSTER_ID;
-       huebulb_ep1.in_clusters[5] = ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID;
-       huebulb_ep1.in_clusters[6] = ZB_ZCL_COLOR_CONTROL_CLUSTER_ID;
-       huebulb_ep1.in_clusters[7] = ZB_ZCL_ZLL_COMMISSIONING_CLUSTER_ID;
-       huebulb_ep1.out_clusters[0] = ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID;
+       huebulb_ep1.in_clusters[0] = ZB_ZCL_CLUSTER_BASIC;
+       huebulb_ep1.in_clusters[1] = ZB_ZCL_CLUSTER_IDENTIFY;
+       huebulb_ep1.in_clusters[2] = ZB_ZCL_CLUSTER_GROUPS;
+       huebulb_ep1.in_clusters[3] = ZB_ZCL_CLUSTER_SCENES;
+       huebulb_ep1.in_clusters[4] = ZB_ZCL_CLUSTER_ON_OFF;
+       huebulb_ep1.in_clusters[5] = ZB_ZCL_CLUSTER_LEVEL_CONTROL;
+       huebulb_ep1.in_clusters[6] = ZB_ZCL_CLUSTER_COLOR_CONTROL;
+       huebulb_ep1.in_clusters[7] = ZB_ZCL_CLUSTER_ZLL_COMMISSIONING;
+       huebulb_ep1.out_clusters[0] = ZB_ZCL_CLUSTER_OTA_BOOTLOAD;
 }
 
-static void zigbee_form_network_done_cb(nwk_addr panid, void *user_data)
+static void _zb_form_network_done_cb(zb_nwk_addr panid, void *user_data)
 {
        msgp("\nform_network_done received PANID = 0x%04X\n", panid);
 }
 
-static void zigbee_disable_network_done_cb(unsigned char ret, void *user_data)
+static void _zb_disable_network_done_cb(unsigned char ret, void *user_data)
 {
        msgp("\ndisable_network result received = 0x%02X\n", ret);
 }
 
-static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_event_data_s ev)
+static void _zb_event_cb(zb_nwk_addr addr16, zb_ieee_addr addr64, zb_event_e e,
+       zb_event_data_h ev, void* user_data)
 {
-       unsigned char status, count, ep, command_id;
-       unsigned short cluster_id;
+       int event_type = e;
+       zb_error_e status;
+       unsigned char count;
+
+       zb_end_point ep;
+       zb_cluster_id clusterid;
+       zb_command_id commandid;
+
        msg("");
        msg("");
        msgp("Event received = %s [0x%02X]", zb_event_str[e], e);
 
-       switch (e) {
+       switch (event_type) {
        case ZB_ZDP_ENABLE_EVENT:
        {
-               status = ev.data.enable->status;
+               zb_ev_get_enable_status(
+                       ev,
+                       &status
+                       );
                msg("  zigbee state = %d [%s]", status, (status ? "Enabled" : "Disabled"));
                break;
        }
        case ZB_ZDP_FORM_NETWORK_DONE:
        {
-               msg("  form network done");
+               zb_nwk_addr pan_id = 0;
+               zb_ev_get_form_network_panid(ev, &pan_id);
+               msg("0x%d  form network done", pan_id);
                break;
        }
        case ZB_ZDP_JOIN_EVENT:
        {
-               count = ev.data.join->count;
+               zb_end_point *ep = NULL;
+               zb_ev_get_join_count(
+                       ev,
+                       &count
+                       );
+               zb_ev_get_join_ep(
+                       ev,
+                       &ep
+                       );
+
                msg("  %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X joined",
                        addr64[0], addr64[1], addr64[2], addr64[3],
                        addr64[4], addr64[5], addr64[6], addr64[7]);
-               msg("end-point count=%d", count);
+               msg("end-point count = %d", count);
+               for (int i = 0; i < count; i++)
+                       msg("[%d]", ep[i]);
+
+               if (ep) {
+                       free(ep);
+                       ep = NULL;
+               }
+
                break;
        }
        case ZB_ZDP_REJOIN_EVENT:
@@ -308,73 +334,109 @@ static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_
                        addr64[4], addr64[5], addr64[6], addr64[7]);
                break;
        }
-       case ZB_ZDP_CHILD_LEFT:
-       {
-               msg("  %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X left",
+       case ZB_ZDP_CHILD_LEFT: {
+               zb_error_e status = 0;
+               zb_ev_get_child_left_status(ev, &status);
+               msg("  %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X left Status Code = 0x%02X",
                        addr64[0], addr64[1], addr64[2], addr64[3],
-                       addr64[4], addr64[5], addr64[6], addr64[7]);
+                       addr64[4], addr64[5], addr64[6], addr64[7], status);
                break;
        }
-       case ZB_ZDP_LEAVE_DONE_EVENT:
-       {
+       case ZB_ZDP_LEAVE_DONE_EVENT: {
                msg("  0x%04X leave done\n", addr16);
                break;
        }
-       case ZB_ZDP_UPDATED_NETWORK_NOTIFICATION_EVENT:
-       {
+       case ZB_ZDP_UPDATED_NETWORK_NOTIFICATION_EVENT: {
                msg("  Update network notification received\n");
                break;
        }
        case ZB_ZDP_BIND_RSP_EVENT:
        {
-               /* zb_parse_bind_rsp(ev, &status); */
+               /* zb_parse_bind_cb(ev, &status); */
                /* msg("binding %04X, result=%0X\n", addr16, status); */
                msg("  Not implemented");
                break;
        }
        case ZB_ZDP_UNBIND_RSP_EVENT:
        {
-               /* zb_parse_unbind_rsp(ev, &status); */
+               /* zb_parse_unbind_cb(ev, &status); */
                /* msg("unbinding %04X, result=%0X\n", addr16, status); */
                msg("  Not implemented");
                break;
        }
        case ZB_ZCL_GLOBAL_DEFAULT_RSP_EVENT:
        {
-               ep = ev.data.global_default_rsp->ep;
-               cluster_id = ev.data.global_default_rsp->cluster_id;
-               command_id = ev.data.global_default_rsp->command_id;
-               status = ev.data.global_default_rsp->status;
+               zb_zcl_status_e zcl_status;
+               zb_ev_get_global_default_rsp_ep(
+                       ev,
+                       &ep
+                       );
+               zb_ev_get_global_default_rsp_cluster_id(
+                       ev,
+                       &clusterid
+                       );
+               zb_ev_get_global_default_rsp_command_id(
+                       ev,
+                       &commandid
+                       );
+               zb_ev_get_global_default_rsp_status(
+                       ev,
+                       &zcl_status
+                       );
 
                msg("  addr16     = 0x%04X", addr16);
                msg("  endpoint   = 0x%02X", ep);
-               msg("  cluster_id = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-               msg("  command_id = 0x%02X", command_id);
-               msg("  status     = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+               msg("  cluster_id = 0x%04X (%s)", clusterid, zb_zcl_get_cluster_id_str(clusterid));
+               msg("  commandid = 0x%02X", commandid);
+               msg("  status     = 0x%02X (%s)",
+                       zcl_status, zb_zcl_get_status_str(zcl_status));
                break;
        }
        case ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT:
        {
-               int i, j, count, rec_len;
                int ret;
+               int i, j, count;
+               zb_attribute_id id;
+               zb_zcl_data_type_e type;
+               unsigned char rec_len = 0;
                unsigned char *buf = NULL;
-               unsigned short id;
-               unsigned char type;
-               attr_report_h *t;
-               zb_value_h value;
 
-               t = ev.data.global_attr_report->records;
-               rec_len = ev.data.global_attr_report->count;
+               zb_zcl_attr_report_h *records = NULL;
+
+               ret = zb_ev_get_global_attr_report_records(
+                       ev,
+                       records,
+                       &rec_len
+                       );
+               if (ZIGBEE_ERROR_NONE != ret) {
+                       msg("zb_ev_get_global_attr_report_records(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+                       return;
+               }
+               if (NULL == records) {
+                       msg("records is NULL");
+                       return;
+               }
+
                msg("Global Attribute Report Event Received from = 0x%04X record_len=%d",
                        addr16, rec_len);
                for (j = 0; j < rec_len; j++) {
-                       zb_get_id_from_attr_report(t[j], &id);
+                       zb_attr_report_get_id(
+                               records[j],
+                               &id
+                               );
                        msg("  id   = [0x%04X]", id);
-                       zb_get_type_from_attr_report(t[j], &type);
-                       msg("  type = [0x%02X]", type);
-                       zb_create_value(&value);
-                       zb_get_value_from_attr_report(t[j], value);
-                       ret = zb_get_value(value, &type, &buf, &count);
+                       zb_attr_report_get_type(
+                               records[j],
+                               &type
+                               );
+                       msg("  type = [0x%02X][%s]", type, zb_zcl_get_data_type_str(type));
+                       zb_attr_report_get_value(
+                               records[j],
+                               &type,
+                               &buf,
+                               &count
+                               );
                        if (ZIGBEE_ERROR_NONE == ret) {
                                for (i = 0; i < count; i++)
                                        msg("    0x%02X ", buf[i]);
@@ -384,69 +446,117 @@ static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_
                                free(buf);
                                buf = NULL;
                        }
-                       zb_destroy_value(value);
                }
                break;
        }
        case ZB_ZCL_ALARM_EVENT:
        {
-               msg("Alarm Event Received\n");
+               unsigned short count = 0;
+               zb_ev_get_alarm_count(ev, &count);
+               msg("Alarm Event Received = %d\n", count);
                break;
        }
        case ZB_ZCL_IAS_ZONE_ENROLL_REQUEST_EVENT:
        {
-               /*nwk_addr addr16;*/
+               /*zb_nwk_addr addr16;*/
                unsigned short zone_type;
                unsigned char ep, mfg_code;
                msg("IAS Zone Request Received\n");
 
-               ep = ev.data.ias_enroll_request->src_ep;
-               zone_type = ev.data.ias_enroll_request->zone_type;
-               mfg_code = ev.data.ias_enroll_request->mfg_code;
+               zb_ev_get_enroll_request_src_ep(
+                       ev,
+                       &ep
+                       );
+               zb_ev_get_enroll_request_zone_type(
+                       ev,
+                       &zone_type
+                       );
+               zb_ev_get_enroll_request_mfg_code(
+                       ev,
+                       &mfg_code
+                       );
 
                /*msg("Network Address from 0x%04X\n", addr16);*/
                msg("  End-Point from 0x%02X", ep);
                msg("  Zone Type = 0x%04X", zone_type);
                msg("  Manufacturer Code = 0x%02X", mfg_code);
-               zb_zcl_zone_enroll_response(handle, addr16, ep, ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS,
-                       0x0001);
+               zb_zcl_zone_enroll_response(
+                       handle,
+                       addr16,
+                       ep,
+                       ZB_ZCL_IAS_ZONE_ENROLL_SUCCESS,
+                       0x0001
+                       );
                break;
        }
        case ZB_ZCL_IAS_ZONE_STATUS_CHANGE_NOTIFICATION_EVENT:
        {
                unsigned short zone_status;
 
-               zone_status = ev.data.ias_noti->zone_status;
-               ep = ev.data.ias_noti->src_ep;
+               zb_ev_get_ias_noti_src_ep(
+                       ev,
+                       &ep
+                       );
+               zb_ev_get_ias_noti_zone_status(
+                       ev,
+                       &zone_status
+                       );
+
                msg("  addr16      = 0x%04X", addr16);
                msg("  endpoint    = 0x%02X", ep);
                msg("  zone_status = 0x%04X", zone_status);
+
                break;
        }
        case ZB_ZCL_IAS_ZONE_STATUS_CHANGE_EXTENDED_NOTIFICATION_EVENT:
        {
-               unsigned short zone_status, zone_id, delay;
-               unsigned char extended_status;
-
-               ep = ev.data.ias_extended_noti->src_ep;
-               zone_status = ev.data.ias_extended_noti->zone_status;
-               extended_status = ev.data.ias_extended_noti->extended_status;
-               zone_id = ev.data.ias_extended_noti->zone_id;
-               delay = ev.data.ias_extended_noti->delay;
+               unsigned char status, zone_id;
+               unsigned short zone_status, delay;
+
+               zb_ev_get_ias_ext_noti_src_ep(
+                       ev,
+                       &ep
+                       );
+               zb_ev_get_ias_ext_noti_status(
+                       ev,
+                       &status
+                       );
+               zb_ev_get_ias_ext_noti_zone_status(
+                       ev,
+                       &zone_status
+                       );
+               zb_ev_get_ias_ext_noti_zone_id(
+                       ev,
+                       &zone_id
+                       );
+               zb_ev_get_ias_ext_noti_delay(
+                       ev,
+                       &delay
+                       );
 
                msg("  addr16          = 0x%04X", addr16);
                msg("  endpoint        = 0x%02X", ep);
+               msg("  status          = 0x%02X", status);
                msg("  zone_status     = 0x%04X", zone_status);
-               msg("  extended_status = 0x%02X", extended_status);
                msg("  zone_id         = 0x%04X", zone_id);
                msg("  delay           = 0x%04X", delay);
 
                /* Closed or not alarmed */
                if (0x01 == (zone_status & 0x01))
-                       zb_zcl_onoff_control(handle, dest_addr16, 1, ZB_ZCL_OFF);
+                       zb_zcl_on_off_control(
+                               handle,
+                               dest_addr16,
+                               1,
+                               ZB_ZCL_OFF
+                               );
                /* Opened or alarmed */
                else if (0x00 == (zone_status & 0x01))
-                       zb_zcl_onoff_control(handle, dest_addr16, 1, ZB_ZCL_ON);
+                       zb_zcl_on_off_control(
+                               handle,
+                               dest_addr16,
+                               1,
+                               ZB_ZCL_ON
+                               );
                break;
        }
        case ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_ATTRIBUTE_REPORT_EVENT:
@@ -484,9 +594,12 @@ static int run_create(MManager *mm, struct menu_data *menu)
                return RET_FAILURE;
        }
 
-       ret = zb_create(&handle);
+       ret = zb_create(
+               &handle
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_create(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -500,7 +613,9 @@ static int run_destroy(MManager *mm, struct menu_data *menu)
                return RET_FAILURE;
        }
 
-       zb_destroy(handle);
+       zb_destroy(
+               handle
+               );
        handle = NULL;
 
        return RET_SUCCESS;
@@ -511,22 +626,31 @@ static int run_enable(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        /* Set event callback */
-       ret = zb_set_event_cb(handle, zigbee_event_cb);
+       ret = zb_set_event_cb(
+               handle,
+               _zb_event_cb
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_set_event_cb(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_set_event_cb(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_set_event_cb() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_set_event_cb() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        /* Enable */
-       ret = zb_enable(handle);
+       ret = zb_enable(
+                       handle
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_enable(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_enable(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_enable() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_enable() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -536,13 +660,17 @@ static int run_disable(MManager *mm, struct menu_data *menu)
        /* De-register event callback */
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_disable(handle);
+       ret = zb_disable(
+                       handle
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_disable(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_disable(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_disable() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_disable() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -551,13 +679,17 @@ static int run_hw_reset(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_hw_reset(handle);
+       ret = zb_hw_reset(
+                       handle
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_hw_reset(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_hw_reset(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_hw_reset() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_hw_reset() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -567,13 +699,18 @@ static int run_coex_start(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
        unsigned char channel = 11;
 
-       ret = zb_coex_start(handle, channel);
+       ret = zb_coex_start(
+                       handle,
+                       channel
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_coex_start(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_coex_start(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_coex_start() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_coex_start() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -582,13 +719,17 @@ static int run_coex_stop(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_coex_stop(handle);
+       ret = zb_coex_stop(
+                       handle
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_coex_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_coex_stop(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_coex_stop() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_coex_stop() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -596,18 +737,27 @@ static int run_coex_stop(MManager *mm, struct menu_data *menu)
 static int run_get_network_info(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
-       nwk_addr nodeid;
-       nwk_addr panid;
+       zb_nwk_addr nodeid;
+       zb_nwk_addr panid;
        unsigned char channel;
        unsigned char tx_power;
 
-       ret = zb_get_network_info(handle, co_addr64, &nodeid, &panid, &channel, &tx_power);
+       ret = zb_get_network_info(
+                       handle,
+                       co_addr64,
+                       &nodeid,
+                       &panid,
+                       &channel,
+                       &tx_power
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_get_network_info(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_get_network_info(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_network_info() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_get_network_info() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("  IEEE ADDR : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
                        co_addr64[0], co_addr64[1], co_addr64[2],
                        co_addr64[3], co_addr64[4], co_addr64[5],
@@ -625,11 +775,13 @@ static int run_get_controller_mac_address(MManager *mm, struct menu_data *menu)
 
        ret = zb_get_controller_mac_address(handle, co_addr64);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_controller_mac_address() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_get_controller_mac_address() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("  IEEE ADDR : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
                co_addr64[0], co_addr64[1], co_addr64[2], co_addr64[3],
                co_addr64[4], co_addr64[5], co_addr64[6], co_addr64[7]);
@@ -637,22 +789,32 @@ static int run_get_controller_mac_address(MManager *mm, struct menu_data *menu)
        return RET_SUCCESS;
 }
 
-static int run_get_end_device_list(MManager *mm, struct menu_data *menu)
+static int run_get_end_dev_info_list(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
        int i, j;
        int count;
-       nwk_addr addr16;
-       ieee_addr addr64;
+       zb_nwk_addr addr16;
+       zb_ieee_addr addr64;
        unsigned char num_of_ep;
-       unsigned char ep_list[10];
-       zb_end_device_info_h *list = NULL;
+       unsigned char *ep_list = NULL;
+       zb_end_dev_info_h *list = NULL;
 
        msg("");
-       ret = zb_get_all_device_list(handle, &count, &list);
+       ret = zb_end_dev_info_get_list(
+               handle,
+               &count,
+               &list
+               );
        for (i = 0; i < count && list; i++) {
-               zb_get_network_address(list[i], &addr16);
-               zb_get_ieee_address((list)[i], addr64);
+               zb_end_dev_info_get_network_address(
+                       list[i],
+                       &addr16
+                       );
+               zb_end_dev_info_get_ieee_address(
+                       (list)[i],
+                       addr64
+                       );
 
                msgb("[# %02d]", (i+1));
                if (!strncmp((char *)sj_addr64, (char *)addr64, sizeof(addr64))) {
@@ -668,19 +830,33 @@ static int run_get_end_device_list(MManager *mm, struct menu_data *menu)
                        addr64[0], addr64[1], addr64[2], addr64[3],
                        addr64[4], addr64[5], addr64[6], addr64[7]);
 
-               zb_get_num_of_ep((list)[i], &num_of_ep);
+               zb_end_dev_info_get_num_of_ep(
+                       (list)[i],
+                       &num_of_ep
+                       );
                msg("   number of end-points = 0x%04X", num_of_ep);
 
-               memset(ep_list, 0, sizeof(ep_list));
-               zb_get_ep_list((list)[i], ep_list);
+               zb_end_dev_info_get_ep_list(
+                       (list)[i],
+                       &ep_list
+                       );
                msgn("     ");
+
+               if (NULL == ep_list)
+                       continue;
+
                for (j = 0; j < num_of_ep; j++)
                        msgn("%04x ", ep_list[j]);
                msg("\n");
+
+               free(ep_list);
        }
-       zb_device_list_free(list);
+       zb_end_dev_info_list_free(
+               list
+               );
 
-       msg(" - zb_get_all_device_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_end_dev_info_get_list() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -690,21 +866,31 @@ static int run_get_endpoint_list(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
        int i = 0;
        unsigned char count = 0;
-       unsigned char ep_list[10];
+       zb_end_point *ep_list = NULL;
 
-       ret = zb_get_endpoint_list(handle, dest_addr64, &count, ep_list);
+       ret = zb_end_dev_get_endpoint_list(
+                       handle,
+                       dest_addr64,
+                       &count,
+                       &ep_list);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_get_endpoint_list(%d) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_end_dev_get_endpoint_list(%d) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_endpoint_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_end_dev_get_endpoint_list() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msgb("Endpoints count [%d] : ", count);
        for (i = 0; i < count; i++)
                msgn("  %04d", ep_list[i]);
-
        msg("\n");
 
+       if (ep_list) {
+               free(ep_list);
+               ep_list = NULL;
+       }
+
        return RET_SUCCESS;
 }
 
@@ -715,31 +901,49 @@ static int run_get_cluster_list(MManager *mm, struct menu_data *menu)
        unsigned char ep = 1;
        unsigned char in_count = 0;
        unsigned char out_count = 0;
-       unsigned short in_cluster_list[MAX_ENDPOINT_CLUSTERS] = { 0 };
-       unsigned short out_cluster_list[MAX_ENDPOINT_CLUSTERS] = { 0 };
+       zb_cluster_id *in_cluster_list = NULL;
+       zb_cluster_id *out_cluster_list = NULL;
 
        if (strlen(data_endpoint) > 0)
                ep = (unsigned char)strtol(data_endpoint, NULL, 10);
 
-       ret = zb_get_cluster_list(handle, dest_addr64, ep,
-                               &in_count, in_cluster_list,
-                               &out_count, out_cluster_list);
+       ret = zb_end_dev_info_get_cluster_list(
+                       handle,
+                       dest_addr64,
+                       ep,
+                       &in_count,
+                       &in_cluster_list,
+                       &out_count,
+                       &out_cluster_list);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_get_cluster_list(%d) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_end_dev_info_get_cluster_list (%d) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_cluster_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_end_dev_info_get_cluster_list() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msgb("In Clusters count [%d] : ", in_count);
        for (i = 0; i < in_count; i++)
-               msgn(" %04X (%s)\n", in_cluster_list[i], zb_get_cluster_name(in_cluster_list[i]));
+               msgn(" %04X (%s)\n", in_cluster_list[i], zb_zcl_get_cluster_id_str(in_cluster_list[i]));
        msg("\n");
 
+       if (in_cluster_list) {
+               free(in_cluster_list);
+               in_cluster_list = NULL;
+       }
+
        msgb("Out Clusters count [%d] : ", out_count);
        for (i = 0; i < out_count; i++)
-               msgn(" %04X (%s)\n", out_cluster_list[i], zb_get_cluster_name(out_cluster_list[i]));
+               msgn(" %04X (%s)\n",
+                       out_cluster_list[i], zb_zcl_get_cluster_id_str(out_cluster_list[i]));
        msg("\n");
 
+       if (out_cluster_list) {
+               free(out_cluster_list);
+               out_cluster_list = NULL;
+       }
+
        return RET_SUCCESS;
 }
 
@@ -747,20 +951,33 @@ static int run_choose_end_device_list(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
        int i, j;
-       nwk_addr addr16;
-       ieee_addr addr64;
+       zb_nwk_addr addr16;
+       zb_ieee_addr addr64;
        unsigned char num_of_ep;
-       unsigned char ep_list[10];
+       zb_end_point *ep_list = NULL;
 
        if (NULL != target_list)
-               zb_device_list_free(target_list);
+               zb_end_dev_info_list_free(target_list);
+
+       ret = zb_end_dev_info_get_list(
+                       handle,
+                       &target_list_count,
+                       &target_list
+                       );
 
-       ret = zb_get_all_device_list(handle, &target_list_count, &target_list);
-       msg(" - zb_get_all_device_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_end_dev_info_get_list() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
+
        for (i = 0; i < target_list_count && target_list; i++) {
-               zb_get_network_address(target_list[i], &addr16);
-               zb_get_ieee_address((target_list)[i], addr64);
+               zb_end_dev_info_get_network_address(
+                       target_list[i],
+                       &addr16
+                       );
+               zb_end_dev_info_get_ieee_address(
+                       (target_list)[i],
+                       addr64
+                       );
 
                msgb("[# %02d] End device", (i+1));
                if (!strncmp((char *)sj_addr64, (char *)addr64, sizeof(addr64))) {
@@ -776,15 +993,26 @@ static int run_choose_end_device_list(MManager *mm, struct menu_data *menu)
                        addr64[0], addr64[1], addr64[2], addr64[3],
                        addr64[4], addr64[5], addr64[6], addr64[7]);
 
-               zb_get_num_of_ep((target_list)[i], &num_of_ep);
+               zb_end_dev_info_get_num_of_ep(
+                       (target_list)[i],
+                       &num_of_ep
+                       );
                msg("   number of end-points = 0x%04X", num_of_ep);
 
-               memset(ep_list, 0, sizeof(ep_list));
-               zb_get_ep_list((target_list)[i], ep_list);
+               zb_end_dev_info_get_ep_list(
+                       (target_list)[i],
+                       &ep_list
+                       );
                msgn("      ");
+
+               if (NULL == ep_list)
+                       continue;
+
                for (j = 0; j < num_of_ep; j++)
                        msgn("%04x ", ep_list[j]);
                msg("\n");
+
+               free(ep_list);
        }
 
        return ret;
@@ -794,7 +1022,7 @@ static int run_select_device(MManager *mm, struct menu_data *menu)
 {
        int i;
        int selected = (int)strtol(data_choose_target, NULL, 10);
-       nwk_addr addr16;
+       zb_nwk_addr addr16;
 
        /* Apply manual address first */
        if (strlen(data_dest_addr16) > 0) {
@@ -816,8 +1044,14 @@ static int run_select_device(MManager *mm, struct menu_data *menu)
 
        for (i = 0; i < target_list_count && target_list; i++) {
                if (selected == (i+1)) {
-                       zb_get_network_address(target_list[i], &addr16);
-                       zb_get_ieee_address((target_list)[i], dest_addr64);
+                       zb_end_dev_info_get_network_address(
+                               target_list[i],
+                               &addr16
+                               );
+                       zb_end_dev_info_get_ieee_address(
+                               (target_list)[i],
+                               dest_addr64
+                               );
                        dest_addr16 = addr16;
                        msg("  network addr [0x%04X] selected.", dest_addr16);
                        msg("  ieee address = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
@@ -836,13 +1070,19 @@ static int run_form_network(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_form_network(handle, zigbee_form_network_done_cb, NULL);
+       ret = zb_form_network(
+                       handle,
+                       _zb_form_network_done_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_form_network(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_form_network(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_form_network() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_form_network() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -851,13 +1091,19 @@ static int run_disable_network(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_disable_network(handle, zigbee_disable_network_done_cb, NULL);
+       ret = zb_disable_network(
+                       handle,
+                       _zb_disable_network_done_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_disable_network(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_disable_network(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_disable_network() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_disable_network() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -878,13 +1124,20 @@ static int run_leave_device(MManager *mm, struct menu_data *menu)
                rejoin = (var == 0) ? false : true;
        }
 
-       ret = zb_leave_device(handle, dest_addr64, remove_children, rejoin);
+       ret = zb_leave_device(
+                       handle,
+                       dest_addr64,
+                       remove_children,
+                       rejoin
+                       );
        if (ret != ZIGBEE_ERROR_NONE) {
-               msg("zb_leave_device(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_leave_device(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_leave_device() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_leave_device() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -897,13 +1150,18 @@ static int run_permit_join(MManager *mm, struct menu_data *menu)
        if (strlen(data_pj_timeout))
                timeout = (unsigned char)strtol(data_pj_timeout, NULL, 10);
 
-       ret = zb_permit_join(handle, timeout);
+       ret = zb_permit_join(
+                       handle,
+                       timeout
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_permit_join(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_permit_join(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_permit_join() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_permit_join() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -929,9 +1187,9 @@ static struct menu_data menu_device[] = {
        { "5", "zb_hw_reset", NULL, run_hw_reset, NULL },
        { "6", "zb_coex_start", NULL, run_coex_start, NULL },
        { "7", "zb_coex_stop", NULL, run_coex_stop, NULL },
-       { "8", "zb_get_all_device_list", NULL, run_get_end_device_list, NULL },
+       { "8", "zb_end_dev_info_get_list", NULL, run_get_end_dev_info_list, NULL },
        { "9", "zb_get_endpoint_list", NULL, run_get_endpoint_list, NULL },
-       { "10", "zb_get_cluster_list", _menu_get_cluster_list, NULL, NULL },
+       { "10", "zb_end_dev_info_get_cluster_list ", _menu_get_cluster_list, NULL, NULL },
        { NULL, NULL, },
 };
 
@@ -990,42 +1248,57 @@ static int __select_handle_register_event(MManager *mm, struct menu_data *menu)
        }
        _init_endpoints();
 
-       ret = zb_create(&handle);
+       ret = zb_create(
+                       &handle
+                       );
 
        msg("");
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_create(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        } else {
                msg("zb_create(0x%X) - SUCCESS!!!. handle [%p]", ret, handle);
        }
 
        /* Set event callback */
-       ret = zb_set_event_cb(handle, zigbee_event_cb);
+       ret = zb_set_event_cb(
+               handle,
+               _zb_event_cb
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_set_event_cb(0x%X) - FAILED!!!", ret);
                return RET_FAILURE;
        }
 
-       msg(" - zb_set_event_cb() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_set_event_cb() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        /* Enable */
-       ret = zb_enable(handle);
+       ret = zb_enable(
+               handle
+               );
        if (ZIGBEE_ERROR_PERMISSION_DENIED == ret) {
                /* Admin permission is not set, but we can do normal operations */
                msg("zb_enable(0x%X) - FAILED!!!", ret);
        } else if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_enable(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_enable(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_enable() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_enable() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
 
        /* Set coordinator address */
-       ret = zb_get_controller_mac_address(handle, co_addr64);
+       ret = zb_get_controller_mac_address(
+                       handle,
+                       co_addr64
+                       );
        if (ZIGBEE_ERROR_NONE != ret)
-               msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
        else
                msg("   Coordinator Address:");
                msg("     %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
@@ -1081,11 +1354,17 @@ int main(int arg, char **argv)
        g_main_loop_run(mainloop);
 
 OUT:
-       g_main_loop_unref(mainloop);
-
        if (NULL != target_list)
-               zb_device_list_free(target_list);
+               zb_end_dev_info_list_free(
+                       target_list
+                       );
 
+       if (handle)
+               zb_disable(
+                       handle
+                       );
+
+       g_main_loop_unref(mainloop);
        msg("******* Bye bye *******");
 
        return 0;
index c79651e..beb38fc 100644 (file)
 extern "C" {
 #endif
 
+#include <zigbee.h>
+#include <zigbee_internal.h>
+#include <zigbee_private.h>
+#include <zigbee-zdo_internal.h>
+#include "zigbee-zdo_private.h"
+#include <zigbee-zcl_internal.h>
+#include <zigbee-zcl_private.h>
+
+#include "zb-utils.h"
+
 #define CASE_TO_STR(x) case x: return #x;
 
 typedef struct simple_desc {
-       unsigned char ep; /**< Endpoint ID */
-       unsigned short profile_id; /**< Profile ID */
-       unsigned short device_id; /**< Device ID */
+       zb_end_point ep; /**< Endpoint ID */
+       zb_profile_id profileid; /**< Profile ID */
+       zb_nwk_addr deviceid; /**< Device ID */
        unsigned char device_ver; /**< Device Version */
        unsigned char num_of_in_clusters; /**< Number of In-Cluster */
        unsigned char num_of_out_clusters; /**< Number of Out-Cluster */
-       unsigned short in_clusters[32]; /**< In-Cluster list */
-       unsigned short out_clusters[32]; /**< Out-Cluster list */
+       zb_cluster_id in_clusters[32]; /**< In-Cluster list */
+       zb_cluster_id out_clusters[32]; /**< Out-Cluster list */
 } simple_desc_s;
 
 const char* zigbee_error_to_string(zb_error_e err);
similarity index 64%
rename from test/zcl_cluster_alarm.c
rename to test/zcl-alarm.c
index 17f8c48..fed75a3 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
-
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 static char data_alarm_code[MENU_DATA_SIZE + 1] = "1";
 
-static void zigbee_zcl_alarm_get_alarm_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned char alarm_code, unsigned short cluster_id,
-       unsigned int time_stamp, void *user_data)
+static void _zb_zcl_alarm_get_alarm_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned char alarm_code,
+       zb_cluster_id clusterid,
+       unsigned int time_stamp,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_alarm_get_alarm_rsp()");
+       msgp("_zb_zcl_alarm_get_alarm_cb()");
 
        msg("  Network Address = 0x%04X status = 0x%02X", addr16, status);
        msg("  End-Point  = 0x%02X", ep);
        msg("  alarm_code = 0x%02X", alarm_code);
-       msg("  cluster_id = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
+       msg("  cluster_id = 0x%04X (%s)", clusterid, zb_zcl_get_cluster_id_str(clusterid));
        msg("  time_stamp = 0x%08X", time_stamp);
 }
 
@@ -56,14 +57,21 @@ static int run_alarm_reset_alarm(MManager *mm, struct menu_data *menu)
        if (strlen(data_alarm_code))
                alarm_code = (unsigned char)strtol(data_alarm_code, NULL, 10);
 
-       ret = zb_zcl_alarm_reset_alarm(handle, dest_addr16, 1, alarm_code,
-                       ZB_ZCL_ON_OFF_CLUSTER_ID);
+       ret = zb_zcl_alarm_reset_alarm(
+                       handle,
+                       dest_addr16,
+                       1,
+                       alarm_code,
+                       ZB_ZCL_CLUSTER_ON_OFF
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_reset_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_alarm_reset_alarm(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_alarm_reset_alarm() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_alarm_reset_alarm() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -73,13 +81,19 @@ static int run_alarm_reset_all_alarm(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_alarm_reset_all_alarm(handle, dest_addr16, 1);
+       ret = zb_zcl_alarm_reset_all_alarm(
+                       handle,
+                       dest_addr16,
+                       1
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_reset_all_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_alarm_reset_all_alarm(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_alarm_reset_all_alarm() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_alarm_reset_all_alarm() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -89,14 +103,20 @@ static int run_alarm_get_alarm(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_alarm_get_alarm(handle, dest_addr16, 1,
-                       zigbee_zcl_alarm_get_alarm_rsp, NULL);
+       ret = zb_zcl_alarm_get_alarm(
+                       handle, dest_addr16,
+                       1,
+                       _zb_zcl_alarm_get_alarm_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_get_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_alarm_get_alarm(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_alarm_get_alarm() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_alarm_get_alarm() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -106,13 +126,19 @@ static int run_alarm_reset_all_alarm_log(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_alarm_reset_all_alarm_log(handle, dest_addr16, 1);
+       ret = zb_zcl_alarm_reset_all_alarm_log(
+                       handle,
+                       dest_addr16,
+                       1
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_reset_all_alarm_log(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_alarm_reset_all_alarm_log(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_alarm_reset_all_alarm_log() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_alarm_reset_all_alarm_log() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 86%
rename from test/zcl_cluster_basic.c
rename to test/zcl-basic.c
index 597da17..f03bdf8 100644 (file)
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  dest_addr16;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s st_ep1;
 
 static int run_reset_factory_default(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_basic_reset_factory_default(handle, dest_addr16, st_ep1.ep);
+       ret = zb_zcl_basic_reset_factory_default(
+               handle,
+               dest_addr16,
+               st_ep1.ep
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_basic_reset_factory_default(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_basic_reset_factory_default(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_basic_reset_factory_default() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_basic_reset_factory_default() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 78%
rename from test/zcl_cluster_colorctrl.c
rename to test/zcl-color-ctrl.c
index 9e1e9b0..172874a 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  dest_addr16;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s huebulb_ep1;
 
 static char data_hue[MENU_DATA_SIZE + 1] = "32";
@@ -64,14 +62,22 @@ static int run_move_to_hue(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_to_hue(handle, dest_addr16, huebulb_ep1.ep,
-                       move_hue, direction, trans_time16);
+       ret = zb_zcl_ccontrol_move_to_hue(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       move_hue,
+                       direction,
+                       trans_time16
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_to_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_to_hue(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_to_hue() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_to_hue() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -88,14 +94,21 @@ static int run_move_hue(MManager *mm, struct menu_data *menu)
        if (strlen(data_rate))
                color_rate = (unsigned char)strtol(data_rate, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_hue(handle, dest_addr16, huebulb_ep1.ep,
-                       move_mode, color_rate);
+       ret = zb_zcl_ccontrol_move_hue(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       move_mode,
+                       color_rate
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_hue(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_hue() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_hue() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -115,14 +128,22 @@ static int run_step_hue(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time8))
                trans_time8 = (unsigned char)strtol(data_trans_time8, NULL, 10);
 
-       ret = zb_zcl_ccontrol_step_hue(handle, dest_addr16, huebulb_ep1.ep,
-                       step_mode, step_size, trans_time8);
+       ret = zb_zcl_ccontrol_step_hue(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       step_mode,
+                       step_size,
+                       trans_time8
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_step_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_step_hue(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_step_hue() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_step_hue() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -139,14 +160,21 @@ static int run_move_to_saturation(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_to_saturation(handle, dest_addr16, huebulb_ep1.ep,
-                       saturation, trans_time16);
+       ret = zb_zcl_ccontrol_move_to_saturation(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       saturation,
+                       trans_time16
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_to_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_to_saturation(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_to_saturation() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_to_saturation() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -163,14 +191,21 @@ static int run_move_saturation(MManager *mm, struct menu_data *menu)
        if (strlen(data_rate))
                color_rate = (unsigned char)strtol(data_rate, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_saturation(handle, dest_addr16, huebulb_ep1.ep,
-                       move_mode, color_rate);
+       ret = zb_zcl_ccontrol_move_saturation(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       move_mode,
+                       color_rate
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_saturation(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_saturation() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_saturation() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -190,14 +225,22 @@ static int run_step_saturation(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time8))
                trans_time8 = (unsigned char)strtol(data_trans_time8, NULL, 10);
 
-       ret = zb_zcl_ccontrol_step_saturation(handle, dest_addr16, huebulb_ep1.ep,
-                       step_mode, step_size, trans_time8);
+       ret = zb_zcl_ccontrol_step_saturation(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       step_mode,
+                       step_size,
+                       trans_time8
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_step_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_step_saturation(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_step_saturation() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_step_saturation() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -217,14 +260,22 @@ static int run_move_to_hue_and_saturation(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_to_hue_and_saturation(handle, dest_addr16,
-                       huebulb_ep1.ep, move_hue, saturation, trans_time16);
+       ret = zb_zcl_ccontrol_move_to_hue_and_saturation(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       move_hue,
+                       saturation,
+                       trans_time16
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_to_hue_and_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_to_hue_and_saturation(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_to_hue_and_saturation() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_to_hue_and_saturation() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -244,14 +295,22 @@ static int run_move_to_color(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_to_color(handle, dest_addr16, huebulb_ep1.ep,
-                       color_x, color_y, trans_time16);
+       ret = zb_zcl_ccontrol_move_to_color(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       color_x,
+                       color_y,
+                       trans_time16
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_to_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_to_color(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_to_color() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_to_color() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -268,14 +327,21 @@ static int run_move_color(MManager *mm, struct menu_data *menu)
        if (strlen(data_rate_y))
                rate_y = (unsigned short)strtol(data_rate_y, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_color(handle, dest_addr16, huebulb_ep1.ep,
-                       rate_x, rate_y);
+       ret = zb_zcl_ccontrol_move_color(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       rate_x,
+                       rate_y
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_color(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_color() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_color() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -295,14 +361,22 @@ static int run_step_color(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_step_color(handle, dest_addr16, huebulb_ep1.ep,
-                       step_x, step_y, trans_time16);
+       ret = zb_zcl_ccontrol_step_color(
+                       handle,
+                       dest_addr16,
+                       huebulb_ep1.ep,
+                       step_x,
+                       step_y,
+                       trans_time16
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_step_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_step_color(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_step_color() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_step_color() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -319,14 +393,21 @@ static int run_move_to_color_temperature(MManager *mm, struct menu_data *menu)
        if (strlen(data_trans_time16))
                trans_time16 = (unsigned short)strtol(data_trans_time16, NULL, 10);
 
-       ret = zb_zcl_ccontrol_move_to_color_temperature(handle, dest_addr16,
-                       huebulb_ep1.ep, color_temp, trans_time16);
+       ret = zb_zcl_ccontrol_move_to_color_temperature(
+               handle,
+               dest_addr16,
+               huebulb_ep1.ep,
+               color_temp,
+               trans_time16
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_ccontrol_move_to_color_temperature(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_ccontrol_move_to_color_temperature(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_ccontrol_move_to_color_temperature() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_ccontrol_move_to_color_temperature() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
diff --git a/test/zcl-global-cmd.c b/test/zcl-global-cmd.c
new file mode 100644 (file)
index 0000000..70fa4d9
--- /dev/null
@@ -0,0 +1,1116 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <gio/gio.h>
+
+#include "main.h"
+#include "menu.h"
+
+extern struct menu_data menu_zcl_cluster_alarm[];
+extern struct menu_data menu_zcl_cluster_basic[];
+extern struct menu_data menu_zcl_cluster_colorctrl[];
+extern struct menu_data menu_zcl_cluster_group[];
+extern struct menu_data menu_zcl_cluster_identity[];
+extern struct menu_data menu_zcl_cluster_ias_zone[];
+extern struct menu_data menu_zcl_cluster_levelctrl[];
+extern struct menu_data menu_zcl_cluster_onoff[];
+extern struct menu_data menu_zcl_cluster_pollctrl[];
+extern struct menu_data menu_zcl_cluster_scene[];
+extern struct menu_data menu_zcl_cluster_thermostat[];
+
+extern zb_zigbee_h  handle;
+
+extern zb_nwk_addr  panid;
+extern zb_ieee_addr co_addr64;
+
+extern zb_ieee_addr st_addr64;
+extern zb_ieee_addr sj_addr64;
+
+extern zb_nwk_addr  dest_addr16;
+extern zb_ieee_addr dest_addr64;
+
+extern simple_desc_s st_ep1, st_ep2, st_ep3, st_ep4, sj_ep1, simul_ep1;
+
+static char r_data_cluster_id[MENU_DATA_SIZE + 1] = "6";
+static char r_data_attr_id[MENU_DATA_SIZE + 1] = "0";
+static char w_data_cluster_id[MENU_DATA_SIZE + 1] = "3";
+static char w_data_attr_id[MENU_DATA_SIZE + 1] = "0";
+static char w_data_attr_value[MENU_DATA_SIZE + 1] = "180";
+static char data_min_i[MENU_DATA_SIZE + 1] = "A";
+static char data_max_i[MENU_DATA_SIZE + 1] = "3C";
+static char data_timeout[MENU_DATA_SIZE + 1] = "10";
+
+static void _zb_zcl_global_attr_read_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       zb_zcl_read_attr_status_record_h* records,
+       int count,
+       void *user_data)
+{
+       int i;
+       int len_of_val;
+
+       zb_attribute_id id;
+       zb_zcl_data_type_e type;
+       zb_zcl_status_e status;
+       unsigned char *buf = NULL;
+
+       msg("");
+       msgp("_zb_zcl_global_attr_read_cb()");
+
+       if (NULL == records || 0 == count) {
+               msg("Invalid records info");
+               msg("records_info : [%p]", records);
+               return;
+       }
+
+       msg("  Cluster ID   : 0x%04X (%s)", clusterid,
+               zb_zcl_get_cluster_id_str(
+                       clusterid
+                       ));
+       msg("  Node ID      : 0x%04X", addr16);
+       msg("  End-Point    : 0x%02X", ep);
+       msg("  Rec. Count  :    %d", count);
+
+       for (i = 0; i < count; i++) {
+
+               if (records && *records) {
+                       zb_read_attr_status_record_get_id(
+                               records[i],
+                               &id
+                               );
+                       msg("  Attribute ID : 0x%04X", id);
+               }
+               if (records && *records) {
+                       zb_read_attr_status_record_get_type(
+                               records[i],
+                               &type
+                               );
+                       msg("  Type         : 0x%02X", type);
+               }
+               if (records && *records) {
+                       zb_read_attr_status_record_get_status(
+                               records[i],
+                               &status
+                               );
+                       msg("  Status       : 0x%02X (%s)",
+                               status, zb_zcl_get_status_str(status));
+               }
+               if (records && *records) {
+                       zb_read_attr_status_record_get_value(
+                               records[i],
+                               &type,
+                               &buf,
+                               &len_of_val);
+
+                       if (buf) {
+                               for (int j = 0; j < len_of_val; j++)
+                                       msg("  value[%d] = 0x%02x", j, buf[j]);
+                               free(buf);
+                               buf = NULL;
+                       }
+               }
+       }
+}
+
+static void _zb_zcl_global_attr_write_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       zb_zcl_write_attr_status_record_h* records,
+       int count,
+       void *user_data)
+{
+       int i;
+       zb_attribute_id id = 0;
+       zb_zcl_status_e status;
+
+       msg("");
+       msgp("_zb_zcl_global_attr_write_cb()");
+
+       if (NULL == records || 0 == count) {
+               msg("Invalid records info");
+               return;
+       }
+
+       for (i = 0; i < count; i++) {
+
+               msg("  Cluster ID  : 0x%04X (%s)", clusterid,
+                       zb_zcl_get_cluster_id_str(
+                               clusterid
+                               ));
+               msg("  Node ID     : 0x%04X", addr16);
+               msg("  End-Point   : 0x%02X", ep);
+               msg("  Rec. Count  :    %d", count);
+
+               if (records) {
+                       if (ZIGBEE_ERROR_NONE == zb_write_attr_status_get_id(
+                               records[i],
+                               &id
+                               ))
+                               msg("  AttributeId : 0x%04X", id);
+               }
+               if (records) {
+                       zb_write_attr_status_get_status(
+                               records[i],
+                               &status
+                               );
+                       msg("  status      : 0x%02X (%s)",
+                               status, zb_zcl_get_status_str(status));
+               }
+       }
+}
+
+static void _zb_zcl_global_config_report_write_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       zb_zcl_report_config_response_record_h* records,
+       int count,
+       void *user_data)
+{
+       int i;
+       zb_zcl_status_e status;
+
+       msg("");
+       msgp("_zb_zcl_global_config_report_write_cb()");
+
+       if (NULL == records || 0 == count) {
+               msg("Invalid records info");
+               return;
+       }
+
+       msg("  count=%d", count);
+       for (i = 0; i < count; i++) {
+               zb_report_config_response_record_get_status(records[i], &status);
+               msg("    [%d] status = 0x%02X (%s)",
+                       i, status, zb_zcl_get_status_str(status));
+       }
+}
+
+static void _zb_zcl_global_config_report_read_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       zb_zcl_reporting_config_record_h* records,
+       int count,
+       void *user_data)
+{
+       int ret;
+       int len_of_val;
+       int i = 0, j = 0;
+       unsigned char *buf = NULL;
+       unsigned short id, max_i, min_i;
+
+       zb_zcl_data_type_e type;
+
+       msg("");
+       msgp("_zb_zcl_global_config_report_read_cb()");
+
+       if (NULL == records || 0 == count) {
+               msg("Invalid records info");
+               return;
+       }
+
+       msg("  cluster_id 0x%04X (%s)", clusterid,
+               zb_zcl_get_cluster_id_str(
+                       clusterid
+               ));
+       msg("  nodeId     0x%04X", addr16);
+       msg("  endpoint   0x%02X", ep);
+       msg("  Rec. Count  :    %d", count);
+
+       while (i < count) {
+               msg("    records[%d]", i);
+               zb_report_config_record_get_id(
+                       records[i],
+                       &id
+                       );
+               msg("    AttributeId 0x%04X", id);
+               zb_report_config_record_get_type(
+                       records[i],
+                       &type
+                       );
+               /*if ((zb_zcl_get_analog_or_discret(type) == DATA_TYPE_ANALOG)) {*/
+                       msg("    type 0x%02X", type);
+                       zb_report_config_record_get_max_interval(
+                               records[i],
+                               &max_i
+                               );
+                       msg("    Max Interval 0x%04X", max_i);
+                       zb_report_config_record_get_min_interval(
+                               records[i],
+                               &min_i
+                               );
+                       msg("    Min Interval 0x%04X", min_i);
+
+                       ret = zb_report_config_record_get_change(
+                               records[i],
+                               &type,
+                               &buf,
+                               &len_of_val
+                               );
+
+                       if (ZIGBEE_ERROR_NONE == ret && buf) {
+                               msg("     type = [0x%2X][%s]", type, zb_zcl_get_data_type_str(type));
+                                       for (j = 0; j < len_of_val; j++)
+                                       msg("      change[%d] = 0x%02x", j, buf[j]);
+                       }
+
+                       if (buf) {
+                               free(buf);
+                               buf = NULL;
+                       }
+
+                       msg("");
+               /*
+               } else {
+                       msg("Unsuccessful Attempt\n");
+               }
+               */
+               i++;
+       }
+}
+
+static void _zb_zcl_global_attr_discover_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       unsigned char discovery_complete,
+       zb_zcl_discover_attr_info_record_h *records,
+       int count,
+       void *user_data)
+{
+       int i;
+       zb_zcl_data_type_e type;
+       zb_attribute_id id;
+
+       msg("");
+       msgp("_zb_zcl_global_attr_discover_cb()");
+
+       if (NULL == records || 0 == count) {
+               msg("Invalid records info");
+               return;
+       }
+
+       msg("  Network Address = 0x%04X", addr16);
+       msg("  End-Point       = 0x%02X", ep);
+       msg("  Cluster ID      = 0x%04X (%s)", clusterid,
+               zb_zcl_get_cluster_id_str(
+                       clusterid
+               ));
+       msg("  discovery_complete = %d", discovery_complete);
+
+       for (i = 0; i < count; i++) {
+               zb_discover_attr_info_get_type(
+                       records[i],
+                       &type
+                       );
+               msg("    [%d] type = 0x%02X", i, type);
+               zb_discover_attr_info_get_id(
+                       records[i],
+                       &id
+                       );
+               msg("    [%d] id   = 0x%04X", i, id);
+       }
+}
+
+static void _zb_zcl_global_discover_cmds_received_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       unsigned char discovery_complete,
+       zb_command_id *commandids,
+       int command_ids_len,
+       void *user_data)
+{
+       int i;
+
+       msg("");
+       msgp("_zb_zcl_global_discover_cmds_received_cb()");
+
+       msg("  Network Address = 0x%04X", addr16);
+       msg("  End-Point       = 0x%02X", ep);
+       msg("  Cluster ID      = 0x%04X (%s)", clusterid,
+               zb_zcl_get_cluster_id_str(
+                       clusterid
+               ));
+       msg("  discovery_complete = %d", discovery_complete);
+
+       for (i = 0; i < command_ids_len; i++)
+               msg("    commandid[%d]   = 0x%02X", i, commandids[i]);
+}
+
+static void _zb_zcl_global_discover_cmds_generated_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       unsigned char discovery_complete,
+       zb_command_id *commandids,
+       int command_ids_len,
+       void *user_data)
+{
+       int i;
+
+       msg("");
+       msgp("_zb_zcl_global_discover_cmds_generated_cb()");
+
+       msg("  Network Address = 0x%04X", addr16);
+       msg("  End-Point       = 0x%02X", ep);
+       msg("  Cluster ID      = 0x%04X (%s)",
+               clusterid, zb_zcl_get_cluster_id_str(clusterid));
+       msg("  discovery_complete = %d", discovery_complete);
+
+       for (i = 0; i < command_ids_len; i++)
+               msg("    commandid[%d]   = 0x%02X", i, commandids[i]);
+}
+
+static void _zb_zcl_global_attr_extended_discover_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_cluster_id clusterid,
+       unsigned char discovery_complete,
+       zb_zcl_extended_attr_info_h *records,
+       unsigned short count,
+       void *user_data)
+{
+       int i;
+       zb_zcl_data_type_e type;
+       zb_attribute_id id;
+       zb_zcl_acl_type_e acl;
+
+       msg("");
+       msgp("_zb_zcl_global_attr_extended_discover_cb()");
+
+       msg("  Network Address = 0x%04X", addr16);
+       msg("  End-Point       = 0x%02X", ep);
+       msg("  Cluster ID      = 0x%04X (%s)", clusterid, zb_zcl_get_cluster_id_str(
+               clusterid)
+               );
+       msg("  discovery_complete = %d", discovery_complete);
+
+       for (i = 0; i < count; i++) {
+               zb_extended_attr_info_get_id(
+                       records[i],
+                       &id
+                       );
+               msg("    [%d] id   = 0x%02X", i, id);
+               zb_extended_attr_info_get_type(
+                       records[i],
+                       &type
+                       );
+               msg("    [%d] type = 0x%04X", i, type);
+               zb_extended_attr_info_get_acl(
+                       records[i],
+                       &acl
+                       );
+               msg("    [%d] acl  = 0x%04X", i, acl);
+       }
+}
+
+static int run_global_attr_read(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+#if 0
+       /* For SmartThings open/close sensor */
+       unsigned short st_cluster_id = ZB_ZCL_CLUSTER_ID_IAS_ZONE;
+       unsigned short st_attribute_id[] = {
+               ZB_ZCL_ZONE_STATE,
+               ZB_ZCL_ZONE_TYPE,
+               ZB_ZCL_ZONE_STATUS,
+               ZB_ZCL_IAS_CIE_ADDRESS,
+               ZB_ZCL_ZONE_ID
+       };
+
+       int st_len_of_attr = sizeof(st_attribute_id) / sizeof(st_attribute_id[0]);
+       /* Reading zone state attribute */
+       ret = zb_zcl_global_attr_read(
+                       handle,
+                       dest_addr16,
+                       1,
+                       st_ep1.ep,
+                       -1,
+                       st_cluster_id,
+                       st_attribute_id,
+                       st_len_of_attr,
+                       _zb_zcl_global_attr_read_cb,
+                       NULL
+                       );
+#endif
+#if 0
+       /* Reading active power report in electrical measurement cluster */
+       sj_cluster_id = ZB_ZCL_CLUSTER_ID_ELECTRICAL_MEASUREMENT;
+       sj_attribute_id[0] = ZB_ZCL_ACTIVE_POWER;
+       sj_len_of_attr = 1;
+
+       ret = zb_zcl_global_attr_read(
+                       handle,
+                       dest_addr16,
+                       1,
+                       sj_ep1.ep,
+                       -1,
+                       sj_cluster_id,
+                       sj_attribute_id,
+                       sj_len_of_attr,
+                       _zb_zcl_global_attr_read_cb,
+                       NULL
+                       );
+#endif
+
+       zb_cluster_id clusterid = ZB_ZCL_CLUSTER_ON_OFF;
+       zb_attribute_id attributeid[] = {ZB_ZCL_ATTR_ON_OFF};
+       int len_of_attr = sizeof(attributeid) / sizeof(attributeid[0]);
+
+       if (strlen(r_data_cluster_id))
+               clusterid = (unsigned short)strtol(r_data_cluster_id, NULL, 16);
+       if (strlen(r_data_attr_id))
+               attributeid[0] = (unsigned short)strtol(r_data_attr_id, NULL, 16);
+
+       ret = zb_zcl_global_attr_read(
+               handle,
+               dest_addr16,
+               1,
+               1,
+               ZB_ZCL_FC_DEFAULT,
+               clusterid,
+               attributeid,
+               len_of_attr,
+               _zb_zcl_global_attr_read_cb,
+               NULL
+               );
+
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_read(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_read() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_attr_write(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       /* Samjin Power Outlet */
+       zb_zcl_write_attr_record_h attr;
+       int size = -1;
+
+       zb_cluster_id clusterid = ZB_ZCL_CLUSTER_IDENTIFY;
+       zb_attribute_id attributeid = ZB_ZCL_ATTR_IDENTIFY_TIME;
+       unsigned short value;
+
+       if (strlen(w_data_cluster_id))
+               clusterid = (unsigned short)strtol(w_data_cluster_id, NULL, 16);
+       if (strlen(w_data_attr_id))
+               attributeid = (unsigned short)strtol(w_data_attr_id, NULL, 16);
+       if (strlen(w_data_attr_value))
+               value = (unsigned short)strtol(w_data_attr_value, NULL, 16);
+
+       ret = zb_write_attr_record_create(
+               &attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_write_attr_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       /* zb_write_attr_record_set_id(attr, ZB_ZCL_ATTR_IDENTIFY_TIME); */
+       zb_write_attr_record_set_id(
+               attr,
+               attributeid
+               );
+       zb_write_attr_record_set_type(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       size = zb_zcl_get_data_size(
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       if (size < 0) {
+               zb_write_attr_record_destroy(attr);
+               msg("zb_zcl_get_data_size(%d) - FAILED!!!", size);
+               return RET_FAILURE;
+       }
+
+       zb_write_attr_record_set_value(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER,
+               (unsigned char *)&value,
+               size
+               );
+
+       ret = zb_zcl_global_attr_write(
+               handle, dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               clusterid,
+               &attr,
+               1,
+               _zb_zcl_global_attr_write_cb,
+               NULL
+               );
+       zb_write_attr_record_destroy(
+               attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_write(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_write() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_attr_undivided_write(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       unsigned char data[] = { 0x02, 0x01};
+       /* Samjin Power Outlet */
+       zb_zcl_write_attr_record_h attr;
+       int size = -1;
+
+       ret = zb_write_attr_record_create(
+               &attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_write_attr_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       zb_write_attr_record_set_id(
+               attr,
+               ZB_ZCL_ATTR_IDENTIFY_TIME
+               );
+       zb_write_attr_record_set_type(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       size = zb_zcl_get_data_size(
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       if (size < 0) {
+               zb_write_attr_record_destroy(
+                       attr
+                       );
+               msg("zb_zcl_get_data_size(%d) - FAILED!!!", size);
+               return RET_FAILURE;
+       }
+
+
+       zb_write_attr_record_set_value(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER,
+               data,
+               size
+               );
+       ret = zb_zcl_global_attr_write_undivided(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               ZB_ZCL_CLUSTER_IDENTIFY,
+               &attr,
+               1,
+               _zb_zcl_global_attr_write_cb,
+               NULL);
+       zb_write_attr_record_destroy(
+               attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_write_undivided(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_write_undivided() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_attr_no_rsp_write(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       unsigned char value[] = { 0x02, 0x01};
+       /* Samjin Power Outlet */
+       zb_zcl_write_attr_record_h attr;
+       int size = -1;
+
+       ret = zb_write_attr_record_create(
+               &attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_write_attr_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       zb_write_attr_record_set_id(
+               attr,
+               ZB_ZCL_ATTR_IDENTIFY_TIME
+               );
+       zb_write_attr_record_set_type(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       size = zb_zcl_get_data_size(
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER
+               );
+       if (size < 0) {
+               zb_write_attr_record_destroy(
+                       attr
+                       );
+               msg("zb_zcl_get_data_size(%d) - FAILED!!!", size);
+               return RET_FAILURE;
+       }
+
+       zb_write_attr_record_set_value(
+               attr,
+               ZB_ZCL_UNSIGNED_16_BIT_INTEGER,
+               value,
+               size
+               );
+       ret = zb_zcl_global_attr_write_no_rsp(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               ZB_ZCL_CLUSTER_IDENTIFY,
+               &attr,
+               1);
+       zb_write_attr_record_destroy(
+               attr
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_write_no_rsp(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_write_no_rsp() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_write_config_report(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       /* Samjin Power Outlet */
+       unsigned char value[] = {1, 0, 2, 0, 3, 0};
+       zb_zcl_reporting_config_record_h config;
+       zb_cluster_id clusterid = ZB_ZCL_CLUSTER_ON_OFF;
+       zb_attribute_id attributeid = ZB_ZCL_ATTR_ON_OFF;
+       unsigned short min_i = 0xA;
+       unsigned short max_i = 0x3C;
+       unsigned short timeout = 10;
+
+       if (strlen(r_data_cluster_id))
+               clusterid = (unsigned short)strtol(r_data_cluster_id, NULL, 16);
+       if (strlen(r_data_attr_id))
+               attributeid = (unsigned short)strtol(r_data_attr_id, NULL, 16);
+
+       if (strlen(data_min_i))
+               min_i = (unsigned short)strtol(data_min_i, NULL, 16);
+       if (strlen(data_max_i))
+               max_i = (unsigned short)strtol(data_max_i, NULL, 16);
+       if (strlen(data_timeout))
+               timeout = (unsigned short)strtol(data_timeout, NULL, 10);
+
+       ret = zb_report_config_record_create(
+               &config
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_report_config_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       zb_report_config_record_set_dir(
+               config,
+               ZB_ZCL_SERVER_TO_CLIENT
+               );
+       zb_report_config_record_set_id(
+               config,
+               attributeid
+               );
+       zb_report_config_record_set_min_interval(
+               config,
+               min_i
+               );
+       zb_report_config_record_set_max_interval(
+               config,
+               max_i
+               );
+       zb_report_config_record_set_change(
+               config,
+               ZB_ZCL_48_BIT_BITMAP,
+               value
+               );
+       zb_report_config_record_set_timeout(
+               config,
+               timeout
+               );
+
+       ret = zb_zcl_global_config_report_write(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               clusterid,
+               &config,
+               1,
+               _zb_zcl_global_config_report_write_cb,
+               NULL
+               );
+       zb_report_config_record_destroy(
+               config
+               );
+#if 0
+       /* ST Open/Close Sensor  */
+       zb_zcl_reporting_config_record_h config1;
+       unsigned short val2 = 0x007f;
+
+       ret = zb_report_config_record_create(
+               &config1
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_report_config_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       zb_report_config_record_set_dir(
+               config1,
+               ZB_ZCL_CLIENT_TO_SERVER
+               );
+       zb_report_config_record_set_id(
+               config1,
+               ZB_ZCL_ZONE_STATE
+               );
+       zb_report_config_record_set_type(
+               config1,
+               ZB_ZCL_SIGNED_16_BIT_INTEGER
+               );
+       zb_report_config_record_set_min_interval(
+               config1,
+               0
+               );
+       zb_report_config_record_set_max_interval(
+               config1,
+               60
+               );
+       zb_set_change_to_report_config_record(
+               config1,
+               ZB_ZCL_SIGNED_16_BIT_INTEGER,
+               &val2
+               );
+       zb_report_config_record_set_timeout(
+               config1,
+               60
+               );
+       ret = zb_zcl_global_config_report_write(
+                       handle,
+                       dest_addr16,
+                       1,
+                       st_ep1.ep,
+                       ZB_ZCL_FC_DEFAULT,
+                       ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT,
+                       &config1,
+                       1,
+                       _zb_zcl_global_config_report_write_cb,
+                       NULL
+                       );
+       zb_report_config_record_destroy(
+               config1
+               );
+#endif
+
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_config_report_write(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_config_report_write() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_read_config_report(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       zb_zcl_read_report_config_record_h read_report_conf;
+
+       ret = zb_read_report_config_record_create(&read_report_conf);
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_read_report_config_record_create(0x%X) - FAILED!!! [%s]",
+                               ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       zb_read_report_config_record_set_dir(read_report_conf, ZB_ZCL_CLIENT_TO_SERVER);
+       zb_read_report_config_record_set_id(read_report_conf, ZB_ZCL_ATTR_ON_OFF);
+
+       /* Samjin Power Outlet */
+       ret = zb_zcl_global_config_report_read(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               ZB_ZCL_CLUSTER_ON_OFF,
+               &read_report_conf, 1,
+               _zb_zcl_global_config_report_read_cb,
+               NULL
+               );
+       zb_read_report_config_record_destroy(read_report_conf);
+
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_config_report_read(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_config_report_read() ret: [0x%X] [%s]", ret,
+               zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+
+}
+
+static int run_global_attr_discover(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+#if 0
+       /* For ST Open/Close Sensor */
+       ret = zb_zcl_global_attr_discover(
+               handle,
+               dest_addr16,
+               1,
+               st_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               ZB_ZCL_CLUSTER_IDENTIFY,
+               ZB_ZCL_ATTR_IDENTIFY_TIME,
+               2,
+               _zb_zcl_global_attr_discover_cb,
+               NULL
+               );
+#endif
+       /* For SJ Power Outlet */
+       ret = zb_zcl_global_attr_discover(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_FC_DEFAULT,
+               ZB_ZCL_CLUSTER_ON_OFF,
+               ZB_ZCL_ATTR_ON_OFF,
+               5,
+               _zb_zcl_global_attr_discover_cb,
+               NULL
+               );
+
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_discover(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_discover() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_discover_cmds_received(MManager *mm,
+       struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       ret = zb_zcl_global_discover_cmds_received(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_DEFAULT_RESPONSE_DISABLED,
+               ZB_ZCL_CLUSTER_ON_OFF,
+               ZB_ZCL_ATTR_ON_OFF,
+               5,
+               _zb_zcl_global_discover_cmds_received_cb,
+               NULL
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_discover_cmds_received(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_discover_cmds_received() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_discover_cmds_generated(MManager *mm,
+       struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       ret = zb_zcl_global_discover_cmds_generated(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_DEFAULT_RESPONSE_DISABLED,
+               ZB_ZCL_CLUSTER_IDENTIFY,
+               0x00,
+               4,
+               _zb_zcl_global_discover_cmds_generated_cb,
+               NULL
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_discover_cmds_generated(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_discover_cmds_generated() ret: [0x%X] [%s]", ret,
+               zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+static int run_global_attr_extended_discover(MManager *mm, struct menu_data *menu)
+{
+       int ret = ZIGBEE_ERROR_NONE;
+       ret = zb_zcl_global_attr_extended_discover(
+               handle,
+               dest_addr16,
+               1,
+               sj_ep1.ep,
+               ZB_ZCL_DEFAULT_RESPONSE_DISABLED,
+               ZB_ZCL_CLUSTER_ON_OFF,
+               ZB_ZCL_ATTR_ON_OFF,
+               5,
+               _zb_zcl_global_attr_extended_discover_cb,
+               NULL
+               );
+       if (ZIGBEE_ERROR_NONE != ret) {
+               msg("zb_zcl_global_attr_extended_discover(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
+               return RET_FAILURE;
+       }
+
+       msg(" - zb_zcl_global_attr_extended_discover() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
+       msg("");
+
+       return RET_SUCCESS;
+}
+
+struct menu_data menu_zcl_global_read_attr[] = {
+       { "1", "Cluster ID (Hex)", NULL, NULL, r_data_cluster_id },
+       { "2", "Attribute ID (Hex)", NULL, NULL, r_data_attr_id },
+       { "3", "run", NULL, run_global_attr_read, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_zcl_global_write_attr[] = {
+       { "1", "Cluster ID (Hex)", NULL, NULL, w_data_cluster_id },
+       { "2", "Attribute ID (Hex)", NULL, NULL, w_data_attr_id },
+       { "3", "Attribute Value (Hex)", NULL, NULL, w_data_attr_value },
+       { "4", "run", NULL, run_global_attr_write, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_zcl_global_config_report[] = {
+       { "1", "Cluster ID (Hex)", NULL, NULL, r_data_cluster_id },
+       { "2", "Attribute ID (Hex)", NULL, NULL, r_data_attr_id },
+       { "3", "Min interval (Hex)", NULL, NULL, data_min_i },
+       { "4", "Max interval (Hex)", NULL, NULL, data_max_i },
+       { "5", "Timeout", NULL, NULL, data_timeout },
+       { "6", "run", NULL, run_global_write_config_report, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_zcl_global[] = {
+       { "1", "zb_zcl_global_attr_read",
+                       menu_zcl_global_read_attr, NULL, NULL },
+       { "2", "zb_zcl_global_attr_write",
+                       menu_zcl_global_write_attr, NULL, NULL },
+       { "3", "zb_zcl_global_attr_write_undivided",
+                       NULL, run_global_attr_undivided_write, NULL },
+       { "4", "zb_zcl_global_attr_write_no_rsp",
+                       NULL, run_global_attr_no_rsp_write, NULL },
+       { "5", "zb_zcl_global_config_report_write",
+                       menu_zcl_global_config_report, NULL, NULL },
+       { "6", "zb_zcl_global_config_report_read",
+                       NULL, run_global_read_config_report, NULL },
+       { "7", "zb_zcl_global_attr_discover",
+                       NULL, run_global_attr_discover, NULL },
+       { "8", "zb_zcl_global_discover_cmds_received",
+                       NULL, run_global_discover_cmds_received, NULL },
+       { "9", "zb_zcl_global_discover_cmds_generated",
+                       NULL, run_global_discover_cmds_generated, NULL },
+       { "10", "zb_zcl_global_attr_extended_discover",
+                       NULL, run_global_attr_extended_discover, NULL },
+       { NULL, NULL, },
+};
+
+struct menu_data menu_zcl_cluster[] = {
+       { "1", "Alarm Cluster", menu_zcl_cluster_alarm, NULL, NULL },
+       { "2", "Basic Cluster", menu_zcl_cluster_basic, NULL, NULL },
+       { "3", "Color Control Cluster", menu_zcl_cluster_colorctrl, NULL, NULL },
+       { "4", "Group Cluster", menu_zcl_cluster_group, NULL, NULL },
+       { "5", "IAS zone Cluster", menu_zcl_cluster_ias_zone, NULL, NULL },
+       { "6", "Identity Cluster", menu_zcl_cluster_identity, NULL, NULL },
+       { "7", "Level Control Cluster", menu_zcl_cluster_levelctrl, NULL, NULL },
+       { "8", "On/Off Cluster", menu_zcl_cluster_onoff, NULL, NULL },
+       { "9", "Poll Control Cluster", menu_zcl_cluster_pollctrl, NULL, NULL },
+       { "10", "Scene Cluster", menu_zcl_cluster_scene, NULL, NULL },
+       { "11", "Simple Metering Cluster", NULL, NULL, NULL },
+       { "12", "Thermostat Cluster", menu_zcl_cluster_thermostat, NULL, NULL },
+       { NULL, NULL, },
+};
similarity index 64%
rename from test/zcl_cluster_group.c
rename to test/zcl-group.c
index c155068..853038f 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static char data_group_name[MENU_DATA_SIZE + 1] = "6grpone";
 static char data_group_id[MENU_DATA_SIZE + 1] = "2";
 
-static void zigbee_zcl_group_add_group_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, void *user_data)
+static void _zb_zcl_group_add_group_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_group_add_group_rsp()");
+       msgp("_zb_zcl_group_add_group_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
-static void zigbee_zcl_group_view_group_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, const char *group_name, void *user_data)
+static void _zb_zcl_group_view_group_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       const char *group_name,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_group_view_group_rsp()");
+       msgp("_zb_zcl_group_view_group_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point  = 0x%02X", ep);
-       msg("  Status     = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status     = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID   = 0x%04X", group_id);
        msg("  Group Name = %s", group_name);
 }
 
-static void zigbee_zcl_group_get_group_membership_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned char capacity, unsigned char group_count,
-       unsigned short *group_list, void *user_data)
+static void _zb_zcl_group_get_group_membership_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       unsigned char capacity,
+       unsigned char group_count,
+       unsigned short *group_list,
+       void *user_data)
 {
        int i;
 
        msg("");
-       msgp("zigbee_zcl_group_get_group_membership_rsp()");
+       msgp("_zb_zcl_group_get_group_membership_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
@@ -77,15 +87,19 @@ static void zigbee_zcl_group_get_group_membership_rsp(nwk_addr addr16,
                msg("    [%d] group_list = %04X", i, group_list[i]);
 }
 
-static void zigbee_zcl_group_remove_group_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, void *user_data)
+static void _zb_zcl_group_remove_group_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_group_remove_group_rsp()");
+       msgp("_zb_zcl_group_remove_group_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
@@ -97,14 +111,23 @@ static int run_group_add_group(MManager *mm, struct menu_data *menu)
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_group_add_group(handle, dest_addr16, sj_ep1.ep,
-                       group_id, data_group_name, zigbee_zcl_group_add_group_rsp, NULL);
+       ret = zb_zcl_group_add_group(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       group_id,
+                       data_group_name,
+                       _zb_zcl_group_add_group_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_add_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_add_group(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_add_group() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_add_group() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -118,14 +141,22 @@ static int run_group_view_group(MManager *mm, struct menu_data *menu)
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_group_view_group(handle, dest_addr16, sj_ep1.ep,
-                       group_id, zigbee_zcl_group_view_group_rsp, NULL);
+       ret = zb_zcl_group_view_group(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       group_id,
+                       _zb_zcl_group_view_group_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_view_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_view_group(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_view_group() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_view_group() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -137,15 +168,23 @@ static int run_group_get_group_membership(MManager *mm, struct menu_data *menu)
        unsigned short group_list[2] = { 0x0002, 0x0003 };
        unsigned char group_count = 2;
 
-       ret = zb_zcl_group_get_group_membership(handle, dest_addr16, sj_ep1.ep,
-                       group_count, group_list,
-                       zigbee_zcl_group_get_group_membership_rsp, NULL);
+       ret = zb_zcl_group_get_group_membership(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       group_count,
+                       group_list,
+                       _zb_zcl_group_get_group_membership_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_get_group_membership(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_get_group_membership(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_get_group_membership() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_get_group_membership() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -159,14 +198,22 @@ static int run_group_remove_group(MManager *mm, struct menu_data *menu)
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_group_remove_group(handle, dest_addr16, sj_ep1.ep,
-                       group_id, zigbee_zcl_group_remove_group_rsp, NULL);
+       ret = zb_zcl_group_remove_group(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       group_id,
+                       _zb_zcl_group_remove_group_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_remove_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_remove_group(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_remove_group() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_remove_group() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -176,13 +223,19 @@ static int run_group_remove_all_group(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_group_remove_all_group(handle, dest_addr16, sj_ep1.ep);
+       ret = zb_zcl_group_remove_all_group(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_remove_all_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_remove_all_group(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_remove_all_group() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_remove_all_group() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -196,14 +249,21 @@ static int run_group_add_group_if_identifying(MManager *mm, struct menu_data *me
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_group_add_group_if_identifying(handle, dest_addr16, sj_ep1.ep,
-                       group_id, data_group_name);
+       ret = zb_zcl_group_add_group_if_identifying(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       group_id,
+                       data_group_name
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_add_group_if_identifying(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_group_add_group_if_identifying(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_group_add_group_if_identifying() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_group_add_group_if_identifying() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 83%
rename from test/zcl_cluster_ias_zone.c
rename to test/zcl-ias-zone.c
index 4b45d9e..7ea2270 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static char data_enroll_response_code[MENU_DATA_SIZE + 1] = "10";
@@ -48,14 +45,21 @@ static int run_enroll_response(MManager *mm, struct menu_data *menu)
        if (strlen(data_zone_id))
                zone_id = (unsigned short)strtol(data_zone_id, NULL, 10);
 
-       ret = zb_zcl_zone_enroll_response(handle, dest_addr16, sj_ep1.ep,
-               enroll_response_code, zone_id);
+       ret = zb_zcl_zone_enroll_response(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       enroll_response_code,
+                       zone_id
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_zone_enroll_response(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_zone_enroll_response(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_zone_enroll_response() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_zone_enroll_response() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 73%
rename from test/zcl_cluster_identity.c
rename to test/zcl-identity.c
index 6ea9180..82f7433 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static char data_identify_time[MENU_DATA_SIZE + 1] = "10";
 
-static void zigbee_zcl_identify_query_cb(nwk_addr addr16,
+static void _zb_zcl_identify_query_cb(zb_nwk_addr addr16,
        unsigned short identify_time, void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_identify_query_cb()");
+       msgp("_zb_zcl_identify_query_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  identify_time   = %d", identify_time);
@@ -53,13 +50,20 @@ static int run_identify(MManager *mm, struct menu_data *menu)
        if (strlen(data_identify_time))
                identify_time = (unsigned short)strtol(data_identify_time, NULL, 10);
 
-       ret = zb_zcl_identify(handle, dest_addr16, sj_ep1.ep, identify_time);
+       ret = zb_zcl_identify(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       identify_time
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_identify(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_identify(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_identify() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_identify() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -69,14 +73,21 @@ static int run_identify_query(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_identify_query(handle, dest_addr16, sj_ep1.ep,
-                       zigbee_zcl_identify_query_cb, NULL);
+       ret = zb_zcl_identify_query(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       _zb_zcl_identify_query_cb,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_identify_query(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_identify_query(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_identify_query() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_identify_query() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 76%
rename from test/zcl_cluster_levelctrl.c
rename to test/zcl-level-ctrl.c
index dd3389b..26f768e 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s dimmer_ep1;
 
 static char data_level[MENU_DATA_SIZE + 1] = "100";
@@ -51,14 +48,21 @@ static int run_move_to_level(MManager *mm, struct menu_data *menu)
        if (strlen(data_time))
                transition_time = (unsigned short)strtol(data_time, NULL, 10);
 
-       ret = zb_zcl_levelctrl_move_to_level(handle, dest_addr16, dimmer_ep1.ep,
-                       level, transition_time);
+       ret = zb_zcl_levelctrl_move_to_level(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       level,
+                       transition_time
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_move_to_level(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_move_to_level(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_move_to_level() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_move_to_level() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -75,14 +79,21 @@ static int run_move(MManager *mm, struct menu_data *menu)
        if (strlen(data_rate))
                rate = (unsigned char)strtol(data_rate, NULL, 10);
 
-       ret = zb_zcl_levelctrl_move(handle, dest_addr16, dimmer_ep1.ep,
-                       move_mode, rate);
+       ret = zb_zcl_levelctrl_move(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       move_mode,
+                       rate
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_move(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_move(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_move() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_move() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -102,14 +113,22 @@ static int run_step(MManager *mm, struct menu_data *menu)
        if (strlen(data_time))
                transition_time = (unsigned short)strtol(data_time, NULL, 10);
 
-       ret = zb_zcl_levelctrl_step(handle, dest_addr16, dimmer_ep1.ep,
-                       step_mode, step_size, transition_time);
+       ret = zb_zcl_levelctrl_step(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       step_mode,
+                       step_size,
+                       transition_time
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_step(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_step(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_step() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_step() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -119,13 +138,19 @@ static int run_stop(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_levelctrl_stop(handle, dest_addr16, dimmer_ep1.ep);
+       ret = zb_zcl_levelctrl_stop(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_stop(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_stop() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_stop() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -142,14 +167,21 @@ static int run_move_with_on_off(MManager *mm, struct menu_data *menu)
        if (strlen(data_rate))
                rate = (unsigned char)strtol(data_rate, NULL, 10);
 
-       ret = zb_zcl_levelctrl_move_with_on_off(handle, dest_addr16, dimmer_ep1.ep,
-                       move_mode, rate);
+       ret = zb_zcl_levelctrl_move_with_on_off(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       move_mode,
+                       rate
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_move_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_move_with_on_off(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_move_with_on_off() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_move_with_on_off() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -166,14 +198,21 @@ static int run_move_to_level_with_on_off(MManager *mm, struct menu_data *menu)
        if (strlen(data_time))
                transition_time = (unsigned short)strtol(data_time, NULL, 10);
 
-       ret = zb_zcl_levelctrl_move_to_level_with_on_off(handle, dest_addr16,
-                       dimmer_ep1.ep, level, transition_time);
+       ret = zb_zcl_levelctrl_move_to_level_with_on_off(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       level,
+                       transition_time
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_move_to_level_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_move_to_level_with_on_off(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_move_to_level_with_on_off() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_move_to_level_with_on_off() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -193,14 +232,22 @@ static int run_step_with_on_off(MManager *mm, struct menu_data *menu)
        if (strlen(data_time))
                transition_time = (unsigned short)strtol(data_time, NULL, 10);
 
-       ret = zb_zcl_levelctrl_step_with_on_off(handle, dest_addr16, dimmer_ep1.ep,
-                       step_mode, step_size, transition_time);
+       ret = zb_zcl_levelctrl_step_with_on_off(
+                       handle,
+                       dest_addr16,
+                       dimmer_ep1.ep,
+                       step_mode,
+                       step_size,
+                       transition_time
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_step_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_levelctrl_step_with_on_off(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_levelctrl_step_with_on_off() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_levelctrl_step_with_on_off() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 65%
rename from test/zcl_cluster_onoff.c
rename to test/zcl-on-off.c
index c6a32eb..5f2e7a4 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static int run_on(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_ON);
+       ret = zb_zcl_on_off_control(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       ZB_ZCL_ON
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_on_off_control(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_onoff_control() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_on_off_control() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -53,13 +57,20 @@ static int run_off(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_OFF);
+       ret = zb_zcl_on_off_control(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       ZB_ZCL_OFF
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_on_off_control(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_onoff_control() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_on_off_control() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -69,13 +80,20 @@ static int run_toggle(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_TOGGLE);
+       ret = zb_zcl_on_off_control(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       ZB_ZCL_TOGGLE
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_on_off_control(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_onoff_control() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_on_off_control() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -89,7 +107,7 @@ static struct menu_data menu_zcl_cluster_onoff_control[] = {
 };
 
 struct menu_data menu_zcl_cluster_onoff[] = {
-       { "1", "zb_zcl_onoff_control",
+       { "1", "zb_zcl_on_off_control",
                        menu_zcl_cluster_onoff_control, NULL, NULL },
        { NULL, NULL, },
 };
similarity index 77%
rename from test/zcl_cluster_pollctrl.c
rename to test/zcl-poll-ctrl.c
index 08aa784..d2b7664 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
-
-extern nwk_addr  dest_addr16;
+extern zb_zigbee_h  handle;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static char data_poll_state[MENU_DATA_SIZE + 1] = "1";
@@ -38,11 +35,13 @@ static char data_poll_timeout[MENU_DATA_SIZE + 1] = "100";
 static char data_long_interval[MENU_DATA_SIZE + 1] = "200";
 static char data_short_interval[MENU_DATA_SIZE + 1] = "5";
 
-static void zigbee_zcl_poll_control_check_in(nwk_addr addr16, unsigned char ep,
+static void _zb_zcl_poll_control_check_in(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
        void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_poll_control_check_in()");
+       msgp("_zb_zcl_poll_control_check_in()");
 
        msg("  Network Address = 0x%04X End-Point = 0x%02X", addr16, ep);
 }
@@ -58,14 +57,21 @@ static int run_check_in_response(MManager *mm, struct menu_data *menu)
        if (strlen(data_poll_timeout))
                fast_poll_timeout = (unsigned short)strtol(data_poll_timeout, NULL, 10);
 
-       ret = zb_zcl_pollctrl_check_in_response(handle, dest_addr16, sj_ep1.ep,
-                       start_fast_polling, fast_poll_timeout);
+       ret = zb_zcl_pollctrl_check_in_response(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               start_fast_polling,
+               fast_poll_timeout
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_check_in_response(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_pollctrl_check_in_response(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_pollctrl_check_in_response() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_pollctrl_check_in_response() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -75,13 +81,19 @@ static int run_fast_poll_stop(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zcl_pollctrl_fast_poll_stop(handle, dest_addr16, sj_ep1.ep);
+       ret = zb_zcl_pollctrl_fast_poll_stop(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_fast_poll_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_pollctrl_fast_poll_stop(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_pollctrl_fast_poll_stop() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_pollctrl_fast_poll_stop() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -95,14 +107,19 @@ static int run_set_long_poll_interval(MManager *mm, struct menu_data *menu)
        if (strlen(data_long_interval))
                long_poll_interval = (unsigned short)strtol(data_long_interval, NULL, 10);
 
-       ret = zb_zcl_pollctrl_set_long_poll_interval(handle, dest_addr16, sj_ep1.ep,
-                       long_poll_interval,  zigbee_zcl_poll_control_check_in, NULL);
+       ret = zb_zcl_pollctrl_set_long_poll_interval(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       long_poll_interval,  _zb_zcl_poll_control_check_in, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_set_long_poll_interval(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_pollctrl_set_long_poll_interval(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_pollctrl_set_long_poll_interval() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_pollctrl_set_long_poll_interval() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -116,14 +133,22 @@ static int run_set_short_poll_interval(MManager *mm, struct menu_data *menu)
        if (strlen(data_short_interval))
                short_poll_interval = (unsigned short)strtol(data_short_interval, NULL, 10);
 
-       ret = zb_zcl_pollctrl_set_short_poll_interval(handle, dest_addr16, sj_ep1.ep,
-                       short_poll_interval, zigbee_zcl_poll_control_check_in, NULL);
+       ret = zb_zcl_pollctrl_set_short_poll_interval(
+                       handle,
+                       dest_addr16,
+                       sj_ep1.ep,
+                       short_poll_interval,
+                       _zb_zcl_poll_control_check_in,
+                       NULL
+                       );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_set_short_poll_interval(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_pollctrl_set_short_poll_interval(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_pollctrl_set_short_poll_interval() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_pollctrl_set_short_poll_interval() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 63%
rename from test/zcl_cluster_scene.c
rename to test/zcl-scene.c
index 1eb4879..2bc6dec 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  dest_addr16;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s sj_ep1;
 
 static char data_group_id[MENU_DATA_SIZE + 1] = "2";
@@ -38,31 +36,43 @@ static char data_scene_id[MENU_DATA_SIZE + 1] = "1";
 static char data_trans_time[MENU_DATA_SIZE + 1] = "0";
 static char data_scene_name[MENU_DATA_SIZE + 1] = "6scnone";
 
-static void zigbee_zcl_scene_add_scene_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, unsigned char scene_id, void *user_data)
+static void _zb_zcl_scene_add_scene_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       unsigned char scene_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_scene_add_scene_rsp()");
+       msgp("_zb_zcl_scene_add_scene_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
 
-static void zigbee_zcl_scene_view_scene_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, unsigned char scene_id,
-       unsigned short transition_time, const char *scene_name,
-       const char *extension_field_set, unsigned short ext_len, void *user_data)
+static void _zb_zcl_scene_view_scene_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       unsigned char scene_id,
+       unsigned short transition_time,
+       const char *scene_name,
+       const char *extension_field_set,
+       unsigned short ext_len,
+       void *user_data)
 {
        int i;
        msg("");
-       msgp("zigbee_zcl_scene_view_scene_rsp()");
+       msgp("_zb_zcl_scene_view_scene_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Status          = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status          = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID        = 0x%04X", group_id);
        msg("  Scene ID        = 0x%02X", scene_id);
        msg("  Transition Time = 0x%04X", transition_time);
@@ -71,59 +81,79 @@ static void zigbee_zcl_scene_view_scene_rsp(nwk_addr addr16, unsigned char ep,
                msg("    extension_field_set[%d] = 0x%02X", i, extension_field_set[i]);
 }
 
-static void zigbee_zcl_scene_remove_scene_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, unsigned char scene_id, void *user_data)
+static void _zb_zcl_scene_remove_scene_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       unsigned char scene_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_scene_remove_scene_rsp()");
+       msgp("_zb_zcl_scene_remove_scene_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
 
-static void zigbee_zcl_scene_remove_all_scene_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, void *user_data)
+static void _zb_zcl_scene_remove_all_scene_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_scene_remove_all_scene_rsp()");
+       msgp("_zb_zcl_scene_remove_all_scene_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
-static void zigbee_zcl_scene_store_scene_rsp(nwk_addr addr16, unsigned char ep,
-       unsigned char status, unsigned short group_id, unsigned char scene_id, void *user_data)
+static void _zb_zcl_scene_store_scene_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned short group_id,
+       unsigned char scene_id,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zcl_scene_store_scene_rsp()");
+       msgp("_zb_zcl_scene_store_scene_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
 
-static void zigbee_zcl_scene_get_scene_membership_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned char status, unsigned char capacity, unsigned short group_id,
-       unsigned char scene_count, unsigned char *scene_list, void *user_data)
+static void _zb_zcl_scene_get_scene_membership_cb(
+       zb_nwk_addr addr16,
+       zb_end_point ep,
+       zb_zcl_status_e status,
+       unsigned char capacity,
+       unsigned short group_id,
+       unsigned char scene_count,
+       unsigned char *scene_list,
+       void *user_data)
 {
        int i;
 
        msg("");
-       msgp("zigbee_zcl_scene_get_scene_membership_rsp()");
+       msgp("_zb_zcl_scene_get_scene_membership_cb()");
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
+       msg("  Status    = 0x%02X (%s)", status, zb_zcl_get_status_str(status));
        msg("  Capacity  = 0x%02X", capacity);
        msg("  Group ID  = 0x%02X", group_id);
-       for (i = 0; i < scene_count && ZB_ZCL_SUCCESS == status; i++)
+       for (i = 0; i < scene_count && ZB_ZCL_STATUS_SUCCESS == status; i++)
                msg("    scene_list[%d] = 0x%02X", i, scene_list[i]);
 }
 
@@ -141,15 +171,27 @@ static int run_scene_add_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_scene_id))
                scene_id = (unsigned char)strtol(data_scene_id, NULL, 10);
 
-       ret = zb_zcl_scene_add_scene(handle, dest_addr16,
-                       sj_ep1.ep, group_id, scene_id, trans_time, data_scene_name,
-                       ext_len, ext_field_set, zigbee_zcl_scene_add_scene_rsp, NULL);
+       ret = zb_zcl_scene_add_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               scene_id,
+               trans_time,
+               data_scene_name,
+               ext_len,
+               ext_field_set,
+               _zb_zcl_scene_add_scene_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_add_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_add_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_add_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_add_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -166,14 +208,23 @@ static int run_scene_view_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_scene_id))
                scene_id = (unsigned char)strtol(data_scene_id, NULL, 10);
 
-       ret = zb_zcl_scene_view_scene(handle, dest_addr16, sj_ep1.ep, group_id,
-                       scene_id, zigbee_zcl_scene_view_scene_rsp, NULL);
+       ret = zb_zcl_scene_view_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               scene_id,
+               _zb_zcl_scene_view_scene_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_view_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_view_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_view_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_view_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -187,14 +238,22 @@ static int run_scene_get_scene_membership(MManager *mm, struct menu_data *menu)
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_scene_get_scene_membership(handle, dest_addr16, sj_ep1.ep,
-                       group_id, zigbee_zcl_scene_get_scene_membership_rsp, NULL);
+       ret = zb_zcl_scene_get_scene_membership(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               _zb_zcl_scene_get_scene_membership_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_get_scene_membership(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_get_scene_membership(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_get_scene_membership() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_get_scene_membership() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -211,14 +270,23 @@ static int run_scene_remove_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_scene_id))
                scene_id = (unsigned char)strtol(data_scene_id, NULL, 10);
 
-       ret = zb_zcl_scene_remove_scene(handle, dest_addr16, sj_ep1.ep, group_id,
-                       scene_id, zigbee_zcl_scene_remove_scene_rsp, NULL);
+       ret = zb_zcl_scene_remove_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               scene_id,
+               _zb_zcl_scene_remove_scene_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_remove_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_remove_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_remove_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_remove_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -232,14 +300,22 @@ static int run_scene_remove_all_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_group_id))
                group_id = (unsigned short)strtol(data_group_id, NULL, 10);
 
-       ret = zb_zcl_scene_remove_all_scene(handle, dest_addr16, sj_ep1.ep, group_id,
-                       zigbee_zcl_scene_remove_all_scene_rsp, NULL);
+       ret = zb_zcl_scene_remove_all_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               _zb_zcl_scene_remove_all_scene_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_remove_all_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_remove_all_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_remove_all_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_remove_all_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -256,14 +332,23 @@ static int run_scene_store_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_scene_id))
                scene_id = (unsigned char)strtol(data_scene_id, NULL, 10);
 
-       ret = zb_zcl_scene_store_scene(handle, dest_addr16, sj_ep1.ep, group_id,
-                       scene_id, zigbee_zcl_scene_store_scene_rsp, NULL);
+       ret = zb_zcl_scene_store_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               scene_id,
+               _zb_zcl_scene_store_scene_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_store_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_store_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_store_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_store_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -280,14 +365,21 @@ static int run_scene_recall_scene(MManager *mm, struct menu_data *menu)
        if (strlen(data_scene_id))
                scene_id = (unsigned char)strtol(data_scene_id, NULL, 10);
 
-       ret = zb_zcl_scene_recall_scene(handle, dest_addr16, sj_ep1.ep,
-                       group_id, scene_id);
+       ret = zb_zcl_scene_recall_scene(
+               handle,
+               dest_addr16,
+               sj_ep1.ep,
+               group_id,
+               scene_id
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_recall_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_scene_recall_scene(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_scene_recall_scene() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_scene_recall_scene() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 85%
rename from test/zcl_cluster_thermostat.c
rename to test/zcl-thermostat.c
index 1fea0f3..c28edd4 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  dest_addr16;
+extern zb_nwk_addr  dest_addr16;
 extern simple_desc_s s_thermostat_ep1;
 
 static char data_mode[MENU_DATA_SIZE + 1] = "0";
@@ -47,14 +45,21 @@ static int run_adjust_setpoint(MManager *mm, struct menu_data *menu)
        if (strlen(data_amount))
                amount = (unsigned char)strtol(data_amount, NULL, 10);
 
-       ret = zb_zcl_thermostat_adjust_setpoint(handle, dest_addr16,
-                       s_thermostat_ep1.ep, mode, amount);
+       ret = zb_zcl_thermostat_adjust_setpoint(
+               handle,
+               dest_addr16,
+               s_thermostat_ep1.ep,
+               mode,
+               amount
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_thermostat_adjust_setpoint(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zcl_thermostat_adjust_setpoint(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zcl_thermostat_adjust_setpoint() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zcl_thermostat_adjust_setpoint() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
diff --git a/test/zcl_global_cmd.c b/test/zcl_global_cmd.c
deleted file mode 100755 (executable)
index ba227d6..0000000
+++ /dev/null
@@ -1,800 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <zigbee.h>
-
-#include "main.h"
-#include "menu.h"
-
-extern struct menu_data menu_zcl_cluster_alarm[];
-extern struct menu_data menu_zcl_cluster_basic[];
-extern struct menu_data menu_zcl_cluster_colorctrl[];
-extern struct menu_data menu_zcl_cluster_group[];
-extern struct menu_data menu_zcl_cluster_identity[];
-extern struct menu_data menu_zcl_cluster_ias_zone[];
-extern struct menu_data menu_zcl_cluster_levelctrl[];
-extern struct menu_data menu_zcl_cluster_onoff[];
-extern struct menu_data menu_zcl_cluster_pollctrl[];
-extern struct menu_data menu_zcl_cluster_scene[];
-extern struct menu_data menu_zcl_cluster_thermostat[];
-
-extern zigbee_h  handle;
-
-extern nwk_addr  panid;
-extern ieee_addr co_addr64;
-
-extern ieee_addr st_addr64;
-extern ieee_addr sj_addr64;
-
-extern nwk_addr  dest_addr16;
-extern ieee_addr dest_addr64;
-
-extern simple_desc_s st_ep1, st_ep2, st_ep3, st_ep4, sj_ep1, simul_ep1;
-
-static char r_data_cluster_id[MENU_DATA_SIZE + 1] = "6";
-static char r_data_attr_id[MENU_DATA_SIZE + 1] = "0";
-static char w_data_cluster_id[MENU_DATA_SIZE + 1] = "3";
-static char w_data_attr_id[MENU_DATA_SIZE + 1] = "0";
-static char w_data_attr_value[MENU_DATA_SIZE + 1] = "180";
-static char data_min_i[MENU_DATA_SIZE + 1] = "A";
-static char data_max_i[MENU_DATA_SIZE + 1] = "3C";
-static char data_timeout[MENU_DATA_SIZE + 1] = "10";
-
-static void zigbee_zcl_global_read_attributes_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, zb_global_record_data_s *records_info,
-       int records_len, void *user_data)
-{
-       int count;
-       int ret;
-       unsigned short id;
-       unsigned char type;
-       unsigned char status;
-       unsigned char *buf = NULL;
-       zb_value_h value = NULL;
-       read_attr_status_record_h *records;
-
-       msg("");
-       msgp("zigbee_zcl_global_read_attributes_rsp()");
-
-       if (NULL == records_info || ZB_GLOBAL_READ_ATTR != records_info->type
-                || NULL == records_info->record.read_attr) {
-               msg("Invalid records info");
-               msg("records_info : [%p]", records_info);
-               if (records_info) {
-                       msg("    type: [%x]", records_info->type);
-                       msg("    type: [%p]", records_info->record.read_attr);
-               }
-               return;
-       }
-       records = records_info->record.read_attr;
-
-       ret = zb_create_value(&value);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_value(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return;
-       }
-
-       msg("  Cluster ID   : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  Node ID      : 0x%04X", addr16);
-       msg("  End-Point    : 0x%02X", ep);
-       msg("  Msg length     %d", records_len);
-
-       if (records && *records) {
-               zb_get_id_from_read_attr_status_record(*records, &id);
-               msg("  Attribute ID : 0x%04X", id);
-       }
-       if (records && *records) {
-               zb_get_type_from_read_attr_status_record(*records, &type);
-               msg("  Type         : 0x%02X", type);
-       }
-       if (records && *records) {
-               zb_get_status_from_read_attr_status_record(*records, &status);
-               msg("  Status       : 0x%02X (%s)", status, zb_get_zcl_error_message(status));
-       }
-       if (records && *records) {
-               zb_get_value_from_read_attr_status_record(*records, type, value);
-               if (value) {
-                       zb_get_value(value, &type, &buf, &count);
-                       if (buf) {
-                               msg("  value[0] = 0x%02x", buf[0]);
-                               free(buf);
-                       }
-               }
-       }
-
-       if (value)
-               zb_destroy_value(value);
-}
-
-static void zigbee_zcl_global_write_attributes_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, zb_global_record_data_s *records_info,
-       int records_len, void *user_data)
-{
-       int ret;
-       unsigned short id = 0;
-       unsigned char status;
-       zb_value_h value = NULL;
-       write_attr_status_record_h *records;
-
-       msg("");
-       msgp("zigbee_zcl_global_write_attributes_rsp()");
-
-       if (NULL == records_info || ZB_GLOBAL_WRITE_ATTR != records_info->type
-                || NULL == records_info->record.write_attr) {
-               msg("Invalid records info");
-               return;
-       }
-       records = records_info->record.write_attr;
-
-       ret = zb_create_value(&value);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_value(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return;
-       }
-
-       msg("  Cluster ID  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  Node ID     : 0x%04X", addr16);
-       msg("  End-Point   : 0x%02X", ep);
-       msg("  Msg length    %d", records_len);
-
-       if (records) {
-               if (ZIGBEE_ERROR_NONE == zb_get_id_from_write_attr_status(*records, &id))
-                       msg("  AttributeId : 0x%04X", id);
-       }
-       if (records) {
-               zb_get_status_from_write_attr_status(*records, &status);
-               msg("  status      : 0x%02X (%s)", status, zb_get_zcl_error_message(status));
-       }
-       zb_destroy_value(value);
-}
-
-static void zigbee_zcl_global_configure_reporting_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, zb_global_record_data_s *records_info,
-       int records_len, void *user_data)
-{
-       int i;
-       unsigned char status;
-       report_config_response_record_h *records;
-
-       msg("");
-       msgp("zigbee_zcl_global_configure_reporting_rsp()");
-
-       if (NULL == records_info || ZB_GLOBAL_CONFIG_REPORT != records_info->type
-                || NULL == records_info->record.report_config_rsp) {
-               msg("Invalid records info");
-               return;
-       }
-       records = records_info->record.report_config_rsp;
-
-       msg("  records_len=%d", records_len);
-       for (i = 0; i < records_len; i++) {
-               zb_get_status_from_report_config_response_record(records[i], &status);
-               msg("    [%d] status = 0x%02X (%s)", i, status, zb_get_zcl_error_message(status));
-       }
-}
-
-static void zigbee_zcl_global_read_reporting_configuration_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, zb_global_record_data_s *records_info,
-       int records_len, void *user_data)
-{
-       zb_value_h val;
-       int i = 0;
-       int j = 0;
-       int count;
-       int ret;
-       unsigned char type, *buf = NULL;
-       unsigned short id, max_i, min_i;
-       report_config_record_h *records;
-
-       msg("");
-       msgp("zigbee_zcl_global_read_reporting_configuration_rsp()");
-
-       if (NULL == records_info || ZB_GLOBAL_READ_REPORT_CONFIG != records_info->type
-                || NULL == records_info->record.report_config) {
-               msg("Invalid records info");
-               return;
-       }
-
-       records = records_info->record.report_config;
-       msg("  cluster_id 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  nodeId     0x%04X", addr16);
-       msg("  endpoint   0x%02X", ep);
-       msg("  Msg length   %d", records_len);
-
-       while (i < records_len) {
-               msg("    records[%d]", i);
-               zb_get_id_from_report_config_record(records[i], &id);
-               msg("    AttributeId 0x%04X", id);
-               zb_get_type_from_report_config_record(records[i], &type);
-               /*if ((zb_get_analog_or_discret(type) == DATA_TYPE_ANALOG)) {*/
-                       msg("    type 0x%02X", type);
-                       zb_get_max_i_from_report_config_record(records[i], &max_i);
-                       msg("    Max Interval 0x%04X", max_i);
-                       zb_get_min_i_from_report_config_record(records[i], &min_i);
-                       msg("    Min Interval 0x%04X", min_i);
-                       ret = zb_create_value(&val);
-                       if (ZIGBEE_ERROR_NONE != ret) {
-                               msg("zb_create_read_report_config_record(0x%X) - FAILED!!! [%s]",
-                                               ret, zigbee_error_to_string(ret));
-                               continue;
-                       }
-
-                       zb_get_change_from_report_config_record1(records[i], val);
-                       ret = zb_get_value(val, &type, &buf, &count);
-                       if (ZIGBEE_ERROR_NONE == ret) {
-                               for (j = 0; j < count; j++)
-                                       msg("      value[j] = 0x%02x", buf[j]);
-                       }
-
-                       if (buf) {
-                               free(buf);
-                               buf = NULL;
-                       }
-
-                       msg("");
-                       zb_destroy_value(val);
-               /*
-               } else {
-                       msg("Unsuccessful Attempt\n");
-               }
-               */
-               i++;
-       }
-}
-
-static void zigbee_zcl_global_discover_attributes_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, unsigned char discovery_complete,
-       discover_attr_info_record_h * records, int records_len, void *user_data)
-{
-       int i;
-       unsigned char type;
-       unsigned short id;
-
-       msg("");
-       msgp("zigbee_zcl_global_discover_attributes_rsp()");
-
-       msg("  Network Address = 0x%04X", addr16);
-       msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  discovery_complete = %d", discovery_complete);
-
-       for (i = 0; i < records_len; i++) {
-               zb_get_type_from_discover_attr_info(records[i], &type);
-               msg("    [%d] type = 0x%02X", i, type);
-               zb_get_id_from_discover_attr_info(records[i], &id);
-               msg("    [%d] id   = 0x%04X", i, id);
-       }
-}
-
-static void zigbee_zcl_global_discover_cmds_received_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, unsigned char discovery_complete,
-       unsigned char *command_ids, int command_ids_len, void *user_data)
-{
-       int i;
-
-       msg("");
-       msgp("zigbee_zcl_global_discover_cmds_received_rsp()");
-
-       msg("  Network Address = 0x%04X", addr16);
-       msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  discovery_complete = %d", discovery_complete);
-
-       for (i = 0; i < command_ids_len; i++)
-               msg("    command_id[%d]   = 0x%02X", i, command_ids[i]);
-}
-
-static void zigbee_zcl_global_discover_cmds_generated_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, unsigned char discovery_complete,
-       unsigned char *command_ids, int command_ids_len, void *user_data)
-{
-       int i;
-
-       msg("");
-       msgp("zigbee_zcl_global_discover_cmds_generated_rsp()");
-
-       msg("  Network Address = 0x%04X", addr16);
-       msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  discovery_complete = %d", discovery_complete);
-
-       for (i = 0; i < command_ids_len; i++)
-               msg("    command_id[%d]   = 0x%02X", i, command_ids[i]);
-}
-
-static void zigbee_zcl_global_discover_attr_extended_rsp(nwk_addr addr16,
-       unsigned char ep, unsigned short cluster_id, unsigned char discovery_complete,
-       extended_attr_info_h *records, unsigned short records_len, void *user_data)
-{
-       int i;
-       unsigned char type;
-       unsigned short id;
-       unsigned char acl;
-
-       msg("");
-       msgp("zigbee_zcl_global_discover_attr_extended_rsp()");
-
-       msg("  Network Address = 0x%04X", addr16);
-       msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-       msg("  discovery_complete = %d", discovery_complete);
-
-       for (i = 0; i < records_len; i++) {
-               zb_get_id_from_extended_attr_info(records[i], &id);
-               msg("    [%d] id   = 0x%02X", i, id);
-               zb_get_type_from_extended_attr_info(records[i], &type);
-               msg("    [%d] type = 0x%04X", i, type);
-               zb_get_acl_from_extended_attr_info(records[i], &acl);
-               msg("    [%d] acl  = 0x%04X", i, acl);
-       }
-}
-
-static int run_global_read_attr(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-#if 0
-       /* For SmartThings open/close sensor */
-       unsigned short st_cluster_id = ZB_ZCL_IAS_ZONE_CLUSTER_ID;
-       unsigned short st_attribute_id[] = {
-               ZB_ZCL_ZONE_STATE_ATTRIBUTE_ID,
-               ZB_ZCL_ZONE_TYPE_ATTRIBUTE_ID,
-               ZB_ZCL_ZONE_STATUS_ATTRIBUTE_ID,
-               ZB_ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID,
-               ZB_ZCL_ZONE_ID_ATTRIBUTE_ID
-       };
-
-       int st_len_of_attr = sizeof(st_attribute_id) / sizeof(st_attribute_id[0]);
-       /* Reading zone state attribute */
-       ret = zb_zcl_global_read_attr(handle, dest_addr16, 1, st_ep1.ep,
-                       -1, st_cluster_id, st_attribute_id, st_len_of_attr,
-                       zigbee_zcl_global_read_attributes_rsp, NULL);
-#endif
-#if 0
-       /* Reading active power report in electrical measurement cluster */
-       sj_cluster_id = ZB_ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID;
-       sj_attribute_id[0] = ZB_ZCL_ACTIVE_POWER_ATTRIBUTE_ID;
-       sj_len_of_attr = 1;
-
-       ret = zb_zcl_global_read_attr(handle, dest_addr16, 1, sj_ep1.ep,
-                       -1, sj_cluster_id, sj_attribute_id, sj_len_of_attr,
-                       zigbee_zcl_global_read_attributes_rsp, NULL);
-#endif
-
-       unsigned short cluster_id = ZB_ZCL_ON_OFF_CLUSTER_ID;
-       unsigned short attribute_id[] = {
-               ZB_ZCL_ON_OFF_ATTRIBUTE_ID
-       };
-       int len_of_attr = sizeof(attribute_id) / sizeof(attribute_id[0]);
-
-       if (strlen(r_data_cluster_id))
-               cluster_id = (unsigned short)strtol(r_data_cluster_id, NULL, 16);
-       if (strlen(r_data_attr_id))
-               attribute_id[0] = (unsigned short)strtol(r_data_attr_id, NULL, 16);
-
-       ret = zb_zcl_global_read_attr(handle, dest_addr16, 1, 1,
-                       ZB_ZCL_FC_DEFAULT, cluster_id, attribute_id, len_of_attr,
-                       zigbee_zcl_global_read_attributes_rsp, NULL);
-
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_read_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_read_attr() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_write_attr(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       /* Samjin Power Outlet */
-       write_attr_record_h attr;
-       int size = -1;
-
-       unsigned short cluster_id = ZB_ZCL_IDENTIFY_CLUSTER_ID;
-       unsigned short attribute_id = ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID;
-       unsigned short temp;
-       unsigned char attribute_value[3] = {0,};
-
-       if (strlen(w_data_cluster_id))
-               cluster_id = (unsigned short)strtol(w_data_cluster_id, NULL, 16);
-       if (strlen(w_data_attr_id))
-               attribute_id = (unsigned short)strtol(w_data_attr_id, NULL, 16);
-       if (strlen(w_data_attr_value)) {
-               temp = (unsigned short)strtol(w_data_attr_value, NULL, 16);
-               memcpy(attribute_value, &temp, sizeof(unsigned short));
-       }
-
-       ret = zb_create_write_attr_record(&attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_write_attr_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       /* zb_set_id_to_write_attr_record(attr, ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID); */
-       zb_set_id_to_write_attr_record(attr, attribute_id);
-       zb_set_type_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       size = zb_get_data_size(ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       if (size < 0) {
-               zb_destroy_write_attr_record(attr);
-               msg("zb_get_data_size(%d) - FAILED!!!", size);
-               return RET_FAILURE;
-       }
-
-       zb_set_buf_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER, attribute_value, size);
-
-       ret = zb_zcl_global_write_attr(handle, dest_addr16, 1, sj_ep1.ep,
-                       ZB_ZCL_FC_DEFAULT,
-                       cluster_id, &attr, 1,
-                       zigbee_zcl_global_write_attributes_rsp, NULL);
-       zb_destroy_write_attr_record(attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_write_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_write_attr() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_write_attr_undivided(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       unsigned char value[] = { 0x02, 0x01};
-       /* Samjin Power Outlet */
-       write_attr_record_h attr;
-       int size = -1;
-
-       ret = zb_create_write_attr_record(&attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_write_attr_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       zb_set_id_to_write_attr_record(attr, ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID);
-       zb_set_type_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       size = zb_get_data_size(ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       if (size < 0) {
-               zb_destroy_write_attr_record(attr);
-               msg("zb_get_data_size(%d) - FAILED!!!", size);
-               return RET_FAILURE;
-       }
-
-       zb_set_buf_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER, value, size);
-       ret = zb_zcl_global_write_attr_undivided(handle, dest_addr16, 1,
-                       sj_ep1.ep, ZB_ZCL_FC_DEFAULT, ZB_ZCL_IDENTIFY_CLUSTER_ID, &attr, 1,
-                       zigbee_zcl_global_write_attributes_rsp, NULL);
-       zb_destroy_write_attr_record(attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_write_attr_undivided(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_write_attr_undivided() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_write_attr_no_rsp(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       unsigned char value[] = { 0x02, 0x01};
-       /* Samjin Power Outlet */
-       write_attr_record_h attr;
-       int size = -1;
-
-       ret = zb_create_write_attr_record(&attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_write_attr_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       zb_set_id_to_write_attr_record(attr, ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID);
-       zb_set_type_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       size = zb_get_data_size(ZB_ZCL_UNSIGNED_16_BIT_INTEGER);
-       if (size < 0) {
-               zb_destroy_write_attr_record(attr);
-               msg("zb_get_data_size(%d) - FAILED!!!", size);
-               return RET_FAILURE;
-       }
-
-       zb_set_buf_to_write_attr_record(attr, ZB_ZCL_UNSIGNED_16_BIT_INTEGER, value, size);
-       ret = zb_zcl_global_write_attr_no_rsp(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_FC_DEFAULT, ZB_ZCL_IDENTIFY_CLUSTER_ID, &attr, 1);
-       zb_destroy_write_attr_record(attr);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_write_attr_no_rsp(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_write_attr_no_rsp() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_config_report(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       /* Samjin Power Outlet */
-       unsigned char val1 = 1;
-       report_config_record_h config;
-       unsigned short cluster_id = ZB_ZCL_ON_OFF_CLUSTER_ID;
-       unsigned short attribute_id = ZB_ZCL_ON_OFF_ATTRIBUTE_ID;
-       unsigned short min_i = 0xA;
-       unsigned short max_i = 0x3C;
-       unsigned short timeout = 10;
-
-       if (strlen(r_data_cluster_id))
-               cluster_id = (unsigned short)strtol(r_data_cluster_id, NULL, 16);
-       if (strlen(r_data_attr_id))
-               attribute_id = (unsigned short)strtol(r_data_attr_id, NULL, 16);
-
-       if (strlen(data_min_i))
-               min_i = (unsigned short)strtol(data_min_i, NULL, 16);
-       if (strlen(data_max_i))
-               max_i = (unsigned short)strtol(data_max_i, NULL, 16);
-       if (strlen(data_timeout))
-               timeout = (unsigned short)strtol(data_timeout, NULL, 10);
-
-       ret = zb_create_report_config_record(&config);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_report_config_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       zb_set_dir_to_report_config_record(config, ZB_ZCL_CLIENT_TO_SERVER);
-       zb_set_id_to_report_config_record(config, attribute_id);
-       zb_set_type_to_report_config_record(config, ZB_ZCL_BOOLEAN);
-       zb_set_min_i_to_report_config_record(config, min_i);
-       zb_set_max_i_to_report_config_record(config, max_i);
-       zb_set_change_to_report_config_record2(config, ZB_ZCL_BOOLEAN, &val1);
-       zb_set_timeout_to_report_config_record(config, timeout);
-
-       ret = zb_zcl_global_config_report(handle, dest_addr16, 1, sj_ep1.ep,
-                       ZB_ZCL_FC_DEFAULT, cluster_id, &config, 1,
-                       zigbee_zcl_global_configure_reporting_rsp, NULL);
-       zb_destroy_report_config_record(config);
-#if 0
-       /* ST Open/Close Sensor  */
-       report_config_record_h config1;
-       unsigned short val2 = 0x007f;
-
-       ret = zb_create_report_config_record(&config1);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_report_config_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       zb_set_dir_to_report_config_record(config1, ZB_ZCL_CLIENT_TO_SERVER);
-       zb_set_id_to_report_config_record(config1, ZB_ZCL_ZONE_STATE_ATTRIBUTE_ID);
-       zb_set_type_to_report_config_record(config1, ZB_ZCL_SIGNED_16_BIT_INTEGER);
-       zb_set_min_i_to_report_config_record(config1, 0);
-       zb_set_max_i_to_report_config_record(config1, 60);
-       zb_set_change_to_report_config_record(config1, ZB_ZCL_SIGNED_16_BIT_INTEGER, &val2);
-       zb_set_timeout_to_report_config_record(config1, 60);
-       ret = zb_zcl_global_config_report(handle, dest_addr16, 1, st_ep1.ep,
-                       ZB_ZCL_FC_DEFAULT, ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID, &config1, 1,
-                       zigbee_zcl_global_configure_reporting_rsp, NULL);
-       zb_destroy_report_config_record(config1);
-#endif
-
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_config_report(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_config_report() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_read_config_report(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       read_report_config_record_h read_report_conf;
-
-       ret = zb_create_read_report_config_record(&read_report_conf);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create_read_report_config_record(0x%X) - FAILED!!! [%s]",
-                               ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       zb_set_dir_to_read_report_config_record(read_report_conf, ZB_ZCL_CLIENT_TO_SERVER);
-       zb_set_id_to_read_report_config_record(read_report_conf, ZB_ZCL_ON_OFF_ATTRIBUTE_ID);
-
-       /* Samjin Power Outlet */
-       ret = zb_zcl_global_read_config_report(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_FC_DEFAULT, ZB_ZCL_ON_OFF_CLUSTER_ID, &read_report_conf, 1,
-               zigbee_zcl_global_read_reporting_configuration_rsp, NULL);
-       zb_destroy_read_report_config_record(read_report_conf);
-
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_read_config_report(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_read_config_report() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_discover_attr(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-#if 0
-       /* For ST Open/Close Sensor */
-       ret = zb_zcl_global_discover_attr(handle, dest_addr16, 1, st_ep1.ep,
-               ZB_ZCL_FC_DEFAULT, ZB_ZCL_IDENTIFY_CLUSTER_ID, ZB_ZCL_IDENTIFY_TIME_ATTRIBUTE_ID,
-               2, zigbee_zcl_global_discover_attributes_rsp, NULL);
-#endif
-       /* For SJ Power Outlet */
-       ret = zb_zcl_global_discover_attr(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_FC_DEFAULT, ZB_ZCL_ON_OFF_CLUSTER_ID, ZB_ZCL_ON_OFF_ATTRIBUTE_ID, 5,
-               zigbee_zcl_global_discover_attributes_rsp, NULL);
-
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_discover_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_discover_attr() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_discover_cmds_received(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       ret = zb_zcl_global_discover_cmds_received(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_DISABLE_DEFAULT_RESPONSE, ZB_ZCL_ON_OFF_CLUSTER_ID,
-               ZB_ZCL_ON_OFF_ATTRIBUTE_ID, 5,
-               zigbee_zcl_global_discover_cmds_received_rsp, NULL);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_discover_cmds_received(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_discover_cmds_received() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_discover_cmds_generated(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       ret = zb_zcl_global_discover_cmds_generated(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_DISABLE_DEFAULT_RESPONSE, ZB_ZCL_GROUPS_CLUSTER_ID, 0x00, 4,
-               zigbee_zcl_global_discover_cmds_generated_rsp, NULL);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_discover_cmds_generated(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_discover_cmds_generated() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-static int run_global_discover_attr_extended(MManager *mm, struct menu_data *menu)
-{
-       int ret = ZIGBEE_ERROR_NONE;
-       ret = zb_zcl_global_discover_attr_extended(handle, dest_addr16, 1, sj_ep1.ep,
-               ZB_ZCL_DISABLE_DEFAULT_RESPONSE, ZB_ZCL_ON_OFF_CLUSTER_ID,
-               ZB_ZCL_ON_OFF_ATTRIBUTE_ID, 5,
-               zigbee_zcl_global_discover_attr_extended_rsp, NULL);
-       if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_discover_attr_extended(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
-               return RET_FAILURE;
-       }
-
-       msg(" - zb_zcl_global_discover_attr_extended() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
-       msg("");
-
-       return RET_SUCCESS;
-}
-
-struct menu_data menu_zcl_global_read_attr[] = {
-       { "1", "Cluster ID (Hex)", NULL, NULL, r_data_cluster_id },
-       { "2", "Attribute ID (Hex)", NULL, NULL, r_data_attr_id },
-       { "3", "run", NULL, run_global_read_attr, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_zcl_global_write_attr[] = {
-       { "1", "Cluster ID (Hex)", NULL, NULL, w_data_cluster_id },
-       { "2", "Attribute ID (Hex)", NULL, NULL, w_data_attr_id },
-       { "3", "Attribute Value (Hex)", NULL, NULL, w_data_attr_value },
-       { "4", "run", NULL, run_global_write_attr, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_zcl_global_config_report[] = {
-       { "1", "Cluster ID (Hex)", NULL, NULL, r_data_cluster_id },
-       { "2", "Attribute ID (Hex)", NULL, NULL, r_data_attr_id },
-       { "3", "Min interval (Hex)", NULL, NULL, data_min_i },
-       { "4", "Max interval (Hex)", NULL, NULL, data_max_i },
-       { "5", "Timeout", NULL, NULL, data_timeout },
-       { "6", "run", NULL, run_global_config_report, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_zcl_global[] = {
-       { "1", "zb_zcl_global_read_attr",
-                       menu_zcl_global_read_attr, NULL, NULL },
-       { "2", "zb_zcl_global_write_attr",
-                       menu_zcl_global_write_attr, NULL, NULL },
-       { "3", "zb_zcl_global_write_attr_undivided",
-                       NULL, run_global_write_attr_undivided, NULL },
-       { "4", "zb_zcl_global_write_attr_no_rsp",
-                       NULL, run_global_write_attr_no_rsp, NULL },
-       { "5", "zb_zcl_global_config_report",
-                       menu_zcl_global_config_report, NULL, NULL },
-       { "6", "zb_zcl_global_read_config_report",
-                       NULL, run_global_read_config_report, NULL },
-       { "7", "zb_zcl_global_discover_attr",
-                       NULL, run_global_discover_attr, NULL },
-       { "8", "zb_zcl_global_discover_cmds_received",
-                       NULL, run_global_discover_cmds_received, NULL },
-       { "9", "zb_zcl_global_discover_cmds_generated",
-                       NULL, run_global_discover_cmds_generated, NULL },
-       { "10", "zb_zcl_global_discover_attr_extended",
-                       NULL, run_global_discover_attr_extended, NULL },
-       { NULL, NULL, },
-};
-
-struct menu_data menu_zcl_cluster[] = {
-       { "1", "Alarm Cluster", menu_zcl_cluster_alarm, NULL, NULL },
-       { "2", "Basic Cluster", menu_zcl_cluster_basic, NULL, NULL },
-       { "3", "Color Control Cluster", menu_zcl_cluster_colorctrl, NULL, NULL },
-       { "4", "Group Cluster", menu_zcl_cluster_group, NULL, NULL },
-       { "5", "IAS zone Cluster", menu_zcl_cluster_ias_zone, NULL, NULL },
-       { "6", "Identity Cluster", menu_zcl_cluster_identity, NULL, NULL },
-       { "7", "Level Control Cluster", menu_zcl_cluster_levelctrl, NULL, NULL },
-       { "8", "On/Off Cluster", menu_zcl_cluster_onoff, NULL, NULL },
-       { "9", "Poll Control Cluster", menu_zcl_cluster_pollctrl, NULL, NULL },
-       { "10", "Scene Cluster", menu_zcl_cluster_scene, NULL, NULL },
-       { "11", "Simple Metering Cluster", NULL, NULL, NULL },
-       { "12", "Thermostat Cluster", menu_zcl_cluster_thermostat, NULL, NULL },
-       { NULL, NULL, },
-};
similarity index 52%
rename from test/zdo_binding.c
rename to test/zdo-binding.c
index 3886e86..4a07d75 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  panid;
-extern ieee_addr co_addr64;
+extern zb_nwk_addr  panid;
+extern zb_ieee_addr co_addr64;
 
-extern ieee_addr st_addr64;
-extern ieee_addr sj_addr64;
+extern zb_ieee_addr st_addr64;
+extern zb_ieee_addr sj_addr64;
 
-extern nwk_addr  dest_addr16;
-extern ieee_addr dest_addr64;
+extern zb_nwk_addr  dest_addr16;
+extern zb_ieee_addr dest_addr64;
 
 extern simple_desc_s sj_ep1;
 
-/* ZB_ZCL_ON_OFF_CLUSTER_ID */
+/* ZB_ZCL_CLUSTER_ON_OFF */
 static char data_cluster_id[MENU_DATA_SIZE + 1] = "6";
 
-static void zigbee_zdo_bind_unbind_rsp(unsigned char status, void *user_data)
+static void _zb_zdo_bind_unbind_cb(
+       zb_zdp_status_e status,
+       void *user_data)
 {
        msg("");
-       msgp("zigbee_zdo_bind_unbind_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("_zb_zdo_bind_unbind_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 }
 
 static int run_bind_req(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
-       unsigned char src_ep = 1;
-       unsigned short cluster_id = ZB_ZCL_ON_OFF_CLUSTER_ID;
+       zb_end_point src_ep = 1;
+       zb_cluster_id clusterid = ZB_ZCL_CLUSTER_ON_OFF;
 
        if (strlen(data_cluster_id))
-               cluster_id = (unsigned short)strtol(data_cluster_id, NULL, 16);
+               clusterid = (unsigned short)strtol(data_cluster_id, NULL, 16);
 
 #if 0
        /* Samjin Power Outlet */
-       ret = zb_zdo_bind_req(handle, sj_addr16, sj_addr64, 1,
-                       ZB_ZCL_DIAGNOSTICS_CLUSTER_ID, co_addr64,
-                       ZB_UNICAST_BINDING, 0x0004, 1, zigbee_zdo_bind_unbind_rsp, NULL);
+       ret = zb_zdo_bind_req(
+               handle,
+               sj_addr16,
+               sj_addr64, 1,
+               ZB_ZCL_CLUSTER_ID_DIAGNOSTICS,
+               co_addr64,
+               ZB_UNICAST_BINDING,
+               0x0004,
+               1,
+               _zb_zdo_bind_unbind_cb,
+               NULL
+               );
        /* For ST Open/Close Sensor */
-       ret = zb_zdo_bind_req(handle, st_addr16, st_addr64, 1,
-                       ZB_ZCL_IAS_ZONE_CLUSTER_ID, co_addr64,
-                       ZB_UNICAST_BINDING, panid, 1, zigbee_zdo_bind_unbind_rsp, NULL);
+       ret = zb_zdo_bind_req(
+               handle,
+               st_addr16,
+               st_addr64,
+               1,
+               ZB_ZCL_CLUSTER_ID_IAS_ZONE,
+               co_addr64,
+               ZB_UNICAST_BINDING,
+               panid,
+               1,
+               _zb_zdo_bind_unbind_cb,
+               NULL
+               );
 #endif
 
-       ret = zb_zdo_bind_req(handle, dest_addr16, sj_addr64, src_ep, cluster_id,
-                       co_addr64, ZB_UNICAST_BINDING, 0x0004, sj_ep1.ep,
-                       zigbee_zdo_bind_unbind_rsp, NULL);
+       ret = zb_zdo_bind_req(
+               handle,
+               dest_addr16,
+               sj_addr64,
+               src_ep,
+               clusterid,
+               co_addr64,
+               ZB_ZDP_BINDING_TYPE_UNICAST,
+               0x0004,
+               sj_ep1.ep,
+               _zb_zdo_bind_unbind_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_bind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_bind_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_bind_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_bind_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -87,20 +119,32 @@ static int run_bind_req(MManager *mm, struct menu_data *menu)
 static int run_unbind_req(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
-       unsigned short cluster_id = ZB_ZCL_ON_OFF_CLUSTER_ID;
+       zb_cluster_id clusterid = ZB_ZCL_CLUSTER_ON_OFF;
 
        if (strlen(data_cluster_id))
-               cluster_id = (unsigned short)strtol(data_cluster_id, NULL, 16);
-
-       ret = zb_zdo_unbind_req(handle, dest_addr16, co_addr64, 1, cluster_id,
-                       sj_addr64, ZB_UNICAST_BINDING, panid, 1,
-                       zigbee_zdo_bind_unbind_rsp, NULL);
+               clusterid = (unsigned short)strtol(data_cluster_id, NULL, 16);
+
+       ret = zb_zdo_unbind_req(
+               handle,
+               dest_addr16,
+               co_addr64,
+               1,
+               clusterid,
+               sj_addr64,
+               ZB_ZDP_BINDING_TYPE_UNICAST,
+               panid,
+               1,
+               _zb_zdo_bind_unbind_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_unbind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_unbind_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_unbind_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_unbind_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
similarity index 59%
rename from test/zdo_device.c
rename to test/zdo-device.c
index e4ac2bd..0766198 100644 (file)
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
 extern struct menu_data menu_zdo_network[];
 extern struct menu_data menu_zdo_binding[];
 
-extern nwk_addr  panid;
-extern ieee_addr co_addr64;
+extern zb_nwk_addr  panid;
+extern zb_ieee_addr co_addr64;
 
-extern nwk_addr  st_addr16;
-extern ieee_addr st_addr64;
+extern zb_nwk_addr  st_addr16;
+extern zb_ieee_addr st_addr64;
 
-extern nwk_addr  sj_addr16;
-extern ieee_addr sj_addr64;
+extern zb_nwk_addr  sj_addr16;
+extern zb_ieee_addr sj_addr64;
 
-extern nwk_addr  dest_addr16;
-extern ieee_addr dest_addr64;
+extern zb_nwk_addr  dest_addr16;
+extern zb_ieee_addr dest_addr64;
 
 extern simple_desc_s st_ep1, sj_ep1;
 
-static void zigbee_addr_rsp(unsigned char status, ieee_addr addr64, nwk_addr addr16,
-       unsigned char num_of_assoc_dev, unsigned char start_idx, unsigned short
-       *assoc_dev_addr_list, void *user_data)
+static void _zb_addr_cb(
+       zb_zdp_status_e status,
+       zb_ieee_addr addr64,
+       zb_nwk_addr addr16,
+       unsigned char len_of_assoc_dev,
+       unsigned char start_idx,
+       unsigned short *assoc_dev_addr_list,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_addr_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_addr_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
        if (addr64) {
                msg("IEEE Address    : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:",
                        addr64[0], addr64[1], addr64[2], addr64[3],
@@ -60,145 +66,214 @@ static void zigbee_addr_rsp(unsigned char status, ieee_addr addr64, nwk_addr add
        } else
                msg("IEEE Address    : 00:00:00:00:00:00:00:00:");
        msg("Network Address : 0x%04X", addr16);
-       msg("Number of Associated Device : %d", num_of_assoc_dev);
+       msg("Number of Associated Device : %d", len_of_assoc_dev);
        msg("Start Index : %d", start_idx);
 }
 
-static void zigbee_active_ep_rsp(unsigned char status, nwk_addr addr16,
-       unsigned char count, unsigned char *ep_list, void *user_data)
+static void _zb_active_ep_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       unsigned char count,
+       zb_end_point *ep_list,
+       void *user_data)
 {
        int i;
        msg("");
        msg("count  = 0x%02X", count);
        for (i = 0; i < count; i++)
                msg("EP  = 0x%02X", ep_list[i]);
-       msgp("zb_zdo_active_ep_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_active_ep_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 }
 
-static void zigbee_simple_desc_rsp(nwk_addr addr16, unsigned char len,
-       const zb_zdo_simple_desc_h handle, void *user_data)
+static void _zb_simple_desc_cb(
+       zb_nwk_addr addr16,
+       unsigned char len,
+       const zb_zdo_simple_desc_h handle,
+       void *user_data)
 {
        int i, ret;
        unsigned char param_u8;
        unsigned short param_u16;
-       unsigned short *in_clusters;
-       unsigned short *out_clusters;
+       zb_cluster_id *in_clusters = NULL;
+       zb_cluster_id *out_clusters = NULL;
 
        msg("");
-       msgp("zb_zdo_simple_desc_rsp()");
+       msgp("zb_zdo_simple_desc_cb()");
 
-       ret = zb_simple_desc_get_ep(handle, &param_u8);
+       ret = zb_simple_desc_get_ep(
+               handle,
+               &param_u8
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_ep() Fail(0x%X)", ret);
        else
                msg("  ep = %d", param_u8);
 
-       ret = zb_simple_desc_get_profile_id(handle, &param_u16);
+       ret = zb_simple_desc_get_profile_id(
+               handle,
+               &param_u16
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_profile_id() Fail(0x%X)", ret);
        else
-               msg("  profile_id = 0x%x (%s)", param_u16, zb_get_profile_id_string(param_u16));
+               msg("  profile_id = 0x%x (%s)", param_u16,
+                       zb_end_dev_get_profile_id_str(param_u16));
 
-       ret = zb_simple_desc_get_device_id(handle, &param_u16);
+       ret = zb_simple_desc_get_device_id(
+               handle,
+               &param_u16
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_device_id() Fail(0x%X)", ret);
        else
-               msg("  device_id = 0x%x (%s)", param_u16, zb_get_device_id_string(param_u16));
+               msg("  zb_device_id = 0x%x (%s)", param_u16,
+                       zb_end_dev_get_device_id_str(param_u16));
 
-       ret = zb_simple_desc_get_device_ver(handle, &param_u16);
+       ret = zb_simple_desc_get_device_ver(
+               handle,
+               &param_u16
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_device_ver() Fail(0x%X)", ret);
        else
                msg("  device_ver = %d", param_u16);
 
-       ret = zb_simple_desc_get_num_of_in_clusters(handle, &param_u8);
+       ret = zb_simple_desc_get_num_of_in_clusters(
+               handle,
+               &param_u8
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_num_of_in_clusters() Fail(0x%X)", ret);
        else
                msg("  num_of_in_cluster = %d", param_u8);
 
-       ret = zb_simple_desc_get_in_clusters(handle, &in_clusters);
+       ret = zb_simple_desc_get_in_clusters(
+               handle,
+               &in_clusters
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_simple_desc_get_in_clusters() Fail(0x%X)", ret);
        } else {
                for (i = 0; i < param_u8; i++)
-                       msg("    %04X (%s)", in_clusters[i], zb_get_cluster_name(in_clusters[i]));
+                       msg("    %04X (%s)", in_clusters[i], zb_zcl_get_cluster_id_str(in_clusters[i]));
        }
 
-       ret = zb_simple_desc_get_num_of_out_clusters(handle, &param_u8);
+       ret = zb_simple_desc_get_num_of_out_clusters(
+               handle,
+               &param_u8
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_num_of_out_clusters() Fail(0x%X)", ret);
        else
                msg("  num_of_out_cluster = %d", param_u8);
 
-       ret = zb_simple_desc_get_out_clusters(handle, &out_clusters);
+       ret = zb_simple_desc_get_out_clusters(
+               handle,
+               &out_clusters
+               );
        if (ZIGBEE_ERROR_NONE != ret)
                msg("zb_simple_desc_get_out_clusters() Fail(0x%X)", ret);
        else {
                for (i = 0; i < param_u8; i++)
-                       msg("    %04X (%s)", out_clusters[i], zb_get_cluster_name(out_clusters[i]));
+                       msg("    %04X (%s)", out_clusters[i], zb_zcl_get_cluster_id_str(out_clusters[i]));
        }
 }
 
-static void zigbee_match_desc_rsp(unsigned char status, nwk_addr addr16,
-       unsigned char match_length, unsigned char *match_list, void *user_data)
+static void _zb_match_desc_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       unsigned char match_length,
+       unsigned char *match_list,
+       void *user_data)
 {
        unsigned char i;
        msg("");
-       msgp("zb_zdo_match_desc_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_match_desc_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 
-       msg("  nwk_addr = 0x%04X status = 0x%02X match_length = %d",
+       msg("  zb_nwk_addr = 0x%04X status = 0x%02X match_length = %d",
                addr16, status, match_length);
 
        for (i = 0; i < match_length; i++)
                msg("  match_list[%d] = 0x%02x", i, (unsigned int)match_list[i]);
 }
 
-static void zigbee_zdo_power_desc_rsp(unsigned char status, nwk_addr addr16,
-               const zb_zdo_node_power_descriptor_h power_desc, void *user_data)
+static void zigbee_zdo_power_desc_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       const zb_zdo_node_power_descriptor_h power_desc,
+       void *user_data)
 {
-       unsigned char current_power_mode;
-       unsigned char available_power_source;
-       unsigned char current_power_source;
-       unsigned char current_power_source_lv;
+       zb_zdp_cur_pwr_mode_e current_power_mode;
+       zb_zdp_pwr_src_type_e available_power_source;
+       zb_zdp_pwr_src_type_e current_power_source;
+       zb_zdp_pwr_src_level_e current_power_source_lv;
 
        msg("");
-       msgp("zb_zdo_power_desc_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_power_desc_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 
-       zb_node_power_desc_get_current_power_mode(power_desc, &current_power_mode);
+       zb_node_power_desc_get_current_power_mode(
+               power_desc,
+               &current_power_mode
+               );
        msg("  current_power_mode = %02X", current_power_mode);
-       zb_node_power_desc_get_available_power_sources(power_desc, &available_power_source);
+       zb_node_power_desc_get_available_power_sources(
+               power_desc,
+               &available_power_source
+               );
        msg("  available_power_source = %02X", available_power_source);
-       zb_node_power_desc_get_current_power_source(power_desc, &current_power_source);
+       zb_node_power_desc_get_current_power_source(
+               power_desc,
+               &current_power_source
+               );
        msg("  current_power_source = %02X", current_power_source);
-       zb_node_power_desc_get_current_power_source_level(power_desc, &current_power_source_lv);
+       zb_node_power_desc_get_current_power_source_level(
+               power_desc,
+               &current_power_source_lv
+               );
        msg("  current_power_source_level = %02X", current_power_source_lv);
 }
 
-static void zigbee_zdo_complex_desc_rsp(unsigned char status, nwk_addr addr16,
-               unsigned char length, unsigned char *complex_desc, void *user_data)
+static void _zb_zdo_complex_desc_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       unsigned char length,
+       unsigned char *complex_desc,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_complex_desc_rsp() status = 0x%02X (%s) length = %d",
-                       status, zb_zdo_get_error_message(status), length);
+       msgp("zb_zdo_complex_desc_cb() status = 0x%02X (%s) length = %d",
+                       status, zb_zdo_get_status_str(status), length);
 }
 
-static void zigbee_zdo_user_desc_rsp(unsigned char status, nwk_addr addr16,
-               unsigned char length, unsigned char *user_desc, void *user_data)
+static void _zb_zdo_user_desc_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       unsigned char length,
+       unsigned char *user_desc,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_user_desc_rsp() status = 0x%02X (%s) length = %d",
-                       status, zb_zdo_get_error_message(status), length);
+       msgp("zb_zdo_user_desc_cb() status = 0x%02X (%s) length = %d",
+                       status, zb_zdo_get_status_str(status), length);
 }
 
-static void zigbee_zdo_user_desc_conf(unsigned char status, void *user_data)
+static void _zb_zdo_user_desc_conf(
+       zb_zdp_status_e status,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_user_desc_conf() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_user_desc_conf_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 }
 
-static void zigbee_zdo_node_desc_rsp(unsigned char status, nwk_addr addr16,
-       const zb_zdo_node_descriptor_h desc, void *user_data)
+static void _zb_zdo_node_desc_cb(
+       zb_zdp_status_e status,
+       zb_nwk_addr addr16,
+       const zb_zdo_node_descriptor_h desc,
+       void *user_data)
 {
        unsigned char logical_type;
        unsigned char complex_desciptor_available;
@@ -214,32 +289,69 @@ static void zigbee_zdo_node_desc_rsp(unsigned char status, nwk_addr addr16,
        unsigned short descriptor_capability_field;
 
        msg("");
-       msgp("zb_zdo_node_desc_rsp()");
-       msgp("  nwk_addr = 0x%04X status = 0x%02X (%s)", addr16, status, zb_zdo_get_error_message(status));
-
-       zb_node_desc_get_logical_type(desc, &logical_type);
+       msgp("zb_zdo_node_desc_cb()");
+       msgp("  zb_nwk_addr = 0x%04X status = 0x%02X (%s)",
+               addr16, status, zb_zdo_get_status_str(status));
+
+       zb_node_desc_get_logical_type(
+               desc,
+               &logical_type
+               );
        msg("  logical_type = 0x%02X", logical_type);
-       zb_node_desc_get_complex_desciptor_available(desc, &complex_desciptor_available);
+       zb_node_desc_get_complex_desciptor_available(
+               desc,
+               &complex_desciptor_available
+               );
        msg("  complex_desciptor_available = 0x%02X", complex_desciptor_available);
-       zb_node_desc_get_user_descriptor_available(desc, &user_descriptor_available);
+       zb_node_desc_get_user_descriptor_available(
+               desc,
+               &user_descriptor_available
+               );
        msg("  complex_desciptor_available = 0x%02X", complex_desciptor_available);
-       zb_node_desc_get_aps_flags(desc, &aps_flags);
+       zb_node_desc_get_aps_flags(
+               desc,
+               &aps_flags
+               );
        msg("  aps_flags = 0x%02X", aps_flags);
-       zb_node_desc_get_frequency_band(desc, &frequency_band);
+       zb_node_desc_get_frequency_band(
+               desc,
+               &frequency_band
+               );
        msg("  frequency_band = 0x%02X", frequency_band);
-       zb_node_desc_get_mac_capability_flags(desc, &mac_capability_flags);
+       zb_node_desc_get_mac_capability_flags(
+               desc,
+               &mac_capability_flags
+               );
        msg("  mac_capability_flags = 0x%02X", mac_capability_flags);
-       zb_node_desc_get_manufacturer_code(desc, &manufacturer_code);
+       zb_node_desc_get_manufacturer_code(
+               desc,
+               &manufacturer_code
+               );
        msg("  manufacturer_code = 0x%04X", manufacturer_code);
-       zb_node_desc_get_maximum_buffer_size(desc, &maximum_buffer_size);
+       zb_node_desc_get_maximum_buffer_size(
+               desc,
+               &maximum_buffer_size
+               );
        msg("  maximum_buffer_size = 0x%02X", maximum_buffer_size);
-       zb_node_desc_get_maximum_incoming_transfer_size(desc, &maximum_incoming_transfer_size);
+       zb_node_desc_get_maximum_incoming_transfer_size(
+               desc,
+               &maximum_incoming_transfer_size
+               );
        msg("  maximum_incoming_transfer_size = 0x%04X", maximum_incoming_transfer_size);
-       zb_node_desc_get_server_mask(desc, &server_mask);
+       zb_node_desc_get_server_mask(
+               desc,
+               &server_mask
+               );
        msg("  server_mask = 0x%04X", server_mask);
-       zb_node_desc_get_maximum_outgoing_transfer_size(desc, &maximum_outgoing_transfer_size);
+       zb_node_desc_get_maximum_outgoing_transfer_size(
+               desc,
+               &maximum_outgoing_transfer_size
+               );
        msg("  maximum_outgoing_transfer_size = 0x%04X", maximum_outgoing_transfer_size);
-       zb_node_desc_get_descriptor_capability_field(desc, &descriptor_capability_field);
+       zb_node_desc_get_descriptor_capability_field(
+               desc,
+               &descriptor_capability_field
+               );
        msg("  descriptor_capability_field = 0x%04X", descriptor_capability_field);
 }
 
@@ -251,14 +363,22 @@ static int run_nwk_addr_req(MManager *mm, struct menu_data *menu)
                        st_addr64[0], st_addr64[1], st_addr64[2], st_addr64[3],
                        st_addr64[4], st_addr64[5], st_addr64[6], st_addr64[7]);
 
-       ret = zb_zdo_nwk_addr_req(handle, dest_addr64, 0x00, 0x00,
-                       zigbee_addr_rsp, NULL);
+       ret = zb_zdo_nwk_addr_req(
+               handle,
+               dest_addr64,
+               ZB_ZDP_REQ_TYPE_SINGLE_DEVICE_RESPONSE,
+               0x00,
+               _zb_addr_cb,
+               NULL
+               );
        if (ret != ZIGBEE_ERROR_NONE) {
-               msg("zb_zdo_nwk_addr_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_nwk_addr_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_nwk_addr_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_nwk_addr_req() ret: [0x%X] [%s]", ret,
+               zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -268,13 +388,20 @@ static int run_ieee_addr_req(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zdo_ieee_addr_req(handle, dest_addr16, zigbee_addr_rsp, NULL);
+       ret = zb_zdo_ieee_addr_req(
+               handle,
+               dest_addr16,
+               _zb_addr_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_ieee_addr_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_ieee_addr_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_ieee_addr_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_ieee_addr_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -284,13 +411,20 @@ static int run_active_ep(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zdo_active_ep(handle, dest_addr16, zigbee_active_ep_rsp, NULL);
+       ret = zb_zdo_active_ep(
+               handle,
+               dest_addr16,
+               _zb_active_ep_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_active_ep(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_active_ep(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_active_ep() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_active_ep() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -300,14 +434,20 @@ static int run_simple_desc_req(MManager *mm, struct menu_data *menu)
 {
        int ret = ZIGBEE_ERROR_NONE;
 
-       ret = zb_zdo_simple_desc_req(handle, dest_addr16, 1,
-                       zigbee_simple_desc_rsp, NULL);
+       ret = zb_zdo_simple_desc_req(
+               handle, dest_addr16,
+               1,
+               _zb_simple_desc_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_simple_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_simple_desc_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_simple_desc_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_simple_desc_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -318,16 +458,16 @@ static int run_match_desc_req(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 #if 0
        /* for ST open/close sensor */
-       ret = zb_zdo_match_desc_req(handle, st_addr16, st_ep1.profile_id,
+       ret = zb_zdo_match_desc_req(handle, st_addr16, st_ep1.profileid,
                st_ep1.num_of_in_clusters, st_ep1.in_clusters,
                st_ep1.num_of_out_clusters,     st_ep1.out_clusters,
-               zigbee_match_desc_rsp, user_data);
+               _zb_match_desc_cb, user_data);
 #endif
        /* for SJ power outlet */
-       ret = zb_zdo_match_desc_req(handle, dest_addr16, sj_ep1.profile_id,
+       ret = zb_zdo_match_desc_req(handle, dest_addr16, sj_ep1.profileid,
                        sj_ep1.num_of_in_clusters, sj_ep1.in_clusters,
                        sj_ep1.num_of_out_clusters,     sj_ep1.out_clusters,
-                       zigbee_match_desc_rsp, NULL);
+                       _zb_match_desc_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_match_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
@@ -344,7 +484,7 @@ static int run_power_desc_req(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        ret = zb_zdo_power_desc_req(handle, dest_addr16,
-                       zigbee_zdo_power_desc_rsp, NULL);
+                       zigbee_zdo_power_desc_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_power_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
@@ -361,7 +501,7 @@ static int run_complex_desc_req(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        ret = zb_zdo_complex_desc_req(handle, dest_addr16,
-                       zigbee_zdo_complex_desc_rsp, NULL);
+                       _zb_zdo_complex_desc_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_complex_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
@@ -378,7 +518,7 @@ static int run_user_desc_req(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        ret = zb_zdo_user_desc_req(handle, dest_addr16,
-                       zigbee_zdo_user_desc_rsp, NULL);
+                       _zb_zdo_user_desc_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_user_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
@@ -395,7 +535,7 @@ static int run_user_desc_set(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        ret = zb_zdo_user_desc_set(handle, dest_addr16, 4, (unsigned char*)"test",
-                       zigbee_zdo_user_desc_conf, NULL);
+                       _zb_zdo_user_desc_conf, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_user_desc_set(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
@@ -412,7 +552,7 @@ static int run_node_desc_req(MManager *mm, struct menu_data *menu)
        int ret = ZIGBEE_ERROR_NONE;
 
        ret = zb_zdo_node_desc_req(handle, dest_addr16,
-                       zigbee_zdo_node_desc_rsp, NULL);
+                       _zb_zdo_node_desc_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
                msg("zb_zdo_node_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
similarity index 57%
rename from test/zdo_network.c
rename to test/zdo-network.c
index c3fc68b..43b0e5f 100644 (file)
 #include <glib.h>
 #include <gio/gio.h>
 
-#include <zigbee.h>
-
 #include "main.h"
 #include "menu.h"
 
-extern zigbee_h  handle;
+extern zb_zigbee_h  handle;
 
-extern nwk_addr  dest_addr16;
-extern ieee_addr dest_addr64;
+extern zb_nwk_addr  dest_addr16;
+extern zb_ieee_addr dest_addr64;
 
 static char data_duration[MENU_DATA_SIZE + 1] = "5";
 static char data_count[MENU_DATA_SIZE + 1] = "4";
@@ -42,12 +40,16 @@ static char data_rejoin[MENU_DATA_SIZE + 1] = "1";
 static char data_permit_duration[MENU_DATA_SIZE + 1] = "1";
 static char data_tc[MENU_DATA_SIZE + 1] = "1";
 
-static void zigbee_zdo_mgmt_nwk_disc_rsp(unsigned char status,
-       unsigned char network_count, unsigned char start_idx, unsigned char network_list_count,
-       const zb_zdo_network_list_record_h *records, void *user_data)
+static void _zb_zdo_mgmt_nwk_disc_cb(
+       zb_zdp_status_e status,
+       unsigned char network_count,
+       unsigned char start_idx,
+       unsigned char network_list_count,
+       const zb_zdo_network_list_record_h *records,
+       void *user_data)
 {
        int i = 0;
-       ieee_addr extended_pan_id;
+       zb_ieee_addr extended_pan_id;
        unsigned char logical_channel;
        unsigned char stack_profile;
        unsigned char zigbee_version;
@@ -56,30 +58,50 @@ static void zigbee_zdo_mgmt_nwk_disc_rsp(unsigned char status,
        unsigned char permit_joining;
 
        msg("");
-       msgp("zb_zdo_mgmt_nwk_disc_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_mgmt_nwk_disc_cb() status = 0x%02X (%s)", status, zb_zdo_get_status_str(status));
 
        if (!status) {
                msg("  network_count 0x%02X", network_count);
                msg("  start_idx  0x%02X", start_idx);
                msg("  network_list_count  0x%02X", network_list_count);
                for (i = 0; i < network_list_count; i++) {
-                       zb_network_list_record_get_extended_pan_id(records[i], extended_pan_id);
+                       zb_network_list_record_get_extended_pan_id(
+                               records[i], extended_pan_id
+                               );
                        msg("  Extended PanId %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
                                extended_pan_id[7], extended_pan_id[6],
                                extended_pan_id[5], extended_pan_id[4],
                                extended_pan_id[3],     extended_pan_id[2],
                                extended_pan_id[1],     extended_pan_id[0]);
-                       zb_network_list_record_get_logical_channel(records[i], &logical_channel);
+                       zb_network_list_record_get_logical_channel(
+                               records[i],
+                               &logical_channel
+                               );
                        msg("  Logical Channel  0x%02X", logical_channel);
-                       zb_network_list_record_get_stack_profile(records[i], &stack_profile);
+                       zb_network_list_record_get_stack_profile(
+                               records[i],
+                               &stack_profile
+                               );
                        msg("  stack_profile    0x%02X", stack_profile);
-                       zb_network_list_record_get_zigbee_version(records[i], &zigbee_version);
+                       zb_network_list_record_get_zigbee_version(
+                               records[i],
+                               &zigbee_version
+                               );
                        msg("  zigbee_version   0x%02X", zigbee_version);
-                       zb_network_list_record_get_beacon_order(records[i], &beacon_order);
+                       zb_network_list_record_get_beacon_order(
+                               records[i],
+                               &beacon_order
+                               );
                        msg("  Beacon_order     0x%02X", beacon_order);
-                       zb_network_list_record_get_superframe_order(records[i], &superframe_order);
+                       zb_network_list_record_get_superframe_order(
+                               records[i],
+                               &superframe_order
+                               );
                        msg("  Superframe_order 0x%02X", superframe_order);
-                       zb_network_list_record_get_permit_joining(records[i], &permit_joining);
+                       zb_network_list_record_get_permit_joining(
+                               records[i],
+                               &permit_joining
+                               );
                        msg("  Permit joining   0x%02X", permit_joining);
                }
        } else {
@@ -87,15 +109,18 @@ static void zigbee_zdo_mgmt_nwk_disc_rsp(unsigned char status,
        }
 }
 
-static void zigbee_zdo_mgmt_lqi_rsp(unsigned char status,
-       unsigned char neighbor_table_entries, unsigned char start_idx,
+static void _zb_zdo_mgmt_lqi_cb(
+       zb_zdp_status_e status,
+       unsigned char neighbor_table_entries,
+       unsigned char start_idx,
        unsigned char neighbor_table_list_count,
-       const zb_zdo_neighbor_table_desc_h *neighbor_table_list, void *user_data)
+       const zb_zdo_neighbor_table_desc_h *neighbor_table_list,
+       void *user_data)
 {
        int i;
-       ieee_addr extended_pan_id;
-       ieee_addr addr64;
-       nwk_addr addr16;
+       zb_ieee_addr extended_pan_id;
+       zb_ieee_addr addr64;
+       zb_nwk_addr addr16;
        unsigned char device_type;
        unsigned char rx_on_when_idle;
        unsigned char releationship;
@@ -104,116 +129,202 @@ static void zigbee_zdo_mgmt_lqi_rsp(unsigned char status,
        unsigned char lqi;
 
        msg("");
-       msgp("zb_zdo_mgmt_lqi_rsp()");
+       msgp("zb_zdo_mgmt_lqi_cb()");
        msgp("  status = 0x%02X (%s) start_idx=%d count=%d", status,
-               zb_zdo_get_error_message(status), start_idx, neighbor_table_list_count);
+               zb_zdo_get_status_str(status), start_idx, neighbor_table_list_count);
        for (i = start_idx; i < neighbor_table_list_count; i++) {
-               zb_neighbor_table_desc_get_extended_pan_id(neighbor_table_list[i], extended_pan_id);
+               zb_neighbor_table_desc_get_extended_pan_id(
+                       neighbor_table_list[i],
+                       extended_pan_id
+                       );
                msg("  ext PAN ID      = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
-               extended_pan_id[0], extended_pan_id[1], extended_pan_id[2], extended_pan_id[3],
-               extended_pan_id[4], extended_pan_id[5], extended_pan_id[6], extended_pan_id[7]);
-               zb_neighbor_table_desc_get_ieee_addr(neighbor_table_list[i], addr64);
+                       extended_pan_id[0], extended_pan_id[1],
+                       extended_pan_id[2], extended_pan_id[3],
+                       extended_pan_id[4], extended_pan_id[5],
+                       extended_pan_id[6], extended_pan_id[7]);
+               zb_neighbor_table_desc_get_ieee_addr(
+                       neighbor_table_list[i],
+                       addr64
+                       );
                msg("  IEEE address    = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
-               addr64[0], addr64[1], addr64[2], addr64[3], addr64[4], addr64[5], addr64[6], addr64[7]);
-               zb_neighbor_table_desc_get_nwk_addr(neighbor_table_list[i], &addr16);
+                       addr64[0], addr64[1], addr64[2], addr64[3],
+                       addr64[4], addr64[5], addr64[6], addr64[7]);
+               zb_neighbor_table_desc_get_nwk_addr(
+                       neighbor_table_list[i],
+                       &addr16
+                       );
                msg("  Network address = 0x%04X", addr16);
-               zb_neighbor_table_desc_get_device_type(neighbor_table_list[i], &device_type);
+               zb_neighbor_table_desc_get_device_type(
+                       neighbor_table_list[i],
+                       &device_type
+                       );
                msg("  Device Type     = 0x%02X", device_type);
-               zb_neighbor_table_desc_get_rx_on_when_idle(neighbor_table_list[i], &rx_on_when_idle);
+               zb_neighbor_table_desc_get_rx_on_when_idle(
+                       neighbor_table_list[i],
+                       &rx_on_when_idle
+                       );
                msg("  Rx on idle      = 0x%02X", rx_on_when_idle);
-               zb_neighbor_table_desc_get_relationship(neighbor_table_list[i], &releationship);
+               zb_neighbor_table_desc_get_relationship(
+                       neighbor_table_list[i],
+                       &releationship
+                       );
                msg("  Relationship    = 0x%02X", releationship);
-               zb_neighbor_table_desc_get_permit_joining(neighbor_table_list[i], &permit_joining);
+               zb_neighbor_table_desc_get_permit_joining(
+                       neighbor_table_list[i],
+                       &permit_joining
+                       );
                msg("  Permit Joining  = 0x%02X", permit_joining);
-               zb_neighbor_table_desc_get_depth(neighbor_table_list[i], &depth);
+               zb_neighbor_table_desc_get_depth(
+                       neighbor_table_list[i],
+                       &depth
+                       );
                msg("  Depth           = 0x%02X", depth);
-               zb_neighbor_table_desc_get_lqi(neighbor_table_list[i], &lqi);
+               zb_neighbor_table_desc_get_lqi(
+                       neighbor_table_list[i],
+                       &lqi
+                       );
                msg("  LQI             = 0x%02X", lqi);
        }
 }
 
-static void zigbee_zdo_mgmt_rtg_rsp(unsigned char status,
-       unsigned char routing_table_entries, unsigned char start_idx,
+static void _zb_zdo_mgmt_rtg_cb(
+       zb_zdp_status_e status,
+       unsigned char routing_table_entries,
+       unsigned char start_idx,
        unsigned char routing_table_list_count,
-       const zb_zdo_routing_table_h *routing_table_list, void *user_data)
+       const zb_zdo_routing_table_h *routing_table_list,
+       void *user_data)
 {
        int i;
-       nwk_addr dst_addr;
-       unsigned char mode;
+       zb_nwk_addr dst_addr;
+       zb_zdp_status_e table_status;
        unsigned char memory_constrained;
        unsigned char many_to_one;
        unsigned char route_record_required;
-       nwk_addr next_hop_addr;
+       zb_nwk_addr next_hop_addr;
 
        msg("");
-       msgp("zb_zdo_mgmt_rtg_rsp()");
+       msgp("zb_zdo_mgmt_rtg_cb()");
        msgp("  status = 0x%02X (%s) routing_table_entries=%d start_idx=%d count=%d",
-                       status, zb_zdo_get_error_message(status),
+                       status, zb_zdo_get_status_str(status),
                        routing_table_entries, start_idx, routing_table_list_count);
        for (i = start_idx; i < routing_table_list_count; i++) {
-               zb_routing_table_get_dst_addr(routing_table_list[i], &dst_addr);
+               zb_routing_table_get_dst_addr(
+                       routing_table_list[i],
+                       &dst_addr
+                       );
                msg("  [%d] Destination address   = 0x%04X", i, dst_addr);
-               zb_routing_table_get_dst_status(routing_table_list[i], &mode);
-               msg("  [%d] Status                = 0x%02X", i, mode);
-               zb_routing_table_get_memory_constrained(routing_table_list[i], &memory_constrained);
+               zb_routing_table_get_dst_status(
+                       routing_table_list[i],
+                       &table_status
+                       );
+               msg("  [%d] Status                = 0x%02X", i, table_status);
+               zb_routing_table_get_memory_constrained(
+                       routing_table_list[i],
+                       &memory_constrained
+                       );
                msg("  [%d] memory_constrained    = 0x%02X", i, memory_constrained);
-               zb_routing_table_get_many_to_one(routing_table_list[i], &many_to_one);
+               zb_routing_table_get_many_to_one(
+                       routing_table_list[i],
+                       &many_to_one
+                       );
                msg("  [%d] many_to_one           = 0x%02X", i, many_to_one);
-               zb_routing_table_get_route_record_required(routing_table_list[i], &route_record_required);
+               zb_routing_table_get_route_record_required(
+                       routing_table_list[i],
+                       &route_record_required
+                       );
                msg("  [%d] route_record_required = 0x%02X", i, route_record_required);
-               zb_routing_table_get_next_hop_addr(routing_table_list[i], &next_hop_addr);
+               zb_routing_table_get_next_hop_addr(
+                       routing_table_list[i],
+                       &next_hop_addr
+                       );
                msg("  [%d] next_hop_addr         = 0x%04X", i, next_hop_addr);
                msg("");
        }
 }
 
-static void zigbee_zdo_mgmt_bind_rsp(unsigned char status, unsigned char entries,
-       unsigned char start_idx, unsigned char binding_table_list_count, const zb_zdo_binding_table_h *list,
+static void _zb_zdo_mgmt_bind_cb(
+       zb_zdp_status_e status,
+       unsigned char entries,
+       unsigned char start_idx,
+       unsigned char binding_table_list_count,
+       const zb_zdo_binding_table_h *list,
        void *user_data)
 {
        int i;
-       nwk_addr addr16;
-       ieee_addr addr64;
-       unsigned short cluster_id;
-       unsigned char src_ep, dst_ep, dst_addr_mode;
+       zb_nwk_addr addr16;
+       zb_ieee_addr addr64;
+       zb_cluster_id clusterid;
+       zb_end_point src_ep, dst_ep;
+       unsigned char dst_addr_mode;
 
        msg("");
-       msgp("zb_zdo_mgmt_bind_rsp()");
+       msgp("zb_zdo_mgmt_bind_cb()");
        msgp("  status = 0x%02X (%s) start_idx = %d number of records = %d",
-               status, zb_zdo_get_error_message(status), start_idx, binding_table_list_count);
+               status, zb_zdo_get_status_str(status), start_idx, binding_table_list_count);
 
        for (i = 0; i < binding_table_list_count; i++) {
-               zb_binding_table_get_src_addr(list[i], addr64);
+               zb_binding_table_get_src_addr(
+                       list[i],
+                       addr64
+                       );
                msg("  Src IEEE address    = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
-                       addr64[0], addr64[1], addr64[2], addr64[3], addr64[4], addr64[5], addr64[6], addr64[7]);
-               zb_binding_table_get_src_ep(list[i], &src_ep);
+                       addr64[0], addr64[1], addr64[2], addr64[3],
+                       addr64[4], addr64[5], addr64[6], addr64[7]);
+               zb_binding_table_get_src_ep(
+                       list[i],
+                       &src_ep
+                       );
                msg("  Src End-Point       = 0x%02X", src_ep);
-               zb_binding_table_get_cluster_id(list[i], &cluster_id);
-               msg("  Cluster ID          = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
-               zb_binding_table_get_dst_addr_mode(list[i], &dst_addr_mode);
+               zb_binding_table_get_cluster_id(
+                       list[i],
+                       &clusterid
+                       );
+               msg("  Cluster ID          = 0x%04X (%s)",
+                       clusterid, zb_zcl_get_cluster_id_str(clusterid));
+               zb_binding_table_get_dst_addr_mode(
+                       list[i],
+                       &dst_addr_mode
+                       );
                msg("  Dst Address Mode    = 0x%02X", dst_addr_mode);
-               zb_binding_table_get_dst_addr16(list[i], &addr16);
+               zb_binding_table_get_dst_addr16(
+                       list[i],
+                       &addr16
+                       );
                msg("  Dst Network address = 0x%04X", addr16);
-               memset(addr64, 0, sizeof(ieee_addr));
-               zb_binding_table_get_dst_addr64(list[i], addr64);
+               memset(addr64, 0, sizeof(zb_ieee_addr));
+               zb_binding_table_get_dst_addr64(
+                       list[i],
+                       addr64
+                       );
                msg("  Dst IEEE address    = %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
-                       addr64[0], addr64[1], addr64[2], addr64[3], addr64[4], addr64[5], addr64[6], addr64[7]);
-               zb_binding_table_get_dst_ep(list[i], &dst_ep);
+                       addr64[0], addr64[1], addr64[2], addr64[3],
+                       addr64[4], addr64[5], addr64[6], addr64[7]);
+               zb_binding_table_get_dst_ep(
+                       list[i],
+                       &dst_ep
+                       );
                msg("  Dst End-Point       = 0x%02X", src_ep);
                msg("");
        }
 }
 
-static void zigbee_zdo_mgmt_leave_rsp(unsigned char status, void *user_data)
+static void _zb_zdo_mgmt_leave_cb(
+       zb_zdp_status_e status,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_mgmt_leave_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_mgmt_leave_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 }
 
-static void zigbee_zdo_mgmt_permit_joining_rsp(unsigned char status, void *user_data)
+static void _zb_zdo_mgmt_permit_joining_cb(
+       zb_zdp_status_e status,
+       void *user_data)
 {
        msg("");
-       msgp("zb_zdo_mgmt_permit_joining_rsp() status = 0x%02X (%s)", status, zb_zdo_get_error_message(status));
+       msgp("zb_zdo_mgmt_permit_joining_cb() status = 0x%02X (%s)",
+               status, zb_zdo_get_status_str(status));
 }
 
 static int run_mgmt_nwk_disc_req(MManager *mm, struct menu_data *menu)
@@ -231,15 +342,23 @@ static int run_mgmt_nwk_disc_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_start_idx))
                start_idx = (unsigned char)strtol(data_start_idx, NULL, 10);
 
-       ret = zb_zdo_mgmt_nwk_disc_req(handle, dest_addr16, scan_channels,
-                       scan_duration, scan_count, start_idx,
-                       zigbee_zdo_mgmt_nwk_disc_rsp, NULL);
+       ret = zb_zdo_mgmt_nwk_disc_req(
+               handle,
+               dest_addr16,
+               scan_channels,
+               scan_duration,
+               scan_count, start_idx,
+               _zb_zdo_mgmt_nwk_disc_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_nwk_disc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_nwk_disc_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_nwk_disc_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_nwk_disc_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -260,14 +379,22 @@ static int run_mgmt_nwk_update_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_nwk_update_id))
                nwk_update_id = (unsigned char)strtol(data_nwk_update_id, NULL, 10);
 
-       ret = zb_zdo_mgmt_nwk_update_req(handle, scan_channels, scan_duration,
-                       scan_count, nwk_update_id, dest_addr16);
+       ret = zb_zdo_mgmt_nwk_update_req(
+               handle,
+               scan_channels,
+               scan_duration,
+               scan_count,
+               nwk_update_id,
+               dest_addr16
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_nwk_update_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_nwk_update_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_nwk_update_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_nwk_update_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -281,14 +408,21 @@ static int run_mgmt_lqi_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_start_idx))
                start_idx = (unsigned char)strtol(data_start_idx, NULL, 10);
 
-       ret = zb_zdo_mgmt_lqi_req(handle, dest_addr16, start_idx,
-                       zigbee_zdo_mgmt_lqi_rsp, NULL);
+       ret = zb_zdo_mgmt_lqi_req(
+               handle,
+               dest_addr16,
+               start_idx,
+               _zb_zdo_mgmt_lqi_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_lqi_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_lqi_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_lqi_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_lqi_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -302,14 +436,21 @@ static int run_mgmt_rtg_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_start_idx))
                start_idx = (unsigned char)strtol(data_start_idx, NULL, 10);
 
-       ret = zb_zdo_mgmt_rtg_req(handle, dest_addr16, start_idx,
-                       zigbee_zdo_mgmt_rtg_rsp, NULL);
+       ret = zb_zdo_mgmt_rtg_req(
+               handle,
+               dest_addr16,
+               start_idx,
+               _zb_zdo_mgmt_rtg_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_rtg_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_rtg_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_rtg_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_rtg_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -323,14 +464,21 @@ static int run_mgmt_bind_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_start_idx))
                start_idx = (unsigned char)strtol(data_start_idx, NULL, 10);
 
-       ret = zb_zdo_mgmt_bind_req(handle, dest_addr16, start_idx,
-                       zigbee_zdo_mgmt_bind_rsp, NULL);
+       ret = zb_zdo_mgmt_bind_req(
+               handle,
+               dest_addr16,
+               start_idx,
+               _zb_zdo_mgmt_bind_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_bind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_bind_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_bind_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_bind_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -352,14 +500,22 @@ static int run_mgmt_leave_req(MManager *mm, struct menu_data *menu)
                rejoin = (var == 0) ? false : true;
        }
 
-       ret = zb_zdo_mgmt_leave_req(handle, dest_addr64, remove_children, rejoin,
-                       zigbee_zdo_mgmt_leave_rsp, NULL);
+       ret = zb_zdo_mgmt_leave_req(
+               handle,
+               dest_addr64,
+               remove_children,
+               rejoin,
+               _zb_zdo_mgmt_leave_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_leave_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_leave_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_leave_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_leave_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;
@@ -376,15 +532,22 @@ static int run_mgmt_permit_joining_req(MManager *mm, struct menu_data *menu)
        if (strlen(data_tc))
                tc_significance = (unsigned char)strtol(data_tc, NULL, 10);
 
-       ret = zb_zdo_mgmt_permit_joining_req(handle, dest_addr16,
-                       permit_duration, tc_significance,
-                       zigbee_zdo_mgmt_permit_joining_rsp, NULL);
+       ret = zb_zdo_mgmt_permit_joining_req(
+               handle,
+               dest_addr16,
+               permit_duration,
+               tc_significance,
+               _zb_zdo_mgmt_permit_joining_cb,
+               NULL
+               );
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_permit_joining_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
+               msg("zb_zdo_mgmt_permit_joining_req(0x%X) - FAILED!!! [%s]",
+                       ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_zdo_mgmt_permit_joining_req() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
+       msg(" - zb_zdo_mgmt_permit_joining_req() ret: [0x%X] [%s]",
+               ret, zigbee_error_to_string(ret));
        msg("");
 
        return RET_SUCCESS;