📄 jdd_logapi.h.svn-base
字号:
#endif
#else
/** @cond */
#define JDD_LOG_INFO0(pucFormat)
#define JDD_LOG_INFO1(pucFormat, p1)
#define JDD_LOG_INFO2(pucFormat, p1, p2)
#define JDD_LOG_INFO3(pucFormat, p1, p2, p3)
#define JDD_LOG_INFO4(pucFormat, p1, p2, p3, p4)
#define JDD_LOG_INFO5(pucFormat, p1, p2, p3, p4, p5)
#define JDD_LOG_INFO_TCS(pucMsg, pmValue)
#define JDD_LOG_INFO_HEX(pucMsg, pucDumpInfo, iLength)
#define JDD_LOG_INFO_MEM(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif /* LOG_LEVEL_INFORMATION */
#if ((JC_LOG_LEVEL >= LOG_LEVEL_WARNING) && (0 != __MODULE_ID__))
/**
* @brief Used to log the warning message with one parameter.
*/
#define JDD_LOG_WARNING0(pucFormat) JDD_LOG0(LOG_LEVEL_WARNING, pucFormat)
/**
* @brief Used to log the warning message with two parameter, where the first parameter should be format value.
*/
#define JDD_LOG_WARNING1(pucFormat, p1) JDD_LOG1(LOG_LEVEL_WARNING, pucFormat, p1)
/**
* @brief Used to log the warning message with three parameter, where the first parameter should be format value.
*/
#define JDD_LOG_WARNING2(pucFormat, p1, p2) JDD_LOG2(LOG_LEVEL_WARNING, pucFormat, p1, p2)
/**
* @brief Used to log the warning message with four parameter, where the first parameter should be format value.
*/
#define JDD_LOG_WARNING3(pucFormat, p1, p2, p3) JDD_LOG3(LOG_LEVEL_WARNING, pucFormat, p1, p2, p3)
/**
* @brief Used to log the warning message with five parameter, where the first parameter should be format value.
*/
#define JDD_LOG_WARNING4(pucFormat, p1, p2, p3, p4) JDD_LOG4(LOG_LEVEL_WARNING, pucFormat, p1, p2, p3, p4)
/**
* @brief Used to log the warning message with six parameter, where the first parameter should be format value.
*/
#define JDD_LOG_WARNING5(pucFormat, p1, p2, p3, p4, p5) JDD_LOG5(LOG_LEVEL_WARNING, pucFormat, p1, p2, p3, p4, p5)
/**
* @brief Used to log the warning message with two parameter, where the first parameter should be JC_INT8 string
* and second parameter should be of type JC_CHAR *
*/
#define JDD_LOG_WARNING_TCS(pucMsg, pmValue) JDD_LOG_TCS(LOG_LEVEL_WARNING, pucMsg, pmValue)
#if (LOG_BINARY_HEX)
#define JDD_LOG_WARNING_HEX(pucMsg, pucDumpInfo, iLength) JDD_LOG_HEX(LOG_LEVEL_WARNING, pucDumpInfo, iLength)
#else
/** @cond */
#define JDD_LOG_WARNING_HEX(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif
#if (LOG_BINARY_MEM)
#define JDD_LOG_WARNING_MEM(pucMsg, pucDumpInfo, iLength) JDD_LOG_MEM(LOG_LEVEL_WARNING, pucDumpInfo, iLength)
#else
/** @cond */
#define JDD_LOG_WARNING_MEM(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif
#else
/** @cond */
#define JDD_LOG_WARNING0(pucFormat)
#define JDD_LOG_WARNING1(pucFormat, p1)
#define JDD_LOG_WARNING2(pucFormat, p1, p2)
#define JDD_LOG_WARNING3(pucFormat, p1, p2, p3)
#define JDD_LOG_WARNING4(pucFormat, p1, p2, p3, p4)
#define JDD_LOG_WARNING5(pucFormat, p1, p2, p3, p4, p5)
#define JDD_LOG_WARNING_TCS(pucMsg, pmValue)
#define JDD_LOG_WARNING_HEX(pucMsg, pucDumpInfo, iLength)
#define JDD_LOG_WARNING_MEM(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif /* LOG_LEVEL_WARNING */
#if ((JC_LOG_LEVEL >= LOG_LEVEL_FATAL) && (0 != __MODULE_ID__))
/**
* @brief Used to log the fatal message with one parameter.
*/
#define JDD_LOG_FATAL0(pucFormat) JDD_LOG0(LOG_LEVEL_FATAL, pucFormat)
/**
* @brief Used to log the fatal message with two parameter, where the first parameter should be format value.
*/
#define JDD_LOG_FATAL1(pucFormat, p1) JDD_LOG1(LOG_LEVEL_FATAL, pucFormat, p1)
/**
* @brief Used to log the fatal message with three parameter, where the first parameter should be format value.
*/
#define JDD_LOG_FATAL2(pucFormat, p1, p2) JDD_LOG2(LOG_LEVEL_FATAL, pucFormat, p1, p2)
/**
* @brief Used to log the fatal message with four parameter, where the first parameter should be format value.
*/
#define JDD_LOG_FATAL3(pucFormat, p1, p2, p3) JDD_LOG3(LOG_LEVEL_FATAL, pucFormat, p1, p2, p3)
/**
* @brief Used to log the fatal message with five parameter, where the first parameter should be format value.
*/
#define JDD_LOG_FATAL4(pucFormat, p1, p2, p3, p4) JDD_LOG4(LOG_LEVEL_FATAL, pucFormat, p1, p2, p3, p4)
/**
* @brief Used to log the fatal message with six parameter, where the first parameter should be format value.
*/
#define JDD_LOG_FATAL5(pucFormat, p1, p2, p3, p4, p5) JDD_LOG5(LOG_LEVEL_FATAL, pucFormat, p1, p2, p3, p4, p5)
/**
* @brief Used to log the fatal message with two parameter, where the first parameter should be JC_INT8 string
* and second parameter should be of type JC_CHAR *
*/
#define JDD_LOG_FATAL_TCS(pucMsg, pmValue) JDD_LOG_TCS(LOG_LEVEL_FATAL, pucMsg, pmValue)
#if (LOG_BINARY_HEX)
#define JDD_LOG_FATAL_HEX(pucMsg, pucDumpInfo, iLength) JDD_LOG_HEX(LOG_LEVEL_FATAL, pucDumpInfo, iLength)
#else
/** @cond */
#define JDD_LOG_FATAL_HEX(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif
#if (LOG_BINARY_MEM)
#define JDD_LOG_FATAL_MEM(pucMsg, pucDumpInfo, iLength) JDD_LOG_MEM(LOG_LEVEL_FATAL, pucDumpInfo, iLength)
#else
/** @cond */
#define JDD_LOG_FATAL_MEM(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif
#else
/** @cond */
#define JDD_LOG_FATAL0(pucFormat)
#define JDD_LOG_FATAL1(pucFormat, p1)
#define JDD_LOG_FATAL2(pucFormat, p1, p2)
#define JDD_LOG_FATAL3(pucFormat, p1, p2, p3)
#define JDD_LOG_FATAL4(pucFormat, p1, p2, p3, p4)
#define JDD_LOG_FATAL5(pucFormat, p1, p2, p3, p4, p5)
#define JDD_LOG_FATAL_TCS(pucMsg, pmValue)
#define JDD_LOG_FATAL_HEX(pucMsg, pucDumpInfo, iLength)
#define JDD_LOG_FATAL_MEM(pucMsg, pucDumpInfo, iLength)
/** @endcond */
#endif /* LOG_LEVEL_FATAL */
/**
* @brief The Log layer shall be initialized using this API.
* @param[in] pvLogReference Specifies the reference which shall be used by the log module
*
* This function should be invoked by the application layer before invoking the Jataayu
* terminal components.
* @note This should be part of the application startup code.
*/
void jdd_LogInitialize (void *pvLogReference) ;
/**
* @brief The Log layer shall be deinitialized using this API.
* @param[in] pvLogReference Specifies the reference which shall be used by the log module
*
* This function should be invoked by the application layer after deinitializing all the
* Jataayu terminal components.
*/
void jdd_LogDeInitialize (void *pvLogReference) ;
/**
* @brief JDD API for logging the message
* @param[in] logInfo The log level (e.g. LOG_LEVEL_INFORMATION/LOG_LEVEL_WARNING/LOG_LEVEL_FATAL)
* @param[in] iModuleNum The ID of the module where the log is placed
* @param[in] pcFileName The full path of the source file where the log is
* placed, or module name or NULL if LOG_FILE_NAMES is turned off.
* @param[in] iLineNumber The line number in the source file where the log is placed
* @param[in] pcFormat The printf-like format string of the log statement.
* @param[in] ... The variable arguments ...
*/
void jdd_LogMsg (JC_INT32 logInfo, JC_INT32 iModuleNum, const JC_INT8 *pcFileName, JC_INT32 iLineNumber, const JC_INT8 *pcFormat, ...) ;
/**
* @brief JDD API for logging for JC_CHAR format
* @param[in] logInfo The log level (e.g. LOG_LEVEL_INFORMATION/LOG_LEVEL_WARNING/LOG_LEVEL_FATAL)
* @param[in] iModuleNum The ID of the module where the log is placed
* @param[in] pcFileName The full path of the source file where the log is
* placed, or module name or NULL if LOG_FILE_NAMES is turned off.
* @param[in] iLineNumber The line number in the source file where the log is placed
* @param[in] pcMsg The Message associated to the JC_CHAR string.
* @param[in] pmValue The Value which nees to be logged
*/
void jdd_LogMsgTcs (JC_INT32 logInfo, JC_INT32 iModuleNum, const JC_INT8 *pcFileName, JC_INT32 iLineNumber, const JC_INT8 *pcMsg, const JC_CHAR *pmValue) ;
/**
* @brief JDD API for dumping the data in the hex format
* @param[in] logInfo The log level (e.g. LOG_LEVEL_INFORMATION/LOG_LEVEL_WARNING/LOG_LEVEL_FATAL)
* @param[in] iModuleNum The ID of the module where the log is placed
* @param[in] pcFileName The full path of the source file where the log is
* placed, or module name or NULL if LOG_FILE_NAMES is turned off.
* @param[in] iLineNumber The line number in the source file where the log is placed
* @param[in] pcMsgInfo The Message associated to the data.
* @param[in] pucDumpInfo The content which nees to be dumped as the hex format in the log
* @param[in] iLength The Size of the content
*/
void jdd_LogDumpHex (JC_INT32 logInfo, JC_INT32 iModuleNum, const JC_INT8 *pcFileName, JC_INT32 iLineNumber, const JC_INT8 *pcMsgInfo, JC_UINT8 *pucDumpInfo, JC_INT32 iLength) ;
/**
* @brief JDD API for logging the data in the same content
* @param[in] logInfo The log level (e.g. LOG_LEVEL_INFORMATION/LOG_LEVEL_WARNING/LOG_LEVEL_FATAL)
* @param[in] iModuleNum The ID of the module where the log is placed
* @param[in] pcFileName The full path of the source file where the log is
* placed, or module name or NULL if LOG_FILE_NAMES is turned off.
* @param[in] iLineNumber The line number in the source file where the log is placed
* @param[in] pcMsgInfo The Message associated to the data.
* @param[in] pucDumpInfo The content which nees to be logged
* @param[in] iLength The Size of the content
*/
void jdd_LogDumpMem (JC_INT32 logInfo, JC_INT32 iModuleNum, const JC_INT8 *pcFileName, JC_INT32 iLineNumber, const JC_INT8 *pcMsgInfo, JC_UINT8 *pucDumpInfo, JC_INT32 iLength) ;
/*Added for previous backward compatiblity dependancies*/
void jdd_LogPrintf (JC_INT32 eLogLevelInfo, const JC_INT8 *pcModuleName,
const JC_INT8 *pcFormat, ...) ;
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -