![]() |
WE310F5
39.00.000
|
This file contains the public APIs and structures of the debug module. More...
Go to the source code of this file.
Data Structures | |
struct | M2MB_DBG_CFG |
Debug module configuration context. More... | |
#define | M2MB_DBG_EMERG(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_EMERG, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_ALERT(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_ALERT, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_CRIT(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_CRIT, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_ERROR(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_ERROR, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_WARN(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_WARN, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_NOTICE(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_NOTICE, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_INFO(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_INFO, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_DBG_DEBUG(...) m2mb_dbg_msg_log(M2MB_DBG_LOG_SEVERITY_DEBUG, __func__, __LINE__, __VA_ARGS__) |
#define | M2MB_FUNC_ENTRY |
#define | M2MB_FUNC_EXIT |
#define | M2MB_FUNC_EXIT_RC(x) |
enum | M2MB_DBG_LOG_SEVERITY { M2MB_DBG_LOG_SEVERITY_INVALID = -1, M2MB_DBG_LOG_SEVERITY_LOGING_OFF = 0, M2MB_DBG_LOG_SEVERITY_EMERG, M2MB_DBG_LOG_SEVERITY_ALERT, M2MB_DBG_LOG_SEVERITY_CRIT, M2MB_DBG_LOG_SEVERITY_ERROR, M2MB_DBG_LOG_SEVERITY_WARN, M2MB_DBG_LOG_SEVERITY_NOTICE, M2MB_DBG_LOG_SEVERITY_INFO, M2MB_DBG_LOG_SEVERITY_DEBUG } |
M2MB_DBG_LOG_SEVERITY defines different debug category. More... | |
typedef enum M2MB_DBG_LOG_SEVERITY | M2MB_DBG_LOG_SEVERITY_T |
M2MB_DBG_LOG_SEVERITY defines different debug category. More... | |
typedef INT32(* | M2MB_DBG_CMD_CB_T) (VOID *userCtx, UINT32 len, UINT8 *cmd) |
M2MB_DBG_CMD_CB_T defines the command handler to handle the received command. More... | |
typedef VOID(* | M2MB_DBG_SEND_T) (VOID *userCtx, UINT32 len, UINT8 *data) |
M2MB_DBG_SEND_T defines the debug log send API the send the logs. More... | |
typedef VOID(* | M2MB_DBG_RECV_PROC_DONE_T) (VOID *userCtx) |
M2MB_DBG_RECV_PROC_DONE_T defines the API to indicate the receive process is done. More... | |
typedef struct M2MB_DBG_CFG | M2MB_DBG_CFG_T |
Debug module configuration context. More... | |
INT32 | m2mb_dbg_init (M2MB_DBG_CFG_T *pCfg, M2MB_UART_CONFIG_T *uart_cfg) |
m2mb_dbg_init is called to initialize the debug module. More... | |
INT32 | m2mb_dbg_is_init (VOID) |
m2mb_dbg_is_init is called to check if dbg module is initialized. More... | |
INT32 | m2mb_dbg_prepare_for_deepsleep (VOID) |
m2mb_dbg_prepare_for_deepsleep is called to make the dbg module ready for deepsleep. More... | |
INT32 | m2mb_dbg_reinit (VOID) |
m2mb_dbg_reinit is called after coming out of deepsleep. More... | |
INT32 | m2mb_dbg_msg_log (M2MB_DBG_LOG_SEVERITY_T severity, char const *sourceFilePath, UINT32 lineNumber, char *format,...) |
m2mb_dbg_msg_log is called to log debug information. More... | |
INT32 | m2mb_dbg_consol_print (char *format,...) |
m2mb_dbg_consol_print is called to print to the console. More... | |
M2MB_STATUS_T | m2mb_dbg_set_severity (M2MB_DBG_LOG_SEVERITY_T severityLevel) |
m2mb_dbg_set_severity is called to set the severity level to log. More... | |
M2MB_DBG_LOG_SEVERITY_T | m2mb_dbg_get_severity (VOID) |
m2mb_dbg_get_severity is called to get the severity level. More... | |
void | m2mb_data_tx_done_cb (UINT32 num_bytes, void *cb_data) |
m2mb_data_tx_done_cb is called to inform data transfer is complete. More... | |
void | m2mb_data_rx_cb (UINT32 num_bytes, void *cb_data) |
m2mb_data_rx_cb is called to inform data received which needs to be processed for command input handlling. More... | |
This file contains the public APIs and structures of the debug module.
we866e4/epl/inc/modules/m2mb_dbg.h
Debug provides APIs to do debug logging.
Debug logs can be enabled to send debug logs either over a serial port or over UDP/TCP. The debug logs can be categorized and can be filtered at compile or run time.
Currently, it supports sending logs over a serial port. The logs will come as below:- time from beginning in msec:severity:file name:line number:user log\r\n example:- 305419896:ERROR:main.c:149:This is debug log:len = 4, i = 4, p = Telit-4-D
Here :
Definition in file m2mb_dbg.h.