📄 iccp_log.c
字号:
#endif mms_debug_sel |= MMS_LOG_IND; }/************************************************************************//* cfg_mlog_mms_log_conf *//************************************************************************/ST_VOID cfg_mlog_mms_log_conf (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_conf: entered." );#endif mms_debug_sel |= MMS_LOG_CONF; }/************************************************************************//* cfg_mlog_mms_log_req *//************************************************************************/ST_VOID cfg_mlog_mms_log_req (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_req: entered." );#endif mms_debug_sel |= MMS_LOG_REQ; }/************************************************************************//* cfg_mlog_mms_log_resp *//************************************************************************/ST_VOID cfg_mlog_mms_log_resp (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_resp: entered." );#endif mms_debug_sel |= MMS_LOG_RESP; }/************************************************************************//* cfg_mlog_mms_log_vm *//************************************************************************/ST_VOID cfg_mlog_mms_log_vm (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_vm: entered." );#endif mms_debug_sel |= MMS_LOG_VM; }/************************************************************************//* cfg_mlog_mms_log_data *//************************************************************************/ST_VOID cfg_mlog_mms_log_data (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_data: entered." );#endif mms_debug_sel |= MMS_LOG_DATA; }/************************************************************************//* cfg_mlog_mms_log_err *//************************************************************************/ST_VOID cfg_mlog_mms_log_err (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_err: entered." );#endif mms_debug_sel |= MMS_LOG_ERR; }/************************************************************************//* cfg_mlog_mms_log_nerr *//************************************************************************/ST_VOID cfg_mlog_mms_log_nerr (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_nerr: entered." );#endif mms_debug_sel |= MMS_LOG_NERR; }/************************************************************************//* cfg_mlog_mms_log_pdu *//************************************************************************/ST_VOID cfg_mlog_mms_log_pdu (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_pdu: entered." );#endif mms_debug_sel |= MMS_LOG_PDU; }/************************************************************************//* cfg_mlog_mms_log_config *//************************************************************************/ST_VOID cfg_mlog_mms_log_config (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_config: entered." );#endif mms_debug_sel |= MMS_LOG_CONFIG; }/************************************************************************//* cfg_mlog_mms_log_rt *//************************************************************************/ST_VOID cfg_mlog_mms_log_rt (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_rt: entered." );#endif mms_debug_sel |= MMS_LOG_RT; }/************************************************************************//* cfg_mlog_mms_log_rtaa *//************************************************************************/ST_VOID cfg_mlog_mms_log_rtaa (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_rtaa: entered." );#endif mms_debug_sel |= MMS_LOG_RTAA; }/************************************************************************//* cfg_mlog_mms_log_aa *//************************************************************************/ST_VOID cfg_mlog_mms_log_aa (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mms_log_aa: entered." );#endif mms_debug_sel |= MMS_LOG_AA; }/************************************************************************//* cfg_mlog_mmsconf_print *//************************************************************************/ST_VOID cfg_mlog_mmsconf_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mmsconf_print: entered." );#endif mms_debug_sel |= MMS_LOG_USR_CONF; }/************************************************************************//* cfg_mlog_mmsind_print *//************************************************************************/ST_VOID cfg_mlog_mmsind_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_mmsind_print: entered." );#endif mms_debug_sel |= MMS_LOG_USR_IND; }/************************************************************************//* cfg_mlog_acse_ind_print *//************************************************************************/ST_VOID cfg_mlog_acse_ind_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_acse_ind_print: entered." );#endif s_debug_sel |= ACSE_IND_PRINT; }/************************************************************************//* cfg_mlog_acse_cnf_print *//************************************************************************/ST_VOID cfg_mlog_acse_cnf_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_acse_cnf_print: entered." );#endif s_debug_sel |= ACSE_CNF_PRINT; } /************************************************************************//* cfg_mlog_acse_err_print *//************************************************************************/ST_VOID cfg_mlog_acse_err_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_acse_err_print: entered." );#endif s_debug_sel |= ACSE_ERR_PRINT; } /************************************************************************//* cfg_mlog_acse_dec_print *//************************************************************************/ST_VOID cfg_mlog_acse_dec_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_acse_dec_print: entered." );#endif s_debug_sel |= ACSE_DEC_PRINT; }/************************************************************************//* cfg_mlog_acse_nerr_print *//************************************************************************/ST_VOID cfg_mlog_acse_nerr_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_acse_nerr_print: entered." );#endif s_debug_sel |= ACSE_NERR_PRINT; }/************************************************************************//* cfg_mlog_ica_err_log *//************************************************************************/ST_VOID cfg_mlog_ica_err_log (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_ica_err_log: entered." );#endif IC_SET_LOG_MASK1( ICA_LOG_ERR ); }/************************************************************************//* cfg_mlog_ica_flow_log *//************************************************************************/ST_VOID cfg_mlog_ica_flow_log (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_ica_flow_log: entered." );#endif IC_SET_LOG_MASK1( ICA_LOG_FLOW ); }/************************************************************************//* cfg_mlog_ica_data_log *//************************************************************************/ST_VOID cfg_mlog_ica_data_log (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_ica_data_log: entered." );#endif IC_SET_LOG_MASK1( ICA_LOG_DATA ); }/************************************************************************//* cfg_mlog_osak_print *//************************************************************************/ST_VOID cfg_mlog_osak_print (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_osak_print: entered." );#endif#if defined( vms ) s_debug_sel |= OSAK_PRINT;#endif } /************************************************************************//* cfg_mlog_osak_deb *//************************************************************************/ST_VOID cfg_mlog_osak_deb (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_osak_deb: entered." );#endif#if defined( vms ) s_debug_sel |= OSAK_DEB;#endif }/************************************************************************//* cfg_mlog_end *//************************************************************************/ST_VOID cfg_mlog_end (ST_VOID) {#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_end: entered." );#endif /* Pop from stack the mblog_file_mem_attr_kwtbl to return to base of */ /* the state table */ if ( cfg_tbl_pop( 1 ) != SD_SUCCESS ) cfg_set_config_err(); cfg_set_endfile_ok(); }/************************************************************************//* cfg_mlog_dump_file_name *//************************************************************************/ST_VOID cfg_mlog_dump_file_name (ST_VOID) { ST_CHAR *fname;#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_dump_file_name: entered." );#endif /* Found 'DumpFileName' keyword, read the user defined log file name */ if ( ( fname = cfg_get_string_ptr() ) != NULL ) { strcpy( logmem_file_name, fname ); sLogCtrl->mc.dumpFileName = logmem_file_name; } else { cfg_set_config_err(); } }/************************************************************************//* cfg_mlog_time_enable *//************************************************************************/ST_VOID cfg_mlog_time_enable (ST_VOID) {ST_UINT16 val;#ifdef S_TABLE_DEBUG printf( "\ncfg_mlog_time_enable: entered." );#endif /* Found 'TimeEnable' keyword, get the value */ if ( cfg_get_ushort( ( ST_UINT16 * )&val ) == SD_SUCCESS ) { if ( val == 1 ) { M_SET_CTRL( LOG_TIMEDATE_EN | LOG_TIME_EN ); /* Standard Time/Date logging */ } else if ( val == 2 ) { M_SET_CTRL( LOG_DIFFTIME_EN | LOG_TIME_EN ); /* Elapsed time logging */ } } else cfg_set_config_err(); }/************************************************************************//* dyn_slog_fun *//* The MMS-EASE S_LOG facility has been attached via a global function *//* pointer to call this function each time a messages is to be written *//* to the S_LOG file. The default action is to send the same message *//* to the screen so it looks like the program is doing something. *//************************************************************************/ST_VOID dyn_slog_fun(LOG_CTRL *lc, ST_INT logType, ST_CHAR *sourceFile, ST_INT lineNum, ST_INT count, ST_CHAR *slog_buf) { printf( "\n%s", slog_buf ); }/************************************************************************//* slogDynOn *//* set slog_dyn_log_fun *//************************************************************************/ST_VOID slogDynOn ( ) { slog_dyn_log_fun = dyn_slog_fun; printf ("\n\nScreen Logging is ENABLED!"); }/************************************************************************//* slogDynOff *//* clear slog_dyn_log_fun *//************************************************************************/ST_VOID slogDynOff ( ) { slog_dyn_log_fun = NULL; printf ("\n\nScreen Logging is DISABLED!"); }/************************************************************************//* dyn_iccp_slog_fun: *//************************************************************************/ST_VOID dyn_iccp_slog_fun (icShort icInd, icShort icErrNum, icChar *msg, icInt lTxt) { slogx( 1, /* do it parameter from */ sLogCtrl, /* The Slog ctrl structure ptr */ ( ST_INT )icErrNum, /* Log Type */ __FILE__, /* This is the File */ __LINE__, /* This is the line in the file */ msg ); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -