|
|
|
|
/****************************************************************************/
|
|
|
|
|
/* Copyright (c) 2007,<2C><><EFBFBD>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾ */
|
|
|
|
|
/* All rights reserved. */
|
|
|
|
|
/* */
|
|
|
|
|
/* ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
/** ʵ<>ֶ<EFBFBD><D6B6><EFBFBD>log<6F><67>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @file ai_log.h */
|
|
|
|
|
/* */
|
|
|
|
|
/* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ע<><D7A2> */
|
|
|
|
|
/* 2007/07/24 TYJ <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> */
|
|
|
|
|
/****************************************************************************/
|
|
|
|
|
#ifndef IEC61850_AI_LOG_H
|
|
|
|
|
#define IEC61850_AI_LOG_H
|
|
|
|
|
|
|
|
|
|
#include "ai_def.h"
|
|
|
|
|
#include "slog.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C"{
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FILE_EN
|
|
|
|
|
//#define AI_LOG_STDOUT_EN
|
|
|
|
|
#define AI_LOG_USER_EN
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FILE_NAME "iec61850.log" /**< Ĭ<><C4AC><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FILE_SIZE 1000000L /**< <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><F3B2BBB3><EFBFBD>1M */
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_ERR 0x00000001 /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2>־ */
|
|
|
|
|
#define AI_LOG_FLOW 0x00000002 /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2>־ */
|
|
|
|
|
#define AI_LOG_DATA 0x00000004 /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2>־ */
|
|
|
|
|
#define AI_LOG_TEST 0x00000008 /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2>־ */
|
|
|
|
|
extern ST_UINT ai_log_sel; /**< <20><>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern SD_CONST ST_CHAR *SD_CONST ai_log_err_logstr; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
extern SD_CONST ST_CHAR *SD_CONST ai_log_flow_logstr; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
extern SD_CONST ST_CHAR *SD_CONST ai_log_data_logstr; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
extern SD_CONST ST_CHAR *SD_CONST ai_log_test_logstr; /**< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD>û<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô˽ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
|
|
|
|
* @param logStr Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
* @return ST_VOID
|
|
|
|
|
*/
|
|
|
|
|
extern ST_VOID (*user_log_put)(ST_CHAR *logStr);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ.
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>ʱ<EFBFBD>䡢Դ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fmtΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>b...Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_ERR0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERR6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_err_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e, f);}
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_ERR0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_ERR1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_ERR2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_ERR3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_ERR4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_ERR5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_FUN_ERR6(fmt,a,b,c,d,e,f)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ.
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>ʱ<EFBFBD>䡢Դ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fmtΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>b...Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_FLOW0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOW6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_flow_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e, f);}
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_FLOW0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_FLOW1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_FLOW2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_FLOW3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_FLOW4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_FLOW5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_FUN_FLOW6(fmt,a,b,c,d,e,f)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ.
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>ʱ<EFBFBD>䡢Դ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fmtΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>b...Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_TEST0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TEST6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_test_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e, f);}
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_TEST0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_TEST1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_TEST2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_TEST3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_TEST4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_TEST5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_FUN_TEST6(fmt,a,b,c,d,e,f)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ.
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>ʱ<EFBFBD>䡢Դ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fmtΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>b...Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_DATA0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATA6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slog (sLogCtrl, ai_log_data_logstr, thisFileName, __LINE__, fmt,a, b, c, d, e, f);}
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|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_ERRC0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_ERRC6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_ERR) _slogc (sLogCtrl, fmt,a, b, c, d, e, f);}
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_ERRC0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_ERRC1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_ERRC2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FU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
#define AI_LOG_FUN_FLOWC0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_FLOWC6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_FLOW) _slogc (sLogCtrl, fmt,a, b, c, d, e, f);}
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_FLOWC0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_FLOWC1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_FLOWC2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_FLOWC3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_FLOWC4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_FLOWC5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_F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
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TESTC2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TESTC3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TESTC4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TESTC5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_TESTC6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_TEST) _slogc (sLogCtrl, fmt,a, b, c, d, e, f);}
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_TESTC0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_TESTC1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_TESTC2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_TESTC3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_TESTC4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_TESTC5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_FUN_TESTC6(fmt,a,b,c,d,e,f)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD>Ϣ.
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>ʱ<EFBFBD>䡢Դ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>fmtΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>a<EFBFBD><EFBFBD>b...Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
*/
|
|
|
|
|
#if defined(DEBUG_SISCO) /**< <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define AI_LOG_FUN_DATAC0(fmt) {\
|
|
|
|
|
if(ai_log_sel & AI_LOG_DATA) \
|
|
|
|
|
_slogc (sLogCtrl, fmt);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC1(fmt,a) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC2(fmt,a,b) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a, b);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC3(fmt,a,b,c) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a, b, c);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC4(fmt,a,b,c,d) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a, b, c, d);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC5(fmt,a,b,c,d,e) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a, b, c, d, e);}
|
|
|
|
|
|
|
|
|
|
#define AI_LOG_FUN_DATAC6(fmt,a,b,c,d,e,f) {\
|
|
|
|
|
if (ai_log_sel & AI_LOG_DATA) _slogc (sLogCtrl, fmt,a, b, c, d, e, f);}
|
|
|
|
|
#else
|
|
|
|
|
#define AI_LOG_FUN_DATAC0(fmt)
|
|
|
|
|
#define AI_LOG_FUN_DATAC1(fmt,a)
|
|
|
|
|
#define AI_LOG_FUN_DATAC2(fmt,a,b)
|
|
|
|
|
#define AI_LOG_FUN_DATAC3(fmt,a,b,c)
|
|
|
|
|
#define AI_LOG_FUN_DATAC4(fmt,a,b,c,d)
|
|
|
|
|
#define AI_LOG_FUN_DATAC5(fmt,a,b,c,d,e)
|
|
|
|
|
#define AI_LOG_FUN_DATAC6(fmt,a,b,c,d,e,f)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
ST_VOID ai_init_log(ST_VOID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|