⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icta_cfg.c

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 C
📖 第 1 页 / 共 5 页
字号:
  {    {"Name",		cfgClientVarName,	NULL},    {"Scope",		cfgClientVarScope,	NULL},    {"Type",		cfgClientVarType,	NULL},    {"Writeable",	cfgClientVarWriteable,	NULL},    {"%ClientVarsEnd",	cfgClientVarsEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientMsg [] =  {    {"MsgRef", 			cfgClientMsgRef,	NULL},    {"Scope",			cfgClientMsgScope,	NULL},    {"MaxSize",			cfgClientMsgSize,	NULL},    {"%ClientMessageEnd",	cfgClientMsgEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientDevice [] =  {    {"Name",			cfgClientDeviceName,	NULL},    {"Scope",		 	cfgClientDeviceScope,	NULL},    {"Type",		 	cfgClientDeviceType,	NULL},    {"SBO",		 	cfgClientDeviceSBO,	NULL},    {"%ClientDeviceEnd", 	cfgClientDeviceEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientSAcct [] =  {    {"AcctRef",			cfgClientSAcctRef,	NULL},    {"Scope",			cfgClientSAcctScope,	NULL},    {"Type",			cfgClientSAcctType,	NULL},    {"ValueType",		cfgClientSAcctValue,	NULL},    {"Rows",			cfgClientSAcctRows,	NULL},    {"MatrixRef",		cfgClientSAcctMatrix,	NULL},    {"%ClientSimpleAcctEnd",	cfgClientSAcctEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientMatrix [] =  {    {"MatrixRef",		cfgClientMatrixRef,	NULL},    {"MatrixScope",		cfgClientMatrixScope,	NULL},    {"%ClientMatrixAcctEnd",	cfgClientMatrixEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientCond [] =  {    {"LinkName",		cfgClientCondName,	NULL},    {"Condition",		cfgClientCondCond,	NULL},    {"%ClientTACondEnd",	cfgClientCondEnd,	NULL},    { NULL, NULL, NULL}  };struct cfg_kw_el kwtblClientTran [] =  {    {"TranGroupRefNo",		cfgClientTranRef,	NULL},    {"LinkName",		cfgClientTranLinkName,	NULL},    {"Periodic",		cfgClientTranPeriodic,	NULL},    {"PerInt",			cfgClientTranInterval,	NULL},    {"Offset",			cfgClientTranOffset,	NULL},    {"RBE",			cfgClientTranRBE,	NULL},    {"BufferInterval",		cfgClientTranBufInt,	NULL},    {"IntegrityInterval",	cfgClientTranIntInt,	NULL},    {"Critical",		cfgClientTranTranCrit,	NULL},    {"Start",			cfgClientTranStart,	NULL},    {"StartTime",		cfgClientTranStartTime, NULL},    {"Vars",			cfgClientTranVars,	NULL},    {"%ClientTranGroupEnd",	cfgClientTranGroupEnd,	NULL},    { NULL, NULL, NULL}  };  /************************************************************************//* 			ictaConfigure					*//* set up any globals and read the config file				*//************************************************************************/ST_RET ictaConfigure(ST_VOID)  {  pstVCC = chk_calloc(1, sizeof(ICTA_VCC));  pstVCC->typeList = NULL;  pstVCC->remoteList = NULL;  /* Read the configuration file                                	*/  return (readCfgFile (ICTA_CFG_FILE));  }/************************************************************************//* 			readCfgFile                          		*//************************************************************************/static ST_RET readCfgFile (ST_CHAR *configFile)  {ST_RET sRet;  /* Initialize the logging	*//*  cfg_log_mask = CFG_LOG_ERR | CFG_LOG_FLOW; */  cfg_log_mask = CFG_LOG_ERR;  /* process the file	*/  sRet = cfg_process_file (configFile, kwtblCfgBegin);	  return (sRet);  }/************************************************************************//*			cfgConfigBegin					*//* key word = 'ConfigurationBegin'					*//************************************************************************/static ST_VOID  cfgConfigBegin (ST_VOID)  {  /* Initial state for parsing the configuration file			*/  /* Configuration file successfully opened, read first section		*/  if (cfg_tbl_push (kwtblBegin) != SD_SUCCESS)     cfg_set_config_err ();  }/************************************************************************//*			cfgConfigEnd					*//* keyword  = 'ConfigurationEnd'					*//************************************************************************/static ST_VOID  cfgConfigEnd (ST_VOID)  {  if (cfg_tbl_pop (1) != SD_SUCCESS)    cfg_set_config_err ();  cfg_set_endfile_ok ();	/* this is the end of configuration	*/  }/************************************************************************//*			cfgGeneralBegin					*//************************************************************************/static ST_VOID cfgGeneralBegin (ST_VOID)  {  if (cfg_tbl_push (kwtblGeneralAttr) != SD_SUCCESS)       cfg_set_config_err ();  }/************************************************************************//*			cfgGeneralMultiThread				*//* found 'MultipleThreads' keyword					*//************************************************************************/static ST_VOID cfgGeneralMultiThread (ST_VOID)  {#ifdef SISCO_THREADS  bMultiThreads = icTrue;#else  ICA_Log_Cfg0("Multiple Threads are not supported!");#endif    }/************************************************************************//*			cfgGeneralAutoResponse				*//* found 'AutoResponse' keword						*//************************************************************************/static ST_VOID cfgGeneralAutoResponse (ST_VOID)  {  bAutoResponse = icTrue;  }/************************************************************************//*			cfgGeneralRunVerbose				*//* found 'RunVerbose' keword						*//************************************************************************/static ST_VOID cfgGeneralRunVerbose (ST_VOID)  {  bRunVerbose = icTrue;  }/************************************************************************//*			cfgGeneralIncrementVars				*//* found 'IncrementVars' keword						*//************************************************************************/static ST_VOID cfgGeneralIncrementVars (ST_VOID)  {  bIncrementVars = icTrue;  }/************************************************************************//*			cfgGeneralNewB4B8				*//* found 'UseNewB4B8' keword						*//************************************************************************/static ST_VOID cfgGeneralNewB4B8 (ST_VOID)  {  bUseNewB4B8 = icTrue;  }/************************************************************************//*			cfgGeneralReceiveDsTs				*//* found 'UseReceiveDsTs' keword					*//************************************************************************/static ST_VOID cfgGeneralReceiveDsTs (ST_VOID)  {  uReceiveDsTsRpt = incomingDsTs;  }/************************************************************************//*			cfgGeneralUseApTitles				*//************************************************************************/static ST_VOID cfgGeneralUseApTitles (ST_VOID)  {  icEnableApTitleCheck = icTrue;  }/************************************************************************//*			cfgGeneralUseNewDefLink				*//* found 'UseNewDefLink'                                                *//************************************************************************/static ST_VOID cfgGeneralUseNewDefLink (ST_VOID)  {  bUseNewDefLink = icTrue;  icIncRemArOnLinkDown = icTrue;  }/************************************************************************//*			cfgGeneralUseNewStartRem			*//* found 'UseNewStartRemote'                                            *//************************************************************************/static ST_VOID cfgGeneralUseNewStartRem (ST_VOID)  {  bUseNewStartRem = icTrue;  }/************************************************************************//*			cfgGeneralEnd					*//************************************************************************/static ST_VOID cfgGeneralEnd (ST_VOID)  {  if (cfg_tbl_pop (1) != SD_SUCCESS)    cfg_set_config_err ();  }/************************************************************************//*			cfgLocalBegin					*//************************************************************************/static ST_VOID cfgLocalBegin (ST_VOID)  {  if (cfg_tbl_push (kwtblLocalAttr) != SD_SUCCESS)       cfg_set_config_err ();  }/************************************************************************//*			cfgLocalName					*//* found 'LocalName' keyword, get the value				*//************************************************************************/static ST_VOID cfgLocalName (ST_VOID)  {ST_CHAR  *name = NULL;  if ((name = cfg_get_string_ptr ()) != NULL)    {    strcpy(pstVCC->stLocal.localName, name);    }  else    cfg_set_config_err ();  }/************************************************************************//*			cfgMaxTranSets					*//* found 'MaxTransferSets' keyword, get the value					*//************************************************************************/static ST_VOID cfgMaxTranSets (ST_VOID)  {ST_INT16 sVal;  if (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS)     pstVCC->stLocal.nMaxTransferSets =  (icInt) sVal;  else    cfg_set_config_err();  }/************************************************************************//*			cfgMaxDataSets					*//* found 'MaxDataSets' keyword, get the value				*//************************************************************************/static ST_VOID cfgMaxDataSets (ST_VOID)  {ST_INT16 sVal;  if (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS)    pstVCC->stLocal.nMaxDataSets = (icInt) sVal;  else    cfg_set_config_err();  }/************************************************************************//*			cfgMaxMsgSize					*//* found 'MaxMMSMsgSize' keyword, get the value				*//************************************************************************/static ST_VOID cfgMaxMsgSize (ST_VOID)  {ST_INT iVal;  if (cfg_get_int (&iVal) == SD_SUCCESS)    pstVCC->stLocal.nMaxMMSMsgSize = (icInt) iVal;  else    cfg_set_config_err();  }/************************************************************************//*			cfgLocalEnd					*//************************************************************************/static ST_VOID cfgLocalEnd (ST_VOID)  {  if (cfg_tbl_pop (1) != SD_SUCCESS)    cfg_set_config_err ();  }/************************************************************************//*			cfgTypesBegin					*//************************************************************************/static ST_VOID cfgTypesBegin (ST_VOID)  {  if (cfg_tbl_push (kwtblTypesAttr) != SD_SUCCESS)       cfg_set_config_err ();  }/************************************************************************//*			cfgType						*//* found 'TypeName' keyword, get the value				*//************************************************************************/static ST_VOID cfgType (ST_VOID)  {ST_CHAR  *name = NULL;  setupType();  if ((name = cfg_get_string_ptr ()) != NULL)    strcpy(pstType->typeName, name);  else    cfg_set_config_err();  }/************************************************************************//*			cfgTDL						*//* found 'TDL' keyword, get the value			  	        *//************************************************************************/static ST_VOID cfgTDL (ST_VOID)  {ST_CHAR  *name = NULL;  if ((name = cfg_get_string_ptr ()) != NULL)    {    pstType->tdl = chk_calloc(1, strlen(name)+1);    strcpy(pstType->tdl, name);    }  else    cfg_set_config_err();  }/************************************************************************//*			cfgTypesEnd					*//************************************************************************/static ST_VOID cfgTypesEnd (ST_VOID)  {  setupType();  if (cfg_tbl_pop (1) != SD_SUCCESS)    cfg_set_config_err ();  }/************************************************************************//*			setupType					*//* utility function to check for complete type spec, add to list and	*//* allocate more memory							*//************************************************************************/static ST_VOID setupType (ST_VOID)  {  if ( (pstType) && strlen(pstType->typeName) && strlen(pstType->tdl) )    list_add_last((ST_VOID **)&pstVCC->typeList, pstType);  else if (pstType)    {    chk_free(pstType);    pstType = NULL;    }  pstType = chk_calloc(1, sizeof(ICTA_TYPE));    }  /************************************************************************//*			cfgRemoteBegin					*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -