Update test app
authorsaerome kim <saerome.kim@samsung.com>
Fri, 10 Feb 2017 07:15:02 +0000 (16:15 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Thu, 11 May 2017 09:07:20 +0000 (18:07 +0900)
 - change signal name from 'status_change_rsp' to 'status_change_rpt'
 - change printing cluster name function
 - change printing error code function

Change-Id: I4d1a177b22d01e201c474676a70914fe740e5127
Signed-off-by: saerome kim <saerome.kim@samsung.com>
include/zb-zcl.h
lib/zbl-dbus.c
lib/zbl-zcl.c
test/custom.c
test/main.c
test/zcl-cluster-alarm.c
test/zcl-cluster-group.c
test/zcl-cluster-scene.c
test/zcl-global-cmd.c
test/zdo-network.c

index 33dbb82777334770ece3b6e0398bf645b6f4925b..4a055cfe634ee28c25af740bdfc521eedb071273 100644 (file)
@@ -64,7 +64,7 @@
  * @return pointer of status code string
  *
  */
-const char* zb_get_zcl_status_code_name(int id);
+const char* zb_get_zcl_error_message(int id);
 
 /**
  * @brief Return readable cluster name for human
index 90840af63c42fa2380564f2dce543d9afa803669..449d4c4820a929fad609b4f2cd1a399d704afb7c 100644 (file)
@@ -865,7 +865,7 @@ static void _zbl_signal_handler(GDBusConnection *connection,
                }
                free(records);
                free(ev.data.global_attr_report);
-       } else if (!g_strcmp0(signal_name, "status_change_rsp")) {
+       } else if (!g_strcmp0(signal_name, "status_change_rpt")) {
                zb_event_data_s ev;
                nwk_addr addr16;
                unsigned char src_ep;
@@ -1040,15 +1040,15 @@ static int _zbl_dbus_subscribe_signal(zigbee_h handle)
 
        /* Section 3. Subscribe ZCL IAS cluster signal */
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_ZCL_IAS_ZONE_INTERFACE,
-                                       "status_change_rsp", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
+                                       "status_change_rpt", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
                                        G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
        if (0 == id) {
-               ERR("g_dbus_connection_signal_subscribe(status_change_rsp) Fail(%d)\n", errno);
+               ERR("g_dbus_connection_signal_subscribe(status_change_rpt) Fail(%d)\n", errno);
                _zbl_dbus_unsubscribe_signal(handle->dbus_sub_ids);
                return ZIGBEE_ERROR_IO_ERROR;
        }
        handle->dbus_sub_ids = g_list_append(handle->dbus_sub_ids, GUINT_TO_POINTER(id));
-       DBG("subscribed for status_change_rsp signal %d", id);
+       DBG("subscribed for status_change_rpt signal %d", id);
 
        id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_ZCL_IAS_ZONE_INTERFACE,
                                                "enroll_request", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
index 89d525f3a837d95ad623b68cb8505f43363e526a..fcf8ac483b90d39056458a9090f24c1a92533755 100644 (file)
@@ -12,7 +12,7 @@
 #include "zb-common.h"
 #include "zcl/zb-zcl-type.h"
 
-API const char* zb_get_zcl_status_code_name(int id)
+API const char* zb_get_zcl_error_message(int id)
 {
        const char* status_name = NULL;
 
@@ -121,214 +121,214 @@ API const char* zb_get_cluster_name(int id)
 
        switch (id) {
        case ZB_ZCL_BASIC_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BASIC_CLUSTER_ID : 0x0000";
+               clust_name = "ZB_ZCL_BASIC";
                break;
        case ZB_ZCL_POWER_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POWER_CONFIG_CLUSTER_ID : 0x0001";
+               clust_name = "ZB_ZCL_POWER_CONFIG";
                break;
        case ZB_ZCL_DEVICE_TEMP_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEVICE_TEMP_CLUSTER_ID : 0x0002";
+               clust_name = "ZB_ZCL_DEVICE_TEMP";
                break;
        case ZB_ZCL_IDENTIFY_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IDENTIFY_CLUSTER_ID : 0x0003";
+               clust_name = "ZB_ZCL_IDENTIFY";
                break;
        case ZB_ZCL_GROUPS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GROUPS_CLUSTER_ID : 0x0004";
+               clust_name = "ZB_ZCL_GROUPS";
                break;
        case ZB_ZCL_SCENES_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SCENES_CLUSTER_ID : 0x0005";
+               clust_name = "ZB_ZCL_SCENES";
                break;
        case ZB_ZCL_ON_OFF_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ON_OFF_CLUSTER_ID : 0x0006";
+               clust_name = "ZB_ZCL_ON_OFF";
                break;
        case ZB_ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID : 0x0007";
+               clust_name = "ZB_ZCL_ON_OFF_SWITCH_CONFIG";
                break;
        case ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_LEVEL_CONTROL_CLUSTER_ID : 0x0008";
+               clust_name = "ZB_ZCL_LEVEL_CONTROL";
                break;
        case ZB_ZCL_ALARM_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ALARM_CLUSTER_ID : 0x0009";
+               clust_name = "ZB_ZCL_ALARM";
                break;
        case ZB_ZCL_TIME_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TIME_CLUSTER_ID : 0x000A";
+               clust_name = "ZB_ZCL_TIME";
                break;
        case ZB_ZCL_RSSI_LOCATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_RSSI_LOCATION_CLUSTER_ID : 0x000B";
+               clust_name = "ZB_ZCL_RSSI_LOCATION";
                break;
        case ZB_ZCL_BINARY_INPUT_BASIC_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BINARY_INPUT_BASIC_CLUSTER_ID : 0x000F";
+               clust_name = "ZB_ZCL_BINARY_INPUT_BASIC";
                break;
        case ZB_ZCL_COMMISSIONING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_COMMISSIONING_CLUSTER_ID : 0x0015";
+               clust_name = "ZB_ZCL_COMMISSIONING";
                break;
        case ZB_ZCL_PARTITION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PARTITION_CLUSTER_ID : 0x0016";
+               clust_name = "ZB_ZCL_PARTITION";
                break;
        case ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID:
-               clust_name = "ZB_ZCL_OTA_BOOTLOAD_CLUSTER_ID : 0x0019";
+               clust_name = "ZB_ZCL_OTA_BOOTLOAD";
                break;
        case ZB_ZCL_POWER_PROFILE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POWER_PROFILE_CLUSTER_ID : 0x001A";
+               clust_name = "ZB_ZCL_POWER_PROFILE";
                break;
        case ZB_ZCL_APPLIANCE_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_CONTROL_CLUSTER_ID : 0x001B";
+               clust_name = "ZB_ZCL_APPLIANCE_CONTROL";
                break;
        case ZB_ZCL_POLL_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_POLL_CONTROL_CLUSTER_ID : 0x0020";
+               clust_name = "ZB_ZCL_POLL_CONTROL";
                break;
        case ZB_ZCL_SHADE_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SHADE_CONFIG_CLUSTER_ID : 0x0100";
+               clust_name = "ZB_ZCL_SHADE_CONFIG";
                break;
        case ZB_ZCL_DOOR_LOCK_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DOOR_LOCK_CLUSTER_ID : 0x0101";
+               clust_name = "ZB_ZCL_DOOR_LOCK";
                break;
        case ZB_ZCL_WINDOW_COVERING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_WINDOW_COVERING_CLUSTER_ID : 0x0102";
+               clust_name = "ZB_ZCL_WINDOW_COVERING";
                break;
        case ZB_ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID : 0x0200";
+               clust_name = "ZB_ZCL_PUMP_CONFIG_CONTROL";
                break;
        case ZB_ZCL_THERMOSTAT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_THERMOSTAT_CLUSTER_ID : 0x0201";
+               clust_name = "ZB_ZCL_THERMOSTAT";
                break;
        case ZB_ZCL_FAN_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_FAN_CONTROL_CLUSTER_ID : 0x0202";
+               clust_name = "ZB_ZCL_FAN_CONTROL";
                break;
        case ZB_ZCL_DEHUMID_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEHUMID_CONTROL_CLUSTER_ID : 0x0203";
+               clust_name = "ZB_ZCL_DEHUMID_CONTROL";
                break;
        case ZB_ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID:
-               clust_name = "ZB_ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID : 0x0204";
+               clust_name = "ZB_ZCL_THERMOSTAT_UI_CONFIG";
                break;
        case ZB_ZCL_COLOR_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_COLOR_CONTROL_CLUSTER_ID : 0x0300";
+               clust_name = "ZB_ZCL_COLOR_CONTROL";
                break;
        case ZB_ZCL_BALLAST_CONFIGURATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BALLAST_CONFIGURATION_CLUSTER_ID : 0x0301";
+               clust_name = "ZB_ZCL_BALLAST_CONFIGURATION";
                break;
        case ZB_ZCL_ILLUM_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ILLUM_MEASUREMENT_CLUSTER_ID : 0x0400";
+               clust_name = "ZB_ZCL_ILLUM_MEASUREMENT";
                break;
        case ZB_ZCL_ILLUM_LEVEL_SENSING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ILLUM_LEVEL_SENSING_CLUSTER_ID : 0x0401";
+               clust_name = "ZB_ZCL_ILLUM_LEVEL_SENSING";
                break;
        case ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TEMP_MEASUREMENT_CLUSTER_ID : 0x0402";
+               clust_name = "ZB_ZCL_TEMP_MEASUREMENT";
                break;
        case ZB_ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID : 0x0403";
+               clust_name = "ZB_ZCL_PRESSURE_MEASUREMENT";
                break;
        case ZB_ZCL_FLOW_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_FLOW_MEASUREMENT_CLUSTER_ID : 0x0404";
+               clust_name = "ZB_ZCL_FLOW_MEASUREMENT";
                break;
        case ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID : 0x0405";
+               clust_name = "ZB_ZCL_RELATIVE_HUMIDITY_MEASUREMENT";
                break;
        case ZB_ZCL_OCCUPANCY_SENSING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_OCCUPANCY_SENSING_CLUSTER_ID : 0x0406";
+               clust_name = "ZB_ZCL_OCCUPANCY_SENSING";
                break;
        case ZB_ZCL_IAS_ZONE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_ZONE_CLUSTER_ID : 0x0500";
+               clust_name = "ZB_ZCL_IAS_ZONE";
                break;
        case ZB_ZCL_IAS_ACE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_ACE_CLUSTER_ID : 0x0501";
+               clust_name = "ZB_ZCL_IAS_ACE";
                break;
        case ZB_ZCL_IAS_WD_CLUSTER_ID:
-               clust_name = "ZB_ZCL_IAS_WD_CLUSTER_ID : 0x0502";
+               clust_name = "ZB_ZCL_IAS_WD";
                break;
        case ZB_ZCL_GENERIC_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GENERIC_TUNNEL_CLUSTER_ID : 0x0600";
+               clust_name = "ZB_ZCL_GENERIC_TUNNEL";
                break;
        case ZB_ZCL_BACNET_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BACNET_PROTOCOL_TUNNEL_CLUSTER_ID : 0x0601";
+               clust_name = "ZB_ZCL_BACNET_PROTOCOL_TUNNEL";
                break;
        case ZB_ZCL_11073_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_11073_PROTOCOL_TUNNEL_CLUSTER_ID : 0x0614";
+               clust_name = "ZB_ZCL_11073_PROTOCOL_TUNNEL";
                break;
        case ZB_ZCL_ISO7816_PROTOCOL_TUNNEL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ISO7816_PROTOCOL_TUNNEL_CLUSTER_ID : 0x0615";
+               clust_name = "ZB_ZCL_ISO7816_PROTOCOL_TUNNEL";
                break;
        case ZB_ZCL_PRICE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PRICE_CLUSTER_ID : 0x0700";
+               clust_name = "ZB_ZCL_PRICE";
                break;
        case ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_ID : 0x0701";
+               clust_name = "ZB_ZCL_DEMAND_RESPONSE_LOAD_CONTROL";
                break;
        case ZB_ZCL_SIMPLE_METERING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_SIMPLE_METERING_CLUSTER_ID : 0x0702";
+               clust_name = "ZB_ZCL_SIMPLE_METERING";
                break;
        case ZB_ZCL_MESSAGING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_MESSAGING_CLUSTER_ID : 0x0703";
+               clust_name = "ZB_ZCL_MESSAGING";
                break;
        case ZB_ZCL_TUNNELING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TUNNELING_CLUSTER_ID : 0x0704";
+               clust_name = "ZB_ZCL_TUNNELING";
                break;
        case ZB_ZCL_PREPAYMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PREPAYMENT_CLUSTER_ID : 0x0705";
+               clust_name = "ZB_ZCL_PREPAYMENT";
                break;
        case ZB_ZCL_ENERGY_MANAGEMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ENERGY_MANAGEMENT_CLUSTER_ID : 0x0706";
+               clust_name = "ZB_ZCL_ENERGY_MANAGEMENT";
                break;
        case ZB_ZCL_TOU_CALENDAR_CLUSTER_ID:
-               clust_name = "ZB_ZCL_TOU_CALENDAR_CLUSTER_ID : 0x0707";
+               clust_name = "ZB_ZCL_TOU_CALENDAR";
                break;
        case ZB_ZCL_DEVICE_MANAGEMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DEVICE_MANAGEMENT_CLUSTER_ID : 0x0708";
+               clust_name = "ZB_ZCL_DEVICE_MANAGEMENT8";
                break;
        case ZB_ZCL_EVENTS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_EVENTS_CLUSTER_ID : 0x0709";
+               clust_name = "ZB_ZCL_EVENTS";
                break;
        case ZB_ZCL_MDU_PAIRING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_MDU_PAIRING_CLUSTER_ID : 0x070A";
+               clust_name = "ZB_ZCL_MDU_PAIRING";
                break;
        case ZB_ZCL_KEY_ESTABLISHMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_KEY_ESTABLISHMENT_CLUSTER_ID : 0x0800";
+               clust_name = "ZB_ZCL_KEY_ESTABLISHMENT";
                break;
        case ZB_ZCL_INFORMATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_INFORMATION_CLUSTER_ID : 0x0900";
+               clust_name = "ZB_ZCL_INFORMATION";
                break;
        case ZB_ZCL_DATA_SHARING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_SHARING_CLUSTER_ID : 0x0901";
+               clust_name = "ZB_ZCL_DATA_SHARING";
                break;
        case ZB_ZCL_GAMING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_GAMING_CLUSTER_ID : 0x0902";
+               clust_name = "ZB_ZCL_GAMING";
                break;
        case ZB_ZCL_DATA_RATE_CONTROL_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_RATE_CONTROL_CLUSTER_ID : 0x0903";
+               clust_name = "ZB_ZCL_DATA_RATE_CONTROL";
                break;
        case ZB_ZCL_VOICE_OVER_ZIGBEE_CLUSTER_ID:
-               clust_name = "ZB_ZCL_VOICE_OVER_ZIGBEE_CLUSTER_ID : 0x0904";
+               clust_name = "ZB_ZCL_VOICE_OVER_ZIGBEE";
                break;
        case ZB_ZCL_CHATTING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_CHATTING_CLUSTER_ID : 0x0905";
+               clust_name = "ZB_ZCL_CHATTING";
                break;
        case ZB_ZCL_PAYMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_PAYMENT_CLUSTER_ID : 0x0A01";
+               clust_name = "ZB_ZCL_PAYMENT";
                break;
        case ZB_ZCL_BILLING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_BILLING_CLUSTER_ID : 0x0A02";
+               clust_name = "ZB_ZCL_BILLING";
                break;
        case ZB_ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID : 0x0B00";
+               clust_name = "ZB_ZCL_APPLIANCE_IDENTIFICATION";
                break;
        case ZB_ZCL_METER_IDENTIFICATION_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DATA_RATE_CONTROL_CLUSTER_ID : 0x0B01";
+               clust_name = "ZB_ZCL_DATA_RATE_CONTROL";
                break;
        case ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID : 0x0B02";
+               clust_name = "ZB_ZCL_APPLIANCE_EVENTS_AND_ALERT";
                break;
        case ZB_ZCL_APPLIANCE_STATISTICS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_APPLIANCE_STATISTICS_CLUSTER_ID : 0x0905";
+               clust_name = "ZB_ZCL_APPLIANCE_STATISTICS";
                break;
        case ZB_ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID : 0x0B04";
+               clust_name = "ZB_ZCL_ELECTRICAL_MEASUREMENT";
                break;
        case ZB_ZCL_DIAGNOSTICS_CLUSTER_ID:
-               clust_name = "ZB_ZCL_DIAGNOSTICS_CLUSTER_ID : 0x0B05";
+               clust_name = "ZB_ZCL_DIAGNOSTICS";
                break;
        case ZB_ZCL_ZLL_COMMISSIONING_CLUSTER_ID:
-               clust_name = "ZB_ZCL_ZLL_COMMISSIONING_CLUSTER_ID : 0x1000";
+               clust_name = "ZB_ZCL_ZLL_COMMISSIONING0";
                break;
        default:
                clust_name = "UNDEFINED_CLUSTER";
index eb86d96d92e2a5d0fdd815cb1436548195e089ee..0cce339b9fb97831bb61f81277b5f9b602f991c2 100644 (file)
@@ -39,7 +39,7 @@ void _zb_aps_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msgp("\n_zb_aps_send_rsp()");
        msg("  src_ep      : 0x%X", src_ep);
        msg("  dst_ep      : 0x%X", dst_ep);
-       msg("  cluster_id  : 0x%04X", cluster_id);
+       msg("  cluster_id  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  profile_id  : 0x%04X", profile_id);
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
@@ -57,7 +57,7 @@ void _zb_zcl_send_rsp(nwk_addr addr16, unsigned char src_ep, unsigned char dst_e
        msgp("\n_zb_zcl_send_rsp()");
        msg("  src_ep      : 0x%X", src_ep);
        msg("  dst_ep      : 0x%X", dst_ep);
-       msg("  cluster_id  : 0x%04X", cluster_id);
+       msg("  cluster_id  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  profile_id  : 0x%04X", profile_id);
        msg("  payload_len : 0x%04X", payload_len);
        msg("  payload : ");
index 25db2762934fb68e808945d3964f8a8b2fa0e955..849ce61dfd8625a16b1538687b34f866f320ae57 100644 (file)
@@ -326,9 +326,9 @@ static void zigbee_event_cb(nwk_addr addr16, ieee_addr addr64, zb_event_e e, zb_
 
                msg("  addr16     = 0x%04X", addr16);
                msg("  endpoint   = 0x%02X", ep);
-               msg("  cluster_id = 0x%04X", cluster_id);
+               msg("  cluster_id = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
                msg("  command_id = 0x%02X", command_id);
-               msg("  status     = 0x%02X, %s", status, zb_get_zcl_status_code_name(status));
+               msg("  status     = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
                break;
        }
        case ZB_ZCL_GLOBAL_ATTRIBUTE_REPORT_EVENT:
@@ -700,12 +700,12 @@ static int run_get_cluster_list(MManager *mm, struct menu_data *menu)
        msg(" - zb_get_cluster_list() ret: [0x%X]", ret);
        msgb("In Clusters count [%d] : ", in_count);
        for(i = 0; i < in_count; i++) {
-               msgn(" %04X", in_cluster_list[i]);
+               msgn(" %04X (%s)\n", in_cluster_list[i], zb_get_cluster_name(in_cluster_list[i]));
        }
        msg("\n");
        msgb("Out Clusters count [%d] : ", out_count);
        for(i = 0; i < out_count; i++) {
-               msgn(" %04X", out_cluster_list[i]);
+               msgn(" %04X (%s)\n", out_cluster_list[i], zb_get_cluster_name(out_cluster_list[i]));
        }
        msg("\n");
 
index 62c581dbcb588a0d9fb39aa6203d999f04566ac2..180eefd4c40d3f97b68cac952c234f2d263032d1 100644 (file)
@@ -44,7 +44,7 @@ static void zigbee_zcl_alarm_get_alarm_rsp(nwk_addr addr16, unsigned char ep,
        msg("  Network Address = 0x%04X status = 0x%02X", addr16, status);
        msg("  End-Point  = 0x%02X", ep);
        msg("  alarm_code = 0x%02X", alarm_code);
-       msg("  cluster_id = 0x%04X", cluster_id);
+       msg("  cluster_id = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  time_stamp = 0x%08X", time_stamp);
 }
 
index 54eee99dc3d7196c49ea80946d5a28a3e3010719..9795085566bbfdd0bafbcf4484884090d1a94616 100644 (file)
@@ -44,7 +44,7 @@ static void zigbee_zcl_group_add_group_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
@@ -56,7 +56,7 @@ static void zigbee_zcl_group_view_group_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point  = 0x%02X", ep);
-       msg("  Status     = 0x%02X", status);
+       msg("  Status     = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID   = 0x%04X", group_id);
        msg("  Group Name = %s", group_name);
 }
@@ -85,7 +85,7 @@ static void zigbee_zcl_group_remove_group_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
index d2549da8681586d5184e189a0f13de79ee96dde6..23a992fda8e24a2b3fbd4b5219e3c254830bff24 100644 (file)
@@ -46,7 +46,7 @@ static void zigbee_zcl_scene_add_scene_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
@@ -62,7 +62,7 @@ static void zigbee_zcl_scene_view_scene_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Status          = 0x%02X", status);
+       msg("  Status          = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID        = 0x%04X", group_id);
        msg("  Scene ID        = 0x%02X", scene_id);
        msg("  Transition Time = 0x%04X", transition_time);
@@ -79,7 +79,7 @@ static void zigbee_zcl_scene_remove_scene_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
@@ -92,7 +92,7 @@ static void zigbee_zcl_scene_remove_all_scene_rsp(nwk_addr addr16, unsigned char
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
 }
 
@@ -104,7 +104,7 @@ static void zigbee_zcl_scene_store_scene_rsp(nwk_addr addr16, unsigned char ep,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Group ID  = 0x%04X", group_id);
        msg("  Scene ID  = 0x%02X", scene_id);
 }
@@ -120,7 +120,7 @@ static void zigbee_zcl_scene_get_scene_membership_rsp(nwk_addr addr16,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point = 0x%02X", ep);
-       msg("  Status    = 0x%02X", status);
+       msg("  Status    = 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        msg("  Capacity  = 0x%02X", capacity);
        msg("  Group ID  = 0x%02X", group_id);
        for (i = 0; i < scene_count && ZB_ZCL_SUCCESS == status; i++)
index f86ff1ad5164dbe464789ab2be7e93b302b096ec..2e55b495c85a20b1591d70fe2d0fce6d513166ef 100644 (file)
@@ -90,7 +90,7 @@ static void zigbee_zcl_global_read_attributes_rsp(nwk_addr addr16,
        records = records_info->record.read_attr;
 
        zb_create_value(&value);
-       msg("  Cluster ID   : 0x%04x", cluster_id);
+       msg("  Cluster ID   : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  Node ID      : 0x%04X", addr16);
        msg("  End-Point    : 0x%02X", ep);
        msg("  Msg length     %d", records_len);
@@ -105,7 +105,7 @@ static void zigbee_zcl_global_read_attributes_rsp(nwk_addr addr16,
        }
        if (records && *records) {
                zb_get_status_from_read_attr_status_record(*records, &status);
-               msg("  Status       : 0x%02X, %s", status, zb_get_zcl_status_code_name(status));
+               msg("  Status       : 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        }
        if (records && *records) {
                zb_get_value_from_read_attr_status_record(*records, type, value);
@@ -140,7 +140,7 @@ static void zigbee_zcl_global_write_attributes_rsp(nwk_addr addr16,
        records = records_info->record.write_attr;
 
        zb_create_value(&value);
-       msg("  Cluster ID  : 0x%04X", cluster_id);
+       msg("  Cluster ID  : 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  Node ID     : 0x%04X", addr16);
        msg("  End-Point   : 0x%02X", ep);
        msg("  Msg length    %d", records_len);
@@ -151,7 +151,7 @@ static void zigbee_zcl_global_write_attributes_rsp(nwk_addr addr16,
        }
        if (records) {
                zb_get_status_from_write_attr_status(*records, &status);
-               msg("  status      : 0x%02X, %s", status, zb_get_zcl_status_code_name(status));
+               msg("  status      : 0x%02X (%s)", status, zb_get_zcl_error_message(status));
        }
        zb_destroy_value(value);
 }
@@ -177,7 +177,7 @@ static void zigbee_zcl_global_configure_reporting_rsp(nwk_addr addr16,
        msg("  records_len=%d", records_len);
        for (i = 0; i < records_len; i++) {
                zb_get_status_from_report_config_response_record(records[i], &status);
-               msg("    [%d] status = 0x%02X %s", i, status, zb_get_zcl_status_code_name(status));
+               msg("    [%d] status = 0x%02X (%s)", i, status, zb_get_zcl_error_message(status));
        }
 }
 
@@ -204,7 +204,7 @@ static void zigbee_zcl_global_read_reporting_configuration_rsp(nwk_addr addr16,
        }
 
        records = records_info->record.report_config;
-       msg("  cluster_id 0x%04X", cluster_id);
+       msg("  cluster_id 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  nodeId     0x%04X", addr16);
        msg("  endpoint   0x%02X", ep);
        msg("  Msg length   %d", records_len);
@@ -257,7 +257,7 @@ static void zigbee_zcl_global_discover_attributes_rsp(nwk_addr addr16,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%02X", cluster_id);
+       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  discovery_complete = %d", discovery_complete);
 
        for (i = 0; i < records_len; i++) {
@@ -279,7 +279,7 @@ static void zigbee_zcl_global_discover_cmds_received_rsp(nwk_addr addr16,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%02X", cluster_id);
+       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  discovery_complete = %d", discovery_complete);
 
        for (i = 0; i < command_ids_len; i++)
@@ -297,7 +297,7 @@ static void zigbee_zcl_global_discover_cmds_generated_rsp(nwk_addr addr16,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%02X", cluster_id);
+       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  discovery_complete = %d", discovery_complete);
 
        for (i = 0; i < command_ids_len; i++)
@@ -318,7 +318,7 @@ static void zigbee_zcl_global_discover_attr_extended_rsp(nwk_addr addr16,
 
        msg("  Network Address = 0x%04X", addr16);
        msg("  End-Point       = 0x%02X", ep);
-       msg("  Cluster ID      = 0x%02X", cluster_id);
+       msg("  Cluster ID      = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
        msg("  discovery_complete = %d", discovery_complete);
 
        for (i = 0; i < records_len; i++) {
index 4d3ed30e636cfc28b06ec3b6481fce345adb3bd9..ef1680d5ed1e75b0ba2339eb2c6a1e7440542793 100644 (file)
@@ -187,7 +187,7 @@ static void zigbee_zdo_mgmt_bind_rsp(unsigned char status, unsigned char entries
                zb_binding_table_get_src_ep(list[i], &src_ep);
                msg("  Src End-Point       = 0x%02X", src_ep);
                zb_binding_table_get_cluster_id(list[i], &cluster_id);
-               msg("  Cluster ID          = 0x%04X", cluster_id);
+               msg("  Cluster ID          = 0x%04X (%s)", cluster_id, zb_get_cluster_name(cluster_id));
                zb_binding_table_get_dst_addr_mode(list[i], &dst_addr_mode);
                msg("  Dst Address Mode    = 0x%02X", dst_addr_mode);
                zb_binding_table_get_dst_addr16(list[i], &addr16);