1513 lines
		
	
	
		
			82 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			1513 lines
		
	
	
		
			82 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
| #include "stdio.h"
 | |
| #include "string.h"
 | |
| #include "iot_dbglog_parser.h"
 | |
| #include "iot_module_api.h"
 | |
| 
 | |
| #define FW_VERSION "11.0.1"
 | |
| typedef struct _dbglog_msg_entry {
 | |
|     int msgid;
 | |
|     int module_id;
 | |
|     int argnum;
 | |
|     char* format;
 | |
| }dbglog_msg_entry_t;
 | |
| 
 | |
| dbglog_msg_entry_t dbglog_msg_list[] = {
 | |
|     { COMMUNICATOR_RECV_PACKAGE, IOT_COMMUNICATOR_MID, 1, "recv data len:%d" },
 | |
|     { COMMUNICATOR_RECV_PACKAGE_INVALID, IOT_COMMUNICATOR_MID, 0, "invalid" },
 | |
|     /* SIMULATOR LOG*/
 | |
|     { SIMULATOR_TX_MISS_TIMESLOT, PLC_SIM_TX_MID , 2, "simulator_hw_sched_task:"
 | |
|       "missed end time, cur:%ld, end time:%ld\n"},
 | |
|     { OS_CPU_RATIO, OS_UTILS_MID, 1, "the max cpu ratio - %d%%" },
 | |
|     /* CVG COMMON logs */
 | |
|     { CVG_INIT_ID, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_init sw ver - 0x%4x module type=%d" },
 | |
|     { CVG_START_VDEV_ID, PLC_CVG_COMMON_MID, 3,
 | |
|         "cvg_start_vdev_ext id - %lu, reason %lu, force %lu" },
 | |
|     { CVG_START_VDEV_INTERNAL_ID, PLC_CVG_COMMON_MID, 4,
 | |
|         "cvg_start_vdev_internal id - %lu reason - %lu start_cnt %lu "
 | |
|         "force %lu"},
 | |
|     { CVG_STOP_VDEV_INTERNAL_ID, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_stop_vdev_internal id - %lu vdev - %x" },
 | |
|     { CVG_APP_RPT_MSDU_TO_APP_ID, PLC_CVG_COMMON_MID, 7,
 | |
|         "cvg_app_report_msdu_to_app_sg msdu_sn = 0n%d. type = %d, org teis = "
 | |
|         "[%d ==> %d], msg_id = %d, app_id = %d, len = 0n%d" },
 | |
|     { CVG_APP_RPT_SIG_HOP_MSDU_TO_APP_ID, PLC_CVG_COMMON_MID, 6,
 | |
|         "cvg_app_report_single_hop_msdu_to_app bcast = %d, org teis = "
 | |
|         "[%d ==> %d], msg_id = %d, app_id = %d, len = 0n%d" },
 | |
|     { CVG_APP_RPT_MSDU_TO_APP_ID_SPG, PLC_CVG_COMMON_MID, 7,
 | |
|         "cvg_app_report_msdu_to_app_spg msdu_sn = 0n%d. type = %d, org teis = "
 | |
|         "[%d ==> %d], msg_id = %d, app_id = %d, len = 0n%d" },
 | |
|     {CVG_APP_SEND_APP_MSDU, PLC_CVG_COMMON_MID, 6,
 | |
|         "cvg_app_handle_send_msdu_req_sg send data. len = 0n%d, "
 | |
|         "next hop tei = 0n%d. org tei = [%d ==> %d], msdu_sn = %d, type = %d"},
 | |
|     { CVG_APP_SEND_APP_MSDU_SPG, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_app_handle_send_msdu_req_spg send data. len = 0n%d, "
 | |
|         "next hop tei = 0n%d" },
 | |
|     {CVG_APP_DROP_APP_MSDU, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_app_handle_send_msdu_req_sg drop data. len = 0n%d, "
 | |
|         "drop pos = 0n%d"},
 | |
|     { CVG_APP_DROP_APP_MSDU_SPG, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_app_handle_send_msdu_req_spg drop data. len = 0n%d, "
 | |
|         "drop pos = 0n%d" },
 | |
|     { CVG_HANDLE_MSG_ID, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_handle_msg msg type %lu, msg id %lu" },
 | |
|     { CVG_HANDLE_MSG_CANCEL_ID, PLC_CVG_COMMON_MID, 2,
 | |
|         "cvg_handle_msg_cancel msg type %lu, msg id %lu" },
 | |
|     { CVG_MAIN_TASK_ID, PLC_CVG_COMMON_MID, 0,
 | |
|         "cvg_main_task" },
 | |
|     { CVG_START_TASK_ID, PLC_CVG_COMMON_MID, 0,
 | |
|         "cvg_start_tasks" },
 | |
|     { CVG_STOP_TASK_ID, PLC_CVG_COMMON_MID, 0,
 | |
|         "cvg_stop_tasks" },
 | |
|     { CVG_DUMP_STATUS_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_dump_status start reason "
 | |
|         "%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_DUMP_STATUS_CONN_LESS_TXRX_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_status_dump total start cnt %lu, "
 | |
|         "cert_detect-zc_status_sn-passcode %08x, "
 | |
|         "connless_info: tx %lu, tx drop %lu, rx %lu, rx rpt %lu, "
 | |
|         "cvg_network_addr %08x%08x, app fwd %lu" },
 | |
|     { CVG_DUMP_STATUS_TXRX_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_dump_status state %lu, bc tx %lu, bc tx drop %lu, uc tx %lu, "
 | |
|         "uc tx drop %lu, bc rx %lu, bc rx rpt %lu, uc rx %lu, uc rx rpt %lu" },
 | |
|     { CVG_DUMP_STATUS_RF_TXRX_ID, PLC_CVG_COMMON_MID, 5,
 | |
|         "cvg_dump_status rf bc rx %lu, bc rx rpt %lu, uc rx %lu, uc rx rpt %lu, "
 | |
|         "app fwd %lu"},
 | |
|     { CVG_DUMP_STATUS_PRM_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_prm_cco_dump_status assoc rx %lu, proxy chg rx %lu, "
 | |
|         "proxy chg accept %lu, phase chg %lu, pco %lu, sta %lu, "
 | |
|         "a %lu, b %lu, c %lu\n" },
 | |
|     { CVG_DUMP_STATUS_PRM_PCO_BM_ID, PLC_CVG_COMMON_MID, 8,
 | |
|         "cvg_prm_cco_status_dump pco cnt "
 | |
|         "%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_DUMP_STATUS_PRM_STA_BM_ID, PLC_CVG_COMMON_MID, 8,
 | |
|         "cvg_prm_cco_dump_status sta cnt "
 | |
|         "%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_DUMP_STATUS_PRM_PCO_LINK_BM_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_prm_cco_status_dump pco[%lu] cnt "
 | |
|         "%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_DUMP_STATUS_PRM_STA_LINK_BM_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_prm_cco_dump_status sta[%lu] cnt "
 | |
|         "%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_DUMP_STATUS_RT_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_rt_dump_status rc req cnt %lu ok %lu drop %lu, rc fwd cnt %lu, "
 | |
|         "rc rsp cnt %lu, d_peer_cnt-unreachable_d_peer_cnt %08x, "
 | |
|         "rt_period-rp_state-hb_timer_state %08x, no_msdu_dis_cnt %lu, "
 | |
|         "no_msdu_hb_cnt %lu" },
 | |
|     { CVG_DUMP_STATUS_PRM_STA_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_prm_sta_status_dump proxy tx_snr %d, rx_snr %d, "
 | |
|         "tx_sr-rx_sr-cco_tf_sr-tf_sr %08x, "
 | |
|         "rf_tx_sr-rf_rx_sr-rf_wi_rx_sr-rf_tf_sr %08x, "
 | |
|         "d_sub_sta_cnt-rfhop-phase-level-role %08x, cco_a_rx_snr %d, "
 | |
|         "cco_b_rx_snr %d, cco_c_rx_snr %d, "
 | |
|         "cco_a_inactive-cco_b_inactive-cco_c_inactive %08x" },
 | |
|     { CVG_DUMP_STATUS_PKT_ID, PLC_CVG_COMMON_MID, 9,
 | |
|        "cvg_status_dump pkt info: pkt size#%lu, free_n = %lu, total_n = %lu;"
 | |
|        " pkt size#%lu, free_n = %lu, total_n = %lu;"
 | |
|        " pkt size#%lu, free_n = %lu, total_n = %lu;"},
 | |
|     { CVG_PM_LISTENER_FUNC_ID, PLC_CVG_COMMON_MID, 1,
 | |
|         "cvg_pm_listener_func notification dropped, arg %lu" },
 | |
|     { CVG_DUMP_STATUS_NWM_STA_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_nwm_sta_status_dump rp_spent %lu, proxy_tf_0_cnt-"
 | |
|         "proxy_role_sta_cnt-cco_addr_chg_cnt-role_chg_cnt %08x, "
 | |
|         "tsfm_switch_cnt-no_bc_rx_cnt %08x, proxy_tei %lu, local_tei %lu, "
 | |
|         "bc_period_cnt %lu, nid %lu, "
 | |
|         "wdg_enable-pco_chg_nack-pm_state-nid_chg_cnt-nid_conflict_cnt-"
 | |
|         "nw_lock-agc_dis-join_check-last_event-prev_state-curr_state %08x, "
 | |
|         "last_event_ts %lu"},
 | |
|     { CVG_DUMP_STATUS_NWM_STA_2_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_nwm_sta_status_dump roam_cnt %lu, force_roam_cnt %lu, "
 | |
|         "pco_leave_roam_cnt %lu, tf_sr_0_roam_cnt %lu, "
 | |
|         "tx_rx_sr_0_roam_cnt %lu, bc rx cnt %lu, sof rx cnt %lu, "
 | |
|         "last_started_ts %lu, last_associated_ts %lu"},
 | |
|     { CVG_DUMP_STATUS_RT_2_ID, PLC_CVG_COMMON_MID, 7,
 | |
|         "cvg_rt_dump_status next_hop_req_cnt %lu, next_hop_main_cnt %lu, "
 | |
|         "next_hop_best_rt_cnt %lu, next_hop_cand_rt_cnt %lu, "
 | |
|         "next_hop_backup_cnt %lu, next_hop_fail_cnt %lu, fb-op-chn-cod %08x" },
 | |
|     { CVG_DUMP_STATUS_NWM_STA_3_ID, PLC_CVG_COMMON_MID, 9,
 | |
|         "cvg_nwm_sta_status_dump tsfm_enable %lu tsfm_start_ts %lu "
 | |
|         "tsfm_allow_switch_nw %lu nor_lock %lu abn_lock %lu cco_addr %08x%08x "
 | |
|         "rf_bc_cnt %lu rf_sof_cnt %lu"},
 | |
|     /* CVG NWM logs */
 | |
|     { CVG_NWM_INIT_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_init" },
 | |
|     { CVG_NWM_INIT_VDEV_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_init_vdev vdev - %lu, reboot_cnt %lu" },
 | |
|     { CVG_NWM_RESET_VDEV_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_reset_vdev vdev - %lu" },
 | |
|     { CVG_NWM_CCO_P2P_SN_CHECK_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_p2p_sn_check faild curr_sn %lu new_sn %lu" },
 | |
|     { CVG_NWM_CCO_KICKOUT_PEER_ID, PLC_CVG_NWM_MID, 5,
 | |
|         "cvg_nwm_cco_kickout_peer peer - %p, tei %lu, cnt - %d, reason %lu, "
 | |
|         "delay %lu" },
 | |
|     { CVG_NWM_CCO_SELECT_PROXY_ID, PLC_CVG_NWM_MID, 3,
 | |
|         "cvg_nwm_cco_select_proxy candidate proxy %lu, link %lu, "
 | |
|         "allowed level %lu" },
 | |
|     { CVG_NWM_CCO_ACCEPT_ASSOC_ID, PLC_CVG_NWM_MID, 9,
 | |
|         "cvg_nwm_cco_accept_assoc %02x:%02x:%02x:%02x:%02x:%02x, "
 | |
|         "peer - %lu, proxy - %lu, phase_1 %lu" },
 | |
|     { CVG_NWM_CCO_REJECT_ASSOC_ID, PLC_CVG_NWM_MID, 7,
 | |
|         "cvg_nwm_cco_reject_assoc %02x:%02x:%02x:%02x:%02x:%02x, reason %lu" },
 | |
|     { CVG_NWM_CCO_ASSOC_REQ_ID, PLC_CVG_NWM_MID, 8,
 | |
|         "cvg_nwm_cco_assoc_req_rx %02x:%02x:%02x:%02x:%02x:%02x "
 | |
|         "assoc random %lu, device type: %d" },
 | |
|     { CVG_NWM_CCO_ASSOC_REQ_DUP_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_assoc_req_rx ignore duplicate req" },
 | |
|     { CVG_NWM_CCO_ACCEPT_PROXY_CHG_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_cco_accept_proxy_change peer - %p, tei %lu, req - %p, "
 | |
|         "old - %lu, new - %lu, vendor %04x" },
 | |
|     { CVG_NWM_CCO_PROXY_CHG_REQ_ID, PLC_CVG_NWM_MID, 7,
 | |
|         "cvg_nwm_cco_proxy_change_req_rx tei - %lu cand proxy - "
 | |
|         "%lu %lu %lu %lu %lu, reason %lu" },
 | |
|     { CVG_NWM_CCO_TF_SR_REPORT_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_tf_sr_report_rx org tei: %lu, sub_sta_count: %lu" },
 | |
|     { CVG_NWM_CCO_TF_SR_REPORT_P_ID, PLC_CVG_NWM_MID, 5,
 | |
|         "cvg_nwm_cco_tf_sr_report_rx sta tei: %lu, link = %lu, dl_sr = %lu, "
 | |
|         "ul_sr = %lu, dl_ul_sr = %lu" },
 | |
|     { CVG_NWM_CCO_SOF_RX_ID, PLC_CVG_NWM_MID, 3,
 | |
|         "cvg_nwm_cco_sof_rx os - %d, od - %d, msdu type - %d"},
 | |
|     { CVG_NWM_CCO_SL_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_sl_func timer - %x"},
 | |
|     { CVG_NWM_VDEV_SM_CCO_INIT_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_cco_init vdev id - %lu, event - %lu"},
 | |
|     { CVG_NWM_VDEV_SM_CCO_INIT_S_ID, PLC_CVG_NWM_MID, 4,
 | |
|         "cvg_nwm_vdev_sm_cco_init start network conflict detect, "
 | |
|         "network_sn %lu, nid %x, option %lu, channel %lu"},
 | |
|     { CVG_NWM_VDEV_SM_CCO_STARTING_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_vdev_sm_cco_starting timeout %lu"},
 | |
|     { CVG_NWM_VDEV_SM_CCO_STARTING_BC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_cco_starting start beaconing"},
 | |
|     { CVG_NWM_VDEV_SM_CCO_STARTED_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_vdev_sm_cco_started timeout %lu"},
 | |
|     { CVG_NWM_VDEV_CCO_SM_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_cco_sm state changed from %lu to %lu"},
 | |
|     { CVG_NWM_STA_PATH_NUMBER_CHECK_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_sta_path_number_check faild curr_pn %lu new_pn %lu" },
 | |
|     { CVG_NWM_STA_BC_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_bc_func timer - %x"},
 | |
|     { CVG_NWM_STA_LEAVE_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_leave_func timer - %x"},
 | |
|     { CVG_NWM_STA_SEND_ASSOC_ID, PLC_CVG_NWM_MID, 8,
 | |
|         "cvg_nwm_sta_send_assoc candidate proxy %lu %lu %lu %lu %lu, "
 | |
|         "joining nid %lu, next hop %lu link %lu"},
 | |
|     { CVG_NWM_STA_SEND_PROXY_CHG_ID, PLC_CVG_NWM_MID, 8,
 | |
|         "cvg_nwm_sta_send_proxy_change candidate proxy %lu %lu %lu %lu %lu, "
 | |
|         "old proxy %lu, next hop %lu link %lu"},
 | |
|     { CVG_NWM_STA_ASSOC_REQ_FWD_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_assoc_req_fwd %02x:%02x:%02x:%02x:%02x:%02x" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_FWD_IN_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd in %02x:%02x:%02x:%02x:%02x:%02x" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_FWD_OUT_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd out" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_FWD_CE_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd packet cnt exceed max" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_FWD_SC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd route info size corrupted" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_FWD_CC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd route info content corrupted, "
 | |
|         "fatal error" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_CE_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx packet cnt exceed max" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_CC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx packet cnt corrupted" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_SNC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx packet sn corrupted" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_SND_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx packet sn duplicated" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_SC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx route info size corrupted" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_RCC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_conf_rx route info content corrupted, "
 | |
|         "fatal error" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_assoc_conf_rx joined, tei %lu, role %lu, "
 | |
|         "level %lu, rf_hop %lu, proxy %lu, link %lu" },
 | |
|     { CVG_NWM_STA_PROXY_CHG_CONF_RX_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_proxy_change_conf_rx bitmap size corrupted" },
 | |
|     { CVG_NWM_STA_PROXY_CHG_CONF_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_proxy_change_conf_rx level changed from %lu to %lu, "
 | |
|         "proxy changed from %lu to %lu, link from %lu to %lu" },
 | |
|     { CVG_NWM_STA_PROXY_CHG_CONF_R_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_proxy_change_conf_rx request rejected %lu" },
 | |
|     { CVG_NWM_STA_PROXY_CHG_CONF_TO_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta_associated proxy change timeout" },
 | |
|     { CVG_NWM_STA_TF_SR_RPT_FWD_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_tf_sr_report_fwd sta_tei = %lu" },
 | |
|     { CVG_NWM_REMOTE_PEER_INFO_UPDATE_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_remote_peer_info_update proxy level changed from %lu to %lu" },
 | |
|     { CVG_NWM_REMOTE_PEER_INFO_UPDATE_L_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_remote_peer_info_update leave network due to rule 7" },
 | |
|     { CVG_NWM_STA_LEAVE_IND_RX_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_sta_leave_ind_rx leave network due to rule 4, reason %lu, "
 | |
|         "delay %lu" },
 | |
|     { CVG_NWM_STA_HB_CHECK_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_hb_check leave network due to rule %lu" },
 | |
|     { CVG_NWM_STA_HB_CHECK_D_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_hb_check direct sub sta %lu proxy changed" },
 | |
|     { CVG_NWM_STA_ASSOCIATING_SOF_RX_ID, PLC_CVG_NWM_MID, 3,
 | |
|         "cvg_nwm_sta_associating_sof_rx os - %lu, od - %lu, msdu type - %lu" },
 | |
|     { CVG_NWM_STA_ASSOCIATED_SOF_RX_ID, PLC_CVG_NWM_MID, 3,
 | |
|         "cvg_nwm_sta_associated_sof_rx os - %lu, od - %lu, msdu type - %lu" },
 | |
|     { CVG_NWM_STA_ASSOCIATED_BC_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_associated_bc_rx leave network due to rule %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_INIT_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_vdev_sm_sta_init event - %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_STARTED_NS_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_vdev_sm_sta_started vdev - %lu, start network selection" },
 | |
|     { CVG_NWM_VDEV_SM_STA_STARTED_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_started vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_STARTED_PS_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_started vdev - %lu, start proxy selection "
 | |
|         "duration %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_SELECTING_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_selecting vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_ASSOCIATING_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_associating vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_ASSOCIATING_RT_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_vdev_sm_sta_associating assoc timeout, retry %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_ASSOCIATING_RM_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta_associating assoc timeout, "
 | |
|         "reach max and restart" },
 | |
|     { CVG_NWM_VDEV_SM_STA_ASSOCIATED_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_associated vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_LEAVING_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_leaving vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_STA_SM_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sta_sm state changed from %lu to %lu"},
 | |
|     { CVG_NWM_SWITCH_ROLE_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_switch_role local device role switched from %lu to %lu"},
 | |
|     { CVG_NWM_STA_ASSOC_FAILED1, PLC_CVG_NWM_MID, 2,
 | |
|         "Assoc failed.reason = [0x%02X], retry interval %lu"},
 | |
|     { CVG_NWM_STA_ASSOC_FAILED2, PLC_CVG_NWM_MID, 1,
 | |
|         "add nid [%08X] to blist."},
 | |
|     { CVG_NWM_CCO_ADD_NID_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_add_nid NID list full" },
 | |
|     { CVG_NWM_CCO_ADD_RF_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_add_nn_rf RF list full" },
 | |
|     { CVG_NWM_CCO_NW_CONFLICT_RPT_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_nw_confict_rpt_rx nid conflict detected - %lu" },
 | |
|     { CVG_NWM_CCO_RF_CONFLICT_RPT_RX_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_rf_confict_rpt_rx rf conflict op chn - %lu %lu" },
 | |
|     { CVG_NWM_CCO_STARTED_BC_RX_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_started_bc_rx nid conflict detected - %lu, cnt %lu" },
 | |
|     { CVG_NWM_CCO_STARTING_BC_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_starting_bc_rx nid conflict detected - %lu" },
 | |
|     { CVG_NWM_CCO_STARTING_RF_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_starting_bc_rx rf conflict detected - %lu" },
 | |
|     { CVG_NWM_CCO_STARTING_SOF_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_starting_sof_rx nid conflict detected - %lu" },
 | |
|     { CVG_NWM_STA_ADD_NID_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_add_nn_nid NID list full" },
 | |
|     { CVG_NWM_STA_SEND_NW_CONFLICT_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_send_nw_conflict report nid conflict to cco" },
 | |
|     { CVG_NWM_STA_SEND_RF_CONFLICT_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_send_rf_conflict report rf conflict to cco" },
 | |
|     { CVG_NWM_STA_ASSOCIATED_BC_RX_M_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_associated_bc_rx missed proxy beacon" },
 | |
|     { CVG_NWM_VDEV_SM_STA_SELECTING_NG_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta_selecting phase good candidate not found" },
 | |
|     { CVG_NWM_STA_SELECTING_BC_RX_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_selecting_bc_rx preferred network restarted" },
 | |
|     { CVG_NWM_STA_SELECTING_BC_P_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_selecting_bc_rx route period changed, restart proxy "
 | |
|         "selection duration %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_SELECTING_BC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta_selecting no bc received in the previous rp, "
 | |
|         "restart" },
 | |
|     { CVG_NWM_BC_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_bc_rx rx bc dropped, new_bp %lu" },
 | |
|     { CVG_NWM_SOF_RX_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sof_rx rx sof dropped" },
 | |
|     { CVG_NWM_STA_SELECTING_SOF_RX_DROP_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_selecting_sof_rx sof frame dropped. reason %lu" },
 | |
|     { CVG_NWM_STA_ASSOCIATING_SOF_RX_DROP_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_associating_sof_rx sof frame dropped. reason %lu" },
 | |
|     { CVG_NWM_VDEV_SM_STA_TESTING_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_sta_testing vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_VDEV_SM_CCO_TESTING_TO_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_vdev_sm_cco_testing vdev - %lu, timeout %lu" },
 | |
|     { CVG_NWM_TEST_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_test_func timer - %x" },
 | |
|     { CVG_NWM_TEST_LISTEN_EN_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_test_cmd_listen_en..., vdev id = %lu" },
 | |
|     { CVG_NWM_TEST_LISTEN_DIS_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_test_cmd_listen_dis..., vdev id = %lu" },
 | |
|     { CVG_NWM_CCO_GATHER_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_assco_gather_func timer - %x"},
 | |
|     { CVG_NWM_CCO_GATHER_ASSOC_REQ_ID, PLC_CVG_NWM_MID, 9,
 | |
|         "cvg_nwm_cco_gather_assoc %02x:%02x:%02x:%02x:%02x:%02x, "
 | |
|         "peer - %lu, proxy - %lu, phase_1 %lu" },
 | |
|     { CVG_NWM_CCO_GATHER_ASSOC_IND_TX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_send_assoc_gather_ind sta_cnt is %lu"},
 | |
|     { CVG_NWM_STA_GATHER_ASSOC_IND_SC_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_assoc_gather_ind_rx sta info size corrupted" },
 | |
|     { CVG_NWM_STA_GATHER_ASSOC_IND_RX_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_assoc_gather_ind_rx joined, tei %lu, role %lu, "
 | |
|         "level %lu, rf_hop %lu, proxy %lu, link %lu" },
 | |
|     { CVG_NWM_STA_SELECTING_BC_P_RX_2_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_selecting_bc_rx beacon period changed, restart proxy "
 | |
|         "selection duration %lu" },
 | |
|     { CVG_NWM_CCO_BP_END_ALERT_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_bp_end_alert clean up leaving peers" },
 | |
|     { CVG_NWM_STA_PROXY_CHG_CONF_TO_2_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta_leaving proxy change timeout" },
 | |
|     { CVG_NWM_STA_CHECK_NN_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_check_nn network info expired %lu" },
 | |
|     { CVG_NWM_STA_CHECK_RF_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_sta_check_rf network info expired rf channel %lu option %lu" },
 | |
|     { CVG_NWM_CCO_CHECK_NN_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_check_nn network info expired %lu" },
 | |
|     { CVG_NWM_CCO_CHECK_RF_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_check_rf network info expired rf channel %lu option %lu" },
 | |
|     { CVG_NWM_CCO_NID_RPT_CHECK_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_nid_rpt_check nid conflict detected" },
 | |
|     { CVG_NWM_CCO_RF_RPT_CHECK_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_cco_rf_rpt_check rf conflict detected" },
 | |
|     { CVG_NWM_CCO_KICKOUT_UNKNOWN_PEER_ID, PLC_CVG_NWM_MID, 7,
 | |
|         "cvg_nwm_cco_kickout_unknown_peer addr "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X, reason %lu" },
 | |
|     { CVG_NWM_STA_ZC_NTB_REQ_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_zc_ntb_req_rx request failed %lu" },
 | |
|     { CVG_NWM_CCO_ZC_NTB_RPT_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_zc_ntb_rpt_rx invalid report %lu" },
 | |
|     { CVG_NWM_STA_ASSOC_CONF_P2P_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_sta_assoc_conf_rx obsolete assoc conf "
 | |
|         "received obsolete p2p_sn %lu current p2p_sn %lu" },
 | |
|     { CVG_NWM_NEW_BP_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_new_bp notification dropped, bp_cnt_delta %lu" },
 | |
|     { CVG_NWM_CCO_HB_CHECK_ID, PLC_CVG_NWM_MID, 3,
 | |
|         "cvg_nwm_new_bp notification dropped, bp_cnt_delta %lu" },
 | |
|     { CVG_NWM_STA_ASSOCING_BC_RX_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_associating_bc_rx associating network restarted" },
 | |
|     { CVG_NWM_STA_FWD_UNICAST_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_msdu_fwd_unicast from %lu, hop [%lu -> %lu]. "
 | |
|         "org tei: [%u ==> %u], msdu_sn = %u"},
 | |
|     { CVG_NWM_STA_MONITOR_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_monitor_func timer - %x"},
 | |
|     { CVG_NWM_STA_LEAVE_NW_JOIN_BEST_NID_ID, PLC_CVG_NWM_MID, 7,
 | |
|         "cvg_nwm_sta_check_best_nw nw_lock:%lu monitor_cnt:%lu "
 | |
|         "current nid 0x%x, best nid 0x%x, in wl valid %lu, in wl %lu, "
 | |
|         "nor_locked %lu"},
 | |
|     { CVG_NWM_STA_ZC_NTB_RPT_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_zc_ntb_rpt_rx invalid report %lu" },
 | |
|     { CVG_NWM_CCO_ZC_COLLECT_STATE_CHECK_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_cco_zc_collect_state_check state - %lu to %lu" },
 | |
|     { CVG_NWM_CCO_DIAG_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_diag_rx request failed %lu" },
 | |
|     { CVG_NWM_STA_DIAG_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_diag_rx request failed %lu" },
 | |
|     { CVG_NWM_STA_NW_SAMPLE_FUNC_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_nw_sample_func timer - %x"},
 | |
|     { CVG_NWM_STA_LEAVE_NW_NO_BC_TS_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_sta_hb_check leave network due to no assigned beacon ts" },
 | |
|     { CVG_NWM_CCO_ZC_NTB_RPT_V2_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_zc_ntb_rpt_v2_rx invalid report %lu" },
 | |
|     { CVG_NWM_STA_ZC_NTB_RPT_V2_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_zc_ntb_rpt_v2_rx report dropped %lu" },
 | |
|     { CVG_NWM_STA_ZC_NTB_REQ_V2_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_zc_ntb_req_v2_rx request failed %lu" },
 | |
|     { CVG_NWM_STA_NW_CMP_PEER_SNR_ID, PLC_CVG_NWM_MID, 9,
 | |
|         "cvg_nwm_sta_nw_info_cmp_peer_snr nid:0x%x "
 | |
|         "addr:%02X:%02X:%02X:%02X:%02X:%08X level:%lu snr_q8:%d"},
 | |
|     { CVG_NWM_STA_NW_CMP_LEVEL_SNR_ID, PLC_CVG_NWM_MID, 8,
 | |
|         "cvg_nwm_sta_nw_info_cmp_level_avg nid:0x%x level:%u snr:%d cnt:%lu, "
 | |
|         "nid:0x%x level:%u snr:%d cnt:%lu"},
 | |
|     { CVG_NWM_STA_NW_CMP_LEVEL_PHASE_SNR_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_nw_info_cmp_level_phase_avg nid:0x%x level:%u snr:%d, "
 | |
|         "nid:0x%x level:%u snr:%d"},
 | |
|     { CVG_NWM_STA_CHECK_ZC_NTB_BEST_NW_ID, PLC_CVG_NWM_MID, 2,
 | |
|         "cvg_nwm_sta_check_zc_ntb_best_nw nid:0x%x avg:%lu "},
 | |
|     { CVG_NWM_STA_CMP_NTB_TSFM_ID, PLC_CVG_NWM_MID, 7,
 | |
|         "cvg_nwm_sta_check_best_nw nid:0x%x, ntb_win:%lu-%lu, nid:0x%x, "
 | |
|         "ntb_win:%lu-%lu reason %lu"},
 | |
|     { CVG_NWM_VDEV_SM_STA_DOG_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_sta stop feed dog"},
 | |
|     { CVG_NWM_CCO_BP_STOP_DOG_ID, PLC_CVG_NWM_MID, 0,
 | |
|         "cvg_nwm_vdev_sm_cco stop feed dog dur to bp alert abnormal "},
 | |
|     { CVG_NWM_STA_AREA_NOTIFY_ZC_NTB_RPT_RX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_sta_area_notify_zc_ntb_rpt_rx invalid report %lu" },
 | |
|     { CVG_NWM_CCO_AREA_NOTIFY_ZC_NTB_RPT_TX_ID, PLC_CVG_NWM_MID, 1,
 | |
|         "cvg_nwm_cco_area_notify_zc_ntb_send failed. %lu" },
 | |
|     { CVG_NWM_CCO_DELAY_KICKOUT_PEER_ID, PLC_CVG_NWM_MID, 5,
 | |
|         "cvg_nwm_cco_send_delay_leave_ind_spg: tei %lu, cnt %lu, reason %lu, "
 | |
|         "delay %lu, state %lu" },
 | |
|     { CVG_NWM_STA_GATHER_ASSOC_CONF_RT_ID, PLC_CVG_NWM_MID, 4,
 | |
|         "cvg_nwm_sta_assoc_conf_fwd debug %lu, proxy %lu, sta %lu, "
 | |
|         "p2p_sn %lu" },
 | |
|     { CVG_NWM_STA_DEL_DUP_PEER_ID, PLC_CVG_NWM_MID, 6,
 | |
|         "cvg_nwm_sta_delete_duplicate_peer %08x:%08x:%08x:%08x:%08x:%08x" },
 | |
| 
 | |
|     /* CVG PEER logs */
 | |
|     { CVG_PRM_INIT_ID, PLC_CVG_PRM_MID, 0,
 | |
|         "cvg_prm_init" },
 | |
|     { CVG_PRM_INIT_VDEV_ID, PLC_CVG_PRM_MID, 1,
 | |
|         "cvg_prm_init_vdev id - %lu" },
 | |
|     { CVG_PRM_RESET_VDEV_ID, PLC_CVG_PRM_MID, 1,
 | |
|         "cvg_prm_reset_vdev id - %lu" },
 | |
|     { CVG_PRM_DUMP_PEER_ID, PLC_CVG_PRM_MID, 9,
 | |
|         "cvg_prm_dump_peer tei %lu, phase %lu, tx_sr %lu, "
 | |
|         "rx_sr %lu, tf_sr %lu, cco_tf_sr %lu, rx_snr %d, tx_snr %d, "
 | |
|         "inactive_cnt %lu" },
 | |
|     { CVG_PRM_SET_PEER_ADDR_ID, PLC_CVG_PRM_MID, 7,
 | |
|         "cvg_prm_set_peer_addr tei = %lu, mac = "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X" },
 | |
|     { CVG_PRM_SET_PEER_ADDR_ORIG_ID, PLC_CVG_PRM_MID, 7,
 | |
|         "cvg_prm_set_peer_addr address changed, tei %lu orig = "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X" },
 | |
|     { CVG_PRM_SET_PEER_ADDR_NEW_ID, PLC_CVG_PRM_MID, 7,
 | |
|         "cvg_prm_set_peer_addr address changed, tei %lu new = "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X" },
 | |
|     /* CVG BWM logs */
 | |
|     { CVG_BWM_INIT_ID, PLC_CVG_BWM_MID, 0,
 | |
|         "cvg_bwm_init" },
 | |
|     { CVG_BWM_FREQ_BAND_CHG, PLC_CVG_BWM_MID, 3,
 | |
|       "cvg_bwm_config_self_fb mac vdev#%lu freq band id change old = %lu,"
 | |
|        "new = %lu"},
 | |
|     { CVG_BWM_RF_CHANNEL_CHG, PLC_CVG_BWM_MID, 5,
 | |
|       "cvg_bwm_config_self_rf chg old [%lu %lu] new [%lu %lu] lock %lu" },
 | |
|     { CVG_BWM_CCO_FREQ_BAND_CHG_ONGING, PLC_CVG_BWM_MID, 2,
 | |
|       "cvg_bwn_cco_assign_fb_chg freq band change to %lu, left time = %lu"},
 | |
|     { CVG_BWM_CCO_RF_CHANNEL_CHG_ONGING, PLC_CVG_BWM_MID, 3,
 | |
|       "cvg_bwn_cco_assign_rf_chg rf channel change to [%lu %lu], left time = %lu"},
 | |
|     { CVG_BWM_INIT_VDEV_ID, PLC_CVG_BWM_MID, 1,
 | |
|         "cvg_bwm_init_vdev id - %lu" },
 | |
|     { CVG_BWM_RESET_VDEV_ID, PLC_CVG_BWM_MID, 1,
 | |
|         "cvg_bwm_reset_vdev id - %lu" },
 | |
|     { CVG_BWM_CCO_ASSIGN_TS_ID, PLC_CVG_BWM_MID, 2,
 | |
|         "cvg_bwm_cco_assign_ts beacon region not enough, proxy_cnt %lu, "
 | |
|         "allowed non_cco_cnt %lu\n" },
 | |
|     { CVG_BWM_CCO_CONFIG_BW_ID, PLC_CVG_BWM_MID, 3,
 | |
|         "cvg_bwm_cco_config_bw config changed - new state %lu, "
 | |
|         "new beacon period %lu, new slot dur %lu" },
 | |
|     { CVG_BWM_DUMP_TS_BC_ID, PLC_CVG_BWM_MID, 5,
 | |
|         "cvg_bwm_dump_ts bc_period %lu, bc_slot_dur %lu, cco_bc_cnt %lu, "
 | |
|         "proxy_bc_cnt %lu, sta_bc_cnt %lu" },
 | |
|     { CVG_BWM_DUMP_TS_BC_S_ID, PLC_CVG_BWM_MID, 5,
 | |
|         "cvg_bwm_dump_ts addr %02x, tei %lu, type %lu, tx_flag %lu, phase %lu" },
 | |
|     { CVG_BWM_DUMP_TS_CSMA_ID, PLC_CVG_BWM_MID, 8,
 | |
|         "cvg_bwm_dump_ts csma_slot_frag_s %lu, phase_cnt %lu, "
 | |
|         "phase1 %lu, slot_dur1 %lu, phase2 %lu, slot_dur2 %lu, "
 | |
|         "phase3 %lu, slot_dur3 %lu"},
 | |
|     { CVG_BWM_DUMP_TS_TDMA_ID, PLC_CVG_BWM_MID, 2,
 | |
|         "cvg_bwm_dump_ts tdma lid %lu, slot_dur %lu" },
 | |
|     { CVG_BWM_DUMP_TS_DCSMA_ID, PLC_CVG_BWM_MID, 8,
 | |
|         "cvg_bwm_dump_ts dcsma lid %lu, phase_cnt %lu, "
 | |
|         "phase1 %lu, slot_dur1 %lu, phase2 %lu, slot_dur2 %lu, "
 | |
|         "phase3 %lu, slot_dur3 %lu" },
 | |
|     { CVG_BWM_CCO_REQ_LID_ID, PLC_CVG_BWM_MID, 1,
 | |
|         "cvg_bwm_cco_request_lid bandwidth allocated for lid %lu" },
 | |
|     { CVG_BWM_CCO_REL_LID_ID, PLC_CVG_BWM_MID, 1,
 | |
|         "cvg_bwm_cco_release_lid bandwidth freed for lid %lu" },
 | |
|     /* CVG SEC logs */
 | |
|     { CVG_SEC_INIT_ID, PLC_CVG_SEC_MID, 0,
 | |
|         "cvg_sec_init" },
 | |
|     { CVG_SEC_INIT_VDEV_ID, PLC_CVG_SEC_MID, 1,
 | |
|         "cvg_sec_init_vdev id - %lu" },
 | |
|     { CVG_SEC_RESET_VDEV_ID, PLC_CVG_SEC_MID, 1,
 | |
|         "cvg_sec_reset_vdev id - %lu" },
 | |
|     /* CVG RT logs */
 | |
|     { CVG_RT_INIT_ID, PLC_CVG_RT_MID, 0,
 | |
|         "cvg_rt_init" },
 | |
|     { CVG_RT_INIT_VDEV_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_init_vdev id - %lu" },
 | |
|     { CVG_RT_RESET_VDEV_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_reset_vdev id - %lu" },
 | |
|     { CVG_RT_ROUTE_TO_ID, PLC_CVG_RT_MID, 8,
 | |
|         "cvg_rt_route_timeout proxy %lu, phase %lu, tx_sr %lu, rx_sr %lu, "
 | |
|         "tf_sr %lu, cco_tf_sr %lu, rx_snr %d, tx_snr %d" },
 | |
|     { CVG_RT_ROUTE_TO_RF_ID, PLC_CVG_RT_MID, 9,
 | |
|         "cvg_rt_route_timeout_rf proxy-rf_valid %08x, rcv_bm %08x, tf_sr %lu, "
 | |
|         "wi_rx_sr %lu, rx_sr %lu, tx_sr %lu, rx_snr %d, "
 | |
|         "tx_snr %d, rx_rssi %d" },
 | |
|     { CVG_RT_VDEV_START_RP_F_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_vdev_start_rt_period already started vdev id - %lu" },
 | |
|     { CVG_RT_VDEV_START_RP_T_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_vdev_start_rt_period vdev %lu start rt period %d "
 | |
|         "left %d dis period %d" },
 | |
|     { CVG_RT_VDEV_STOP_RP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_vdev_stop_rt_period vdev %lu, stop rp %d" },
 | |
|     { CVG_RT_HEART_BEAT_RX_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_heart_beat_rx org tei: %d, max_dl_sta: %d, "
 | |
|         "max_dl_size = %d, bitmap_size= %d" },
 | |
|     { CVG_RT_HEART_BEAT_RX_S_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_heart_beat_rx org sta tei: %d" },
 | |
|     { CVG_RT_CCO_RP_CHECK_ID, PLC_CVG_RT_MID, 2,
 | |
|         "route period will be changed from %lu to %lu" },
 | |
|     { CVG_RT_CCO_RP_CHECK_2_ID, PLC_CVG_RT_MID, 2,
 | |
|         "route period changed from %lu to %lu" },
 | |
|     { CVG_RT_SEND_LINK_CONF_REQ_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_send_link_conf_req send link conf req, req_sn %lu" },
 | |
|     { CVG_RT_SEND_LINK_CONF_RSP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_send_link_conf_rsp send link conf response, req_sn %lu, "
 | |
|         "dest %lu" },
 | |
|     { CVG_RT_SEND_ROUTE_ERR_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_send_route_err send route recovery err, req_sn %lu, dest %lu" },
 | |
|     { CVG_RT_SEND_ROUTE_ACK_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_send_route_ack send route recovery ack, req_sn %lu, dest %lu, "
 | |
|         "next_hop %lu" },
 | |
|     { CVG_RT_SEND_ROUTE_RSP_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_send_route_rsp send route recovery rsp, req_sn %lu, dest %lu, "
 | |
|         "next_hop %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_HANDLE_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_route_req_handle new request received, req_sn %lu, src %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_HANDLE_CAND_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_req_handle new candidate found, req_sn %lu, tei %lu, "
 | |
|         "tf_sr %lu, rx_snr %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_HANDLE_DROP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_route_req_handle drop request %lu, req_sn %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_FWD_CAND_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_req_fwd new candidate found, req_sn %lu, tei %lu, "
 | |
|         "tf_sr %lu, rx_snr %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_FWD_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_route_req_fwd route recovery req forwarded, req_sn %lu, "
 | |
|         "src %lu, dest %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_FWD_DROP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_route_req_fwd drop request %lu, req_sn %lu" },
 | |
|     { CVG_RT_ROUTE_RSP_HANDLE_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_route_rsp_handle receive route recovery rsp, req_sn %lu, "
 | |
|         "src %lu, dest %lu" },
 | |
|     { CVG_RT_ROUTE_RSP_HANDLE_DROP_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_route_rsp_handle drop reason %lu" },
 | |
|     { CVG_RT_ROUTE_RSP_FWD_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_route_rsp_fwd receive route recovery rsp, req_sn %lu, src %lu, "
 | |
|         "dest %lu" },
 | |
|     { CVG_RT_ROUTE_RSP_FWD_DROP_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_route_rsp_fwd drop reason %lu" },
 | |
|     { CVG_RT_ROUTE_ACK_HANDLE_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_ack_handle receive route recovery ack, req_sn %lu, "
 | |
|         "prev %lu, src %lu, dest %lu" },
 | |
|     { CVG_RT_ROUTE_ACK_HANDLE_DROP_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_route_ack_handle drop reason %lu" },
 | |
|     { CVG_RT_ROUTE_ACK_FWD_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_route_ack_fwd receive route recovery ack, req_sn %lu, src %lu, "
 | |
|         "dest %lu" },
 | |
|     { CVG_RT_ROUTE_ACK_FWD_DROP_ID, PLC_CVG_RT_MID, 1,
 | |
|         "cvg_rt_route_ack_fwd drop reason %lu" },
 | |
|     { CVG_RT_START_ROUTE_RECOVERY_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_start_route_recovery dest %lu, req_sn %lu" },
 | |
|     { CVG_RT_ROUTE_REQ_RX_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_req_rx drop %lu, prev hop %lu src %lu dest %lu" },
 | |
|     { CVG_RT_ROUTE_RSP_RX_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_rsp_rx drop %lu, prev hop %lu src %lu dest %lu" },
 | |
|     { CVG_RT_ROUTE_ACK_RX_ID, PLC_CVG_RT_MID, 4,
 | |
|         "cvg_rt_route_ack_rx drop %lu, prev hop %lu src %lu dest %lu" },
 | |
|     { CVG_RT_ROUTE_ERR_RX_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_route_err_rx drop %lu, from %lu" },
 | |
|     { CVG_RT_LINK_CONF_REQ_RX_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_link_conf_req_rx receive link conf req, req_sn %lu, "
 | |
|         "src %lu dest %lu" },
 | |
|     { CVG_RT_LINK_CONF_REQ_RX_DROP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_link_conf_req_rx drop %lu, src %lu" },
 | |
|     { CVG_RT_LINK_CONF_RSP_RX_ID, PLC_CVG_RT_MID, 3,
 | |
|         "cvg_rt_link_conf_rsp_rx receive link conf rsp, req_sn %lu, src %lu, "
 | |
|         "dest %lu" },
 | |
|     { CVG_RT_LINK_CONF_RSP_RX_DROP_ID, PLC_CVG_RT_MID, 2,
 | |
|         "cvg_rt_link_conf_rsp_rx drop %lu, src %lu" },
 | |
|     { CVG_RT_CHECK_ROUTE_RECOVERY_FWD_ID, PLC_CVG_RT_MID, 0,
 | |
|         "cvg_rt_check_route_recovery_fwd forward route recovery rsp" },
 | |
|     { CVG_RT_ROUTE_TO_PARTIAL_ID, PLC_CVG_RT_MID, 0,
 | |
|         "cvg_rt_route_timeout partial timer not completed yet" },
 | |
|     { CVG_RT_DEBUG_ID, PLC_CVG_RT_MID, 8,
 | |
|         "cvg_rt_debug_check %08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x" },
 | |
|     { CVG_NWM_STA_NO_BC_RX_DUMP_ID, PLC_CVG_NWM_MID, 9,
 | |
|       "cvg_nwm_sta_hb_check leave nw rule 1, ts %lu, data [%08x, %08x, %08x, "
 | |
|       "%08x, %08x, %08x, %08x, %08x]" },
 | |
|     /* IPC logs */
 | |
|     { IOT_IPC_REG_CLIENT_ID, IOT_IPC_MID, 3,
 | |
|         "iot_ipc_register_client ret - %x, f_id - %lu, c_id - %lu" },
 | |
|     { IOT_IPC_DEREG_CLIENT_ID, IOT_IPC_MID, 2,
 | |
|         "iot_ipc_deregister_client ret - %lu, f_id - %x" },
 | |
|     /* PKT logs */
 | |
|     { IOT_PKT_ALLOC_ID, IOT_PKT_MID, 2,
 | |
|         "iot_pkt_alloc count %lu, addr = 0x%X" },
 | |
|     { IOT_PKT_FREE_ID, IOT_PKT_MID, 2,
 | |
|         "iot_pkt_free count %lu, addr = 0x%X" },
 | |
|     /* Timer statistics logs */
 | |
|     { OS_TIMER_CREATED, IOT_STATISTICS_MID, 3,
 | |
|         "ststic:timer. mid = %d, timer cnt = %d, total = %d"},
 | |
|     { OS_TIMER_TOTAL_CNT, IOT_STATISTICS_MID, 1, "ststic:timer total cnt = %d"},
 | |
|     { OS_MEM_MISC_USAGE1, IOT_STATISTICS_MID, 4,
 | |
|         "ststic:alloc misc- mid= [%d], size = %d, mtotal = %d, p = [%08X]"},
 | |
|     { OS_MEM_MISC_USAGE2, IOT_STATISTICS_MID, 7,
 | |
|         "static:misc timer = %d, lock = %d, task = %d, "
 | |
|         "iot_pkt = %d, plc_lib = %d, dbglog = %d, total =%d"},
 | |
|     { OS_MEM_CVG_USAGE1, IOT_STATISTICS_MID, 4,
 | |
|         "ststic:alloc cvg - mid= [%d], size = %d, mtotal = %d, p = [%08X]"},
 | |
|     { OS_MEM_CVG_USAGE2, IOT_STATISTICS_MID, 7,
 | |
|         "ststic:cvg common = %d, rt = %d, sec = %d, "
 | |
|         "bwm = %d, prm = %d, nwm = %d, total = %d"},
 | |
|     { OS_LOCK_USAGE1, IOT_STATISTICS_MID, 3,
 | |
|         "ststic:lock. mid = %d, lock cnt = %d, total = %d" },
 | |
|     { OS_LOCK_USAGE2, IOT_STATISTICS_MID, 1,
 | |
|         "ststic:lock total cnt = %d"},
 | |
|     { OS_EVT_USAGE1, IOT_STATISTICS_MID, 3,
 | |
|         "ststic:event. mid = %d, event cnt = %d, total = %d" },
 | |
|     { OS_EVT_USAGE2, IOT_STATISTICS_MID, 1,
 | |
|         "ststic:event total cnt = %d" },
 | |
|     /* iot task logs */
 | |
|     { IOT_TASK_CREATE_ID, IOT_TASK_MID, 2,
 | |
|         "iot_task_create task %p, exe func %p" },
 | |
|     { IOT_TASK_DELETE_ID, IOT_TASK_MID, 2,
 | |
|             "iot_task_delete task %p, exe func %p" },
 | |
|     { IOT_TASK_FUNC_ID, IOT_TASK_MID, 2,
 | |
|         "iot_task_func task %p, exe func %p" },
 | |
|     /* iot smart grid logs */
 | |
|     { IOT_SG_HANDLE_PLC_REG_MSG_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_handle_plc_msg PLC lib registered msdu type %lu, prio %lu" },
 | |
|     { IOT_SG_HANDLE_PLC_STATE_MSG_ID, IOT_SMART_GRID_MID, 8,
 | |
|         "iot_sg_handle_plc_msg PLC link state ready %lu, role %lu, cco addr "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X" },
 | |
|     { IOT_SG_STA_SM_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_sta_msg_exe_func state changed from %lu to %lu" },
 | |
|     { IOT_SG_STA_HADNLE_METER_R_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_handle_meter_r drop packet reason %lu" },
 | |
|     { IOT_SG_STA_CON_MR_PARSE, IOT_SMART_GRID_MID, 1,
 | |
|          "iot_sg_sta_parse_frame drop packet reason %lu...." },
 | |
|     { IOT_SG_STA_HADNLE_CON_MR_TO_ID, IOT_SMART_GRID_MID, 2,
 | |
|          "iot_sg_sta_meter_read_done_multiple -- meter read pid %lu timeout,"
 | |
|           " retry %lu..." },
 | |
|     { IOT_SG_STA_HANDLE_CON_MR_NACK_ID, IOT_SMART_GRID_MID, 2,
 | |
|           "iot_sg_sta_meter_read_done_multiple -- meter read pid %lu nack,"
 | |
|           " retry %lu..." },
 | |
|     { IOT_SG_STA_QUEUE_GW_APP_OTHER_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_sta_queue_gw_app_other drop req id %lu, reason is %lu" },
 | |
|     { IOT_SG_STA_METER_READ_DONE_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_sta_meter_read_done drop response" },
 | |
|     { IOT_SG_STA_SM_STARTED_TO_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_sm_started timeout %lu" },
 | |
|     { IOT_SG_STA_START_SEC_NODE_REG_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_start_sec_node_reg drop packet reason %lu" },
 | |
|     { IOT_SG_STA_METER_READ_DONE_SINGLE_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_meter_read_done_single drop req id %lu" },
 | |
|     { IOT_SG_STA_START_SEC_NODE_REG_S_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_sta_start_sec_node_reg start node register" },
 | |
|     { IOT_SG_STA_STOP_SEC_NODE_REG_S_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_sta_stop_sec_node_reg stop node register" },
 | |
|     { IOT_SG_STA_STOP_SEC_NODE_REG_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_stop_sec_node_reg drop packet reason %lu" },
 | |
|     { IOT_SG_STA_QUERY_SEC_NODE_REG_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_query_sec_node_reg drop packet reason %lu" },
 | |
|     { IOT_SG_STA_QUERY_SEC_NODE_REG_S_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_query_sec_node_reg drop req id %lu" },
 | |
|     { IOT_SG_STA_CORRECT_TIME_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_correct_time drop packet reason %lu" },
 | |
|     { IOT_SG_STA_EVENT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_event drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT_EXE_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "driver correct time execute..."},
 | |
|     { IOT_SG_STA_SEC_NODE_REG_DONE_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_sta_node_reg_done..." },
 | |
| 
 | |
|     { IOT_SG_STA_MR_ERR_ISSUE_NMEM_ID, IOT_SMART_GRID_MID, 1,
 | |
|        "iot_sg_sta_issue_frame fail -- no memory, idx = %lu" },
 | |
|     { IOT_SG_STA_MR_ERR_DRV_BUSY_ID, IOT_SMART_GRID_MID, 1,
 | |
|        "iot_sg_sta_issue_frame fail -- driver busy, idx = %lu" },
 | |
|     { IOT_SG_STA_MR_ERR_CON_NMEM_1_ID, IOT_SMART_GRID_MID, 1,
 | |
|        "iot_sg_sta_save_meter_read_rsp -- alloc memory fail, seq = %lu" },
 | |
|     { IOT_SG_STA_MR_ERR_CON_NMEM_2_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_sta_save_meter_read_rsp -- memory expand fail, seq = %lu, "
 | |
|         "ack = %04x" },
 | |
|     { IOT_SG_STA_MR_ERR_CON_NMEM_3_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_sta_save_meter_read_rsp -- message size over, seq = %lu, "
 | |
|         "ack = %04x" },
 | |
|     { IOT_SG_STA_MR_ERR_CON_LOST_ITEM_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_sta_send_meter_read_rsp -- con mr lost item, seq = %lu, "
 | |
|         "ack = %04x" },
 | |
| 
 | |
|     { IOT_SG_STA_DRV_PM_MR_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "pm_drv_meter_read drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_PM_MR_TO_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "pm_resp_trans_handle meter read timeot..." },
 | |
|     { IOT_SG_STA_DRV_PM_MR_PEND_ID, IOT_SMART_GRID_MID, 3,
 | |
|         "pm_drv_meter_read pending, p_id = %lu, timeout = %lu, interval = %lu"},
 | |
|     { IOT_SG_STA_DRV_PM_CT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "pm_drv_correct_time drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_PM_CT_PEND_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "pm_drv_correct_time pend..." },
 | |
|     { IOT_SG_STA_DRV_PM_CMT_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "pm_drv_comm_test drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_PM_CMT_PEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "pm_drv_comm_test pending, p_id = %lu" },
 | |
|     { IOT_SG_STA_DRV_PM_DETECT_SUCCESS, IOT_SMART_GRID_MID, 9,
 | |
|         "pm_resp_detect_handle meter detect succeed, addr = "
 | |
|         "%02x:%02x:%02x:%02x:%02x:%02x, protocol code = %lu, "
 | |
|         "meter type = %lu, meter phase = %lu" },
 | |
|     { IOT_SG_STA_DRV_PM_DETECT_GET_ADDR, IOT_SMART_GRID_MID, 6,
 | |
|         "pm_resp_detect_handle get meter addr, addr = "
 | |
|         "%02x:%02x:%02x:%02x:%02x:%02x" },
 | |
|     { IOT_SG_STA_DRV_PM_DETECT_FINISH, IOT_SMART_GRID_MID, 0,
 | |
|         "pm_resp_detect_handle meter detect finish, change driver" },
 | |
|     { IOT_SG_STA_DRV_CT2_MR_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_meter_read drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_MR_PEND_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "ct2_meter_read pending, sponsor = %lu, p_id = %lu"},
 | |
|     { IOT_SG_STA_DRV_CT2_MR_TO_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_resp_trans_handle meter read timeout, sponsor = %lu..."},
 | |
|     { IOT_SG_STA_DRV_CT2_CT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_correct_time drop packet reason %lu"},
 | |
|     { IOT_SG_STA_DRV_CT2_CT_PEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_correct_time pending, type = %lu"},
 | |
|     { IOT_SG_STA_DRV_CT2_CMT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_comm_test drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_CMT_PEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_comm_test pending, type = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_STOP_DUMP_INFO1, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_smc_stop_dump: reason = %lu, pm_cnt = %lu, dur time = %lus" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_STOP_DUMP_INFO2, IOT_SMART_GRID_MID, 8,
 | |
|         "|----addr = %02x%02x%02x%02x%02x%02x, p_id = %d, b_id = %d" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_START, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_smc_start reason = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_MSG_ANALYSE, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_resp_smc_stage_sm645_analyse: analyse result = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_ADDR_UPDATE, IOT_SMART_GRID_MID, 7,
 | |
|         "ct2_smc_addr_gen_update done, cursor = %d, gen_addr ="
 | |
|          "%02x%02x%02x%02x%02x%02x" },
 | |
|     { IOT_SG_STA_DRV_CT2_SMC_ADD_PM, IOT_SMART_GRID_MID, 8,
 | |
|         "ct2_smc_add_pm_info: addr = %02x%02x%02x%02x%02x%02x, p_id = %lu"
 | |
|         " b_id = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT2_UART_CONFIG, IOT_SMART_GRID_MID, 2,
 | |
|          "ct2_drv_uart_config buad = %lu, format_type = %lu" },
 | |
| 
 | |
|     { IOT_SG_STA_DRV_CT1_MR_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct1_drv_meter_read drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_MR_PEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct1_drv_meter_read pending, p_id = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_MR_TO_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "_ct1_drv_trans_handle meter read timeout..." },
 | |
|     { IOT_SG_STA_DRV_CT1_CT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct1_drv_correct_time drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_CT_PEND_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "ct1_drv_correct_time pending..." },
 | |
|     { IOT_SG_STA_DRV_CT1_CMT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct1_drv_comm_test drop packet reason %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_CMT_PEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct1_drv_comm_test pending, type = %lu" },
 | |
| 
 | |
|     { IOT_SG_STA_DRV_CT1_DEV_DETECT_ID, IOT_SMART_GRID_MID, 6,
 | |
|         "ct1 driver detect dev done, dev addr = %02x%02x%02x%02x%02x%02x"},
 | |
|     { IOT_SG_STA_DRV_CT1_SMC_QR_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "ct1_drv_req_smc_cmd_issue - query, start index = %lu, cnt = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_SMC_START_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "ct1_drv_smc_start, in state %lu, start_reason = %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_SMC_START_FAIL_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_resp_smc_handle - start search meter fail, enter state %lu" },
 | |
|     { IOT_SG_STA_DRV_CT1_SMC_STOP_FAIL_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "ct2_drv_resp_smc_handle - stop search meter fail, enter state %lu" },
 | |
|     { IOT_SG_STA_DRV_STATE_COUNT_ID ,IOT_SMART_GRID_MID, 6,
 | |
|         "iot_sg_sta_print_log_to_flash sta drv stats - drv id %lu,"
 | |
|         "drv_state_cnt %08X:%08X:%08X:%08X:%08X" },
 | |
| 
 | |
|     {IOT_SG_CCO_HANDLE_METER_READ, IOT_SMART_GRID_MID, 8,
 | |
|         "meter_data received.seq = 0n%d. "
 | |
|         "meter_mac = %02X:%02X:%02X:%02X:%02X:%02X. cmd = %08X"},
 | |
|     {IOT_SG_CCO_HANDLE_METER_READ_TYPE_ERROR, IOT_SMART_GRID_MID, 7,
 | |
|         "read meter type %d is error for %02X:%02X:%02X:%02X:%02X:%02X"},
 | |
|     {IOT_SG_CCO_HANDLE_METER_READ_NO_RECORD, IOT_SMART_GRID_MID, 6,
 | |
|         "read meter cmd does not exist. mac[%02X:%02X:%02X:%02X:%02X:%02X]"},
 | |
|     {IOT_SG_CCO_CON_MR_NO_CMD, IOT_SMART_GRID_MID, 0,
 | |
|         "no entry to send"},
 | |
|     {IOT_SG_CCO_SEND_CON_MR_CMD, IOT_SMART_GRID_MID, 5,
 | |
|         "len = %d, flag = %d, send_cnt = %d, sn = %lu, mr_type = %d"},
 | |
|     { IOT_SG_CCO_CON_MR_PLC_PKG_SEND_BCAST, IOT_SMART_GRID_MID, 1,
 | |
|         "send a package on plc for con meter, current package count "
 | |
|         "for bcast is %lu" },
 | |
|     { IOT_SG_CCO_CON_MR_PLC_PKG_RCV_BCAST, IOT_SMART_GRID_MID, 1,
 | |
|         "receive a package on plc for con meter, current package count for "
 | |
|         "bcast is %lu" },
 | |
|     { IOT_SG_CCO_CON_MR_PLC_PKG_SEND_UNICAST, IOT_SMART_GRID_MID, 7,
 | |
|         "send a con meter unicast pkg on plc, sta_mac = "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X, pkt cnt is %lu" },
 | |
|     { IOT_SG_CCO_CON_MR_PLC_PKG_RCV_UNICAST, IOT_SMART_GRID_MID, 7,
 | |
|         "receive a con meter unicast pkg on plc, sta_mac = "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X, pkt cnt is %lu" },
 | |
|     {IOT_SG_CCO_SEND_CON_MR_DEST_MAC, IOT_SMART_GRID_MID, 6,
 | |
|         "dest_mac = %02X:%02X:%02X:%02X:%02X:%02X"},
 | |
|     {IOT_SG_CCO_SEND_CON_MR_RSP_NO_CMD_RECORD, IOT_SMART_GRID_MID, 8,
 | |
|         "meter_data drop.seq = %lu. len = %lu "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X."},
 | |
|     {IOT_SG_CCO_SEND_CON_MR_RSP_DATA, IOT_SMART_GRID_MID, 9,
 | |
|         "meter_data received.seq = %lu. mr_type = %lu, len = %lu "
 | |
|         "%02X:%02X:%02X:%02X:%02X:%02X."},
 | |
|     {IOT_SG_CCO_SEND_CON_MR_NO_RSP, IOT_SMART_GRID_MID, 3,
 | |
|         "read meter no rsp: sn = %d, proto_type = %d, afn = %02X"},
 | |
|     {IOT_SG_CCO_DROP_METER_DATA_NO_UL_BUF, IOT_SMART_GRID_MID, 4,
 | |
|         "drop ul meter data. mr_type = %d, sn = %d, afn = %d, proto_type = %d"},
 | |
|     {IOT_SG_CCO_BUF_REFRESH, IOT_SMART_GRID_MID, 0, "buf: refresh buf entry age"},
 | |
|     {IOT_SG_CCO_DL_ONLINE_PKT_EXCEED, IOT_SMART_GRID_MID, 0, "dl_buf: exceed max online concurrent."},
 | |
|     {IOT_SG_CCO_TRIGGER_DL_BUF_SEND_DATA, IOT_SMART_GRID_MID, 0, "dl_buf: trigger send data to PLC"},
 | |
|     {IOT_SG_CCO_UL_BUF_NO_DATA, IOT_SMART_GRID_MID, 0, "ul_buf: no cmd to send"},
 | |
|     {IOT_SG_CCO_UL_METER_DATA_RPT, IOT_SMART_GRID_MID, 6,
 | |
|         "ul buf_entry = %08X, send cnt = %d, len = %d, sn = %d, afn = 0x%02X, "
 | |
|         "task_id = %04X"},
 | |
|     {IOT_SG_CCO_UL_EVENT_DATA_RPT, IOT_SMART_GRID_MID, 4,
 | |
|         "evt_rpt: ul entry = %08X, send cnt = %d, len = %d, proto_type = %d"},
 | |
|     {IOT_SG_CCO_UL_SEC_NODE_RPT, IOT_SMART_GRID_MID, 3,
 | |
|         "sec_node_rpt: ul entry = %08X, send cnt = %d, len = %d"},
 | |
|     { IOT_SG_CCO_RM_UL_SEC_NODE_RPT, IOT_SMART_GRID_MID, 3,
 | |
|         "rm_sec_node_rpt: ul entry = %08X, send cnt = %d, len = %d" },
 | |
|     { IOT_SG_CCO_SEC_NODE_QUERY_SKIP, IOT_SMART_GRID_MID, 1,
 | |
|          "iot_sg_cco_query_sec_node_reg  skip, reason = %lu" },
 | |
|     {IOT_SG_CCO_SEC_NODE_QUERY, IOT_SMART_GRID_MID, 6,
 | |
|          "sec_node_quer dest [%02X:%02X:%02X:%02X:%02X:%02X]"},
 | |
|     {IOT_SG_CCO_SEC_NODE_REG_S_ID, IOT_SMART_GRID_MID, 3,
 | |
|          "iot_sg_handle_start_sec_node_reg state from %lu to %lu, dur = %lu" },
 | |
|     { IOT_SG_CCO_SEC_NODE_REG_P1_ID, IOT_SMART_GRID_MID, 1,
 | |
|          "iot_sg_handle_stop_sec_node_reg sec node reg is done, reason %lu" },
 | |
|     { IOT_SG_CCO_SEC_NODE_REG_P2_ID, IOT_SMART_GRID_MID, 1,
 | |
|          "iot_sg_handle_query_sec_node_reg sec node reg is done, reason %lu" },
 | |
|     { IOT_SG_CCO_SEC_NODE_REG_RPT_DROP_ID, IOT_SMART_GRID_MID, 8,
 | |
|          "iot_sg_cco_handle_sec_node_rpt drop packet reason %lu, seq = %lu, "
 | |
|          "sta = %02x%02x%02x%02x%02x%02x"},
 | |
|     { IOT_SG_CCO_EVT_CTRL_HANDLE_ID, IOT_SMART_GRID_MID, 2,
 | |
|          "iot_sg_handle_evt_rpt event reportint ctrl = %lu, caller = %lu"},
 | |
|     {IOT_SG_CCO_ADD_SEC_NODE_FAILED, IOT_SMART_GRID_MID, 0,
 | |
|         "sec_node_reg failed to add to ul buf. no entry."},
 | |
|     { IOT_SG_CCO_RECEIVE_SEC_NODE, IOT_SMART_GRID_MID, 8,
 | |
|          "iot_sg_cco_handle_sec_node_rpt: reg_param = %d, reg_state = %d "
 | |
|          "sta addr = %02x%02x%02x%02x%02x%02x\n" },
 | |
|     {IOT_SG_CCO_EVT_RPT_OK, IOT_SMART_GRID_MID, 6,
 | |
|         "event_rpt[%02X:%02X:%02X:%02X:%02X:%02X] - add event to ul buf"},
 | |
|     {IOT_SG_CCO_EVT_RPT_DROP_ID, IOT_SMART_GRID_MID, 7,
 | |
|         "iot_sg_cco_handle_evt_rpt drop packet reason %lu, pm_addr = %02x"
 | |
|         "%02x%02x%02x%02x%02x" },
 | |
|     { IOT_SG_CCO_STA_EVT_RPT_DROP_ID, IOT_SMART_GRID_MID, 7,
 | |
|         "iot_sg_cco_handle_device_evt_rpt drop packet reason %lu,"
 | |
|         " pm_addr = %02x%02x%02x%02x%02x%02x" },
 | |
|     {IOT_GW_CCO_EVT_RPT_DROP_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_gw_cco_handle_evt_rpt drop packet reason %lu" },
 | |
|     {IOT_SG_CCO_EVT_RPT_BUF_FULL, IOT_SMART_GRID_MID, 6,
 | |
|         "event_rpt[%02X:%02X:%02X:%02X:%02X:%02X] - buf is full"},
 | |
|     {IOT_SG_CCO_PRINT_M_DATA, IOT_SMART_GRID_MID, 0, "meter_data: tbd"},
 | |
|     {IOT_SG_CCO_SRC_METER_ADDR, IOT_SMART_GRID_MID, 8,
 | |
|         "src_meter_addr:%02X:%02X:%02X:%02X:%02X:%02X, seq = 0n%d,type = 0n%d"},
 | |
|     {IOT_SG_CCO_DEST_STA_ADDR, IOT_SMART_GRID_MID, 6,
 | |
|         "dest_sta_addr: %02X:%02X:%02X:%02X:%02X:%02X"},
 | |
|     {IOT_SG_CCO_UART_RECV_DATA, IOT_SMART_GRID_MID, 0, "uart recv data: tbd"},
 | |
| 
 | |
|     { IOT_GW_CCO_SEC_NODE_REG_RPT_DROP_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_gw_cco_handle_sec_node_rpt  drop packet reason %lu" },
 | |
|     { IOT_GW_CCO_PLC_PKT_DROP_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_gw_cco_handle_plc_app_data drop packet, id = %lu" },
 | |
|     { IOT_SG_CCO_DRV_CCTT_SEC_NODE_RPT_ID, IOT_SMART_GRID_MID, 7,
 | |
|         "sec_node_rpt: sec_node_cnt = %lu, "
 | |
|         "m_addr = %02x%02x%02x%02x%02x%02x\n"},
 | |
| 
 | |
|     { IOT_SG_STA_DUMP_STATUS_1_ID, IOT_SMART_GRID_MID, 9,
 | |
|         " iot_sg_sta_print_log_to_flash sta mr statistics -- "
 | |
|         "con_mr_cnt %lu, sus_cnt %lu; "
 | |
|         "rt_mr_cnt %lu, sus_cnt %lu; "
 | |
|         "cctt_mr_cnt %lu, sus_cnt %lu; "
 | |
|         "black_listed_mr_cnt %lu; "
 | |
|         "cache_mr_hit_cnt %lu; join_leave_cnt = %08X;" },
 | |
|     { IOT_SG_STA_DUMP_STATUS_2_ID, IOT_SMART_GRID_MID, 8,
 | |
|         "iot_sg_sta_print_log_to_flash time YYYYMMDD %08x-HHMMSS %06x, "
 | |
|         "app_proto-user_type-drv_id %08x, rec corr cnt %lu, "
 | |
|         "drv send corr cnt %lu, mr_err_cnt %08x:%08x:%08x" },
 | |
| 
 | |
|     {IOT_SG_PROTO_PRINT_MAC, IOT_SMART_GRID_MID, 1, "13H_F01 mac[0n%d] tbd"},
 | |
|     {IOT_SG_PROTO_PRINT_DATA, IOT_SMART_GRID_MID, 1,
 | |
|         "fwd. type = 0n%d,  data = tbd"},
 | |
|     {IOT_SG_PROTO_PRINT_CMD, IOT_SMART_GRID_MID, 3, "proto 3762 handle cmd: "
 | |
|         "afn = 0x%02X, fn = 0x%02X, data_len = 0n%d. data: tbd\n"},
 | |
|     {IOT_SG_PROTO_UART_SEND, IOT_SMART_GRID_MID, 0, "<--uart send--:tbd"},
 | |
|     {IOT_SG_PROTO_IR_SEND, IOT_SMART_GRID_MID, 0, "<--ir send--:tbd"},
 | |
|     { IOT_SG_CCO_DRV_DUMP_STATUS_ID0, IOT_SMART_GRID_MID, 9,
 | |
|         "cctt_drv_print_log_to_flash cco mr pkg statistics:"
 | |
|         " concurrent mr cnt: %lu, success cnt: %lu;"
 | |
|         " router mr cnt: %lu, success cnt: %lu;"
 | |
|         " cctt mr cnt: %lu, success cnt: %lu;"
 | |
|         " sw_version: %04x, received cctt's cmd cnt: %lu,"
 | |
|         " send to cctt cmd cnt: %lu\n"},
 | |
|     { IOT_SG_CCO_DRV_DUMP_STATUS_ID1, IOT_SMART_GRID_MID, 4,
 | |
|         "cctt_drv_print_log_to_flash finished_restart_pause_resume: "
 | |
|         "%lu:%lu:%lu:%lu" },
 | |
|     { IOT_SG_CCO_TIMESTAMP_STRING, IOT_SMART_GRID_MID, 9,
 | |
|         "iot_sg_cco_print_log_to_flash %lu-%02d-%02d %02d:%02d:%02d, "
 | |
|         "tsfm detect duration:%lu, tsfm detect used time:%lu, "
 | |
|         "tsfm detect done by timeout:%lu" },
 | |
|     { IOT_SG_STA_DRV_PM_TIME_ID, IOT_SMART_GRID_MID, 6,
 | |
|         "iot_sg_sta_get_time_done"
 | |
|         " current meter time: %02d-%02d-%02d %02d:%02d:%02d" },
 | |
|     { IOT_SG_CCO_START_BROADCAST_DATA_LEN_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "broadcast data length = %d\n" },
 | |
|     { IOT_SG_CCO_PRINT_CMD_10H_FN, IOT_SMART_GRID_MID, 1,
 | |
|         "cctt_drv_handle_10h_rt_query:fn = F%d\n" },
 | |
|     { IOT_SG_CCO_ADD_SEC_NODE_ADDR, IOT_SMART_GRID_MID, 8,
 | |
|         "add_sec_node_sn: %d, add_sec_node_proto_type: %d, "
 | |
|         "m_addr = %02X:%02X:%02X:%02X:%02X:%02X\n" },
 | |
|     { IOT_SG_CCO_RMV_SEC_NODE_ADDR, IOT_SMART_GRID_MID, 7,
 | |
|         "add_sec_node_sn: %d, "
 | |
|         "m_addr = %02X:%02X:%02X:%02X:%02X:%02X\n" },
 | |
|     { IOT_SG_CCO_ROUTER_WORK_MODE, IOT_SMART_GRID_MID, 5,
 | |
|         "rt_work_mode: %d (1:study, 0:meter reading), "
 | |
|         "reg_allowed: %d (1:allowed, 0:not allowed), ecc_type: %02X, "
 | |
|         "rate: %d, rate_unit: %d (1:kbps, 0:bps)\n" },
 | |
|     { IOT_SG_CCO_PRINT_CMD_11H_FN, IOT_SMART_GRID_MID, 1,
 | |
|         "cctt_drv_handle_11h_rt_set:fn = F%d\n" },
 | |
|     { IOT_SG_CCO_ADD_SEC_NODE_DATA_LEN_ERROR, IOT_SMART_GRID_MID, 0,
 | |
|         "cctt_drv_handle_11h_rt_set:data_len error!\n" },
 | |
|     { IOT_SG_CCO_PRINT_CMD_12H_FN, IOT_SMART_GRID_MID, 1,
 | |
|         "cctt_drv_handle_12h_rt_ctrl:fn = F%d\n" },
 | |
|     { IOT_SG_CCO_CMD_13H_F1_SEC_NODE_DATA_LEN_ERROR, IOT_SMART_GRID_MID, 0,
 | |
|         "cctt_drv_cmd_13h_f1:data_len error!\n" },
 | |
|     { IOT_SG_UPGRADE_FILE_TYPE, IOT_SMART_GRID_MID, 7,
 | |
|         "sg_upgrade: action = %d, seg_len = %d, file_cmd = %d, "
 | |
|         "is_last = %d, seg_index/total_set_cnt = %d/%d, sn = %d\n" },
 | |
|     { IOT_SG_UPGRADE_TRAIL_RUN_TIMEOUT, IOT_SMART_GRID_MID, 1,
 | |
|         "sg_upgrade: trail run timeout. link_ready = %d\n" },
 | |
|     { IOT_SG_CCO_NET_FMT_DELAY_TIME_OUT, IOT_SMART_GRID_MID, 0,
 | |
|         "cctt_drv_net_formation_delay_timer_func time out\n" },
 | |
|     { IOT_SG_CCO_QUERY_SEC_NODE_REG, IOT_SMART_GRID_MID, 9,
 | |
|         "iot_sg_cco_poll_query_sec_node_reg addr = %02x%02x%02x%02x%02x%02x, "
 | |
|         "dev_type = %lu, cur state = %lu, qr_seq = %lu\n" },
 | |
|     { IOT_SG_CCO_LOAD_WL_FROM_PIB, IOT_SMART_GRID_MID, 8,
 | |
|         "load_wl %02x%02x%02x%02x%02x%02x, pid: %lu, idx: %lu\n" },
 | |
|     { IOT_SG_CCO_GET_STA_MAC_BY_INDEX_ERROR, IOT_SMART_GRID_MID, 2,
 | |
|         "iot_sg_cco_get_sta_mac_by_index error, "
 | |
|         "sta_mac ptr = %08X, index %d.\n" },
 | |
|     { IOT_SG_CCO_GET_STA_MAC_BY_INDEX, IOT_SMART_GRID_MID, 7,
 | |
|         "iot_sg_cco_get_sta_mac_by_index, "
 | |
|         "get %02X:%02X:%02X:%02X:%02X:%02X at index %d\n" },
 | |
|     { IOT_SG_CCO_HANDLE_PLC_MSG_STA_JOIN_INFO, IOT_SMART_GRID_MID, 9,
 | |
|         "cco_join:[%02X:%02X:%02X:%02X:%02X:%02X], tei = %d,"
 | |
|         "pco = %d, level = %d\n" },
 | |
|     { IOT_SG_CCO_HANDLE_PLC_MSG_NW_TOPO_RPT, IOT_SMART_GRID_MID, 9,
 | |
|         "iot_sg_cco_handle_plc: tei = %lu, mac = "
 | |
|         "[%02X:%02X:%02X:%02X:%02X:%02X], proxy = %lu, node ver = %lu\n" },
 | |
|     { IOT_SG_CCO_HANDLE_PLC_MSG_NW_NEIGHBOR_RPT, IOT_SMART_GRID_MID, 3,
 | |
|         "iot_sg_cco_handle_plc: nbnw reply:nid[%d], sp_flag = %d, bd = %d\n" },
 | |
|     { IOT_SG_CCO_NW_FMT_DONE, IOT_SMART_GRID_MID, 0,
 | |
|         "network formation done.\n" },
 | |
|     { IOT_SG_CCO_DL_BUF_GET_RETRY_COUNTER_ERR, IOT_SMART_GRID_MID, 1,
 | |
|         "dl_buf: get retry counter error! type = %d" },
 | |
|     { IOT_SG_CCO_START_DL_SEND_TIMER, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: start dl send timer by add entry.\n" },
 | |
|     { IOT_SG_CCO_START_REFRESH_TIMER_BY_ADD_ENTRY, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: start refresh timer by add entry\n" },
 | |
|     { IOT_SG_CCO_STOP_DL_SEND_TIMER, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: stop dl send timer\n" },
 | |
|     { IOT_SG_CCO_STOP_REFRESH_TIMER, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: stop buf refresh timer\n" },
 | |
|     { IOT_SG_CCO_UL_BUF_CHANGED, IOT_SMART_GRID_MID, 3,
 | |
|         "ul_buf changed: op = %d, entry_cnt = %d, entry_type = %d\n" },
 | |
|     { IOT_SG_CCO_DL_BUF_CHANGED, IOT_SMART_GRID_MID, 3,
 | |
|         "dl_buf changed: op = %d, entry_cnt = %d, entry_type = %d\n" },
 | |
|     { IOT_SG_UL_BUF_REPORT_DATA_TO_CCTT, IOT_SMART_GRID_MID, 2,
 | |
|         "ul buf: report data to cctt, priority = %d, reason = %d.\n" },
 | |
|     { IOT_SG_CCO_STOP_UL_SEND_TIMER, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: stop ul send timer.\n" },
 | |
|     { IOT_SG_CCO_RECV_ACK_REPORT_DATA_TO_CCTT, IOT_SMART_GRID_MID, 0,
 | |
|         "recv ack: report data to cctt\n" },
 | |
|     { IOT_SG_CCO_CACHE_SG_MR_CMD_FAILED, IOT_SMART_GRID_MID, 3,
 | |
|         "iot_sg_cco_cache_sg_mr_cmd failed. "
 | |
|         "AFN = %02X, sn = %d, mr_type = %d\n" },
 | |
|     { IOT_SG_CCO_CACHE_SG_MR_CMD_OK, IOT_SMART_GRID_MID, 3,
 | |
|         "iot_sg_cco_cache_sg_mr_cmd OK. "
 | |
|         "AFN = %02X, sn = %d, mr_type = %d\n" },
 | |
|     { IOT_SG_CCO_GET_DL_RETRY_CNT, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_cco_get_dl_retry_cnt: unknown iot_buf_pool_t!"
 | |
|         " retry counter will return zero times\n" },
 | |
|     { IOT_SG_CCO_GET_UL_RETRY_CNT, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_cco_get_ul_retry_cnt: unknown iot_buf_pool_t!"
 | |
|         " retry counter will return zero times\n" },
 | |
|     { IOT_SG_CCO_CON_MR_EXCEED_MAX_CNT, IOT_SMART_GRID_MID, 2,
 | |
|         "dl_buf: cannot send data. on_line pkt = %d, cnt = %d\n" },
 | |
|     { IOT_SG_STA_SEND_CNT_EXCEED_MAX, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_send_dl_buf_data: exceed max cnt for on STA.\n" },
 | |
|     { IOT_SG_CCO_SEND_EXCEED_MAX_BCAST_CNT, IOT_SMART_GRID_MID, 1,
 | |
|         "dl_buf: exceed max bcast cnt. %d.\n" },
 | |
|     { IOT_SG_CCO_UL_BUF_ENTRY_DATA_TYPE, IOT_SMART_GRID_MID, 1,
 | |
|         "ul_buf: send entry. type = %d\n" },
 | |
|     { IOT_SG_CCO_START_UL_SEND_TIMER, IOT_SMART_GRID_MID, 0,
 | |
|         "start timer for ul buf\n" },
 | |
|     { IOT_SG_CCO_READ_METER_NO_RSP, IOT_SMART_GRID_MID, 4,
 | |
|         "read meter no rsp: mr_type = %d, sn = %lu, send_count = %d,"
 | |
|         " afn = %02X\n" },
 | |
|     { IOT_SG_CCO_START_DL_SEND_TIMER_BY_REFRESH, IOT_SMART_GRID_MID, 0,
 | |
|         "buf_timer: start dl send timer by refresh\n" },
 | |
|     { IOT_SG_CCO_TASK_MSG_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_cco_handle_app_cmd: msg_id = %d\n" },
 | |
|     { IOT_SG_CCO_HANDLE_CLI_MSG_ID, IOT_SMART_GRID_MID, 0,
 | |
|         "iot_sg_cco_handle_cli_msg, unknown msg_id\n" },
 | |
|     { IOT_SG_CCO_NOT_ALLOW_BCAST_MR, IOT_SMART_GRID_MID, 6,
 | |
|         "iot_sg_send_dl_buf_data: not allow to bcast mr."
 | |
|         " pm mac = %02X:%02X:%02X:%02X:%02X:%02X\n" },
 | |
|     { IOT_SG_STA_POWERON_EVT_RPT_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_power_on_report_handle power on event report, seq = %lu\n" },
 | |
|     { IOT_SG_STA_UPGRADE_DBG_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "upgrade_dbg. pos = %d, value = %d\n"},
 | |
|     { IOT_SG_STA_EXT_UPGRADE_DBG_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "ext_dev_upgrade_dbg. pos = %d, state = %d\n"},
 | |
|     { IOT_SG_CCO_DUMP0, IOT_SMART_GRID_MID, 9,
 | |
|         "app_cco_dump sta_cnt:%lu, collector_cnt:%lu, wl_cnt:%lu, "
 | |
|         "sec_node_max_dur:%lu, mr_timeout_cnt:%lu, "
 | |
|         "ul_free_cnt-dl_free_cnt:%08x, power_down_evt_cnt:%lu, "
 | |
|         "power_up_evt_cnt:%lu, average_read-timeout_read:%08x\n" },
 | |
|     { IOT_SG_CCO_DUMP1, IOT_SMART_GRID_MID, 9,
 | |
|         "sec node query cnt:%lu, sec node rpt cnt:%lu, "
 | |
|         "sec node reg success cnt:%lu, evt rcv cnt:%lu, "
 | |
|         "evt rpt cnt:%lu, evt rpt success cnt:%lu, "
 | |
|         "app_proto-cctt_proto-esp-user_type %08x, "
 | |
|         "tsfm detect count:%lu, transformer detect state:%lu" },
 | |
|     { IOT_SG_STA_QUEUE_NW_APP_OTHER_ID, IOT_SMART_GRID_MID, 3,
 | |
|         "iot_sg_sta_queue_nw_app_other drop req frame type %lu id %lu, "
 | |
|         "reason is %lu" },
 | |
|     { IOT_SG_STA_QUERY_MOUDLE_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "iot_sg_sta_gw_query_sec_node_reg drop reason %lu" },
 | |
|     { IOT_SG_STA_POWER_OFF_START_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "sta_power_off_rpt_start ts: %lu s" },
 | |
|     { IOT_SG_STA_POWER_OFF_SEND_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "sta_power_off_rpt cnt: %lu, ts: %lu s" },
 | |
|     { IOT_SG_STA_POWER_OFF_BM_SEND_ID, IOT_SMART_GRID_MID, 1,
 | |
|         "sta_power_off_rpt_bm_send seq: %lu" },
 | |
|     { IOT_SG_STA_POWER_OFF_ADDR_SEND_ID, IOT_SMART_GRID_MID, 2,
 | |
|         "sta_power_off_rpt_addr_send seq: %lu, pm cnt: %lu" },
 | |
|     /*********driver Uart logs***************/
 | |
|     {UART_OPEN_ERROR_ID1, IOT_DRIVER_MID , 1, "cannot open the uart port(%d)"},
 | |
|     {UART_OPEN_ERROR_ID2, IOT_DRIVER_MID , 0, "SetupComm fail"},
 | |
|     {UART_OPEN_ERROR_ID3, IOT_DRIVER_MID , 0, "SetCommTimeouts fail"},
 | |
|     {UART_OPEN_ERROR_ID4, IOT_DRIVER_MID , 0, "GetCommState fail"},
 | |
|     {UART_OPEN_ERROR_ID5, IOT_DRIVER_MID , 0, "SetCommState fail"},
 | |
|     {UART_OPEN_ERROR_ID6, IOT_DRIVER_MID , 0, "open tty uart failed.type=(%d)"},
 | |
| 
 | |
|     /*********driver flash logs**************/
 | |
|     { IOT_DRIVER_SWITCH_PART_ERR_ID, IOT_DRIVER_MID, 1,
 | |
|         "get startup parameters value error, error id: %d"},
 | |
|     { IOT_DRIVER_SWITCH_PART_INFO_ID, IOT_DRIVER_MID, 3, "boot: %d, start: %d, last: %d"},
 | |
|     { IOT_DRIVER_UPGRADE_COMMIT_ID, IOT_DRIVER_MID, 1, "upgrade commit: pos = %d"},
 | |
|     { IOT_DRIVER_UPGRADE_COMMIT_INFO_ID, IOT_DRIVER_MID, 3,
 | |
|         "upgrade: flag = %d, upgrade_id = %d, expect id = %d\n"},
 | |
|     { IOT_DRIVER_UPGRADE_PARAM_DUMP_ID, IOT_DRIVER_MID, 4,
 | |
|         "[upgrade commit]old part:%d, new boot:%d, start:%d,last:%d\n"},
 | |
|     { IOT_DRIVER_UPGRADE_CRC_ERR_ID, IOT_DRIVER_MID, 4,
 | |
|         "upgrade error: part = %d, reason = %x, value1 = %x value2 = %x\n"},
 | |
|     { IOT_DRIVER_INTERRUPT_TRIGGER_ERR_ID, IOT_DRIVER_MID, 1,
 | |
|         "interrupt err trigger cnt:%d"},
 | |
| 
 | |
|     /*********driver riscv32 instruction logs**************/
 | |
|     { IOT_DRIVER_RISCV32_SET_DUMP_VAL_ID, IOT_DRIVER_MID, 4,
 | |
|         "snapshot dump: 0x%08x 0x%08x 0x%08x 0x%08x"},
 | |
|     { IOT_DRIVER_RISCV32_SET_COMPRESSED_ID, IOT_DRIVER_MID, 1,
 | |
|         "compressed instuction(0x%x) error, register value is not in IRAM range"},
 | |
|     { IOT_DRIVER_RISCV32_SET_CONTROL_ID, IOT_DRIVER_MID, 2,
 | |
|         "compressed instuction(0x%x) error, jump address(0x%08x) is not in IRAM range"},
 | |
| 
 | |
|     /****************************************/
 | |
|     { IOT_PIB_INIT_ID, IOT_PIB_MID, 0, "iot_pib_init"},
 | |
|     { IOT_PIB_DEINIT_ID, IOT_PIB_MID, 0, "iot_pib_deinit"},
 | |
|     { IOT_PIB_LOAD_ID, IOT_PIB_MID, 0, "iot_pib_load" },
 | |
|     { IOT_PIB_GET_SECTION_ID, IOT_PIB_MID, 0, "iot_pib_get_section" },
 | |
|     { IOT_PIB_GET_FULL_SECTION_ID, IOT_PIB_MID, 0, "iot_pib_get_full_section" },
 | |
|     { IOT_PIB_ACQUIRE_COMMIT_REF_ID, IOT_PIB_MID, 1, "iot_pib_acquire_commit_ref %d"},
 | |
|     { IOT_PIB_RELEASE_COMMIT_REF_ID, IOT_PIB_MID, 1, "iot_pib_release_commit_ref %d" },
 | |
|     { IOT_PIB_COMMIT_ID, IOT_PIB_MID, 0, "iot_pib_commit"},
 | |
| 
 | |
|     { IOT_PIB_ERR_REPORT_ID, IOT_PIB_MID , 4, "fun:%p piberr_id:%d read only:%04x writable:%04x" },
 | |
|     { IOT_PIB_WARNING_REPORT_ID, IOT_PIB_MID, 4, "fun:%p pibwarn_id:%d %04x %04x" },
 | |
| 
 | |
|     { IOT_PIB_SWAP_BUFF_COPY_OK_ID, IOT_PIB_MID, 1, "%p pib copy swap buff" },
 | |
|     { IOT_PIB_WRITE_FLASH_COMPLETE_ID, IOT_PIB_MID, 1, "%p pib commit flash complete" },
 | |
| 
 | |
| 
 | |
|     { IOT_PIB_TASK_RECV_MSG_ID, IOT_PIB_MID, 1, "pibtask recv msg type:%d"},
 | |
|     { IOT_PIB_TASK_COMMIT_MSG_ID, IOT_PIB_MID, 2, "iot_pib_handle_commit_msg sectionid=%d type=%d" },
 | |
|     { IOT_PIB_TASK_CANCEL_MSG_ID, IOT_PIB_MID, 2, "pibtask msg type:%lu msg id: %lu canceled"},
 | |
| 
 | |
|     { IOT_PIB_TIMER_START_ID, IOT_PIB_MID, 2, "%p pib start commit timer at %d" },
 | |
|     { IOT_PIB_TIMER_HANDLE_MSG_ID, IOT_PIB_MID, 0, "iot_pib_handle_timer_msg" },
 | |
| 
 | |
|     { IOT_PIB_INFO_ID, IOT_PIB_MID, 3, "%p pib info print:%x %x"},
 | |
|     { IOT_PIB_R_INFO_ID, IOT_PIB_MID, 3, "read only --> %p pib info print:%x %x"},
 | |
|     { IOT_PIB_W_INFO_ID, IOT_PIB_MID, 5, "writable --> %p pib info print:%x %x %08x %08x" },
 | |
|     { IOT_PIB_BOARD_INFO_ID, IOT_PIB_MID, 5, "wdg_rst_cnt:%d, sft_rst_cnt:%d,"
 | |
|         "power_rst_cnt:%d last reset type:0x%x soft reset reason:0x%x\n" },
 | |
| 
 | |
|     /*mac log*/
 | |
|     { IOT_MAC_BEACON_TX_NTB_INFO, PLC_MAC_BEACON_MID, 3, "mac_beacon_tx: \
 | |
|             bc recv ntb %lu, bc send ntb %lu, bp cnt %lu\n"},
 | |
|     { IOT_MAC_BEACON_RX_NTB_INFO, PLC_MAC_BEACON_MID, 4, "mac_beacon_rx: \
 | |
|             curr ntb:%lu, start ntb %lu, nid %lu phase %lu\n\n"},
 | |
|     /****************************************/
 | |
|     /* mac data log */
 | |
|     { IOT_MAC_RX_MSDU_LENGTH_ID, PLC_MAC_DATA_MID, 1, "msdu len %d formed\n"},
 | |
|     { IOT_MAC_RX_MSDU_CRC_CNT_ID, PLC_MAC_DATA_MID, 1, "msdu crc err cnt:%d\n"},
 | |
|     { IOT_MAC_RX_MSDU_PTR_ID, PLC_MAC_DATA_MID, 1, "mac_data_rx_msdu, msdu->buf = %p\n"},
 | |
|     { IOT_MAC_WARING_NO_MSDU_FOR_SEND_ID, PLC_MAC_DATA_MID, 1, \
 | |
|         "warning:mac_send_msdu_ex_internal:no msdu for sending,lid=%d\r\n"},
 | |
| 
 | |
|     /* mac rx hw log */
 | |
|     { IOT_MAC_RX_SOF_ID, PLC_MAC_RX_HW_MID, 5, \
 | |
|         "delimiter = 0x%x, network = 0x%x, nid = 0x%x, sof dtei = 0x%x, sof stei = 0x%x\n"},
 | |
|     { IOT_MAC_RX_WORKTPYE_NID_ID, PLC_MAC_RX_HW_MID, 3, \
 | |
|         "delimiter = 0x%x, network = 0x%x, nid = 0x%x\n"},
 | |
|     { IOT_MAC_PPM_SYNC_ID, PLC_MAC_RX_HW_MID, 6, \
 | |
|         "ntb_p=0x%08x%08x, ntb_d=0x%08x%08x, calc_ppm=%d, real_ppm=%d\n"},
 | |
|     { IOT_MAC_RX_RINGID_DELI_ID, PLC_MAC_RX_HW_MID, 2, "ring_id = %d delimiter_type = %d\n"},
 | |
|     { IOT_MAC_RX_PLD_DATA_ID, PLC_MAC_RX_HW_MID, 4, "0x%x  0x%x  0x%x  0x%x  "},
 | |
|     { IOT_MAC_RX_PORT_PBNUM_ID, PLC_MAC_RX_HW_MID, 3, "proto1 = 0x%x,proto2 = 0x%x,pb_num=0x%x\n"},
 | |
|     { IOT_MAC_RX_PB_HEADER_ID, PLC_MAC_RX_HW_MID, 3, "ssn = %d, msdu_start = %d, msdu_end = %d\n"},
 | |
|     { IOT_MAC_SG_FC_INFO_ID, PLC_MAC_RX_HW_MID, 3, \
 | |
|         "delimiter = 0x%x, network = 0x%x, nid = 0x%x\n"},
 | |
|     { IOT_MAC_SPG_FC_INFO_ID, PLC_MAC_RX_HW_MID, 3, \
 | |
|         "delimiter = 0x%x, access_ind = 0x%x, snid = 0x%x\n"},
 | |
|     { IOT_MAC_GP_FC_INFO_ID, PLC_MAC_RX_HW_MID, 3, \
 | |
|         "delimiter = 0x%x, access_ind = 0x%x, snid = 0x%x\n"},
 | |
|     { IOT_MAC_RX_DSTEI_SNR_TMI_ID, PLC_MAC_RX_HW_MID, 6, \
 | |
|         "-----rx stei %d, dtei %d,snr:%d,tmi:%d-%d," \
 | |
|         "rx_phase = %d" \
 | |
|         "\n"},
 | |
|     { IOT_MAC_RX_BUF_ID, PLC_MAC_RX_HW_MID, 1, "mac_rx_hw_mpdu_internal, msdu->buf = %p"},
 | |
|     { IOT_MAC_RX_SOF_DROP_ID, PLC_MAC_RX_HW_MID, 2, \
 | |
|         "sof pb dropped: is_not_my_ucast = %d, is_vdev_found = %d\n"},
 | |
|     { IOT_MAC_RX_BC_PB_PLD_CRC_ID, PLC_MAC_RX_HW_MID, 4, \
 | |
|         "rx bcn:nid=0x%x,stei=%d,pb crc=%d,pld crc=%d\n"},
 | |
|     { IOT_MAC_RX_VDEV_NTB_ID, PLC_MAC_RX_HW_MID, 1, "vdev ntb %ld\n"},
 | |
|     { IOT_MAC_RX_CTS_ID, PLC_MAC_RX_HW_MID, 0, "mac_rx_hw_mpdu_internal, CTS rx\n" },
 | |
|     { IOT_MAC_RX_RTS_ID, PLC_MAC_RX_HW_MID, 0, "mac_rx_hw_mpdu_internal, RTS rx\n" },
 | |
|     { IOT_MAC_RX_NNCCO_ID, PLC_MAC_RX_HW_MID, 0, "mac_rx_hw_mpdu_internal, NNCCO rx\n"},
 | |
|     { IOT_MAC_RX_SOUND_ID, PLC_MAC_RX_HW_MID, 0, "mac_rx_hw_mpdu_internal, Sound rx\n"},
 | |
|     { IOT_MAC_RX_SOUND_ACK_ID, PLC_MAC_RX_HW_MID, 0, "mac_rx_hw_mpdu_internal, Sound ack rx\n"},
 | |
|     { IOT_MAC_RX_UNKNOW_MPDU_ID, PLC_MAC_RX_HW_MID, 0, "-----Unknown MPDU!-----\n"},
 | |
|     { IOT_MAC_RX_MPDU_NOTDONE_ID, PLC_MAC_RX_HW_MID, 0, "-----Not done MPDU!-----\n"},
 | |
|     { IOT_MAC_RX_ABORT_FIRST_PB_ID, PLC_MAC_RX_HW_MID, 5, "rx_abort:nid=0x%x,stei=%d,delim=%d, "\
 | |
|                                                           "rx_phase = %d, reg_phase = %d\n"},
 | |
|     { IOT_MAC_RX_ABORT_LAST_PB_ID, PLC_MAC_RX_HW_MID, 2, "rx abort:reason-%d, ntb=0x%x\n"},
 | |
|     { IOT_MAC_RX_OVERFLOW_ID, PLC_MAC_RX_HW_MID, 1, "rx overflow:reason-%d\n"},
 | |
|     { IOT_MAC_RX_OVERWRITE_ID,  PLC_MAC_RX_HW_MID, 5, "mac HW overwrite found @0x%x,"\
 | |
|             "4 pointers' are: 0x%x, 0x%x, 0x%x, 0x%x\n"},
 | |
|     { IOT_MAC_RX_MSDU_LEN_INVALID_ID,  PLC_MAC_RX_HW_MID, 1, "mac rx msdu len is 0 cnt: %d\n"},
 | |
| 
 | |
|     /*mac tx hw log*/
 | |
|     { IOT_MAC_TX_HW_DUMMY_END_ID, PLC_MAC_TX_HW_MID, 0, "dummy end\n"},
 | |
|     { IOT_MAC_TX_HW_DUMMY_FREE_ID, PLC_MAC_TX_HW_MID, 0, "dummy freed\n"},
 | |
|     { IOT_MAC_TX_ABORT_ID, PLC_MAC_TX_HW_MID, 1, "tx_abort:reason=%d\n"},
 | |
|     { IOT_MAC_TX_HW_FLUSH, PLC_MAC_TX_HW_MID, 3, "hwq[qid].desc=%d, tx_done=%d\n"},
 | |
| 
 | |
|     /* mac tx log */
 | |
|     { IOT_MAC_TX_DONE_ID, PLC_MAC_TX_MID, 1, "hwq:%d tx_done triggered.\n"},
 | |
|     { IOT_MAC_TXDONE_OK_ID, PLC_MAC_TX_MID, 2, "tx ok=0x%x,tx done=0x%x.\n"},
 | |
|     { IOT_MAC_TXDONE_TS_ID, PLC_MAC_TX_MID, 2, "TS:local=0x%x,sack=0x%x.\n"},
 | |
|     { IOT_MAC_TXDONE_SACK_ID, PLC_MAC_TX_MID, 2, "sack:miss=0x%x-err=0x%x.\n"},
 | |
|     { IOT_MAC_TX_POWER_CHANGE_ID, PLC_MAC_TX_MID, 1, "auto change tx power, reason bitmap = 0x%x."},
 | |
| 
 | |
| 
 | |
|     /*mac rate log*/
 | |
|     { IOT_MAC_RATE_UPDATA_ID, PLC_MAC_RATE_MID, 4, \
 | |
|         "---snr=%d,load=%d, peer_tei=%d, peer_sub = %d, " \
 | |
|         "peer_snr=%d\n"},
 | |
| 
 | |
|     /*mac rx reorder log*/
 | |
|     { IOT_MAC_PLD_INFO, PLC_MAC_REORDER_MID, 2, "msdu pad len %d formed with %d PBs\n"},
 | |
|     { IOT_MAC_PB_CNT_ID, PLC_MAC_REORDER_MID, 3, \
 | |
|         "pb_rdy_cnt:%d,pb_total_cnt:%d.alloc:%d\n"},
 | |
|     { IOT_MAC_CHECK_SSN_ID, PLC_MAC_REORDER_MID, 5, \
 | |
|         "check ssn, ssn:%d, total_cnt:%d, msdu_st:%d, msdu_end:%d, is_retry:%d\n"},
 | |
| 
 | |
|     /*mac crc log*/
 | |
|     { IOT_MAC_PB_CRC_ERE_ID, PLC_MAC_CRC_MID, 2, "fcserr = %d, pb_crc_err = %d\n"},
 | |
|     /* mac status log */
 | |
|     { IOT_MAC_STATUS0_ID, PLC_MAC_STATUSE_MID, 9,
 | |
|         "mac_ntb_st=0x%x,"
 | |
|         "msdu_null_first_pb_cnt=%d,"
 | |
|         "mac_tx_underflow_force_cnt=%d,"
 | |
|         "mac_rx_half_pkt_cnt=%d,"
 | |
|         "mac_rx_mpdu_not_done_in_att_cnt=%d,"
 | |
|         "mac_rx_proto_nomatch_cnt=%d,"
 | |
|         "mac_rx_bcn_ok_cnt=%d,"
 | |
|         "mac_rx_bcn_upload_cnt=%d,"
 | |
|         "isr_cnt=%d\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS1_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_rx_msdu_cnt = %d, mac_rx_mpdu_cnt = %d, mac_rx_pb_cnt = %d, mac_rx_fc_err_cnt = %d, "\
 | |
|         "mac_rx_bcn_pb_err_cnt = %d, mac_rx_sof_pb_err_cnt = %d, mac_rx_pld_err_cnt = %d, "
 | |
|         "mac_rx_abort_cnt = %d, mac_rx_overflow_cnt = %d\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS2_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_rx_unicast_cnt = %d, mac_rx_broadcast_cnt = %d, mac_rx_mpdu_type_err_cnt = %d, " \
 | |
|         "mac_mpdu_tx_cnt = %d, mac_tx_no_ack_cnt = %d, "\
 | |
|         "mac_mpdu_tx_unicast_cnt = %d, mac_mpdu_tx_broadcast_cnt = %d, "
 | |
|         "mac_no_msdu_to_send_cnt = %d, msdu_crc_err_cnt = %d\n"},
 | |
| 
 | |
|     /* rate id and pbnum sof err status */
 | |
|     { IOT_MAC_STATUS3_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_0_pbnum_1_sof_err_cnt = %d, mac_tmi_0_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_0_pbnum_3_sof_err_cnt = %d, mac_tmi_0_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_1_pbnum_1_sof_err_cnt = %d, mac_tmi_1_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_1_pbnum_3_sof_err_cnt = %d, mac_tmi_1_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_2_pbnum_1_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS4_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_2_pbnum_2_sof_err_cnt = %d, mac_tmi_2_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_tmi_2_pbnum_4_sof_err_cnt = %d, mac_tmi_3_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_tmi_3_pbnum_2_sof_err_cnt = %d, mac_tmi_3_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_tmi_3_pbnum_4_sof_err_cnt = %d, mac_tmi_4_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_tmi_4_pbnum_2_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS5_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_4_pbnum_3_sof_err_cnt = %d, mac_tmi_4_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_6_pbnum_1_sof_err_cnt = %d, mac_tmi_6_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_6_pbnum_3_sof_err_cnt = %d, mac_tmi_7_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_7_pbnum_1_sof_err_cnt = %d, mac_tmi_7_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_7_pbnum_3_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS6_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_9_pbnum_1_sof_err_cnt = %d, mac_tmi_9_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_9_pbnum_3_sof_err_cnt = %d, mac_tmi_9_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_11_pbnum_1_sof_err_cnt = %d, mac_tmi_11_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_tmi_11_pbnum_3_sof_err_cnt = %d, mac_tmi_11_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_tmi_12_pbnum_1_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS7_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_12_pbnum_2_sof_err_cnt = %d, mac_tmi_12_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_tmi_12_pbnum_4_sof_err_cnt = %d, mac_tmi_13_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_tmi_13_pbnum_2_sof_err_cnt = %d, mac_tmi_13_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_tmi_13_pbnum_4_sof_err_cnt = %d, mac_tmi_14_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_tmi_14_pbnum_2_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS8_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tmi_14_pbnum_3_sof_err_cnt = %d, mac_tmi_14_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_extmi_6_pbnum_1_sof_err_cnt = %d, mac_extmi_6_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_extmi_6_pbnum_3_sof_err_cnt = %d, mac_extmi_6_pbnum_4_sof_err_cnt = %d, "
 | |
|         "mac_extmi_11_pbnum_1_sof_err_cnt = %d, mac_extmi_11_pbnum_2_sof_err_cnt = %d, "
 | |
|         "mac_extmi_11_pbnum_3_sof_err_cnt = %d\n"},
 | |
|     { IOT_MAC_STATUS9_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_extmi_11_pbnum_4_sof_err_cnt = %d, mac_extmi_12_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_extmi_12_pbnum_2_sof_err_cnt = %d, mac_extmi_12_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_extmi_12_pbnum_4_sof_err_cnt = %d, mac_extmi_13_pbnum_1_sof_err_cnt = %d, "
 | |
|         "mac_extmi_13_pbnum_2_sof_err_cnt = %d, mac_extmi_13_pbnum_3_sof_err_cnt = %d, "
 | |
|         "mac_extmi_13_pbnum_4_sof_err_cnt = %d\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS10_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_rx_msdu_len_is_0_cnt = %lu, "
 | |
|         "power cap flag = %d, "
 | |
|         "mac auto power req bitmap = 0x%x, "
 | |
|         "mac_zc_reset_hw_cnt = %lu, "
 | |
|         "mac_zc_event_cnt = %lu, "
 | |
|         "mac_zc_req_cnt = %lu, "
 | |
|         "mac_zc_phase_para = 0x%x,"
 | |
|         "mac_dsr_isr_sync_cnt= %lu, "
 | |
|         "mac_timeout_stream_del_cnt=%u\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS11_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "mac_tx_no_ack_pco_cnt = %lu, "
 | |
|         "mac_tx_unicast_pco_cnt = %lu, "
 | |
|         "mac_rx_scak_pb_all_err_cnt = %lu, "
 | |
|         "mac_rx_scak_pb_all_err_cnt_pco = %lu, "
 | |
|         "mac_rx_fc_err_no_match_cnt = %lu, "
 | |
|         "mac_tx_flush_bcsma_cnt = %lu, "
 | |
|         "mac_zc_phase_A_chg_cnt = %lu, "
 | |
|         "mac_zc_phase_B_chg_cnt = %lu, "
 | |
|         "mac_zc_phase_C_chg_cnt = %lu\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS12_ID, PLC_MAC_STATUSE_MID, 8,
 | |
|         "mac_sync_ntb_overflow_way1 = 0x%x, "
 | |
|         "mac_sync_ntb_overflow_way2 = 0x%x, "
 | |
|         "mac_sync_ntb_overflow_way3 = 0x%x, "
 | |
|         "mac_sync_ntb_overflow_way4 = 0x%x, "
 | |
|         "mac_sync_ntb_overflow_way5 = 0x%x, "
 | |
|         "mac_sync_ntb_overflow_way6 = 0x%x, "
 | |
|         "bcn crc err cnt = %lu, "
 | |
|         "fc_invalid_cnt = %u"},
 | |
| 
 | |
|     { IOT_MAC_STATUS13_ID, PLC_MAC_STATUSE_MID, 7, \
 | |
|         "msdu_tx_cnt = %lu, dump[0] = 0x%08x, dump[1] = 0x%08x, "
 | |
|         "dump[2] = 0x%08x, dump[3] = 0x%08x, dump[4] = 0x%08x, "
 | |
|         "dump[5] = 0x%08x\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS14_ID, PLC_MAC_STATUSE_MID, 8, \
 | |
|         "mac_sts, dbg_reg0 get 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, "
 | |
|         "0x%x, 0x%x\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS15_ID, PLC_MAC_STATUSE_MID, 8, \
 | |
|         "mac_sts, dbg_reg1 get 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, "
 | |
|         "0x%x, 0x%x\n"},
 | |
| 
 | |
|     { IOT_MAC_STATUS16_ID, PLC_MAC_STATUSE_MID, 8, \
 | |
|         "tx_sts_dump. %u, %u, %u, 0x%08x, %u, %u, %u, %u\n"},
 | |
| 
 | |
|     /* rf mac cnt*/
 | |
|     { IOT_MAC_STATUS17_ID, PLC_MAC_STATUSE_MID, 9, \
 | |
|         "txok_withpld = %lu, txok_withoutpld = %lu"
 | |
|         "rxsigok = %u, loststf&rxsigerr= %u, rxphrok_withpld = %u,"
 | |
|         "rxphrok_withoutpld = %u, rxphrerr = %u, rxpldok = %u,"
 | |
|         "rxplderr = %u\n"},
 | |
| 
 | |
|     /*mac desc log*/
 | |
|     { IOT_MAC_DESC1_ID, PLC_MAC_DESC_ENGINE_MID, 8, \
 | |
|         "PLC_MAC_MSDU_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_MAC_PEER_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_MAC_STREAM_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_TX_MPDU_START_POOL:used:%d, total_freemin:0x%x\n"},
 | |
|     { IOT_MAC_DESC2_ID, PLC_MAC_DESC_ENGINE_MID, 8, \
 | |
|         "PLC_TX_MPDU_END_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_TX_PB_START_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_RX_PB_DESC_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_SCHED_CMD_LIST_POOL:used:%d, total_freemin:0x%x\n"},
 | |
|     { IOT_MAC_DESC3_ID, PLC_MAC_DESC_ENGINE_MID, 4, \
 | |
|         "PLC_TX_DUMMY_NODE_POOL:used:%d, total_freemin:0x%x, "
 | |
|         "PLC_MAC_MSDU_FRAME_POOL:used:%d, total_freemin:0x%x\n"},
 | |
|     { IOT_MAC_DESC5_ID, PLC_MAC_DESC_ENGINE_MID, 6, \
 | |
|         "stream_overflow_max:%d, peer_overflow_del_cnt:0x%x, "
 | |
|         "plc_ntb_ppm_update_cnt = %u, rf_ntb_ppm_update_cnt = %u"
 | |
|         "rf_plc_ntb_ppm = 0x%08x, rf_hw_ppm = 0x%08x\n"},
 | |
| 
 | |
|     /* mac hw tsfm log */
 | |
|     { IOT_MAC_HW_TSFM_ID, PLC_MAC_HW_TSFM_MID, 6, \
 | |
|         "mac_hw_tsfm_data = 0x%x,0x%x,0x%x,0x%x, "
 | |
|         "mac_hw_tsfm_tx_req_cnt = %u, "
 | |
|         "mac_hw_tsfm_tx_complete_cnt = %u\n"},
 | |
| 
 | |
|     { IOT_MAC_ZC_LTS_TO_NTB_ID, PLC_MAC_ZC_MID, 6,
 | |
|         "zc_lts_to_ntb %u, bcn_rx_lts = %u, bcn_tx_ntb = %u, "
 | |
|         "ntb_ppm = %d, lts = %u, ntb = %u\n"},
 | |
| 
 | |
|     /****************************************/
 | |
| 
 | |
|     /* phy debug log */
 | |
|     { IOT_PHY_STATUS0_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "ppm_value = %d, rx_dc_pga0 = %d, rx_dc_pgf0 = %d, rx_dc_pga1 = %d, "
 | |
|         "rx_dc_pgf1 = %d, rx_dc_pga2 = %d, rx_dc_pgf2 = %d, rx_dc_pga3 = %d, "
 | |
|         "rx_dc_pgf3 = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS1_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "rx_dc_pga4 = %d, rx_dc_pgf4 = %d, rx_dc_pga5 = %d, rx_dc_pgf5 = %d, "
 | |
|         "rx_dc_pga6 = %d, rx_dc_pgf6 = %d, rx_dc_pga7 = %d, rx_dc_pgf7 = %d, "
 | |
|         "tx_dc0 = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS2_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "tx_dc1 = %d, tx_dc2 = %d, tx_dc3 = %d, dc_cal_cnt = %d, os_cnt = %d, "
 | |
|         "phy_rx_pkt_cnt = %d, phy_rx_fc_ok_cnt = %d, phy_rx_fc_fail_cnt = %d, "
 | |
|         "phy_rx_pld_ok_cnt = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS3_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "phy_rx_pld_fail_cnt = %d, phy_tx_pkt_cnt = %d, granite_ret0 = 0x%x, "
 | |
|         "granite_ret1 = 0x%x, granite_ret2 = 0x%x, granite_ret3 = 0x%x, "
 | |
|         "granite_ret4 = 0x%x, granite_ret5 = 0x%x, granite_ret6 = 0x%x\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS4_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "granite_ret7 = 0x%x, granite_ret8 = 0x%x, granite_ret9 = 0x%x, "
 | |
|         "granite_ret10 = 0x%x, temp_res = %d, bb_rt0_bd0_reg = %d, "
 | |
|         "bb_rt0_bd1_reg = %d, bb_rt2_bd0_reg = %d, bb_rt1_bd0_reg = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS5_ID, PLC_PHY_STATUS_MID, 8, \
 | |
|         "bb_rt1_bd1_reg = %d, bb_rt1_bd2_reg = %d, bb_r0_b0_reg = %d, "
 | |
|         "bb_r0_b1_reg = %d, bb_r0_b2_reg = %d, bb_r1_b0_reg = %d, "
 | |
|         "bb_r1_b1_reg = %d, bb_r1_b2_reg = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS6_ID, PLC_PHY_STATUS_MID, 5, \
 | |
|         "phy_gain_adjust_info = 0x%x, phy_mode = %d, spur7 = %u, "
 | |
|         "phy_init_cnt = %d, phy_reinit_cnt = %d\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS7_ID, PLC_PHY_STATUS_MID, 9, \
 | |
|         "spur_total_num = %u, spur_current_num = %u, spur0 = %u, spur1 = %u, "
 | |
|         "spur2 = %u, spur3 = %u, spur4 = %u, spur5 = %u, spur6 = %u\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS8_ID, PLC_PHY_STATUS_MID, 7, \
 | |
|         "nf_192 = %u, nf_384 = %u, nf_768 = %u, nf_1536 = %u, nf_3072 = %u, "
 | |
|         "nf_6144 = %u, spike_en: %u\n"},
 | |
| 
 | |
|     { IOT_PHY_STATUS9_ID, PLC_PHY_STATUS_MID, 4, \
 | |
|         "FORCE_0:%x,FORCE_1:%x,FORCE_2:%x,ANA_TOP:%x\n"},
 | |
| 
 | |
|     /****************************************/
 | |
| 
 | |
|     /* iot_ping log*/
 | |
|     { IOT_PING_RECV_MSDU, IOT_APP_PING_MID, 8,
 | |
|       "ping_app recv_msdu: %d[%02X] mac:[%2X:%2X:%2X:%2X:%2X:%2X]"},
 | |
|     { IOT_PING_SEND_ACK, IOT_APP_PING_MID, 6,
 | |
|       "STA [%2X:%2X:%2X:%2X:%2X:%2X] send ping ack"},
 | |
|     { IOT_PING_SEND_PING_BCAST, IOT_APP_PING_MID, 2,
 | |
|         "send ping bcast. msg_type = %d, data value = %d"},
 | |
|     /* iot_cli_host_interface*/
 | |
|     { IOT_CLI_HOST_INTERFACE_MAC_LAYER_READY_INFO, IOT_CLI_HOST, 0, "MAC layer is ready!"},
 | |
|     { IOT_CLI_HOST_INTERFACE_MAC_LAYER_NOT_READY_INFO, IOT_CLI_HOST, 0, "MAC layer is NOT ready!"},
 | |
|     { IOT_CLI_HOST_SWITCH_BOOT_PART_INFO, IOT_CLI_HOST, 0, "CLI switch boot part" },
 | |
|     /*iot_cli log*/
 | |
|     { IOT_CLI_READY_INFO, IOT_CLI_MID, 0, "CLI is ready"},
 | |
|     /*uart task log*/
 | |
|     { IOT_UART_DROP_ONE_PKG, IOT_UART_TASK_MID, 1, "uart drop one pkt,len(%d)"},
 | |
|     { IOT_UART_SEND_PKT_TOO_LARGE, IOT_UART_TASK_MID, 2, "send data is too large pkt(%d), buf(%d)"},
 | |
| 
 | |
|     /* iot_plcuart log*/
 | |
|     { IOT_PLCUART_RECV_MSDU, IOT_APP_PLCUART_MID, 8,
 | |
|       "plcuart_app recv_msdu: %d[%02X] mac:[%2X:%2X:%2X:%2X:%2X:%2X]"},
 | |
|     { IOT_PLCUART_SEND_ACK, IOT_APP_PLCUART_MID, 6,
 | |
|       "STA [%2X:%2X:%2X:%2X:%2X:%2X] send plcuart ack"},
 | |
|     { IOT_PLCUART_SEND_MSDU_BCAST, IOT_APP_PLCUART_MID, 2,
 | |
|         "send plcuart bcast. msg_type = %d, data value = %d"},
 | |
| 
 | |
|     /* iot_hw_topo log */
 | |
|     { IOT_HW_TOPO_ID_STATUS, IOT_WQ_TOPO_MID, 5, "hw_topo_dump:fs %lu,"
 | |
|         "dma info:overflow_cnt %lu overrun_cnt %lu handle_0_cnt %lu "
 | |
|         "pend_desc_max %lu" },
 | |
|     { IOT_HW_TOPO_SEND_LOAD_ID, IOT_WQ_TOPO_MID, 6, "iot_plc_hw_tsfm_send_load:"
 | |
|         " reason %lu, phase %d, timeout %u, bit_dur %d, period %d, duty %d"},
 | |
|     { IOT_HW_TOPO_SEND_PA_ID, IOT_WQ_TOPO_MID, 1, "iot_plc_hw_tsfm_send_pa:"
 | |
|         " freq %luHz"},
 | |
|     { IOT_HW_TOPO_SEND_ZC_ID, IOT_WQ_TOPO_MID, 6, "iot_plc_hw_tsfm_send_zc:"
 | |
|         " result:%d, reason %lu, encode %d, duty %lu, ahead %lu, send_bm %02x"},
 | |
| 
 | |
|     { IOT_HW_TOPO_SEND_LOAD_COMPLETE_ID, IOT_WQ_TOPO_MID, 3,
 | |
|         "iot_plc_hw_tsfm_send_load_complete: reason %lu, send count %lu,"
 | |
|         " used time %lu ms"},
 | |
| 
 | |
|     /* riscv dbg log*/
 | |
|     { IOT_RISCV_DUMP_EXCP_INFO_ID, RISCV_DUMP_EXCP_MID, 0, "exception registers dump info"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_RA, RISCV_DUMP_GREG_MID, 1, "ra = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_SP, RISCV_DUMP_GREG_MID, 1, "sp = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_GP, RISCV_DUMP_GREG_MID, 1, "gp = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_TP, RISCV_DUMP_GREG_MID, 1, "tp = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_T0_2, RISCV_DUMP_GREG_MID, 2, "t%d = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_FP, RISCV_DUMP_GREG_MID, 1, "fp = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_S1, RISCV_DUMP_GREG_MID, 1, "s1 = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_A0_7, RISCV_DUMP_GREG_MID, 2, "a%d = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_S2_11, RISCV_DUMP_GREG_MID, 2, "s%d = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_T3_4, RISCV_DUMP_GREG_MID, 2, "t%d = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_T5, RISCV_DUMP_GREG_MID, 1, "t5 = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_GREG_ID_T6, RISCV_DUMP_GREG_MID, 1, "t6 = 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_TRACE_ID, RISCV_DUMP_TRACE_MID, 3, "func: 0x%08x, s0: 0x%08x, stack: 0x%08x"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_00, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Instruction address misaligned]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_01, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Instruction access fault]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_02, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Illegal instruction]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_03, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Breakpoint]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_04, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Load address misaligned]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_05, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Load access fault]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_06, RISCV_DUMP_DREG_MID, 1, "mcause: 0x%02x[Store address misaligned]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID_07, RISCV_DUMP_DREG_MID, 1, "mcase: 0x%02x[Store access fault]"},
 | |
|     { IOT_RISCV_DUMP_DREG_MCAUSE_ID, RISCV_DUMP_DREG_MID, 1, "mcase: 0x%02x"},
 | |
|     { IOT_RISCV_DUMP_DREG_MEPC_MBAD_ID, RISCV_DUMP_DREG_MID, 2, "mepc: 0x%08x, mbadaddr: 0x%08x"},
 | |
| 
 | |
| };
 | |
| 
 | |
| void write_to_file(void* buf, int len, FILE* fd)
 | |
| {
 | |
|     fwrite(buf, 1, len, fd);
 | |
|     fflush(fd);
 | |
| }
 | |
| int main()
 | |
| {
 | |
|     FILE* fd = NULL;
 | |
|     char tmp[255] = { 0 };
 | |
|     char* data_msc_path = "data.msc";
 | |
|     fd = fopen(data_msc_path, "wb+");
 | |
|     write_to_file("VERSION:", strlen("VERSION:"), fd);
 | |
|     sprintf(tmp, "%s", FW_VERSION);
 | |
|     write_to_file(tmp, strlen(tmp), fd);
 | |
|     write_to_file("\n", 1, fd);
 | |
| 
 | |
|     for(int i = 0; i < sizeof(dbglog_msg_list) / sizeof(dbglog_msg_entry_t); i++)
 | |
|     {
 | |
|         sprintf(tmp, "%d", dbglog_msg_list[i].msgid);
 | |
|         write_to_file(&tmp, strlen(tmp), fd);
 | |
|         write_to_file(",", 1, fd);
 | |
|         memset(tmp, 0, sizeof(tmp));
 | |
|         sprintf(tmp, "%d", dbglog_msg_list[i].module_id);
 | |
|         write_to_file(&tmp, strlen(tmp), fd);
 | |
|         write_to_file(",", 1, fd);
 | |
|         sprintf(tmp, "%d", dbglog_msg_list[i].argnum);
 | |
|         write_to_file(&tmp, strlen(tmp), fd);
 | |
|         write_to_file(",\"", 2, fd);
 | |
|         write_to_file(dbglog_msg_list[i].format, strlen(dbglog_msg_list[i].format), fd);
 | |
|         write_to_file("\"", 1, fd);
 | |
|         write_to_file("\n", 1, fd);
 | |
|     }
 | |
|     fclose(fd);
 | |
|     return 0;
 | |
| }
 | |
| 
 |