Add feature / privilege check logic
authorJiwan Kim <ji-wan.kim@samsung.com>
Thu, 23 Mar 2017 10:18:08 +0000 (19:18 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 11 May 2017 09:07:20 +0000 (18:07 +0900)
- Feature check : All APIs
- Privilege check : Required APIs
- Doxygen updation for type of return value
- Adjust Feature name string

Change-Id: I34bba8d6169a47771af39cc75474132813655743
Signed-off-by: Jiwan Kim <ji-wan.kim@samsung.com>
45 files changed:
common/zb_common.h
include/zb_custom.h
include/zb_zcl.h
include/zb_zdo.h
include/zcl/zb_zcl_alarm_cluster.h
include/zcl/zb_zcl_basic_cluster.h
include/zcl/zb_zcl_color_control_cluster.h
include/zcl/zb_zcl_global_commands.h
include/zcl/zb_zcl_groups_cluster.h
include/zcl/zb_zcl_ias_zone_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/zdo/zb_zdo_bind_mgr.h
include/zdo/zb_zdo_config.h
include/zdo/zb_zdo_dev_disc.h
include/zdo/zb_zdo_nwk_mgr.h
include/zdo/zb_zdo_svc_disc.h
include/zigbee.h
include/zigbee_internal.h
lib/zbl.c
lib/zbl_custom.c
lib/zbl_dbus.c
lib/zbl_zcl.c
lib/zbl_zdo.c
test/main.c
test/main.h
test/zcl_cluster_alarm.c
test/zcl_cluster_basic.c
test/zcl_cluster_colorctrl.c
test/zcl_cluster_group.c
test/zcl_cluster_ias_zone.c
test/zcl_cluster_identity.c
test/zcl_cluster_levelctrl.c
test/zcl_cluster_onoff.c
test/zcl_cluster_pollctrl.c
test/zcl_cluster_scene.c
test/zcl_cluster_thermostat.c
test/zcl_global_cmd.c
test/zdo_binding.c
test/zdo_device.c
test/zdo_network.c

index 758ce2cf73a0d2379d2bc90c659d70015cfb1726..163922eca113b7a98673277bc0d981ac1d824bb5 100644 (file)
@@ -23,8 +23,7 @@
 #include <zdo/zb_zdo_type.h>
 #include <zcl/zb_zcl_type.h>
 
-#define ZIGBEE_ADMIN_FEATURE "http://tizen.org/feature/zigbee.admin"
-#define ZIGBEE_FEATURE "http://tizen.org/feature/zigbee"
+#define ZIGBEE_FEATURE "http://tizen.org/feature/network.zigbee"
 
 #if 1
 #define CHECK_FEATURE_SUPPORTED(feature_name) { \
        }
 #endif
 
+#define CHECK_ZIGBEE_PRIVILEGE() { \
+       int zb_check_priv = zbl_check_privilege(); \
+       if (zb_check_priv != ZIGBEE_ERROR_NONE) { \
+               return zb_check_priv; \
+       } \
+}
+
 #ifndef ZIGBEE_DBUS_INTERFACE
 #define ZIGBEE_DBUS_INTERFACE "org.tizen.zigbee"
 #warning "ZIGBEE_DBUS_INTERFACE is redefined"
index 6c667824c2d3f6e58b9ee7e3577be562c6680064..8a9bae93c3d45f4ec78cbf83984aaf58288eec02 100644 (file)
@@ -148,6 +148,8 @@ typedef void (*zb_send_to_local_rsp)(
  * @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_aps_send_rsp()
  */
@@ -201,6 +203,8 @@ int zb_aps_send(
  * @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_send_rsp()
  */
@@ -234,6 +238,8 @@ int zb_zcl_send(
  * @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_send_to_local_rsp()
  */
index b6ec4a8c4a6df3f48bea379b629022e4ac044a36..75d6c3317f7160091e630eb48f215d068a1a3779 100644 (file)
@@ -122,6 +122,9 @@ int zb_get_data_size(unsigned char type);
  * @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()
  */
@@ -210,6 +213,9 @@ int zb_get_value(zb_value_h handle, unsigned char *type, unsigned char **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_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()
@@ -231,6 +237,7 @@ int zb_create_read_attr_status_record(read_attr_status_record_h *handle);
  * @return 0 on success, otherwise a 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()
@@ -257,6 +264,7 @@ void zb_destroy_read_attr_status_record(read_attr_status_record_h handle);
  * @return 0 on success, otherwise a 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()
@@ -289,6 +297,7 @@ int zb_get_id_from_read_attr_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_destroy_read_attr_status_record()
@@ -320,6 +329,7 @@ int zb_set_id_to_read_attr_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_destroy_read_attr_status_record()
@@ -351,6 +361,7 @@ int zb_get_status_from_read_attr_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_destroy_read_attr_status_record()
@@ -383,6 +394,7 @@ int zb_set_status_to_read_attr_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_destroy_read_attr_status_record()
@@ -414,6 +426,7 @@ int zb_get_type_from_read_attr_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_destroy_read_attr_status_record()
@@ -517,6 +530,9 @@ int zb_set_value_to_read_attr_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_discover_attr_info()
  * @see zb_get_id_from_discover_attr_info()
@@ -536,6 +552,7 @@ int zb_create_discover_attr_info(discover_attr_info_record_h *handle);
  * @return 0 on success, otherwise a 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()
@@ -559,6 +576,7 @@ void zb_destroy_discover_attr_info(discover_attr_info_record_h handle);
  * @return 0 on success, otherwise a 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()
@@ -584,6 +602,7 @@ int zb_get_id_from_discover_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -607,6 +626,7 @@ int zb_set_id_to_discover_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -630,6 +650,7 @@ int zb_get_type_from_discover_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -654,6 +675,9 @@ int zb_set_type_to_discover_attr_info(
  * @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()
@@ -699,7 +723,10 @@ void zb_destroy_write_attr_record(
  * @param[in] handle handle of write attribute record
  * @param[in] id attribute identifier
  *
- * @return None
+ * @return 0 on success, otherwise a 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()
@@ -724,7 +751,10 @@ int zb_set_id_to_write_attr_record(
  * @param[in] handle handle of write attribute record
  * @param[in] type attribute data type
  *
- * @return None
+ * @return 0 on success, otherwise a 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()
@@ -751,7 +781,10 @@ int zb_set_type_to_write_attr_record(
  * @param[in] value attribute data
  * @param[in] count length of attribute data
  *
- * @return None
+ * @return 0 on success, otherwise a 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()
@@ -811,6 +844,8 @@ int zb_set_value_to_write_attr_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()
@@ -827,9 +862,7 @@ int zb_create_write_attr_status(write_attr_status_record_h *handle);
  *
  * @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
+ * @return None
  *
  * @see zb_zcl_global_write_attr_rsp()
  * @see zb_create_write_attr_status()
@@ -854,6 +887,7 @@ void zb_destroy_write_attr_status(write_attr_status_record_h handle);
  * @return 0 on success, otherwise a 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()
@@ -877,6 +911,7 @@ int zb_get_status_from_write_attr_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
  *
  * @see zb_zcl_global_write_attr_rsp()
  * @see zb_get_status_from_write_attr_status()
@@ -903,6 +938,7 @@ int zb_set_status_to_write_attr_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
  *
  * @see zb_zcl_global_write_attr_rsp()
  * @see zb_get_status_from_write_attr_status()
@@ -929,6 +965,7 @@ int zb_get_id_from_write_attr_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
  *
  * @see zb_zcl_global_write_attr_rsp()
  * @see zb_get_status_from_write_attr_status()
@@ -953,6 +990,9 @@ int zb_set_id_to_write_attr_status(
  * @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()
@@ -989,6 +1029,7 @@ int zb_create_report_config_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()
@@ -1044,6 +1085,7 @@ void zb_destroy_report_config_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()
@@ -1100,6 +1142,7 @@ int zb_get_dir_from_report_config_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()
@@ -1140,6 +1183,7 @@ int zb_set_dir_to_report_config_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()
@@ -1180,6 +1224,7 @@ int zb_get_id_from_report_config_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()
@@ -1219,6 +1264,7 @@ int zb_set_id_to_report_config_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()
@@ -1258,6 +1304,7 @@ int zb_get_type_from_report_config_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()
@@ -1301,6 +1348,7 @@ int zb_set_type_to_report_config_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()
@@ -1344,6 +1392,7 @@ int zb_get_min_i_from_report_config_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()
@@ -1388,6 +1437,7 @@ int zb_set_min_i_to_report_config_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()
@@ -1432,6 +1482,7 @@ int zb_get_max_i_from_report_config_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()
@@ -1478,6 +1529,7 @@ int zb_set_max_i_to_report_config_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()
@@ -1524,6 +1576,7 @@ int zb_get_timeout_from_report_config_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()
@@ -1851,6 +1904,9 @@ int zb_get_change_from_report_config_record3(
  * @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()
@@ -1896,6 +1952,7 @@ void zb_destroy_read_report_config_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()
@@ -1922,6 +1979,7 @@ int zb_get_dir_from_read_report_config_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()
@@ -1947,6 +2005,7 @@ int zb_set_dir_to_read_report_config_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()
@@ -1972,6 +2031,7 @@ int zb_get_id_from_read_report_config_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()
@@ -1998,6 +2058,9 @@ int zb_set_id_to_read_report_config_record(
  * @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()
@@ -2023,6 +2086,7 @@ int zb_create_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2055,6 +2119,7 @@ void zb_destroy_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2088,6 +2153,7 @@ int zb_get_status_from_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2124,6 +2190,7 @@ int zb_set_status_to_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2160,6 +2227,7 @@ int zb_get_dir_from_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2188,6 +2256,7 @@ int zb_set_dir_to_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2216,6 +2285,7 @@ int zb_get_id_from_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_rsp()
  * @see zb_create_report_config_response_record()
@@ -2245,6 +2315,9 @@ int zb_set_id_to_report_config_response_record(
  * @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()
@@ -2270,6 +2343,7 @@ int zb_create_attr_report(
  * @return 0 on success, otherwise a 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()
@@ -2297,6 +2371,7 @@ void zb_destroy_attr_report(
  * @return 0 on success, otherwise a 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()
@@ -2325,6 +2400,7 @@ int zb_get_id_from_attr_report(
  * @return 0 on success, otherwise a 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()
@@ -2353,6 +2429,7 @@ int zb_set_id_to_attr_report(
  * @return 0 on success, otherwise a 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()
@@ -2381,6 +2458,7 @@ int zb_get_type_from_attr_report(
  * @return 0 on success, otherwise a 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()
@@ -2472,6 +2550,9 @@ int zb_set_value_to_attr_report(
  * @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()
@@ -2497,6 +2578,7 @@ int zb_create_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2527,6 +2609,7 @@ void zb_destroy_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2558,6 +2641,7 @@ int zb_get_id_from_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2586,6 +2670,7 @@ int zb_set_id_to_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2614,6 +2699,7 @@ int zb_get_type_from_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2644,6 +2730,7 @@ int zb_set_type_to_extended_attr_info(
  * @return 0 on success, otherwise a 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()
@@ -2674,6 +2761,7 @@ int zb_get_acl_from_extended_attr_info(
  * @return 0 on success, otherwise a 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()
index 7f92cd9d015b51645ac43eb25a59d4b81f645cf6..d29d9ce8bbcbd9dc0bff7617cbf4ed87d03a8a7e 100644 (file)
@@ -95,6 +95,9 @@ const char* zb_get_device_id_string(int device_id);
  * @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()
@@ -114,6 +117,7 @@ int zb_simple_desc_create(
  * @return 0 on success, otherwise a 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()
@@ -133,6 +137,7 @@ int zb_simple_desc_copy(
  * @return 0 on success, otherwise a 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()
@@ -152,6 +157,7 @@ int zb_simple_desc_destroy(
  * @return 0 on success, otherwise a 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()
  */
@@ -171,6 +177,7 @@ int zb_simple_desc_get_ep(
  * @return 0 on success, otherwise a 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()
  */
@@ -190,6 +197,7 @@ int zb_simple_desc_set_ep(
  * @return 0 on success, otherwise a 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()
  */
@@ -209,6 +217,7 @@ int zb_simple_desc_get_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()
  */
@@ -228,6 +237,7 @@ int zb_simple_desc_set_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_device_id()
  */
@@ -247,6 +257,7 @@ int zb_simple_desc_get_device_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_ver()
  */
@@ -266,6 +277,7 @@ int zb_simple_desc_set_device_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_device_ver()
  */
@@ -285,6 +297,7 @@ int zb_simple_desc_get_device_ver(
  * @return 0 on success, otherwise a 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()
  */
@@ -304,6 +317,7 @@ int zb_simple_desc_set_device_ver(
  * @return 0 on success, otherwise a 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()
  */
@@ -323,6 +337,7 @@ int zb_simple_desc_get_num_of_in_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()
  */
@@ -342,6 +357,7 @@ int zb_simple_desc_set_num_of_in_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()
  */
@@ -361,6 +377,7 @@ int zb_simple_desc_get_num_of_out_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()
  */
@@ -380,6 +397,7 @@ int zb_simple_desc_set_num_of_out_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()
  */
@@ -400,6 +418,7 @@ int zb_simple_desc_get_in_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()
  */
@@ -420,6 +439,7 @@ int zb_simple_desc_set_in_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()
  */
@@ -440,6 +460,7 @@ int zb_simple_desc_get_out_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()
  */
@@ -462,6 +483,9 @@ int zb_simple_desc_set_out_clusters(
  * @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()
@@ -481,6 +505,7 @@ int zb_node_power_desc_create(
  * @return 0 on success, otherwise a 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()
@@ -500,6 +525,7 @@ int zb_node_power_desc_copy(
  * @return 0 on success, otherwise a 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()
@@ -526,6 +552,7 @@ int zb_node_power_desc_destroy(
  * @return 0 on success, otherwise a 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()
  */
@@ -553,6 +580,7 @@ int zb_node_power_desc_get_current_power_mode(
  * @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()
  */
@@ -577,6 +605,7 @@ int zb_node_power_desc_set_current_power_mode(
  * @return 0 on success, otherwise a 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()
  */
@@ -602,6 +631,7 @@ int zb_node_power_desc_get_available_power_sources(
  * @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()
  */
@@ -626,6 +656,7 @@ int zb_node_power_desc_set_available_power_sources(
  * @return 0 on success, otherwise a 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()
  */
@@ -651,6 +682,7 @@ int zb_node_power_desc_get_current_power_source(
  * @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()
  */
@@ -675,6 +707,7 @@ int zb_node_power_desc_set_current_power_source(
  * @return 0 on success, otherwise a 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()
  */
@@ -699,6 +732,7 @@ int zb_node_power_desc_get_current_power_source_level(
  * @return 0 on success, otherwise a 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()
  */
@@ -720,6 +754,9 @@ int zb_node_power_desc_set_current_power_source_level(
  * @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()
@@ -739,6 +776,7 @@ int zb_node_desc_create(
  * @return 0 on success, otherwise a 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()
@@ -758,6 +796,7 @@ int zb_node_desc_copy(
  * @return 0 on success, otherwise a 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()
@@ -781,6 +820,7 @@ int zb_node_desc_destroy(
  * @return 0 on success, otherwise a 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()
  */
@@ -805,6 +845,7 @@ int zb_node_desc_get_logical_type(
  * @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()
  */
@@ -828,6 +869,7 @@ int zb_node_desc_set_logical_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_node_desc_set_complex_descriptor_available()
  */
@@ -852,6 +894,7 @@ int zb_node_desc_get_complex_desciptor_available(
  * @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()
  */
@@ -875,6 +918,7 @@ int zb_node_desc_set_complex_descriptor_available(
  * @return 0 on success, otherwise a 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()
  */
@@ -899,6 +943,7 @@ int zb_node_desc_get_user_descriptor_available(
  * @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()
  */
@@ -920,6 +965,7 @@ int zb_node_desc_set_user_descriptor_available(
  * @return 0 on success, otherwise a 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()
  */
@@ -941,6 +987,7 @@ int zb_node_desc_get_aps_flags(
  * @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()
  */
@@ -967,6 +1014,7 @@ int zb_node_desc_set_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_NOT_SUPPORTED Not supported
  *
  * @see zb_node_desc_set_frequency_band()
  */
@@ -994,6 +1042,7 @@ int zb_node_desc_get_frequency_band(
  * @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()
  */
@@ -1043,6 +1092,7 @@ int zb_node_desc_set_frequency_band(
  * @return 0 on success, otherwise a 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()
  */
@@ -1092,6 +1142,7 @@ int zb_node_desc_get_mac_capability_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_NOT_SUPPORTED Not supported
  *
  * @see zb_node_desc_get_mac_capability_flags()
  */
@@ -1113,6 +1164,7 @@ int zb_node_desc_set_mac_capability_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_NOT_SUPPORTED Not supported
  *
  * @see zb_node_desc_set_manufacturer_code()
  */
@@ -1134,6 +1186,7 @@ int zb_node_desc_get_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()
  */
@@ -1158,6 +1211,7 @@ int zb_node_desc_set_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_maximum_buffer_size()
  */
@@ -1183,6 +1237,7 @@ int zb_node_desc_get_maximum_buffer_size(
  * @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()
  */
@@ -1206,6 +1261,7 @@ int zb_node_desc_set_maximum_buffer_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_node_desc_set_maximum_buffer_size()
  */
@@ -1230,6 +1286,7 @@ int zb_node_desc_get_maximum_incoming_transfer_size(
  * @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()
  */
@@ -1259,6 +1316,7 @@ int zb_node_desc_set_maximum_incoming_transfer_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_node_desc_set_server_mask()
  */
@@ -1289,6 +1347,7 @@ int zb_node_desc_get_server_mask(
  * @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()
  */
@@ -1312,6 +1371,7 @@ int zb_node_desc_set_server_mask(
  * @return 0 on success, otherwise a 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()
  */
@@ -1336,6 +1396,7 @@ int zb_node_desc_get_maximum_outgoing_transfer_size(
  * @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()
  */
@@ -1359,6 +1420,7 @@ int zb_node_desc_set_maximum_outgoing_transfer_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_node_desc_set_descriptor_capability_field()
  */
@@ -1383,6 +1445,7 @@ int zb_node_desc_get_descriptor_capability_field(
  * @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()
  */
@@ -1405,6 +1468,7 @@ int zb_node_desc_set_descriptor_capability_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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_mgmt_nwk_disc_rsp()
  */
@@ -1428,6 +1492,7 @@ int zb_network_list_record_get_extended_pan_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_zdo_mgmt_nwk_disc_rsp()
  */
@@ -1450,6 +1515,7 @@ int zb_network_list_record_get_logical_channel(
  * @return 0 on success, otherwise a 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()
  */
@@ -1472,6 +1538,7 @@ int zb_network_list_record_get_zigbee_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_zdo_mgmt_nwk_disc_rsp()
  */
@@ -1495,6 +1562,7 @@ int zb_network_list_record_get_stack_profile(
  * @return 0 on success, otherwise a 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()
  */
@@ -1518,6 +1586,7 @@ int zb_network_list_record_get_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()
  */
@@ -1542,6 +1611,7 @@ int zb_network_list_record_get_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()
  */
@@ -1563,6 +1633,7 @@ int zb_network_list_record_get_permit_joining(
  * @return 0 on success, otherwise a 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()
@@ -1594,6 +1665,7 @@ int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
  * @return 0 on success, otherwise a 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()
@@ -1621,6 +1693,7 @@ int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
  * @return 0 on success, otherwise a 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()
@@ -1648,6 +1721,7 @@ int zb_routing_table_get_memory_constrained(
  * @return 0 on success, otherwise a 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()
@@ -1676,6 +1750,7 @@ int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
  * @return 0 on success, otherwise a 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()
@@ -1702,6 +1777,7 @@ int zb_routing_table_get_route_record_required(
  * @return 0 on success, otherwise a 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()
@@ -1728,6 +1804,7 @@ int zb_routing_table_get_next_hop_addr(
  * @return 0 on success, otherwise a 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()
@@ -1760,6 +1837,7 @@ int zb_neighbor_table_desc_get_extended_pan_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_zdo_mgmt_lqi_rsp()
  * @see zb_neighbor_table_desc_get_extended_pan_id()
@@ -1792,6 +1870,7 @@ int zb_neighbor_table_desc_get_ieee_addr(
  * @return 0 on success, otherwise a 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()
@@ -1826,6 +1905,7 @@ int zb_neighbor_table_desc_get_nwk_addr(
  * @return 0 on success, otherwise a 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()
@@ -1861,6 +1941,7 @@ int zb_neighbor_table_desc_get_device_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_zdo_mgmt_lqi_rsp()
  * @see zb_neighbor_table_desc_get_extended_pan_id()
@@ -1897,6 +1978,7 @@ int zb_neighbor_table_desc_get_rx_on_when_idle(
  * @return 0 on success, otherwise a 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()
@@ -1931,6 +2013,7 @@ int zb_neighbor_table_desc_get_relationship(
  * @return 0 on success, otherwise a 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()
@@ -1964,6 +2047,7 @@ int zb_neighbor_table_desc_get_permit_joining(
  * @return 0 on success, otherwise a 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()
@@ -1995,6 +2079,7 @@ int zb_neighbor_table_desc_get_depth(
  * @return 0 on success, otherwise a 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()
@@ -2025,6 +2110,7 @@ int zb_neighbor_table_desc_get_lqi(
  * @return 0 on success, otherwise a 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()
  */
@@ -2046,6 +2132,7 @@ int zb_binding_table_get_src_addr(
  * @return 0 on success, otherwise a 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()
  */
@@ -2068,6 +2155,7 @@ int zb_binding_table_get_src_ep(
  * @return 0 on success, otherwise a 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()
  */
@@ -2097,6 +2185,7 @@ int zb_binding_table_get_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
  *
  * @see zb_zdo_mgmt_bind_rsp()
  */
@@ -2120,6 +2209,7 @@ int zb_binding_table_get_dst_addr_mode(
  * @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()
  */
@@ -2143,6 +2233,7 @@ int zb_binding_table_get_dst_addr16(
  * @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()
  */
@@ -2166,6 +2257,7 @@ int zb_binding_table_get_dst_addr64(
  * @return 0 on success, otherwise a 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()
  */
@@ -2187,6 +2279,7 @@ int zb_binding_table_get_dst_ep(
  * @return 0 on success, otherwise a 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()
  */
@@ -2208,6 +2301,7 @@ int zb_discovery_cache_get_ieee_addr(
  * @return 0 on success, otherwise a 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()
  */
index a1e83687f0280b4a5a0c3bfa3d04c72e86650b95..0aa4c97b6413f3bffbf4e29af2e67ce8f656d93d 100644 (file)
@@ -120,6 +120,8 @@ typedef void (*zb_zcl_alarm_get_alarm_rsp)(
  * @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,
@@ -148,6 +150,8 @@ int zb_zcl_alarm_reset_alarm(
  * @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,
@@ -179,6 +183,8 @@ int zb_zcl_alarm_reset_all_alarm(
  * @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()
  */
@@ -204,6 +210,8 @@ int zb_zcl_alarm_get_alarm(
  * @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_zcl_alarm_reset_all_alarm_log(
                zigbee_h handle,
index cd6c72b43cc427f13289a50c952e78115f330b1c..07661954f9ad9b4259dd217a1cb43e4e7e212993 100644 (file)
@@ -58,6 +58,8 @@ extern "C" {
  * @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()
  */
index 32c29117754aac9ab8b863cb8f58308656a98af8..db474d5b4285937078799aee746892ffead25485 100644 (file)
@@ -95,6 +95,8 @@
  * @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(
@@ -135,6 +137,8 @@ int zb_zcl_ccontrol_move_to_hue(
  * @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(
@@ -174,6 +178,8 @@ int zb_zcl_ccontrol_move_hue(
  * @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(
@@ -214,6 +220,8 @@ int zb_zcl_ccontrol_step_hue(
  * @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(
@@ -255,6 +263,8 @@ int zb_zcl_ccontrol_move_to_saturation(
  * @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(
@@ -296,6 +306,8 @@ int zb_zcl_ccontrol_move_saturation(
  * @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(
@@ -340,6 +352,8 @@ int zb_zcl_ccontrol_step_saturation(
  * @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(
@@ -384,6 +398,8 @@ int zb_zcl_ccontrol_move_to_hue_and_saturation(
  * @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(
@@ -424,6 +440,8 @@ int zb_zcl_ccontrol_move_to_color(
  * @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(
@@ -468,6 +486,8 @@ int zb_zcl_ccontrol_move_color(
  * @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(
@@ -509,6 +529,8 @@ int zb_zcl_ccontrol_step_color(
  * @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(
index 39a4c2d8bc5d2a0849564775c32c8608fec18ca2..043a550fb2043b1344935220b8fe2f1538525f03 100644 (file)
@@ -107,6 +107,8 @@ typedef void (*zb_zcl_global_rsp)(
  * @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.
  *
@@ -160,6 +162,8 @@ int zb_zcl_global_read_attr(
  * @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()
  */
@@ -211,6 +215,8 @@ int zb_zcl_global_write_attr(
  * @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()
  */
@@ -260,6 +266,8 @@ int zb_zcl_global_write_attr_undivided(
  * @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(
@@ -308,6 +316,8 @@ int zb_zcl_global_write_attr_no_rsp(
  * @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()
  */
@@ -359,6 +369,8 @@ int zb_zcl_global_config_report(
  * @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()
  */
@@ -437,6 +449,8 @@ typedef void (*zb_zcl_global_discover_attr_rsp)(
  * @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()
  */
@@ -491,6 +505,7 @@ int zb_zcl_global_discover_attr(
  * @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()
@@ -562,6 +577,7 @@ int zb_zcl_global_read_attr_structured(
  * @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()
@@ -651,6 +667,8 @@ typedef void (*zb_zcl_global_discover_cmds_rsp)(
  * @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()
  */
@@ -706,6 +724,8 @@ int zb_zcl_global_discover_cmds_received(
  * @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()
  */
@@ -794,6 +814,8 @@ typedef void (*zb_zcl_global_discover_attr_extended_rsp)(
  * @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()
  */
index b78e53e34dfc2059e384cb8085e04ce065c6d70f..72c9b0756e4d3c4757bd214014b7bee86806458d 100644 (file)
@@ -186,6 +186,8 @@ typedef void (*zb_zcl_group_remove_group_rsp)(
  * @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()
  */
@@ -221,6 +223,8 @@ int zb_zcl_group_add_group(
  * @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()
  */
@@ -255,6 +259,8 @@ int zb_zcl_group_view_group(
  * @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()
  */
@@ -291,6 +297,8 @@ int zb_zcl_group_get_group_membership(
  * @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()
  */
@@ -324,6 +332,8 @@ int zb_zcl_group_remove_group(
  * @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(
@@ -355,6 +365,8 @@ int zb_zcl_group_remove_all_group(
  * @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(
index fe2f9f9f304373d1e1a6036df4fe8fb68c2be792..40ce79b320cf077ce90121481846cb20cf5cb1d4 100644 (file)
@@ -104,6 +104,8 @@ typedef enum {
  * @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(
index 5328ef1c5fd0afac666a1c0b32a41f25b7b31d2f..280c7d155d44a66edac413ad9a4bafed31c751ea 100644 (file)
@@ -58,6 +58,8 @@ extern "C" {
  * @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(
@@ -107,6 +109,8 @@ typedef void (*zb_zcl_identify_query_cb)(
  * @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()
  */
index 5e89abf0eaf7ed1d9709d3a5fc3797efbf5dba89..75b65a080b2ea055ba1d41958a3c1892d50756a5 100644 (file)
@@ -89,6 +89,8 @@ extern "C" {
  * @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(
@@ -124,6 +126,8 @@ int zb_zcl_levelctrl_move_to_level(
  * @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(
@@ -162,6 +166,8 @@ int zb_zcl_levelctrl_move(
  * @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(
@@ -197,6 +203,8 @@ int zb_zcl_levelctrl_step(
  * @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(
@@ -247,6 +255,8 @@ int zb_zcl_levelctrl_stop(
  * @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(
@@ -292,6 +302,8 @@ int zb_zcl_levelctrl_move_to_level_with_on_off(
  * @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(
@@ -341,6 +353,8 @@ int zb_zcl_levelctrl_move_with_on_off(
  * @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(
index 0e1c39c5ff25952c3b7eb8801c037e267e74368a..390831809324c7eb067f6f3285876a3c83b72d8a 100644 (file)
@@ -90,6 +90,8 @@ typedef enum {
  * @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(
index e374ffb71fb65da8082227ce8704219ec2dfa254..5525cffe4ddaeb3d08ef7c8f8f02161c780e4ab6 100644 (file)
@@ -152,6 +152,8 @@ typedef void (*zb_zcl_pollctrl_check_in)(
  * @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(
@@ -180,6 +182,8 @@ int zb_zcl_pollctrl_check_in_response(
  * @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(
@@ -216,6 +220,8 @@ int zb_zcl_pollctrl_fast_poll_stop(
  * @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()
  *
@@ -257,6 +263,8 @@ int zb_zcl_pollctrl_set_long_poll_interval(
  * @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()
  */
index 48ca7dd06c5d28e0372399d009b1b5e528e650af..1488e7ed6fe1b60f138aaef808d0c0eecb0d2150 100644 (file)
@@ -305,6 +305,8 @@ typedef void (*zb_zcl_scene_get_scene_membership_rsp)(
  * @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()
  */
@@ -344,6 +346,8 @@ int zb_zcl_scene_add_scene(
  * @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()
  */
@@ -379,6 +383,8 @@ int zb_zcl_scene_view_scene(
  * @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()
  */
@@ -413,6 +419,8 @@ int zb_zcl_scene_remove_scene(
  * @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()
  */
@@ -447,6 +455,8 @@ int zb_zcl_scene_remove_all_scene(
  * @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()
  */
@@ -479,6 +489,8 @@ int zb_zcl_scene_store_scene(
  * @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,
@@ -512,6 +524,8 @@ int zb_zcl_scene_recall_scene(
  * @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()
  */
index f14939c5d5f76c58c0ca00f5e71ae8967aceecd9..ccd4a0b85923e229186de9bd4c9b71637c2af614 100644 (file)
@@ -73,6 +73,8 @@
  * @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(
index b8ca7362d29370fe95bcefd33f446c066092e534..0239b91dbebf71be709f23372f7fd879675b889a 100644 (file)
@@ -111,6 +111,8 @@ typedef void (*zb_zdo_bind_rsp)(
  * @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()
  */
@@ -195,6 +197,8 @@ typedef void (*zb_zdo_unbind_rsp)(
  * @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()
  *
index cfa19cde5a5eaf5637ebec7d0ff3a36e20171e40..0e8bf73ff4f68508899a999b695477b97992458d 100644 (file)
@@ -62,6 +62,8 @@ extern "C" {
  * @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,
index 3c84147535b9078b2a52355958d591e2dc25e882..26710d07e371399e3548617b1ce48038b254334f 100644 (file)
@@ -120,6 +120,8 @@ typedef void (*zb_zdo_addr_rsp)(
  * @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()
  */
@@ -151,6 +153,7 @@ int zb_zdo_nwk_addr_req(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_ieee_addr_rsp()
  */
@@ -239,6 +242,7 @@ typedef void (*zb_zdo_active_ep_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_active_ep_rsp()
  */
@@ -341,6 +345,7 @@ typedef void (*zb_zdo_simple_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_simple_desc_rsp()
  */
@@ -446,6 +451,7 @@ typedef void (*zb_zdo_extended_simple_desc_rsp)(
  * @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_zdo_extended_simple_desc_rsp()
  */
@@ -614,6 +620,7 @@ typedef void (*zb_zdo_match_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_match_desc_rsp()
  */
@@ -702,6 +709,7 @@ typedef void (*zb_zdo_node_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_node_desc_rsp()
  */
@@ -786,6 +794,7 @@ typedef void (*zb_zdo_power_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_power_desc_rsp()
  */
@@ -881,6 +890,7 @@ typedef void (*zb_zdo_complex_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_complex_desc_rsp()
  */
@@ -975,6 +985,7 @@ typedef void (*zb_zdo_user_desc_rsp)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_complex_desc_rsp()
  */
@@ -1057,6 +1068,7 @@ typedef void (*zb_zdo_user_desc_conf)(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_user_desc_conf()
  */
@@ -1093,6 +1105,7 @@ int zb_zdo_user_desc_set(
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_zdo_user_desc_conf()
  */
index 9b695fbb04de5d0f7cfe0d346983b11a81e2d12b..3d648e90d842823189fa069a01ef941a85155191 100644 (file)
@@ -118,6 +118,8 @@ typedef void (*zb_zdo_mgmt_nwk_disc_rsp)(
  * @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()
  */
@@ -195,6 +197,8 @@ typedef void (*zb_zdo_mgmt_lqi_rsp)(
  * @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()
  */
@@ -265,6 +269,8 @@ typedef void (*zb_zdo_mgmt_rtg_rsp)(
  * @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()
  */
@@ -345,6 +351,8 @@ typedef void (*zb_zdo_mgmt_bind_rsp)(
  * @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()
  */
@@ -411,6 +419,8 @@ typedef void (*zb_zdo_mgmt_leave_rsp)(
  * @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()
  */
@@ -473,6 +483,8 @@ typedef void (*zb_zdo_mgmt_direct_join_rsp)(
  * @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()
  */
@@ -546,6 +558,8 @@ typedef void (*zb_zdo_mgmt_permit_joining_rsp)(
  * @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()
  */
@@ -618,6 +632,8 @@ typedef void (*zb_zdo_mgmt_cache_rsp)(
  * @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()
  */
@@ -668,6 +684,8 @@ int zb_zdo_mgmt_cache_req(
  * @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()
  */
index cc9101bd0d2945c4e3291a0061b42244e6dbf686..dc2264c70e6597ddf8385ccfd119c8e5f0fce91c 100644 (file)
@@ -91,6 +91,8 @@ typedef void (*zb_zdo_system_server_discover_rsp)(
  * @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()
  */
@@ -152,6 +154,8 @@ typedef void (*zb_zdo_find_node_cache_rsp)(
  * @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()
  */
@@ -205,6 +209,8 @@ typedef void (*zb_zdo_discovery_cache_rsp)(
  * @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()
  */
@@ -264,6 +270,8 @@ typedef void (*zb_zdo_discovery_store_rsp)(
  * @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()
  */
@@ -325,6 +333,8 @@ typedef void (*zb_zdo_node_desc_store_rsp)(
  * @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()
  */
@@ -382,6 +392,8 @@ typedef void (*zb_zdo_power_desc_store_rsp)(
  * @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()
  */
@@ -445,6 +457,8 @@ typedef void (*zb_zdo_active_ep_store_rsp)(
  * @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()
  */
@@ -508,6 +522,8 @@ typedef void (*zb_zdo_simple_desc_store_rsp)(
  * @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()
  */
@@ -565,6 +581,8 @@ typedef void (*zb_zdo_remove_node_cache_rsp)(
  * @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()
  */
index 5049b732c3cc589df15d7175328f8c30f9e029e2..2f9be98f985f9a2d791b22e6261fc438d1f94d35 100644 (file)
@@ -59,6 +59,7 @@ extern "C" {
  * @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_NOT_SUPPORTED Not supported
  *
  * @see zb_destroy()
  */
@@ -137,6 +138,7 @@ typedef void (*zb_event_cb)(nwk_addr addr16, ieee_addr addr64, zb_event_e event_
  * @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_create()
  * @see zb_destroy()
@@ -159,6 +161,8 @@ int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler);
  * @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_coex_stop()
  *
@@ -179,6 +183,8 @@ int zb_coex_start(zigbee_h handle, unsigned char channel);
  * @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_coex_start()
  *
@@ -217,6 +223,8 @@ typedef void (*zb_form_network_cb)(nwk_addr panid, void *user_data);
  * @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 finished, form_network_done event will be generated.
  *
@@ -257,6 +265,8 @@ typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data);
  * @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()
  */
@@ -280,6 +290,8 @@ int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_dat
  * @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()
  */
@@ -306,6 +318,8 @@ int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, bool
  * @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()
  */
@@ -327,6 +341,8 @@ int zb_permit_join(zigbee_h handle, unsigned char timeout);
  * @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()
  */
@@ -351,6 +367,8 @@ int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64);
  * @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()
  */
@@ -374,6 +392,8 @@ int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid,
  * @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
  */
@@ -396,6 +416,8 @@ int zb_get_all_device_list(zigbee_h handle, int *count, zb_end_device_info_h **l
  * @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_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *count,
                unsigned char *ep_list);
@@ -420,6 +442,8 @@ int zb_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *count
  * @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_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep,
                unsigned char *in_cluster_count, unsigned short *in_cluster_list,
@@ -431,14 +455,13 @@ int zb_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep,
  * at each device.
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @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 struct zb_end_device_info_s
  */
@@ -477,6 +500,9 @@ typedef bool (*zb_end_device_cb)(int index, zb_end_device_info_h child, void *us
  * @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()
  */
@@ -487,8 +513,6 @@ int zb_devices_info_foreach_end_device(zb_end_device_info_h *list,
  * @brief Gets network address of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -498,6 +522,8 @@ int zb_devices_info_foreach_end_device(zb_end_device_info_h *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_NOT_SUPPORTED Not supported
  *
  * @see zb_end_device_cb()
  * @see zb_devices_info_foreach_end_device()
@@ -509,8 +535,6 @@ int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16);
  * @brief Gets ieee address of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -520,6 +544,8 @@ int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16);
  * @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()
@@ -531,8 +557,6 @@ int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64);
  * @brief Gets a number of end-points of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -542,6 +566,8 @@ int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64);
  * @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()
@@ -553,8 +579,6 @@ int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *count);
  * @brief Gets list of end-points of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -564,6 +588,8 @@ int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *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_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()
@@ -575,8 +601,6 @@ int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list);
  * @brief Gets 802.15.4 MAC capability of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -587,6 +611,8 @@ int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list);
  * @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()
@@ -598,8 +624,6 @@ int zb_get_mac_capabiity(zb_end_device_info_h handle, unsigned char *capability)
  * @brief Gets ability of alternative PAN coordinator of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -610,6 +634,8 @@ int zb_get_mac_capabiity(zb_end_device_info_h handle, unsigned char *capability)
  * @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()
@@ -622,8 +648,6 @@ int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle,
  * @brief Gets device id of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -635,6 +659,8 @@ int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle,
  * @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()
@@ -646,8 +672,6 @@ int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep, unsigned sho
  * @brief Gets profile id of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -659,6 +683,8 @@ int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep, unsigned sho
  * @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()
@@ -670,8 +696,6 @@ int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep, unsigned sh
  * @brief Gets power source type of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -682,6 +706,8 @@ int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep, unsigned sh
  * @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()
@@ -693,8 +719,6 @@ int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src);
  * @brief Gets security capability of a specific end-point
  *
  * @since_tizen 4.0
- * @privlevel public
- * @privilege %http://tizen.org/privilege/zigbee
  *
  * @remarks This function should be called in zb_end_device_cb()
  *
@@ -705,6 +729,8 @@ int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src);
  * @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()
index 39bce1a4757e69e77e64633e748353a7459b619b..d27d3e3887eb106946622e7f00caaa061a52cf96 100644 (file)
@@ -16,9 +16,6 @@
 #ifndef __CAPI_NETWORK_ZIGBEE_INTERNAL_H__
 #define __CAPI_NETWORK_ZIGBEE_INTERNAL_H__
 
-/* For test */
-#define ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA 0
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -77,6 +74,8 @@ typedef void (*zb_enable_cb)(unsigned char status, void *user_data);
  * @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()
@@ -104,6 +103,8 @@ int zb_enable(zigbee_h handle, zb_enable_cb cb, void *user_data);
  * @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()
@@ -126,6 +127,8 @@ int zb_disable(zigbee_h handle);
  * @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);
index 8ea0fc8f4afb04b0df79fd4de755f4147e86a935..d2a3fa9c6893d5687afe0b56391a3a8bc6dbd46f 100644 (file)
--- a/lib/zbl.c
+++ b/lib/zbl.c
@@ -29,6 +29,7 @@
 API int zb_create(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));
        RETVM_IF(NULL == h, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
@@ -55,7 +56,9 @@ API void zb_destroy(zigbee_h handle)
 API int zb_enable(zigbee_h handle, zb_enable_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_enable(handle, cb, user_data);
        DBG("zbl_enable()=0x%X", ret);
        return ret;
@@ -64,7 +67,9 @@ API int zb_enable(zigbee_h handle, zb_enable_cb cb, void *user_data)
 API int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_set_event_cb(handle, event_handler);
        DBG("zb_set_event_cb()=0x%X", ret);
        return ret;
@@ -73,7 +78,9 @@ API int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler)
 API int zb_disable(zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_disable();
        DBG("zbl_disable()=0x%X", ret);
        return ret;
@@ -82,7 +89,9 @@ API int zb_disable(zigbee_h handle)
 API int zb_hw_reset(zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_hw_reset();
        DBG("zbl_hw_reset()=0x%X", ret);
        return ret;
@@ -91,7 +100,9 @@ API int zb_hw_reset(zigbee_h handle)
 API int zb_coex_start(zigbee_h handle, unsigned char channel)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_coex_start(channel);
        DBG("zbl_coex_start()=0x%X", ret);
        return ret;
@@ -100,7 +111,9 @@ API int zb_coex_start(zigbee_h handle, unsigned char channel)
 API int zb_coex_stop(zigbee_h handle)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_coex_stop();
        DBG("zbl_coex_stop()=0x%X", ret);
        return ret;
@@ -109,7 +122,9 @@ API int zb_coex_stop(zigbee_h handle)
 API int zb_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_form_network(handle, cb, user_data);
        DBG("zbl_form_network()=0x%X", ret);
        return ret;
@@ -118,7 +133,9 @@ API int zb_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
 API int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_data)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_disable_network(handle, cb, user_data);
        DBG("zb_disable_network()=0x%X", ret);
        return ret;
@@ -127,7 +144,9 @@ API int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user
 API int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, bool rejoin)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_leave_device(addr, remove_children, rejoin);
        DBG("zbl_leave_device()=0x%X", ret);
        return ret;
@@ -136,7 +155,9 @@ API int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, b
 API int zb_permit_join(zigbee_h handle, unsigned char timeout)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_permit_join(timeout, TRUE);
        DBG("zb_permit_join()=0x%X", ret);
        return ret;
@@ -145,7 +166,9 @@ API int zb_permit_join(zigbee_h handle, unsigned char timeout)
 API int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        ret = zbl_get_controller_mac_address(addr64);
        DBG("zbl_get_controller_mac_address()=0x%X", ret);
        return ret;
@@ -155,6 +178,7 @@ 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)
 {
        int ret = ZIGBEE_ERROR_NONE;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
        ret = zbl_get_network_info(addr64, nodeid, panid, channel, tx_power);
@@ -165,7 +189,9 @@ API int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid,
 API int zb_device_list_free(zb_end_device_info_h *list)
 {
        int i = 0, j = 0;
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == list, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        while (list[i]) {
                j = 0;
                while (list[i]->desc && list[i]->desc[j]) {
index ff103cd22aa576a9ea37c5380708ed3f854d02d4..9054f66380ba6fd1c61cf00dc8aece4fa1cbbf26 100644 (file)
@@ -32,6 +32,8 @@ API int zb_aps_send(zigbee_h handle, nwk_addr addr16, unsigned char aps_frame_ct
                unsigned char cmd_id, unsigned short payload_len, unsigned char *payload,
                zb_aps_send_rsp cb, void *user_data)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
        int ret = ZIGBEE_ERROR_NONE;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
@@ -46,6 +48,8 @@ API int zb_zcl_send(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
                unsigned char cmd, unsigned short payload_len, unsigned char *payload,
                zb_zcl_send_rsp cb, void *user_data)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
        int ret = ZIGBEE_ERROR_NONE;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
@@ -58,6 +62,8 @@ API int zb_zcl_send(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 API int zb_send_to_local(zigbee_h handle, unsigned short length, unsigned char *data,
                zb_send_to_local_rsp cb, void *user_data)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
+
        int ret = ZIGBEE_ERROR_NONE;
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
 
index 1e8950068750962a97386ff96df09d903e7eeedd..0684d86b09452ae04b0135b55d96485903d14379 100644 (file)
@@ -2917,9 +2917,7 @@ static int _check_zigbee_privilege()
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
        if (!variant) {
                ERR("Failed to check_zigbee_privilege [%s]", dbus_err->message);
-               if(g_strcmp0(dbus_err->message, "AccessDenied"))
-                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
-               else if(g_strcmp0(dbus_err->message, "PermissionDenied"))
+               if(strstr(dbus_err->message, "AccessDenied"))
                        result = ZIGBEE_ERROR_PERMISSION_DENIED;
                else
                        result = ZIGBEE_ERROR_IO_ERROR;
@@ -2990,8 +2988,12 @@ static void _zbl_enable_cb(GDBusConnection *connection,
 
 int zbl_enable(zigbee_h handle, zb_enable_cb cb, void *user_data)
 {
+       GVariant *variant = NULL;
+       GError *dbus_err = NULL;
+
        int sub_id, to;
        zbl_req_cb_s *container;
+       int result = ZIGBEE_ERROR_NONE;
 
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
@@ -3018,17 +3020,28 @@ int zbl_enable(zigbee_h handle, zb_enable_cb cb, void *user_data)
        container->tid = g_timeout_add_seconds(to, _zbl_timeout_enable, container);
        container->userdata = user_data;
 
-       g_dbus_connection_call(gdbus_conn,
+       variant = g_dbus_connection_call_sync(gdbus_conn,
                ZIGBEE_MANAGER_INTERFACE,
                ZIGBEE_DBUS_OBJPATH,
                ZIGBEE_MANAGER_INTERFACE,
                "enable",
                NULL, NULL,
                G_DBUS_CALL_FLAGS_NONE,
-               to, NULL,
-               NULL, NULL);
+               -1, NULL, &dbus_err);
 
-       return ZIGBEE_ERROR_NONE;
+       if (!variant) {
+               ERR("Failed to get 'enable' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
+               g_error_free(dbus_err);
+               return result;
+       }
+       g_variant_unref(variant);
+
+       return result;
 }
 
 int zbl_disable(void)
@@ -3042,7 +3055,7 @@ int zbl_disable(void)
        DBG("zbl_disable()");
 
        variant = g_dbus_connection_call_sync(gdbus_conn,
-               ZIGBEE_SERVER_NAME,
+               ZIGBEE_MANAGER_INTERFACE,
                ZIGBEE_DBUS_OBJPATH,
                ZIGBEE_MANAGER_INTERFACE,
                "disable",
@@ -3052,8 +3065,13 @@ int zbl_disable(void)
 
        if (!variant) {
                ERR("Failed to get 'disable' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3077,8 +3095,13 @@ int zbl_hw_reset(void)
 
        if (!variant) {
                ERR("Failed to get 'zb_hw_reset' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3112,8 +3135,13 @@ int zbl_get_network_info(ieee_addr addr64, nwk_addr *nodeid, nwk_addr *panid,
 
        if (!variant) {
                ERR("Failed to 'get_network_info' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(ia(y)qqyy)", &result, &iter,
@@ -3169,8 +3197,13 @@ int zbl_get_controller_mac_address(ieee_addr addr64)
 
        if (!variant) {
                ERR("Failed to get_mac [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
        g_variant_get(variant, "(ia(y))", &result, &iter);
 
@@ -3203,6 +3236,7 @@ int zbl_get_cluster_list(ieee_addr eui64, unsigned char endpoint,
        unsigned short cluster = 0;
        int i = 0;
        int result = 0;
+       int ret = ZIGBEE_ERROR_NONE;
 
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == service_gproxy, ZIGBEE_ERROR_IO_ERROR);
@@ -3253,12 +3287,18 @@ int zbl_get_cluster_list(ieee_addr eui64, unsigned char endpoint,
                g_variant_unref(variant);
        } else {
                ERR("No In/Out Clusters for Endpoint %0X [%s]", endpoint, dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       ret = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       ret = ZIGBEE_ERROR_NONE;
+
                g_error_free(dbus_err);
+
                *in_cluster_count = 0;
                *out_cluster_count = 0;
        }
 
-       return ZIGBEE_ERROR_NONE;
+       return ret;
 }
 
 int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char list[])
@@ -3270,7 +3310,8 @@ int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char l
        GError *dbus_err = NULL;
        unsigned char endpoint;
        int i = 0;
-       int result = ZIGBEE_ERROR_NONE;
+       int result = 0;
+       int ret = ZIGBEE_ERROR_NONE;
 
        RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
        RETV_IF(NULL == service_gproxy, ZIGBEE_ERROR_IO_ERROR);
@@ -3314,11 +3355,14 @@ int zbl_get_endpoint_list(ieee_addr eui64, unsigned char *count, unsigned char l
                ERR("NULL Variant");
                ERR("No Endpoints");
                ERR("[%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       ret = ZIGBEE_ERROR_PERMISSION_DENIED;
+
                g_error_free(dbus_err);
                *count = 0;
        }
 
-       return ZIGBEE_ERROR_NONE;
+       return ret;
 }
 
 int zbl_api_get_node_type(ieee_addr eui64, unsigned char *node_type)
@@ -3350,8 +3394,13 @@ int zbl_api_get_node_type(ieee_addr eui64, unsigned char *node_type)
 
        if (!variant) {
                ERR("Failed to get 'get_node_type' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3373,6 +3422,7 @@ int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
        GVariantIter *endpoint_iter = NULL;
        GError *dbus_err = NULL;
        int result = 0;
+       int ret = ZIGBEE_ERROR_NONE;
        unsigned short node_id;
        unsigned char node_type;
        unsigned char node_mac_address[8] = {0x00};
@@ -3449,11 +3499,14 @@ int zbl_get_all_device_info(zb_end_device_info_h **dev_list, unsigned char* num)
        } else {
                ERR("NULL Variant [%s]", dbus_err->message);
                ERR("No attached nodes");
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       ret = ZIGBEE_ERROR_PERMISSION_DENIED;
+
                g_error_free(dbus_err);
                *num = 0;
        }
 
-       return ZIGBEE_ERROR_NONE;
+       return ret;
 }
 
 int zbl_coex_start(unsigned char channel)
@@ -3470,8 +3523,13 @@ int zbl_coex_start(unsigned char channel)
 
        if (!variant) {
                ERR("Failed to get 'coex_start' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3497,8 +3555,13 @@ int zbl_coex_stop(void)
 
        if (!variant) {
                ERR("Failed to get 'coex_stop' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3545,8 +3608,13 @@ int zbl_form_network(zigbee_h handle, zb_form_network_cb cb, void *user_data)
 
        if (!variant) {
                ERR("Failed to get 'form_network' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3595,8 +3663,13 @@ int zbl_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_da
 
        if (!variant) {
                ERR("Failed to get 'leave_network' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3642,8 +3715,13 @@ int zbl_leave_device(ieee_addr addr64, bool remove_children, bool rejoin)
 
        if (!variant) {
                ERR("Failed to get 'leave_request' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3667,8 +3745,13 @@ int zbl_permit_join(unsigned char duration, bool broadcast)
 
        if (!variant) {
                ERR("Failed to get 'permit_join' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3734,8 +3817,13 @@ int zbl_nwk_addr_req(zigbee_h handle, ieee_addr addr64, unsigned char request_ty
 
        if (!variant) {
                ERR("Failed to get 'nwk_addr_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3786,8 +3874,13 @@ int zbl_ieee_addr_req(zigbee_h handle, nwk_addr addr16, zb_zdo_addr_rsp cb,
 
        if (!variant) {
                ERR("Failed to get 'ieee_addr_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3838,8 +3931,13 @@ int zbl_active_ep(zigbee_h handle, nwk_addr addr16, zb_zdo_active_ep_rsp cb,
 
        if (!variant) {
                ERR("Failed to get 'active_ep_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3890,8 +3988,13 @@ int zbl_simple_desc_req(zigbee_h handle, nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'simple_desc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -3973,8 +4076,13 @@ int zbl_match_desc_req(zigbee_h handle, nwk_addr addr16,
 
        if (!variant) {
                ERR("Failed to get 'matched_descriptor_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4024,8 +4132,13 @@ int zbl_node_desc_req(nwk_addr addr16, zb_zdo_node_desc_rsp cb, void *user_data)
 
        if (!variant) {
                ERR("Failed to get 'node_desc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4073,8 +4186,13 @@ int zbl_power_desc_req(nwk_addr addr16, zb_zdo_power_desc_rsp cb,        void *user_dat
 
        if (!variant) {
                ERR("Failed to get 'power_desc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4122,8 +4240,13 @@ int zbl_complex_desc_req(nwk_addr addr16, zb_zdo_complex_desc_rsp cb, void *user
 
        if (!variant) {
                ERR("Failed to get 'complex_desc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4171,8 +4294,13 @@ int zbl_user_desc_req(nwk_addr addr16, zb_zdo_user_desc_rsp cb, void *user_data)
 
        if (!variant) {
                ERR("Failed to get 'user_desc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4239,8 +4367,13 @@ int zbl_user_desc_set(zigbee_h handle, nwk_addr addr16, unsigned char len,
 
        if (!variant) {
                ERR("Failed to get 'user_desc_set_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4281,8 +4414,13 @@ int zbl_device_annce(zigbee_h handle, nwk_addr addr16, ieee_addr addr64,
 
        if (!variant) {
                ERR("Failed to get 'device_announce' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4358,8 +4496,13 @@ int zbl_bind_req(nwk_addr dst_addr16, ieee_addr src_addr64,
 
        if (!variant) {
                ERR("Failed to get 'bind_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4434,8 +4577,13 @@ int zbl_unbind_req(nwk_addr dst_addr16,
 
        if (!variant) {
                ERR("Failed to get 'unbind_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4488,8 +4636,13 @@ int zbl_mgmt_nwk_disc_req(nwk_addr addr16, unsigned int scan_channels,
 
        if (!variant) {
                ERR("Failed to get 'mgmt_nwk_disc_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4517,8 +4670,13 @@ int zbl_mgmt_nwk_update_req(unsigned int scan_channels, unsigned char scan_durat
 
        if (!variant) {
                ERR("Failed to get 'mgmt_nwk_update_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4570,8 +4728,13 @@ int zbl_mgmt_lqi_req(nwk_addr addr16, unsigned char start_idx,
 
        if (!variant) {
                ERR("Failed to get 'mgmt_lqi_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4623,8 +4786,13 @@ int zbl_mgmt_rtg_req(nwk_addr addr16, unsigned char start_idx,
 
        if (!variant) {
                ERR("Failed to get 'mgmt_rtg_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4676,8 +4844,13 @@ int zbl_mgmt_bind_req(nwk_addr addr16, unsigned char start_idx,
 
        if (!variant) {
                ERR("Failed to get 'mgmt_bind_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4742,8 +4915,13 @@ int zbl_mgmt_leave_device(ieee_addr addr64, unsigned char remove_children,
 
        if (!variant) {
                ERR("Failed to get 'leave_request' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4793,8 +4971,13 @@ int zbl_mgmt_permit_joining_req(nwk_addr addr16, unsigned char duration,
 
        if (!variant) {
                ERR("Failed to get 'mgmt_permit_join_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4857,8 +5040,13 @@ int zbl_aps_send(nwk_addr addr16, unsigned char aps_frame_ctl, unsigned char src
 
        if (!variant) {
                ERR("Failed to get 'aps_send' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4920,8 +5108,13 @@ int zbl_zcl_send(nwk_addr addr16, unsigned char src_ep, unsigned char dst_ep,
 
        if (!variant) {
                ERR("Failed to get 'zcl_send' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -4981,8 +5174,13 @@ int zbl_send_to_local(unsigned short length, unsigned char *data,
 
        if (!variant) {
                ERR("Failed to get 'send_to_local' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5071,8 +5269,13 @@ int zbl_read_attr_req(zigbee_h handle, unsigned short addr16, unsigned char dest
 
        if (!variant) {
                ERR("Failed to get 'read_attributes_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5253,8 +5456,13 @@ int zbl_write_attr_req(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 
        if (!variant) {
                ERR("Failed to get 'write_attributes_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5435,8 +5643,13 @@ int zbl_wattr_undivided_req(zigbee_h handle, nwk_addr addr16, unsigned char src_
 
        if (!variant) {
                ERR("Failed to get 'write_attributes_undivided_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5556,8 +5769,13 @@ int zbl_wattr_req_no_rsp(zigbee_h handle, nwk_addr addr16, unsigned char src_ep,
 
        if (!variant) {
                ERR("Failed to get 'write_attributes_no_rep' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5681,8 +5899,13 @@ int zbl_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char src_
 
        if (!variant) {
                ERR("Failed to get 'configure_reporting_req' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5814,8 +6037,13 @@ int zbl_read_configure_reporting(zigbee_h handle, nwk_addr addr16, unsigned char
 
        if (!variant) {
                ERR("Failed to get 'read_configure_reporting' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5894,8 +6122,13 @@ int zbl_discover_attr_req(zigbee_h handle, unsigned short addr16, unsigned char
 
        if (!variant) {
                ERR("Failed to get 'discover_attributes' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -5972,8 +6205,13 @@ int zbl_discover_cmds_gen(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 
        if (!variant) {
                ERR("Failed to get 'discover_commands_received' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6050,8 +6288,13 @@ int zbl_discover_cmds_recv(zigbee_h handle, nwk_addr addr16, unsigned char src_e
 
        if (!variant) {
                ERR("Failed to get 'discover_commands_received' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6129,8 +6372,13 @@ int zbl_discover_attr_ext(zigbee_h handle, nwk_addr addr16, unsigned char src_ep
 
        if (!variant) {
                ERR("Failed to get 'discover_attributes_extended' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6156,8 +6404,13 @@ int zbl_reset_alarm(nwk_addr addr16, unsigned char ep, unsigned char alarm_code,
 
        if (!variant) {
                ERR("Failed to get 'reset_alarm' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6181,8 +6434,13 @@ int zbl_reset_all_alarm(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'reset_all_alarm' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6232,8 +6490,13 @@ int zbl_get_alarm(nwk_addr addr16, unsigned char ep, zb_zcl_alarm_get_alarm_rsp
 
        if (!variant) {
                ERR("Failed to get 'get_alarm' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6257,8 +6520,13 @@ int zbl_reset_all_alarm_log(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'reset_alarm_log' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6285,8 +6553,13 @@ int zbl_ccontrol_move_to_hue(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_to_hue' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6313,8 +6586,13 @@ int zbl_ccontrol_move_hue(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_hue' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6341,8 +6619,13 @@ int zbl_ccontrol_step_hue(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'step_hue' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6368,8 +6651,13 @@ int zbl_ccontrol_move_to_saturation(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_to_saturation' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6395,8 +6683,13 @@ int zbl_ccontrol_move_saturation(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_saturation' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6423,8 +6716,13 @@ int zbl_ccontrol_step_saturation(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'step_saturation' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6451,8 +6749,13 @@ int zbl_ccontrol_move_to_hue_and_saturation(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_to_hue_and_saturation' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6479,8 +6782,13 @@ int zbl_ccontrol_move_to_color(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_to_color' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6506,8 +6814,13 @@ int zbl_ccontrol_move_color(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_color' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6534,8 +6847,13 @@ int zbl_ccontrol_step_color(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'step_color' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6562,8 +6880,13 @@ int zbl_ccontrol_move_to_color_temperature(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_color_temperature' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6587,8 +6910,13 @@ int zbl_reset_factory_default(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'reset_factory_default' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6613,8 +6941,13 @@ int zbl_identify(nwk_addr addr16, unsigned char dst_ep, unsigned short identify_
 
        if (!variant) {
                ERR("Failed to get 'identify' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6664,8 +6997,13 @@ int zbl_identify_query(nwk_addr addr16, unsigned char dst_ep,
 
        if (!variant) {
                ERR("Failed to get 'query' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6728,8 +7066,13 @@ int zbl_add_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'add_group' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6780,8 +7123,13 @@ int zbl_view_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'view_group' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6846,8 +7194,13 @@ int zbl_group_get_group_membership(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'get_group_membership' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6897,8 +7250,13 @@ int zbl_remove_group(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'remove_group' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6924,8 +7282,13 @@ int zbl_remove_all_group(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'remove_all_group' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6963,8 +7326,13 @@ int zbl_add_group_if_identifying(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'add_group_if_identifying' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -6992,8 +7360,13 @@ int zbl_level_control_move_to_level(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_to_level' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7021,8 +7394,13 @@ int zbl_level_control_move(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7051,8 +7429,13 @@ int zbl_level_control_step(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'step' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7078,8 +7461,13 @@ int zbl_level_control_stop(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'stop' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7107,8 +7495,13 @@ int zbl_level_control_move_to_level_with_on_off(nwk_addr addr16,
 
        if (!variant) {
                ERR("Failed to get 'move_to_level_with_on_off' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7136,8 +7529,13 @@ int zbl_level_control_move_with_on_off(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'move_with_on_off' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7166,8 +7564,13 @@ int zbl_level_control_step_with_on_off(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'step_with_on_off' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7192,8 +7595,13 @@ int zbl_onoff_set(nwk_addr addr16, unsigned char ep, unsigned char on_off_type)
 
        if (!variant) {
                ERR("Failed to get 'set_on_off' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7219,8 +7627,13 @@ int zbl_zone_enroll_response(nwk_addr addr16, unsigned char dst_ep,
 
        if (!variant) {
                ERR("Failed to get 'enroll_response' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7246,8 +7659,13 @@ int zbl_pollcontrol_check_in_response(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'check_in_response' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7271,8 +7689,13 @@ int zbl_pollcontrol_fast_poll_stop(nwk_addr addr16, unsigned char ep)
 
        if (!variant) {
                ERR("Failed to get 'fast_poll_stop' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7324,8 +7747,13 @@ int zbl_pollcontrol_set_long_poll_interval(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'set_long_poll_interval' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7377,8 +7805,13 @@ int zbl_pollcontrol_set_short_poll_interval(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'set_short_poll_interval' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7457,8 +7890,13 @@ int zbl_add_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'add_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7509,8 +7947,13 @@ int zbl_view_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'view_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7562,8 +8005,13 @@ int zbl_remove_scene(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'remove_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7615,8 +8063,13 @@ int zbl_remove_all_scene(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get 'remove_all_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7667,8 +8120,13 @@ int zbl_store_scene(nwk_addr addr16, unsigned char ep, unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'store_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7694,8 +8152,13 @@ int zbl_recall_scene(nwk_addr addr16, unsigned char ep,  unsigned short group_id,
 
        if (!variant) {
                ERR("Failed to get 'recall_scene' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7747,8 +8210,13 @@ int zbl_get_scene_membership(nwk_addr addr16, unsigned char ep,
 
        if (!variant) {
                ERR("Failed to get get_scene_membership [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7774,8 +8242,13 @@ int zbl_thermostat_adjust_setpoint(nwk_addr addr16, unsigned char ep, unsigned c
 
        if (!variant) {
                ERR("Failed to get 'setpoint_raise_lower' [%s]", dbus_err->message);
+               if(strstr(dbus_err->message, "AccessDenied"))
+                       result = ZIGBEE_ERROR_PERMISSION_DENIED;
+               else
+                       result = ZIGBEE_ERROR_IO_ERROR;
+
                g_error_free(dbus_err);
-               return ZIGBEE_ERROR_IO_ERROR;
+               return result;
        }
 
        g_variant_get(variant, "(i)", &result);
@@ -7966,11 +8439,9 @@ int zbl_dbus_get_timeout(GDBusProxy *proxy)
 int zbl_check_privilege()
 {
        int ret = _check_zigbee_privilege();
-       if (ret == ZIGBEE_ERROR_PERMISSION_DENIED)
-               return ret;
-       else if (ret != ZIGBEE_ERROR_NONE) {
+       if (ret != ZIGBEE_ERROR_NONE) {
                ERR("Failed to check privilege");
-               return ZIGBEE_ERROR_OPERATION_FAILED;
+               return ret;
        }
 
        return ZIGBEE_ERROR_NONE;
index 6ccb1e805c84b967b212ae568352d2183b9dee85..abdb8c6ad1e3f16ccd3f0355ecfd66e488bf6c95 100644 (file)
@@ -8,6 +8,7 @@
 #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"
@@ -428,13 +429,16 @@ API int zb_get_data_size(unsigned char type)
 
 API int zb_create_read_attr_status_record(read_attr_status_record_h *handle)
 {
-       read_attr_status_record_h simple = calloc(1, sizeof(struct read_attribute_status_record_s));
+       read_attr_status_record_h simple = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       simple = calloc(1, sizeof(struct read_attribute_status_record_s));
        *handle = simple;
 
        return ZIGBEE_ERROR_NONE;
@@ -455,8 +459,10 @@ 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;
 }
@@ -465,7 +471,9 @@ 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;
 }
@@ -474,8 +482,10 @@ API int zb_get_status_from_read_attr_status_record(read_attr_status_record_h han
                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;
 }
@@ -484,7 +494,9 @@ API int zb_set_status_to_read_attr_status_record(read_attr_status_record_h handl
                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;
 }
@@ -493,8 +505,10 @@ API int zb_get_type_from_read_attr_status_record(read_attr_status_record_h handl
                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;
 }
@@ -503,7 +517,9 @@ 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;
 }
@@ -515,6 +531,7 @@ API int zb_get_value_from_read_attr_status_record(read_attr_status_record_h hand
        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);
@@ -583,6 +600,7 @@ API int zb_set_value_to_read_attr_status_record(read_attr_status_record_h handle
        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);
 
@@ -619,7 +637,11 @@ 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 = calloc(1, sizeof(struct zb_value_s));
+       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;
@@ -650,6 +672,7 @@ API int zb_set_value(zb_value_h handle, unsigned char type, unsigned char *value
        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);
 
@@ -707,6 +730,7 @@ API int zb_get_value(zb_value_h handle, unsigned char *type, unsigned char **val
        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);
 
@@ -741,8 +765,11 @@ 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 = calloc(1,
-               sizeof(struct discover_attribute_info_record_s));
+       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;
@@ -760,8 +787,10 @@ API int zb_get_id_from_discover_attr_info(
                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;
 }
@@ -771,7 +800,9 @@ API int zb_set_id_to_discover_attr_info(
                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;
 }
@@ -781,8 +812,10 @@ API int zb_get_type_from_discover_attr_info(
                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;
 }
@@ -792,7 +825,9 @@ API int zb_set_type_to_discover_attr_info(
                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;
 }
@@ -800,13 +835,16 @@ API int zb_set_type_to_discover_attr_info(
 API int zb_create_write_attr_record(
                write_attr_record_h *handle)
 {
-       write_attr_record_h t = calloc(1, sizeof(struct write_attribute_record_s));
+       write_attr_record_h t = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct write_attribute_record_s));
        *handle = t;
        return ZIGBEE_ERROR_NONE;
 }
@@ -815,8 +853,6 @@ API void zb_destroy_write_attr_record(write_attr_record_h handle)
 {
        struct write_attribute_record_s* h = handle;
 
-       RET_IF(NULL == h);
-
        if (h->value)
                free(h->value);
        free(h);
@@ -826,7 +862,9 @@ 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;
 }
@@ -835,7 +873,9 @@ 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;
 }
@@ -846,6 +886,7 @@ API int zb_set_buf_to_write_attr_record(write_attr_record_h handle,
        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)
@@ -882,6 +923,7 @@ API int zb_set_value_to_write_attr_record(write_attr_record_h handle, zb_value_h
        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);
 
@@ -923,14 +965,16 @@ API int zb_set_value_to_write_attr_record(write_attr_record_h handle, zb_value_h
 
 API int zb_create_write_attr_status(write_attr_status_record_h *handle)
 {
-       write_attr_status_record_h simple = calloc(1,
-               sizeof(struct write_attribute_status_record_s));
+       write_attr_status_record_h simple = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == simple, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       simple = calloc(1, sizeof(struct write_attribute_status_record_s));
        *handle = simple;
 
        return ZIGBEE_ERROR_NONE;
@@ -947,8 +991,10 @@ 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;
 }
@@ -957,7 +1003,9 @@ 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;
 }
@@ -966,8 +1014,10 @@ 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;
 }
@@ -976,15 +1026,22 @@ 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;
+
+       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;
@@ -1005,6 +1062,8 @@ API void zb_destroy_report_config_record(report_config_record_h handle)
 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);
@@ -1015,6 +1074,8 @@ API int zb_get_dir_from_report_config_record(report_config_record_h handle,
 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)
@@ -1027,6 +1088,8 @@ API int zb_set_dir_to_report_config_record(report_config_record_h handle,
 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);
@@ -1037,6 +1100,8 @@ API int zb_get_id_from_report_config_record(report_config_record_h handle,
 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 ;
@@ -1047,6 +1112,8 @@ API int zb_set_id_to_report_config_record(report_config_record_h handle,
 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);
@@ -1057,6 +1124,8 @@ API int zb_get_type_from_report_config_record(report_config_record_h handle,
 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;
@@ -1067,6 +1136,8 @@ API int zb_set_type_to_report_config_record(report_config_record_h handle,
 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);
@@ -1077,6 +1148,8 @@ API int zb_get_min_i_from_report_config_record(report_config_record_h handle,
 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;
@@ -1086,6 +1159,8 @@ API int zb_set_min_i_to_report_config_record(report_config_record_h handle,
 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);
@@ -1096,6 +1171,8 @@ API int zb_get_max_i_from_report_config_record(report_config_record_h handle,
 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;
@@ -1105,6 +1182,8 @@ API int zb_set_max_i_to_report_config_record(report_config_record_h handle,
 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);
@@ -1115,6 +1194,8 @@ API int zb_get_timeout_from_report_config_record(report_config_record_h handle,
 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;
@@ -1124,6 +1205,8 @@ API int zb_set_timeout_to_report_config_record(report_config_record_h handle,
 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;
@@ -1150,6 +1233,8 @@ API int zb_get_change_from_report_config_record1(report_config_record_h handle,
 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;
 
@@ -1180,6 +1265,8 @@ API int zb_set_change_to_report_config_record1(report_config_record_h handle,
 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;
@@ -1209,6 +1296,8 @@ API int zb_get_change_from_report_config_record2(report_config_record_h handle,
 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;
 
@@ -1237,6 +1326,8 @@ API int zb_set_change_to_report_config_record2(
 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;
 
@@ -1262,14 +1353,16 @@ API int zb_get_change_from_report_config_record3(report_config_record_h handle,
 
 API int zb_create_read_report_config_record(read_report_config_record_h *handle)
 {
-       read_report_config_record_h t =
-               calloc(1, sizeof(struct read_reporting_configuration_record_s));
+       read_report_config_record_h t = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct read_reporting_configuration_record_s));
        *handle = t;
 
        return ZIGBEE_ERROR_NONE;
@@ -1285,8 +1378,11 @@ API void zb_destroy_read_report_config_record(read_report_config_record_h handle
 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
@@ -1297,8 +1393,11 @@ API int zb_set_dir_to_read_report_config_record(read_report_config_record_h hand
 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;
 }
@@ -1306,8 +1405,11 @@ API int zb_get_dir_from_read_report_config_record(read_report_config_record_h ha
 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;
 }
@@ -1324,14 +1426,16 @@ API int zb_get_id_from_read_report_config_record(read_report_config_record_h han
 API int zb_create_report_config_response_record(
                report_config_response_record_h *handle)
 {
-       report_config_response_record_h t =
-               calloc(1, sizeof(struct reporting_configuration_response_record_s));
+       report_config_response_record_h t = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct reporting_configuration_response_record_s));
        *handle = t;
 
        return ZIGBEE_ERROR_NONE;
@@ -1348,9 +1452,12 @@ API void zb_destroy_report_config_response_record(
 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;
 }
@@ -1358,8 +1465,11 @@ API int zb_get_status_from_report_config_response_record(
 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;
 }
@@ -1367,9 +1477,12 @@ API int zb_set_status_to_report_config_response_record(
 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;
 }
@@ -1377,8 +1490,11 @@ API int zb_get_dir_from_report_config_response_record(
 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;
 }
@@ -1386,9 +1502,12 @@ API int zb_set_dir_to_report_config_response_record(
 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;
 }
@@ -1396,21 +1515,27 @@ API int zb_get_id_from_report_config_response_record(
 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 = calloc(1, sizeof(struct attribute_report_s));
+       attr_report_h t = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct attribute_report_s));
        *handle = t;
 
        return ZIGBEE_ERROR_NONE;
@@ -1429,40 +1554,54 @@ API void zb_destroy_attr_report(attr_report_h handle)
 
 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;
@@ -1531,6 +1670,8 @@ API int zb_get_value_from_attr_report(attr_report_h handle, zb_value_h value)
 
 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;
@@ -1617,13 +1758,16 @@ struct write_attribute_structured_record_s {
 
 API int zb_create_extended_attr_info(extended_attr_info_h *handle)
 {
-       extended_attr_info_h t = calloc(1, sizeof(struct extended_attribute_infomation_s));
+       extended_attr_info_h t = NULL;
 
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
 
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETVM_IF(NULL == t, ZIGBEE_ERROR_OUT_OF_MEMORY, "calloc() Fail(%d)", errno);
 
+       CHECK_ZIGBEE_PRIVILEGE();
+
+       t = calloc(1, sizeof(struct extended_attribute_infomation_s));
        *handle = t;
 
        return ZIGBEE_ERROR_NONE;
@@ -1639,9 +1783,12 @@ API void zb_destroy_extended_attr_info(extended_attr_info_h handle)
 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;
 }
@@ -1649,8 +1796,11 @@ API int zb_get_id_from_extended_attr_info(extended_attr_info_h handle,
 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;
 }
@@ -1658,9 +1808,12 @@ API int zb_set_id_to_extended_attr_info(extended_attr_info_h handle,
 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;
 }
@@ -1668,8 +1821,11 @@ API int zb_get_type_from_extended_attr_info(extended_attr_info_h handle,
 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;
 }
@@ -1677,9 +1833,12 @@ API int zb_set_type_to_extended_attr_info(extended_attr_info_h handle,
 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;
 }
@@ -1687,8 +1846,11 @@ API int zb_get_acl_from_extended_attr_info(extended_attr_info_h handle,
 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;
 }
index 16546ccb38d6e462c29c4608383dea3d50eea9d2..a7b745a7881613adfea6212f0659f43f278f8cd7 100644 (file)
@@ -119,7 +119,10 @@ 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 = calloc(1, sizeof(struct zb_zdo_simple_desc_s));
+       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;
@@ -130,6 +133,7 @@ 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;
 }
@@ -138,21 +142,26 @@ API int zb_simple_desc_destroy(zb_zdo_simple_desc_h handle)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        free(handle);
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_simple_desc_get_ep(zb_zdo_simple_desc_h handle, unsigned char *ep)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *ep = handle->ep;
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, unsigned char ep)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->ep = ep;
        return ZIGBEE_ERROR_NONE;
 }
@@ -160,8 +169,10 @@ API int zb_simple_desc_set_ep(zb_zdo_simple_desc_h handle, unsigned char ep)
 API int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
                unsigned short *profile_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == profile_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *profile_id = handle->profile_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -169,7 +180,9 @@ API int zb_simple_desc_get_profile_id(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_profile_id(zb_zdo_simple_desc_h handle,
                unsigned short profile_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->profile_id = profile_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -178,8 +191,10 @@ API int zb_simple_desc_set_profile_id(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
                unsigned short *device_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == device_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *device_id = handle->device_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -187,7 +202,9 @@ API int zb_simple_desc_get_device_id(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
                unsigned short device_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->device_id = device_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -195,8 +212,10 @@ API int zb_simple_desc_set_device_id(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
                unsigned short *device_ver)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == device_ver, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *device_ver = handle->device_ver;
        return ZIGBEE_ERROR_NONE;
 }
@@ -204,7 +223,9 @@ API int zb_simple_desc_get_device_ver(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
                unsigned short device_ver)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->device_ver = device_ver;
        return ZIGBEE_ERROR_NONE;
 }
@@ -212,8 +233,10 @@ API int zb_simple_desc_set_device_ver(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
                unsigned char *num_of_in_clusters)
 {
+       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 = handle->num_of_in_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -221,7 +244,9 @@ API int zb_simple_desc_get_num_of_in_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
                unsigned char num_of_in_clusters)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->num_of_in_clusters = num_of_in_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -229,8 +254,10 @@ API int zb_simple_desc_set_num_of_in_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
                unsigned char *num_of_out_clusters)
 {
+       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 = handle->num_of_out_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -238,7 +265,9 @@ API int zb_simple_desc_get_num_of_out_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
                unsigned char num_of_out_clusters)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->num_of_out_clusters = num_of_out_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -246,9 +275,11 @@ API int zb_simple_desc_set_num_of_out_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
                unsigned short **in_clusters)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == handle->in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == in_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *in_clusters = handle->in_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -256,9 +287,11 @@ API int zb_simple_desc_get_in_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
                unsigned short *in_clusters, int num)
 {
+       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(handle->in_clusters, in_clusters, 2 * num);
        return ZIGBEE_ERROR_NONE;
 }
@@ -266,9 +299,11 @@ API int zb_simple_desc_set_in_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
                unsigned short **out_clusters)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == handle->out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == out_clusters, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *out_clusters = handle->out_clusters;
        return ZIGBEE_ERROR_NONE;
 }
@@ -276,9 +311,11 @@ API int zb_simple_desc_get_out_clusters(zb_zdo_simple_desc_h handle,
 API int zb_simple_desc_set_out_clusters(zb_zdo_simple_desc_h handle,
                unsigned short *out_clusters, int num)
 {
+       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(handle->out_clusters, out_clusters, 2 * num);
        return ZIGBEE_ERROR_NONE;
 }
@@ -288,6 +325,7 @@ API int zb_get_all_device_list(zigbee_h handle, int *count, zb_end_device_info_h
        int ret;
        unsigned char cnt;
 
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
        ret = zbl_get_all_device_info(list, &cnt);
        *count = cnt;
@@ -300,6 +338,7 @@ API int zb_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *c
        int ret;
        unsigned char cnt = 0;
 
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        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);
@@ -317,6 +356,7 @@ API int zb_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep,
        unsigned char in_cnt = 0;
        unsigned char out_cnt = 0;
 
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        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);
@@ -338,8 +378,10 @@ API int zb_devices_info_foreach_end_device(zb_end_device_info_h *list,
        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) {
@@ -357,41 +399,51 @@ API int zb_devices_info_foreach_end_device(zb_end_device_info_h *list,
 
 API int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *addr16 = handle->addr16;
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        memcpy(addr64, handle->addr64, sizeof(ieee_addr));
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *count)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == count, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *count = handle->num_of_ep;
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list)
 {
+       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, handle->ep, handle->num_of_ep);
        return ZIGBEE_ERROR_NONE;
 }
 
 API int zb_get_mac_capabiity(zb_end_device_info_h handle, unsigned char *capability)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == capability, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0 == handle->capability, ZIGBEE_ERROR_NO_DATA);
+
        *capability = handle->capability;
        return ZIGBEE_ERROR_NONE;
 }
@@ -399,9 +451,11 @@ API int zb_get_mac_capabiity(zb_end_device_info_h handle, unsigned char *capabil
 API int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle,
                unsigned char *can_do_it)
 {
+       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 == handle->capability, ZIGBEE_ERROR_NO_DATA);
+
        *can_do_it = handle->capability & ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR ? 1 : 0;
        return ZIGBEE_ERROR_NONE;
 }
@@ -410,9 +464,11 @@ API int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep,
                unsigned short *device_id)
 {
        int i;
+       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 == handle->desc, ZIGBEE_ERROR_NO_DATA);
+
        for (i = 0; i < handle->num_of_ep; i++) {
                RETV_IF(NULL == handle->desc[i], ZIGBEE_ERROR_NO_DATA);
                if (handle->desc[i]->ep == ep) {
@@ -427,9 +483,11 @@ API int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep,
                unsigned short *profile_id)
 {
        int i;
+       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 == handle->desc, ZIGBEE_ERROR_NO_DATA);
+
        for (i = 0; i < handle->num_of_ep; i++) {
                RETV_IF(NULL == handle->desc[i], ZIGBEE_ERROR_NO_DATA);
                if (handle->desc[i]->ep == ep) {
@@ -442,9 +500,11 @@ API int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep,
 
 API int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src)
 {
+       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 == handle->capability, ZIGBEE_ERROR_NO_DATA);
+
        *power_src = handle->capability & ZB_ZDP_POWER_SOURCE ? 1 : 0;
        return ZIGBEE_ERROR_NONE;
 }
@@ -452,9 +512,11 @@ API int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_sr
 API int zb_get_security_capabilty(zb_end_device_info_h handle,
                unsigned char *sec_capability)
 {
+       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 == handle->capability, ZIGBEE_ERROR_NO_DATA);
+
        *sec_capability = handle->capability & ZB_ZDP_SECURITY_CAPABILITY ? 1 : 0;
        return ZIGBEE_ERROR_NONE;
 }
@@ -463,8 +525,11 @@ 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 =
-               calloc(1, sizeof(struct zb_zdo_node_power_descriptor_s));
+       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;
@@ -476,6 +541,7 @@ API int zb_node_power_desc_copy(zb_zdo_node_power_descriptor_h src,
        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;
 }
@@ -484,6 +550,7 @@ API int zb_node_power_desc_destroy(zb_zdo_node_power_descriptor_h handle)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        free(handle);
        return ZIGBEE_ERROR_NONE;
 }
@@ -492,8 +559,10 @@ API int zb_node_power_desc_get_current_power_mode(
                zb_zdo_node_power_descriptor_h handle,
                unsigned char* current_power_mode)
 {
+       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 = handle->current_power_mode;
        return ZIGBEE_ERROR_NONE;
 }
@@ -501,8 +570,10 @@ API int zb_node_power_desc_get_current_power_mode(
 API int zb_node_power_desc_set_current_power_mode(
                zb_zdo_node_power_descriptor_h handle, unsigned char current_power_mode)
 {
+       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);
+
        handle->current_power_mode = current_power_mode;
        return ZIGBEE_ERROR_NONE;
 }
@@ -510,8 +581,10 @@ API int zb_node_power_desc_set_current_power_mode(
 API int zb_node_power_desc_get_available_power_sources(
                zb_zdo_node_power_descriptor_h handle, unsigned char* available_power_sources)
 {
+       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 = handle->available_power_sources;
        return ZIGBEE_ERROR_NONE;
 }
@@ -519,8 +592,10 @@ API int zb_node_power_desc_get_available_power_sources(
 API int zb_node_power_desc_set_available_power_sources(
                zb_zdo_node_power_descriptor_h handle, unsigned char available_power_sources)
 {
+       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);
+
        handle->available_power_sources = available_power_sources;
        return ZIGBEE_ERROR_NONE;
 }
@@ -528,8 +603,10 @@ API int zb_node_power_desc_set_available_power_sources(
 API int zb_node_power_desc_get_current_power_source(
                zb_zdo_node_power_descriptor_h handle, unsigned char* current_power_source)
 {
+       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 = handle->current_power_source;
        return ZIGBEE_ERROR_NONE;
 }
@@ -537,8 +614,10 @@ API int zb_node_power_desc_get_current_power_source(
 API int zb_node_power_desc_set_current_power_source(
                zb_zdo_node_power_descriptor_h handle, unsigned char current_power_source)
 {
+       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);
+
        handle->current_power_source = current_power_source;
        return ZIGBEE_ERROR_NONE;
 }
@@ -546,8 +625,10 @@ API int zb_node_power_desc_set_current_power_source(
 API int zb_node_power_desc_get_current_power_source_level(
                zb_zdo_node_power_descriptor_h handle, unsigned char* current_power_source_level)
 {
+       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 = handle->current_power_source_level;
        return ZIGBEE_ERROR_NONE;
 }
@@ -555,7 +636,9 @@ API int zb_node_power_desc_get_current_power_source_level(
 API int zb_node_power_desc_set_current_power_source_level(
                zb_zdo_node_power_descriptor_h handle, unsigned char current_power_source_level)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->current_power_source_level = current_power_source_level;
        return ZIGBEE_ERROR_NONE;
 }
@@ -564,7 +647,11 @@ 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 = calloc(1, sizeof(struct zb_zdo_node_descriptor_s));
+       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;
@@ -576,6 +663,7 @@ API int zb_node_desc_copy(zb_zdo_node_descriptor_h src,
        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;
 }
@@ -584,6 +672,7 @@ API int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle)
 {
        CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        free(handle);
        return ZIGBEE_ERROR_NONE;
 }
@@ -591,8 +680,10 @@ API int zb_node_desc_destroy(zb_zdo_node_descriptor_h handle)
 API int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
                unsigned char* logical_type)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == logical_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *logical_type = handle->logical_type;
        return ZIGBEE_ERROR_NONE;
 }
@@ -600,8 +691,10 @@ API int zb_node_desc_get_logical_type(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
                unsigned char logical_type)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0b11 < logical_type, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
        handle->logical_type = logical_type;
        return ZIGBEE_ERROR_NONE;
 }
@@ -609,8 +702,10 @@ API int zb_node_desc_set_logical_type(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_complex_desciptor_available(
                zb_zdo_node_descriptor_h handle, unsigned char* complex_desciptor_available)
 {
+       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 = handle->complex_desciptor_available;
        return ZIGBEE_ERROR_NONE;
 }
@@ -618,8 +713,10 @@ API int zb_node_desc_get_complex_desciptor_available(
 API int zb_node_desc_set_complex_descriptor_available(
                zb_zdo_node_descriptor_h handle, unsigned char complex_desciptor_available)
 {
+       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);
+
        handle->complex_desciptor_available = complex_desciptor_available;
        return ZIGBEE_ERROR_NONE;
 }
@@ -627,8 +724,10 @@ API int zb_node_desc_set_complex_descriptor_available(
 API int zb_node_desc_get_user_descriptor_available(
                zb_zdo_node_descriptor_h handle, unsigned char* user_descriptor_available)
 {
+       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 = handle->user_descriptor_available;
        return ZIGBEE_ERROR_NONE;
 }
@@ -636,8 +735,10 @@ API int zb_node_desc_get_user_descriptor_available(
 API int zb_node_desc_set_user_descriptor_available(
                zb_zdo_node_descriptor_h handle, unsigned char user_descriptor_available)
 {
+       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);
+
        handle->user_descriptor_available = user_descriptor_available;
        return ZIGBEE_ERROR_NONE;
 }
@@ -645,8 +746,10 @@ API int zb_node_desc_set_user_descriptor_available(
 API int zb_node_desc_get_aps_flags(zb_zdo_node_descriptor_h handle,
                unsigned char* aps_flags)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == aps_flags, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *aps_flags = handle->aps_flags;
        return ZIGBEE_ERROR_NONE;
 }
@@ -654,8 +757,10 @@ API int zb_node_desc_get_aps_flags(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_aps_flags(zb_zdo_node_descriptor_h handle,
                unsigned char aps_flags)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0b111 < aps_flags, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
        handle->aps_flags = aps_flags;
        return ZIGBEE_ERROR_NONE;
 }
@@ -663,8 +768,10 @@ API int zb_node_desc_set_aps_flags(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_frequency_band(zb_zdo_node_descriptor_h handle,
                unsigned char* frequency_band)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == frequency_band, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *frequency_band = handle->frequency_band;
        return ZIGBEE_ERROR_NONE;
 }
@@ -672,8 +779,10 @@ API int zb_node_desc_get_frequency_band(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_frequency_band(zb_zdo_node_descriptor_h handle,
                unsigned char frequency_band)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0b1111 < frequency_band, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
        handle->frequency_band = frequency_band;
        return ZIGBEE_ERROR_NONE;
 }
@@ -682,8 +791,10 @@ API int zb_node_desc_set_frequency_band(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_mac_capability_flags(zb_zdo_node_descriptor_h handle,
                unsigned char* mac_capability_flags)
 {
+       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 = handle->mac_capability_flags;
        return ZIGBEE_ERROR_NONE;
 }
@@ -691,7 +802,9 @@ API int zb_node_desc_get_mac_capability_flags(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_mac_capability_flags(zb_zdo_node_descriptor_h handle,
                unsigned char mac_capability_flags)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->mac_capability_flags = mac_capability_flags;
        return ZIGBEE_ERROR_NONE;
 }
@@ -699,8 +812,10 @@ API int zb_node_desc_set_mac_capability_flags(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_manufacturer_code(zb_zdo_node_descriptor_h handle,
                unsigned short* manufacturer_code)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == manufacturer_code, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *manufacturer_code = handle->manufacturer_code;
        return ZIGBEE_ERROR_NONE;
 }
@@ -708,7 +823,9 @@ API int zb_node_desc_get_manufacturer_code(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_manufacturer_code(zb_zdo_node_descriptor_h handle,
                unsigned short manufacturer_code)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        handle->manufacturer_code = manufacturer_code;
        return ZIGBEE_ERROR_NONE;
 }
@@ -716,8 +833,10 @@ API int zb_node_desc_set_manufacturer_code(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
                unsigned char* maximum_buffer_size)
 {
+       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 = handle->maximum_buffer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -725,8 +844,10 @@ API int zb_node_desc_get_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
                unsigned char maximum_buffer_size)
 {
+       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);
+
        handle->maximum_buffer_size = maximum_buffer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -734,8 +855,10 @@ API int zb_node_desc_set_maximum_buffer_size(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_maximum_incoming_transfer_size(
                zb_zdo_node_descriptor_h handle, unsigned short* maximum_incoming_transfer_size)
 {
+       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 = handle->maximum_incoming_transfer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -743,8 +866,10 @@ API int zb_node_desc_get_maximum_incoming_transfer_size(
 API int zb_node_desc_set_maximum_incoming_transfer_size(
                zb_zdo_node_descriptor_h handle, unsigned short maximum_incoming_transfer_size)
 {
+       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);
+
        handle->maximum_incoming_transfer_size = maximum_incoming_transfer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -752,8 +877,10 @@ API int zb_node_desc_set_maximum_incoming_transfer_size(
 API int zb_node_desc_get_server_mask(zb_zdo_node_descriptor_h handle,
                unsigned short* server_mask)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == server_mask, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *server_mask = handle->server_mask;
        return ZIGBEE_ERROR_NONE;
 }
@@ -761,8 +888,10 @@ API int zb_node_desc_get_server_mask(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_set_server_mask(zb_zdo_node_descriptor_h handle,
                unsigned short server_mask)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(0x7f < server_mask, ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE);
+
        handle->server_mask = server_mask;
        return ZIGBEE_ERROR_NONE;
 }
@@ -770,8 +899,10 @@ API int zb_node_desc_set_server_mask(zb_zdo_node_descriptor_h handle,
 API int zb_node_desc_get_maximum_outgoing_transfer_size(
                zb_zdo_node_descriptor_h handle, unsigned short* maximum_outgoing_transfer_size)
 {
+       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 = handle->maximum_outgoing_transfer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -779,8 +910,10 @@ API int zb_node_desc_get_maximum_outgoing_transfer_size(
 API int zb_node_desc_set_maximum_outgoing_transfer_size(
                zb_zdo_node_descriptor_h handle, unsigned short maximum_outgoing_transfer_size)
 {
+       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);
+
        handle->maximum_outgoing_transfer_size = maximum_outgoing_transfer_size;
        return ZIGBEE_ERROR_NONE;
 }
@@ -788,8 +921,10 @@ API int zb_node_desc_set_maximum_outgoing_transfer_size(
 API int zb_node_desc_get_descriptor_capability_field(
                zb_zdo_node_descriptor_h handle, unsigned short* descriptor_capability_field)
 {
+       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 = handle->descriptor_capability_field;
        return ZIGBEE_ERROR_NONE;
 }
@@ -797,8 +932,10 @@ API int zb_node_desc_get_descriptor_capability_field(
 API int zb_node_desc_set_descriptor_capability_field(
                zb_zdo_node_descriptor_h handle, unsigned short descriptor_capability_field)
 {
+       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);
+
        handle->descriptor_capability_field = descriptor_capability_field;
        return ZIGBEE_ERROR_NONE;
 }
@@ -806,7 +943,9 @@ API int zb_node_desc_set_descriptor_capability_field(
 API int zb_network_list_record_get_extended_pan_id(
                zb_zdo_network_list_record_h handle, ieee_addr extended_pan_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        extended_pan_id = handle->extended_pan_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -814,8 +953,10 @@ API int zb_network_list_record_get_extended_pan_id(
 API int zb_network_list_record_get_logical_channel(
                zb_zdo_network_list_record_h handle, unsigned char* logical_channel)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == logical_channel, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *logical_channel = handle->logical_channel;
        return ZIGBEE_ERROR_NONE;
 }
@@ -823,8 +964,10 @@ API int zb_network_list_record_get_logical_channel(
 API int zb_network_list_record_get_zigbee_version(
                zb_zdo_network_list_record_h handle, unsigned char* zigbee_version)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == zigbee_version, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *zigbee_version = handle->zigbee_version;
        return ZIGBEE_ERROR_NONE;
 }
@@ -832,8 +975,10 @@ API int zb_network_list_record_get_zigbee_version(
 API int zb_network_list_record_get_stack_profile(
                zb_zdo_network_list_record_h handle, unsigned char* stack_profile)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == stack_profile, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *stack_profile = handle->stack_profile;
        return ZIGBEE_ERROR_NONE;
 }
@@ -841,8 +986,10 @@ API int zb_network_list_record_get_stack_profile(
 API int zb_network_list_record_get_beacon_order(
                zb_zdo_network_list_record_h handle, unsigned char* beacon_order)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == beacon_order, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *beacon_order = handle->beacon_order;
        return ZIGBEE_ERROR_NONE;
 }
@@ -850,8 +997,10 @@ API int zb_network_list_record_get_beacon_order(
 API int zb_network_list_record_get_superframe_order(
                zb_zdo_network_list_record_h handle, unsigned char* superframe_order)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == superframe_order, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *superframe_order = handle->superframe_order;
        return ZIGBEE_ERROR_NONE;
 }
@@ -859,8 +1008,10 @@ API int zb_network_list_record_get_superframe_order(
 API int zb_network_list_record_get_permit_joining(
                zb_zdo_network_list_record_h handle, unsigned char* permit_joining)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *permit_joining = handle->permit_joining;
        return ZIGBEE_ERROR_NONE;
 }
@@ -868,9 +1019,11 @@ API int zb_network_list_record_get_permit_joining(
 API int zb_neighbor_table_desc_get_extended_pan_id(
                zb_zdo_neighbor_table_desc_h handle, ieee_addr extended_pan_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == handle->extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == extended_pan_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        memcpy(extended_pan_id, handle->extended_pan_id, sizeof(ieee_addr));
        return ZIGBEE_ERROR_NONE;
 }
@@ -878,9 +1031,11 @@ API int zb_neighbor_table_desc_get_extended_pan_id(
 API int zb_neighbor_table_desc_get_ieee_addr(
                zb_zdo_neighbor_table_desc_h handle, ieee_addr addr64)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == handle->addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        memcpy(addr64, handle->addr64, sizeof(ieee_addr));
        return ZIGBEE_ERROR_NONE;
 }
@@ -888,8 +1043,10 @@ API int zb_neighbor_table_desc_get_ieee_addr(
 API int zb_neighbor_table_desc_get_nwk_addr(
                zb_zdo_neighbor_table_desc_h handle, nwk_addr* addr16)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *addr16 = handle->addr16;
        return ZIGBEE_ERROR_NONE;
 }
@@ -897,8 +1054,10 @@ API int zb_neighbor_table_desc_get_nwk_addr(
 API int zb_neighbor_table_desc_get_device_type(
                zb_zdo_neighbor_table_desc_h handle, unsigned char* device_type)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == device_type, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *device_type = handle->device_type;
        return ZIGBEE_ERROR_NONE;
 }
@@ -906,8 +1065,10 @@ API int zb_neighbor_table_desc_get_device_type(
 API int zb_neighbor_table_desc_get_rx_on_when_idle(
                zb_zdo_neighbor_table_desc_h handle, unsigned char* rx_on_when_idle)
 {
+       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 = handle->rx_on_when_idle;
        return ZIGBEE_ERROR_NONE;
 }
@@ -915,8 +1076,10 @@ API int zb_neighbor_table_desc_get_rx_on_when_idle(
 API int zb_neighbor_table_desc_get_relationship(
                zb_zdo_neighbor_table_desc_h handle, unsigned char* releationship)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == releationship, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *releationship = handle->relationship;
        return ZIGBEE_ERROR_NONE;
 }
@@ -924,8 +1087,10 @@ API int zb_neighbor_table_desc_get_relationship(
 API int zb_neighbor_table_desc_get_permit_joining(
                zb_zdo_neighbor_table_desc_h handle, unsigned char* permit_joining)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == permit_joining, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *permit_joining = handle->permit_joining;
        return ZIGBEE_ERROR_NONE;
 }
@@ -933,8 +1098,10 @@ API int zb_neighbor_table_desc_get_permit_joining(
 API int zb_neighbor_table_desc_get_depth(
                zb_zdo_neighbor_table_desc_h handle, unsigned char* depth)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == depth, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *depth = handle->depth;
        return ZIGBEE_ERROR_NONE;
 }
@@ -942,8 +1109,10 @@ API int zb_neighbor_table_desc_get_depth(
 API int zb_neighbor_table_desc_get_lqi(zb_zdo_neighbor_table_desc_h handle,
                unsigned char* lqi)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == lqi, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *lqi = handle->lqi;
        return ZIGBEE_ERROR_NONE;
 }
@@ -951,8 +1120,10 @@ API int zb_neighbor_table_desc_get_lqi(zb_zdo_neighbor_table_desc_h handle,
 API int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
                nwk_addr* dst_addr)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == dst_addr, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *dst_addr = handle->dst_addr;
        return ZIGBEE_ERROR_NONE;
 }
@@ -960,8 +1131,10 @@ API int zb_routing_table_get_dst_addr(zb_zdo_routing_table_h handle,
 API int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
                unsigned char *status)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == status, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *status = handle->status;
        return ZIGBEE_ERROR_NONE;
 }
@@ -969,8 +1142,10 @@ API int zb_routing_table_get_dst_status(zb_zdo_routing_table_h handle,
 API int zb_routing_table_get_memory_constrained(
                zb_zdo_routing_table_h handle, unsigned char *memory_constrained)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == memory_constrained, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *memory_constrained = handle->memory_constrained;
        return ZIGBEE_ERROR_NONE;
 }
@@ -978,8 +1153,10 @@ API int zb_routing_table_get_memory_constrained(
 API int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
                unsigned char *many_to_one)
 {
+       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 = handle->many_to_one;
        return ZIGBEE_ERROR_NONE;
 }
@@ -987,8 +1164,10 @@ API int zb_routing_table_get_many_to_one(zb_zdo_routing_table_h handle,
 API int zb_routing_table_get_route_record_required(
                zb_zdo_routing_table_h handle, unsigned char *route_record_required)
 {
+       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 = handle->route_record_required;
        return ZIGBEE_ERROR_NONE;
 }
@@ -996,8 +1175,10 @@ API int zb_routing_table_get_route_record_required(
 API int zb_routing_table_get_next_hop_addr(
                zb_zdo_routing_table_h handle, nwk_addr *next_hop_addr)
 {
+       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 = handle->next_hop_addr;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1005,7 +1186,9 @@ API int zb_routing_table_get_next_hop_addr(
 API int zb_binding_table_get_src_addr(zb_zdo_binding_table_h handle,
                ieee_addr src_addr)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        memcpy(src_addr, handle->src_addr64, sizeof(ieee_addr));
        return ZIGBEE_ERROR_NONE;
 }
@@ -1013,8 +1196,10 @@ API int zb_binding_table_get_src_addr(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_src_ep(zb_zdo_binding_table_h handle,
                unsigned char* src_ep)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == src_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *src_ep = handle->src_ep;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1022,8 +1207,10 @@ API int zb_binding_table_get_src_ep(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_cluster_id(zb_zdo_binding_table_h handle,
                unsigned short *cluster_id)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == cluster_id, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *cluster_id = handle->cluster_id;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1031,8 +1218,10 @@ API int zb_binding_table_get_cluster_id(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_dst_addr_mode(zb_zdo_binding_table_h handle,
                unsigned char* dst_addr_mode)
 {
+       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 = handle->dst_addr_mode;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1040,8 +1229,10 @@ API int zb_binding_table_get_dst_addr_mode(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_dst_addr16(zb_zdo_binding_table_h handle,
                nwk_addr* addr16)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *addr16 = handle->dst_addr16;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1049,8 +1240,10 @@ API int zb_binding_table_get_dst_addr16(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_dst_addr64(zb_zdo_binding_table_h handle,
                ieee_addr addr64)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        memcpy(addr64, handle->dst_addr64, sizeof(ieee_addr));
        return ZIGBEE_ERROR_NONE;
 }
@@ -1058,8 +1251,10 @@ API int zb_binding_table_get_dst_addr64(zb_zdo_binding_table_h handle,
 API int zb_binding_table_get_dst_ep(zb_zdo_binding_table_h handle,
                unsigned char* dst_ep)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == dst_ep, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *dst_ep = handle->dst_ep;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1067,7 +1262,9 @@ API int zb_binding_table_get_dst_ep(zb_zdo_binding_table_h handle,
 API int zb_discovery_cache_get_ieee_addr(zb_zdo_discovery_cache_h handle,
                ieee_addr addr64)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        addr64 = handle->addr64;
        return ZIGBEE_ERROR_NONE;
 }
@@ -1075,8 +1272,10 @@ API int zb_discovery_cache_get_ieee_addr(zb_zdo_discovery_cache_h handle,
 API int zb_discovery_cache_get_nwk_addr(zb_zdo_discovery_cache_h handle,
                nwk_addr* addr16)
 {
+       CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
        RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == addr16, ZIGBEE_ERROR_INVALID_PARAMETER);
+
        *addr16 = handle->addr16;
        return ZIGBEE_ERROR_NONE;
 }
index 95ec2c22d9121185d07501238a2344b80a6880ad..fa9cc31ee3eda237f911164880adb1c9816e15db 100644 (file)
@@ -117,6 +117,26 @@ static const char* zb_event_str[] = {
        NULL,
 };
 
+const char* zigbee_error_to_string(zb_error_e err)
+{
+       switch (err) {
+       /* CHECK: List all enum values here */
+       CASE_TO_STR(ZIGBEE_ERROR_NONE)
+       CASE_TO_STR(ZIGBEE_ERROR_INVALID_PARAMETER)
+       CASE_TO_STR(ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE)
+       CASE_TO_STR(ZIGBEE_ERROR_OUT_OF_MEMORY)
+       CASE_TO_STR(ZIGBEE_ERROR_IO_ERROR)
+       CASE_TO_STR(ZIGBEE_ERROR_NO_DATA)
+       CASE_TO_STR(ZIGBEE_ERROR_NOT_SUPPORTED)
+       CASE_TO_STR(ZIGBEE_ERROR_PERMISSION_DENIED)
+       CASE_TO_STR(ZIGBEE_ERROR_INVALID_ENDPOINT)
+       CASE_TO_STR(ZIGBEE_ERROR_INVALID_ADDRESS)
+       CASE_TO_STR(ZIGBEE_ERROR_OPERATION_FAILED)
+       default :
+               return "ZIGBEE_ERROR_UNKNOWN";
+       }
+}
+
 static void _init_endpoints()
 {
        /* Samjin power outlet EP1 */
@@ -470,7 +490,7 @@ static int run_create(MManager *mm, struct menu_data *menu)
 
        ret = zb_create(&handle);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create(0x%X) - FAILED!!!", ret);
+               msg("zb_create(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -497,7 +517,7 @@ static int run_enable(MManager *mm, struct menu_data *menu)
        /* Set event callback */
        ret = zb_set_event_cb(handle, zigbee_event_cb);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_set_event_cb(0x%X) - FAILED!!!", ret);
+               msg("zb_set_event_cb(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -522,7 +542,7 @@ static int run_disable(MManager *mm, struct menu_data *menu)
 
        ret = zb_disable(handle);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_disable(0x%X) - FAILED!!!", ret);
+               msg("zb_disable(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -537,7 +557,7 @@ static int run_hw_reset(MManager *mm, struct menu_data *menu)
 
        ret = zb_hw_reset(handle);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_hw_reset(0x%X) - FAILED!!!", ret);
+               msg("zb_hw_reset(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -553,7 +573,7 @@ static int run_coex_start(MManager *mm, struct menu_data *menu)
 
        ret = zb_coex_start(handle, channel);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_coex_start(0x%X) - FAILED!!!", ret);
+               msg("zb_coex_start(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -568,7 +588,7 @@ static int run_coex_stop(MManager *mm, struct menu_data *menu)
 
        ret = zb_coex_stop(handle);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_coex_stop(0x%X) - FAILED!!!", ret);
+               msg("zb_coex_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -587,7 +607,7 @@ static int run_get_network_info(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_get_network_info(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -609,7 +629,7 @@ 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!!!", ret);
+               msg("zb_get_controller_mac_address(%d) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -662,7 +682,7 @@ static int run_get_end_device_list(MManager *mm, struct menu_data *menu)
        }
        zb_device_list_free(list);
 
-       msg(" - zb_get_all_device_list() ret: [0x%X]", ret);
+       msg(" - zb_get_all_device_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
 
        return RET_SUCCESS;
 }
@@ -680,7 +700,7 @@ static int run_get_endpoint_list(MManager *mm, struct menu_data *menu)
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_endpoint_list() ret: [0x%X]", ret);
+       msg(" - zb_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]);
@@ -712,7 +732,7 @@ static int run_get_cluster_list(MManager *mm, struct menu_data *menu)
                return RET_FAILURE;
        }
 
-       msg(" - zb_get_cluster_list() ret: [0x%X]", ret);
+       msg(" - zb_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]));
@@ -740,7 +760,7 @@ static int run_choose_end_device_list(MManager *mm, struct menu_data *menu)
                zb_device_list_free(target_list);
 
        ret = zb_get_all_device_list(handle, &target_list_count, &target_list);
-       msg(" - zb_get_all_device_list() ret: [0x%X]", ret);
+       msg(" - zb_get_all_device_list() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
 
        for (i = 0; i < target_list_count && target_list; i++) {
                zb_get_network_address(target_list[i], &addr16);
@@ -822,7 +842,7 @@ static int run_form_network(MManager *mm, struct menu_data *menu)
 
        ret = zb_form_network(handle, zigbee_form_network_done_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_form_network(0x%X) - FAILED!!!", ret);
+               msg("zb_form_network(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -837,7 +857,7 @@ static int run_disable_network(MManager *mm, struct menu_data *menu)
 
        ret = zb_disable_network(handle, zigbee_disable_network_done_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_disable_network(0x%X) - FAILED!!!", ret);
+               msg("zb_disable_network(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -864,7 +884,7 @@ static int run_leave_device(MManager *mm, struct menu_data *menu)
 
        ret = zb_leave_device(handle, dest_addr64, remove_children, rejoin);
        if (ret != ZIGBEE_ERROR_NONE) {
-               msg("zb_leave_device(0x%X) - FAILED!!!", ret);
+               msg("zb_leave_device(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -883,7 +903,7 @@ static int run_permit_join(MManager *mm, struct menu_data *menu)
 
        ret = zb_permit_join(handle, timeout);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_permit_join(0x%X) - FAILED!!!", ret);
+               msg("zb_permit_join(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -979,10 +999,10 @@ static int __select_handle_register_event(MManager *mm, struct menu_data *menu)
        msg("");
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_create(%d) - FAILED!!!.", ret);
+               msg("zb_create(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        } else {
-               msg("zb_create(%d) - SUCCESS!!!. handle [%p]", ret, handle);
+               msg("zb_create(0x%X) - SUCCESS!!!. handle [%p]", ret, handle);
        }
 
        /* Set event callback */
@@ -992,16 +1012,16 @@ static int __select_handle_register_event(MManager *mm, struct menu_data *menu)
                return RET_FAILURE;
        }
 
-       msg(" - zb_set_event_cb() ret: [0x%X]", ret);
+       msg(" - zb_set_event_cb() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
 
        /* Enable */
        ret = zb_enable(handle, zigbee_enable_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_enable(0x%X) - FAILED!!!", ret);
+               msg("zb_enable(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
-       msg(" - zb_enable() ret: [0x%X]", ret);
+       msg(" - zb_enable() ret: [0x%X] [%s]", ret, zigbee_error_to_string(ret));
 
        menu_manager_set_user_data(mm, handle);
 
index c243d4f47b495444aaa004870608a062a0a646b5..c79651e03dd25b852b8c9dc1e5a2ce0a0aee3e49 100644 (file)
@@ -21,6 +21,8 @@
 extern "C" {
 #endif
 
+#define CASE_TO_STR(x) case x: return #x;
+
 typedef struct simple_desc {
        unsigned char ep; /**< Endpoint ID */
        unsigned short profile_id; /**< Profile ID */
@@ -32,6 +34,8 @@ typedef struct simple_desc {
        unsigned short out_clusters[32]; /**< Out-Cluster list */
 } simple_desc_s;
 
+const char* zigbee_error_to_string(zb_error_e err);
+
 #ifdef __cplusplus
 }
 #endif
index 180eefd4c40d3f97b68cac952c234f2d263032d1..702aed95a5e7411351a1d524908d5f0de37305d9 100644 (file)
@@ -59,7 +59,7 @@ static int run_alarm_reset_alarm(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_alarm_reset_alarm(handle, dest_addr16, 1, alarm_code,
                        ZB_ZCL_ON_OFF_CLUSTER_ID);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_reset_alarm(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_alarm_reset_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -75,7 +75,7 @@ static int run_alarm_reset_all_alarm(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_zcl_alarm_reset_all_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -92,7 +92,7 @@ static int run_alarm_get_alarm(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_alarm_get_alarm(handle, dest_addr16, 1,
                        zigbee_zcl_alarm_get_alarm_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_alarm_get_alarm(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_alarm_get_alarm(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -108,7 +108,7 @@ static int run_alarm_reset_all_alarm_log(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_zcl_alarm_reset_all_alarm_log(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 49943d4e05292285ef8c2b07930552b031071811..e43963d8a0c680787c095cf25c2872fe0d37d4dd 100644 (file)
@@ -39,7 +39,7 @@ static int run_reset_factory_default(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_zcl_basic_reset_factory_default(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index a56e4a5f64001f9540a0ad2466d772e5dbea10ee..d6eb3b23e118e3dc26a8eb3ef3c4f8c9252746d9 100644 (file)
@@ -67,7 +67,7 @@ static int run_move_to_hue(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_to_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -91,7 +91,7 @@ static int run_move_hue(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -118,7 +118,7 @@ static int run_step_hue(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_step_hue(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -142,7 +142,7 @@ static int run_move_to_saturation(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_to_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -166,7 +166,7 @@ static int run_move_saturation(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -193,7 +193,7 @@ static int run_step_saturation(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_step_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -220,7 +220,7 @@ static int run_move_to_hue_and_saturation(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_to_hue_and_saturation(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -247,7 +247,7 @@ static int run_move_to_color(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_to_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -271,7 +271,7 @@ static int run_move_color(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -298,7 +298,7 @@ static int run_step_color(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_step_color(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -322,7 +322,7 @@ static int run_move_to_color_temperature(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_ccontrol_move_to_color_temperature(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 18728b745549642bc868a96d936a6e3ed63a7f81..234fbc71df320ba79deea4ed88119d25c4a24e58 100644 (file)
@@ -100,7 +100,7 @@ static int run_group_add_group(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_group_add_group(handle, dest_addr16, sj_ep1.ep,
                        group_id, data_group_name, zigbee_zcl_group_add_group_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_add_group(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_group_add_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -121,7 +121,7 @@ static int run_group_view_group(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_group_view_group(handle, dest_addr16, sj_ep1.ep,
                        group_id, zigbee_zcl_group_view_group_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_view_group(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_group_view_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -141,7 +141,7 @@ static int run_group_get_group_membership(MManager *mm, struct menu_data *menu)
                        group_count, group_list,
                        zigbee_zcl_group_get_group_membership_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_get_group_membership(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_group_get_group_membership(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -162,7 +162,7 @@ static int run_group_remove_group(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_group_remove_group(handle, dest_addr16, sj_ep1.ep,
                        group_id, zigbee_zcl_group_remove_group_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_group_remove_group(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_group_remove_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -178,7 +178,7 @@ static int run_group_remove_all_group(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_zcl_group_remove_all_group(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -199,7 +199,7 @@ static int run_group_add_group_if_identifying(MManager *mm, struct menu_data *me
        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!!!", ret);
+               msg("zb_zcl_group_add_group_if_identifying(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index c3570f9fd618ba07029284179a6fc016ef18ac21..318daebc09db66cbb783d3c6f8c61ce3927e90ad 100644 (file)
@@ -51,7 +51,7 @@ static int run_enroll_response(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_zone_enroll_response(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 437dbf1c18214ad86fea58813a7b52997978655f..fd9cdb3921454ede406c2292b5fdbae6ae71d342 100644 (file)
@@ -55,7 +55,7 @@ static int run_identify(MManager *mm, struct menu_data *menu)
 
        ret = zb_zcl_identify(handle, dest_addr16, sj_ep1.ep, identify_time);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_identify(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_identify(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -72,7 +72,7 @@ static int run_identify_query(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_identify_query(handle, dest_addr16, sj_ep1.ep,
                        zigbee_zcl_identify_query_cb, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_identify_query(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_identify_query(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 6d7a66d69c8a9b1754f0f4ac42e30f1b0ce37f26..ef476fbddf2f8f01b4790786f9bd2d42eeb062d0 100644 (file)
@@ -54,7 +54,7 @@ static int run_move_to_level(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_move_to_level(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -78,7 +78,7 @@ static int run_move(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_move(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -105,7 +105,7 @@ static int run_step(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_step(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -121,7 +121,7 @@ static int run_stop(MManager *mm, struct menu_data *menu)
 
        ret = zb_zcl_levelctrl_stop(handle, dest_addr16, dimmer_ep1.ep);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_levelctrl_stop(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_levelctrl_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -145,7 +145,7 @@ static int run_move_with_on_off(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_move_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -169,7 +169,7 @@ static int run_move_to_level_with_on_off(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_move_to_level_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -196,7 +196,7 @@ static int run_step_with_on_off(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_levelctrl_step_with_on_off(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 3bd254a43ae75e8cf4aa54dc448b6238d571c044..057c7c1b56879e1f2f15b94e5c31b362244458ff 100644 (file)
@@ -39,7 +39,7 @@ static int run_on(MManager *mm, struct menu_data *menu)
 
        ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_ON);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -55,7 +55,7 @@ static int run_off(MManager *mm, struct menu_data *menu)
 
        ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_OFF);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -71,7 +71,7 @@ static int run_toggle(MManager *mm, struct menu_data *menu)
 
        ret = zb_zcl_onoff_control(handle, dest_addr16, sj_ep1.ep, ZB_ZCL_TOGGLE);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_onoff_control(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_onoff_control(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 778575c2fa2e52b9ad1158b3b1650bdbe820c78d..503d8d2e1d173941a769278dca3d255d4693615b 100644 (file)
@@ -61,7 +61,7 @@ static int run_check_in_response(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_pollctrl_check_in_response(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -77,7 +77,7 @@ static int run_fast_poll_stop(MManager *mm, struct menu_data *menu)
 
        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!!!", ret);
+               msg("zb_zcl_pollctrl_fast_poll_stop(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -98,7 +98,7 @@ static int run_set_long_poll_interval(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_pollctrl_set_long_poll_interval(handle, dest_addr16, sj_ep1.ep,
                        long_poll_interval,  zigbee_zcl_poll_control_check_in, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_set_long_poll_interval(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_pollctrl_set_long_poll_interval(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -119,7 +119,7 @@ static int run_set_short_poll_interval(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_pollctrl_set_short_poll_interval(handle, dest_addr16, sj_ep1.ep,
                        short_poll_interval, zigbee_zcl_poll_control_check_in, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_pollctrl_set_short_poll_interval(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_pollctrl_set_short_poll_interval(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 23a992fda8e24a2b3fbd4b5219e3c254830bff24..25723f9552f1e425ca7e3e05faefdbecab06af2f 100644 (file)
@@ -145,7 +145,7 @@ static int run_scene_add_scene(MManager *mm, struct menu_data *menu)
                        sj_ep1.ep, group_id, scene_id, trans_time, data_scene_name,
                        ext_len, ext_field_set, zigbee_zcl_scene_add_scene_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_add_scene(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_add_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -169,7 +169,7 @@ static int run_scene_view_scene(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_scene_view_scene(handle, dest_addr16, sj_ep1.ep, group_id,
                        scene_id, zigbee_zcl_scene_view_scene_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_view_scene(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_view_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -190,7 +190,7 @@ static int run_scene_get_scene_membership(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_scene_get_scene_membership(handle, dest_addr16, sj_ep1.ep,
                        group_id, zigbee_zcl_scene_get_scene_membership_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_get_scene_membership(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_get_scene_membership(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -214,7 +214,7 @@ static int run_scene_remove_scene(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_scene_remove_scene(handle, dest_addr16, sj_ep1.ep, group_id,
                        scene_id, zigbee_zcl_scene_remove_scene_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_remove_scene(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_remove_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -235,7 +235,7 @@ static int run_scene_remove_all_scene(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_scene_remove_all_scene(handle, dest_addr16, sj_ep1.ep, group_id,
                        zigbee_zcl_scene_remove_all_scene_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_remove_all_scene(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_remove_all_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -259,7 +259,7 @@ static int run_scene_store_scene(MManager *mm, struct menu_data *menu)
        ret = zb_zcl_scene_store_scene(handle, dest_addr16, sj_ep1.ep, group_id,
                        scene_id, zigbee_zcl_scene_store_scene_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_scene_store_scene(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_scene_store_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -283,7 +283,7 @@ static int run_scene_recall_scene(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_scene_recall_scene(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 76a9c20b15365e40ebfca0a3ef8660d708a1546c..a9b78d3f116338cd53c7e481535d6a620f122d2c 100644 (file)
@@ -50,7 +50,7 @@ static int run_adjust_setpoint(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zcl_thermostat_adjust_setpoint(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 2e55b495c85a20b1591d70fe2d0fce6d513166ef..271a96e55bf7da98d28120b1380e23353356e113 100644 (file)
@@ -378,7 +378,7 @@ static int run_global_read_attr(MManager *mm, struct menu_data *menu)
                        zigbee_zcl_global_read_attributes_rsp, NULL);
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_read_attr(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_global_read_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -421,7 +421,7 @@ static int run_global_write_attr(MManager *mm, struct menu_data *menu)
                        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!!!", ret);
+               msg("zb_zcl_global_write_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -448,7 +448,7 @@ static int run_global_write_attr_undivided(MManager *mm, struct menu_data *menu)
                        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!!!", ret);
+               msg("zb_zcl_global_write_attr_undivided(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -474,7 +474,7 @@ static int run_global_write_attr_no_rsp(MManager *mm, struct menu_data *menu)
                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!!!", ret);
+               msg("zb_zcl_global_write_attr_no_rsp(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -541,7 +541,7 @@ static int run_global_config_report(MManager *mm, struct menu_data *menu)
 #endif
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_config_report(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_global_config_report(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -567,7 +567,7 @@ static int run_global_read_config_report(MManager *mm, struct menu_data *menu)
        zb_destroy_read_report_config_record(read_report_conf);
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_read_config_report(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_global_read_config_report(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -592,7 +592,7 @@ static int run_global_discover_attr(MManager *mm, struct menu_data *menu)
                zigbee_zcl_global_discover_attributes_rsp, NULL);
 
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zcl_global_discover_attr(0x%X) - FAILED!!!", ret);
+               msg("zb_zcl_global_discover_attr(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -610,7 +610,7 @@ static int run_global_discover_cmds_received(MManager *mm, struct menu_data *men
                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!!!", ret);
+               msg("zb_zcl_global_discover_cmds_received(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -627,7 +627,7 @@ static int run_global_discover_cmds_generated(MManager *mm, struct menu_data *me
                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!!!", ret);
+               msg("zb_zcl_global_discover_cmds_generated(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -645,7 +645,7 @@ static int run_global_discover_attr_extended(MManager *mm, struct menu_data *men
                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!!!", ret);
+               msg("zb_zcl_global_discover_attr_extended(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 0544bea28f6ad6fb6f6a1ddaf3a9d8639cddbc26..8aaf36ddfcfebc97b6901e703f7c9dcc7c325156 100644 (file)
@@ -74,7 +74,7 @@ static int run_bind_req(MManager *mm, struct menu_data *menu)
                        co_addr64, ZB_UNICAST_BINDING, 0x0004, sj_ep1.ep,
                        zigbee_zdo_bind_unbind_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_bind_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_bind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -96,7 +96,7 @@ static int run_unbind_req(MManager *mm, struct menu_data *menu)
                        sj_addr64, ZB_UNICAST_BINDING, panid, 1,
                        zigbee_zdo_bind_unbind_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_unbind_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_unbind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index b1c9f28ccb333d30b3890ca5b2d8f1de669c53e5..09bdbb81da06ac0a1580ace25cd7822a5e321a73 100644 (file)
@@ -254,7 +254,7 @@ static int run_nwk_addr_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_nwk_addr_req(handle, dest_addr64, 0x00, 0x00,
                        zigbee_addr_rsp, NULL);
        if (ret != ZIGBEE_ERROR_NONE) {
-               msg("zb_zdo_nwk_addr_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_nwk_addr_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -270,7 +270,7 @@ static int run_ieee_addr_req(MManager *mm, struct menu_data *menu)
 
        ret = zb_zdo_ieee_addr_req(handle, dest_addr16, zigbee_addr_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_ieee_addr_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_ieee_addr_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -286,7 +286,7 @@ static int run_active_ep(MManager *mm, struct menu_data *menu)
 
        ret = zb_zdo_active_ep(handle, dest_addr16, zigbee_active_ep_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_active_ep(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_active_ep(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -303,7 +303,7 @@ static int run_simple_desc_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_simple_desc_req(handle, dest_addr16, 1,
                        zigbee_simple_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_simple_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_simple_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -329,7 +329,7 @@ static int run_match_desc_req(MManager *mm, struct menu_data *menu)
                        sj_ep1.num_of_out_clusters,     sj_ep1.out_clusters,
                        zigbee_match_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_match_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_match_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -346,7 +346,7 @@ static int run_power_desc_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_power_desc_req(handle, dest_addr16,
                        zigbee_zdo_power_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_power_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_power_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -363,7 +363,7 @@ static int run_complex_desc_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_complex_desc_req(handle, dest_addr16,
                        zigbee_zdo_complex_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_complex_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_complex_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -380,7 +380,7 @@ static int run_user_desc_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_user_desc_req(handle, dest_addr16,
                        zigbee_zdo_user_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_user_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_user_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -397,7 +397,7 @@ static int run_user_desc_set(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_user_desc_set(handle, dest_addr16, 4, (unsigned char*)"test",
                        zigbee_zdo_user_desc_conf, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_user_desc_set(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_user_desc_set(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -414,7 +414,7 @@ static int run_node_desc_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_node_desc_req(handle, dest_addr16,
                        zigbee_zdo_node_desc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_node_desc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_node_desc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -433,7 +433,7 @@ static int run_device_annce(MManager *mm, struct menu_data *menu)
                         | ZB_ZDP_POWER_SOURCE | ZB_ZDP_RECEIVER_ON_WHEN_IDLE
                         | ZB_ZDP_ALLOCATE_ADDRESS);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_device_annce(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_device_annce(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
index 20f8d94bcfaa97fe7f1da01e3a00a48941075261..b900719dfa8e68451a5d7c17a599f6dacaa62354 100644 (file)
@@ -235,7 +235,7 @@ static int run_mgmt_nwk_disc_req(MManager *mm, struct menu_data *menu)
                        scan_duration, scan_count, start_idx,
                        zigbee_zdo_mgmt_nwk_disc_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_nwk_disc_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_nwk_disc_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -263,7 +263,7 @@ static int run_mgmt_nwk_update_req(MManager *mm, struct menu_data *menu)
        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!!!", ret);
+               msg("zb_zdo_mgmt_nwk_update_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -284,7 +284,7 @@ static int run_mgmt_lqi_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_mgmt_lqi_req(handle, dest_addr16, start_idx,
                        zigbee_zdo_mgmt_lqi_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_lqi_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_lqi_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -305,7 +305,7 @@ static int run_mgmt_rtg_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_mgmt_rtg_req(handle, dest_addr16, start_idx,
                        zigbee_zdo_mgmt_rtg_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_rtg_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_rtg_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -326,7 +326,7 @@ static int run_mgmt_bind_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_mgmt_bind_req(handle, dest_addr16, start_idx,
                        zigbee_zdo_mgmt_bind_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_bind_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_bind_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -355,7 +355,7 @@ static int run_mgmt_leave_req(MManager *mm, struct menu_data *menu)
        ret = zb_zdo_mgmt_leave_req(handle, dest_addr64, remove_children, rejoin,
                        zigbee_zdo_mgmt_leave_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_leave_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_leave_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }
 
@@ -380,7 +380,7 @@ static int run_mgmt_permit_joining_req(MManager *mm, struct menu_data *menu)
                        permit_duration, tc_significance,
                        zigbee_zdo_mgmt_permit_joining_rsp, NULL);
        if (ZIGBEE_ERROR_NONE != ret) {
-               msg("zb_zdo_mgmt_permit_joining_req(0x%X) - FAILED!!!", ret);
+               msg("zb_zdo_mgmt_permit_joining_req(0x%X) - FAILED!!! [%s]", ret, zigbee_error_to_string(ret));
                return RET_FAILURE;
        }