📄 ictamain.h
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//* (c) Copyright Systems Integration Specialists Company, Inc., *//* 1996 - 2002 All Rights Reserved *//* *//* MODULE NAME : ICTAMAIN.H *//* PRODUCT(S) : ICCP Test Application *//* *//* MODULE DESCRIPTION : main header file *//* *//* *//* MODIFICATION LOG : *//* Date Who Rev Comments *//* -------- --- ------ ----------------------------------------------- *//* 08/08/02 EJV 28 Changed to version 4.10 (Tru64 v5.1 release) *//* 08/05/02 NAV 27 Changes to test 8 remotes *//* 02/07/02 EJV 26 _AIX: Added threads support. *//* Moved include icthread.h from ictamain.c *//* Reworked IC_PTHREAD_COND_INIT *//* 02/05/02 EJV 25 Change to version 4.09 (AIX 4.3.3 release) *//* 10/04/01 EJV 24 Change to version 4.08 (Sun Solaris 8 release) *//* 08/07/01 EJV 23 Change to version 4.073 (DEC UNIX release) *//* 05/18/01 nav 22 Changes for Block 8 Test *//* 03/27/01 EJV 21 Change to version 4.07 (DEC UNIX release) *//* 11/28/00 nav 20 add incomingDsTs prototype *//* 08/28/00 nav 19 Version change *//* 05/22/00 nav 18 Add getDataSetNames *//* 05/11/00 nav 17 Changes for Comp Test *//* 04/28/00 nav 16 Change to version 4.04 *//* 04/24/00 nav 15 Add data structs for connect test *//* 02/23/00 nav 14 Changes for WIN32 mutithreads *//* 06/29/99 nav 13 Add stuff for QUALITY_TEST *//* 06/10/99 nav 12 Prepare for PLC acceptance test *//* 06/03/99 nav 11 Add global bIncrementVars *//* 01/05/99 EJV 10 Changed version to 4.03. *//* 05/13/98 nav 9 move dyn_iccp_slog_fun prototype to iccp_log.h *//* 04/09/98 nav 8 Add prototypes from ictab4b8.c *//* 03/24/98 nav 7 Add ctrlTranGroup *//* 01/20/98 EJV 6 Changed version. *//* 12/11/97 nav 5 add localDom and remoteDom to REMOTE_INFO *//* 06/19/97 nav 4 Overhaul - One process can be client and server *//* 06/05/97 nav 3 Convert to MMS-EASE V7.00 *//* 02/25/97 nav 2 additions for comprehensive test *//* 02/12/97 nav 1 handle matrix accounts *//* 12/16/96 nav Module creation *//************************************************************************/#ifndef ICTAMAIN_INCLUDED#define ICTAMAIN_INCLUDED#if defined (SISCO_THREADS) && (defined (__alpha) || defined(_AIX))#include <pthread.h>#endif#include <stdio.h>#include <stdlib.h>#include <string.h>#include <signal.h>#include "glbtypes.h"#include "sysincs.h"#include "mem_chk.h"#include "gen_list.h"#include "icapi.h" #include "mnmainlp.h"#include "iccp_log.h"#include "mms_user.h"#ifdef SISCO_THREADS#include "icthread.h" /* defines _POSIX_C_SOURCE 199506L */#endif#define ICCP_RELEASE "4.10"#define MAX_ID_LEN 33#define MAX_ASSOCIATIONS 7#define MAX_TRANSFER_SETS 3#define MAX_DATA_SETS 10#ifdef _WIN32#define ICTA_CONFIG_FILE "iccpTest.cfg"#define MMS_LOG_CFG_FILE "mms_log.cfg"#else#define ICTA_CONFIG_FILE "./iccpTest.cfg"#define MMS_LOG_CFG_FILE "./mms_log.cfg"#endif#define ICTA_DO_ALL 100#define ICTA_DO_ONE 101/* identify the client/server */#define ICTA_NOONE 0#define ICTA_CLIENT 1#define ICTA_SERVER 2#define ICTA_BOTH 3#define ICTA_UTIL_SEND 1000#define ICTA_UTIL_RECEIVE 2000#define ICTA_UTIL_SELLING 3000#define ICTA_UTIL_BUYING 4000#define ICTA_UTIL_WHEELING 5000#define ICTA_UTIL_PAYING 6000#define ICTA_UTIL_IN 7000#define ICTA_UTIL_OUT 8000typedef struct Tag_ICTA_TYPE { DBL_LNK l; icChar typeName[MAX_ID_LEN]; icChar *tdl; icTypeId typeId; icBoolean bTypeDefined; } ICTA_TYPE;typedef struct Tag_ICTA_LOCAL_INFO { icChar localName[MAX_ID_LEN]; icInt nMaxTransferSets; icInt nMaxDataSets; icInt nMaxMMSMsgSize; } ICTA_LOCAL_INFO;typedef struct Tag_ICTA_FEATURES { icBoolean bBlock2; icBoolean bBlock3; icBoolean bBlock4; icBoolean bBlock5; icBoolean bBlock6; icBoolean bBlock7; icBoolean bBlock8; icBoolean bBlock9; icUShort supportedFeatures; } ICTA_FEATURES;typedef struct Tag_ICTA_VAR_INFO { DBL_LNK l; icChar varName[MAX_ID_LEN]; icInt varScope; icInt iccpType; icBoolean bUserType; ICTA_TYPE *pstType; icBoolean bWriteable; void *varPtr;#ifdef SISCO_THREADS void *extraPtr;#endif icVariableId varId; icBoolean bVarDefined; int numReads; /* used by comprehensive test */ int numWrites; /* used by comprehensive test */ int numErrors; /* used by comprehensive test */#ifdef QUALITY_TEST int validity[4]; int currSource[4]; int normValue[2]; int tsQuality[2];#endif } ICTA_VAR_INFO;typedef struct Tag_ICTA_MSG_INFO { DBL_LNK l; icInt nRef; icInt scope; icInt maxMsgSize; icMsgId msgId; icBoolean bMsgDefined; int numHits; /* used by comprehensive test */ int numErrors; } ICTA_MSG_INFO;typedef struct Tag_ICTA_VAR_LIST { DBL_LNK l; ICTA_VAR_INFO *pstVariable; } ICTA_VAR_LIST;typedef struct Tag_ICTA_TRANSFER_INFO { DBL_LNK l; icInt nRef; icChar linkName[MAX_ID_LEN]; /* which link handles transfer set */ icBoolean bPeriodic; icInt nPerInterval; icInt nPerOffset; icBoolean bExceptOnly; icInt nBufInterval; icInt nIntegInterval; icBoolean bCritical; icInt nStartBuf; /* number of seconds in the future to start transfer */ icBoolean bUseStartTime; time_t startTime; icInt numVars; ICTA_VAR_LIST *varList; icTransferGroupId transferGroupId; icBoolean bGroupDefined; } ICTA_TRANSFER_INFO;typedef struct Tag_ICTA_DEVICE { DBL_LNK l; icChar name[MAX_ID_LEN]; icInt scope; icInt type; icBoolean sbo; icDeviceValue value; icCheckbackID checkBackId; icVariableId deviceId; icBoolean bDeviceDefined; int numSelect; /* used by comprehensive test */ int numOperate; int numErrors; } ICTA_DEVICE;typedef struct Tag_ICTA_SIMPLE_ACCT { DBL_LNK l; icInt nRef; icInt scope; /* IC_SCOPE_VMD or IC_SCOPE_DOMAIN */ icInt acctType; /* see ictautil.c acctTypeTable[] */ icInt valueType; /* IC_INTEGER_ACCOUNT, IC_FLOAT_ IC_PROFILE_ */ icInt rows; /* how many values associated with this acct */ icInt matrixRef; /* only if this acct involved in matrix acct */ icTAVariableId variableId; icBoolean bAcctDefined; int numHits; /* used by comprehensive test */ int numRequests; int numErrors; int numConditionHits; int numConditionErrs; int request; } ICTA_SIMPLE_ACCT;typedef struct Tag_ICTA_MATRIX_ACCT { DBL_LNK l; icInt matrixRef; icInt matrixScope; icTAVariableId variableId; icBoolean bMatrixDefined; int numHits; /* used by comprehensive test */ } ICTA_MATRIX_ACCT;typedef struct Tag_ICTA_TA_CONDITION { DBL_LNK l; icChar linkName[MAX_ID_LEN]; /* while link handles transfer */ icChar condition; icBoolean bCondDefined; } ICTA_TA_CONDITION;#define CONN_TEST_STOPREM 0#define CONN_TEST_STOPLINK 1#define CONN_TEST_ABORT 2typedef struct Tag_CONNECT_STATS { icTimerId linkUpTimer; /* the #secs to leave the link up */ int numTimer; /* inc when timer goes off */ int numStopLinks; /* inc when icStopLink called */ int numStopRemotes; /* inc when icStopRemote called */ int numAborts; /* inc when mp_abort called */ int lastAction; /* see defines above */ } ICTA_CONNECT_STATS;typedef struct Tag_ICTA_LINK_INFO { DBL_LNK l; icInt nChannel; icChar linkName[MAX_ID_LEN]; icChar localAr[MAX_ID_LEN]; icChar remoteArs[MAX_REMOTE_ARNAMES][MAX_ID_LEN]; icInt nCriticalTimeout; icLinkId linkId; icBoolean bLinkDefined; icBoolean bLinkStarted; icBoolean bLinkUp; struct Tag_ICTA_REMOTE_INFO *pstRemote; /* needed for connect test */ ICTA_CONNECT_STATS *pstStats; } ICTA_LINK_INFO;typedef struct Tag_ICTA_CLIENT_INFO { icChar clientName[MAX_ID_LEN]; ICTA_VAR_INFO *variableList; ICTA_MSG_INFO *infoMsgsList; ICTA_DEVICE *devicesList; ICTA_SIMPLE_ACCT *accountList; ICTA_MATRIX_ACCT *matrixList; ICTA_TRANSFER_INFO *tranGroupList; ICTA_TA_CONDITION *conditionList; } ICTA_CLIENT_INFO;typedef struct Tag_ICTA_SERVER_INFO { icChar serverName[MAX_ID_LEN]; ICTA_FEATURES stFeatures; ICTA_VAR_INFO *variableList; ICTA_MSG_INFO *infoMsgsList; ICTA_DEVICE *devicesList; ICTA_SIMPLE_ACCT *accountList; ICTA_MATRIX_ACCT *matrixList; } ICTA_SERVER_INFO;typedef struct Tag_ICTA_REMOTE_INFO { DBL_LNK l; icChar remoteName[MAX_ID_LEN]; icChar *iccpVersion; icChar bilatTableID[MAX_ID_LEN]; icChar localDom[MAX_ID_LEN]; icChar remoteDom[MAX_ID_LEN]; icInt nReqTimeout; icInt nRetries; icInt nReplyTimeout; icInt nShortestInterval; icBoolean bReqIdentity; icBoolean bInitiate; icRemoteId remoteId; ICTA_LINK_INFO *linkList; icBoolean bIsServer; ICTA_SERVER_INFO *serverObj; /* server objects for remote */ icBoolean bIsClient; ICTA_CLIENT_INFO *clientObj; /* client objects for remote */ icBoolean bRemoteDefined; icBoolean bRemoteStarted; icTimerId timerId; /* used by comprehensive test */ icShort index; icShort testFlag; icBoolean bCompServerDefined; icBoolean bCompClientDefined; icChar taConditions; icTimerId taTestTimer; icTimerId imTestTimer; icTimerId rbeTestTimer; } ICTA_REMOTE_INFO; typedef struct Tag_ICTA_VCC { icChar VCCName[MAX_ID_LEN]; ICTA_LOCAL_INFO stLocal; ICTA_TYPE *typeList; ICTA_REMOTE_INFO *remoteList; } ICTA_VCC; /* a virtual control center *//************************************************************************//* set up global variables *//************************************************************************/extern ICTA_VCC *pstVCC;extern ST_DOUBLE beginTime, endTime; /* for elapsed time */extern icBoolean bMultiThreads;extern icBoolean bCompTestInProgress;extern icBoolean bStopCompTest;extern icBoolean bCompTestVerbose;extern icBoolean bCompTestThreaded;extern time_t compStartTime, compStopTime;extern ST_INT compSleepTime;extern icBoolean bAutoResponse;extern icBoolean bIncrementVars;extern int currChannelNum;extern icBoolean bRunVerbose;extern icBoolean bUseNewB4B8;extern icBoolean bUseNewDefLink;extern icBoolean bUseNewStartRem;#if defined (SISCO_THREADS) && (defined (__alpha) || defined(_AIX))/* to maintain the threads */extern pthread_t threadIDs[100];extern pthread_mutex_t mutex;extern int nLastThread;extern icBoolean bCompTestThreaded;#endif/************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -