|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.trinetwatch.collectionAgentSim.CollectionAgentSim
CollectionAgentSim is a collection agent simulator to be used in
conjunction with the SeisNetWatch NSI Server for testing and as an
example of what the SeisNetWatch system is capable of.
Command Line Options
-c, --configFile [path] : The file to use as the configuration file for the Collection Agent. The default file is [baseDir]/conf/CASim.conf
-b, --baseDir [path] : The base directory into which the different program files, configuration files and log files are placed. The directories are [baseDir}/bin, [baseDir]/conf, and [baseDir]/log. Any program executables are place in 'bin', configuration files are placed in 'conf', and any log files are placed in 'log'. The default base directory is '/usr/local/SeisNetWatch'.
-d, --daemon : puts the CASim in daemon mode (run forever). Default is to accept a terminate command on the keyboard to shutdown.
-l, --globalLogFileName [file] : The Collection Agent Sim logs much information. It is all put into a single global log file. The default name of the file is "CASim.log" and it is placed in the directory '[baseDir]/log/'. The option accepts absolute paths, relative paths or just the file name.
-o, --logfileLogLevel [level] :There are six (6) different levels at which logging can be done. They are: 'NO_MSGS', 'INFO', 'WARNING', 'ERROR', 'DEBUG', and 'ALL_MSGS'. One of these must be used as the argument. The default level is ERROR.
-O, --consoleLogLevel [level] : Log messages are also printed to the terminal. This switch tells the Control Agent what level of messages to print to the console. The levels are the same as for logfileLogLevel. The default level is ERROR.
-C, --caSimStationsFileName [file] : The CASimStations file is a file which holds information about how the Collection Agent will treat requests for usage level changes for different stations. The switch accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/conf/CASimStations.ini'.
-ORBconfig [file] : The orb.conf file is needed to correctly set up CORBA communications. The switch accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/conf/orb.config'.
-n, --caSimName {name_of_server] : This is where the name of the Collection Agent is entered. The default value is an empty string.
-s, --sendIDFlag : Flag set true to have the agent send "ID_MSG" messages to the NSI server. The default value is true.
-f, --fastModeFlag : Flag set true to have the agent send dynamic parameters at a greatly increased pace (for testing). The default value is false.
baseDir = "[path]" globalLogFileName = "[filename]" logfileLogLevel = "[level]" consoleLogLevel = "[level]" caSimStationsFileName = "[filename]" orbConfig = "[filename]" caSimName = "{serverName}" daemon = 'true or false' sendIDFlag = 'true or false' fastModeFlag = 'true or false'
Field Summary | |
static java.lang.String |
ACK_CA_MSG
|
static java.lang.String[] |
ID_MSG_STRARR
|
static java.lang.String |
TERM_ALL_MSG
|
static java.lang.String |
TERM_CA_MSG
|
Constructor Summary | |
CollectionAgentSim(LogFile log,
CfgProperties cfgPropObj)
Creates a new object instance of CollectionAgentSim. |
Method Summary | |
java.lang.String |
agentName()
Returns the name of this agent. |
void |
createNewStation()
Creates new dynamically created station. |
static java.lang.String |
doesFileExist(java.lang.String fileName)
This method checks to see if the file 'fileName' exists. |
static java.lang.String |
doesFileExist(java.lang.String fileName,
java.lang.String baseDir,
java.lang.String specialDir)
This method checks to see if the given file exists. |
boolean |
getFastModeFlag()
Returns true if the agent is in "fast" mode. |
java.lang.String |
getOrbCfgFilePath()
Returns the path to the orb configuration file. |
boolean |
getSendIDFlag()
Returns true if the agent is to send "ID_MSG" messages. |
StationTable |
getStationsTable()
Returns a handle to the stations table. |
static java.lang.String |
getVersion()
Returns the version of this agent. |
boolean |
initCORBAservices(java.lang.String[] args,
boolean daemonFlag)
Initializes CORBA services and connects to the CORBA event channels. |
static void |
main(java.lang.String[] args)
The method executed to begin the simulated collection agent. |
static int |
propLogLevel(CfgPropItem tmpProp)
This method looks at the string value of the given property item and returns the integer for the loging level that string represents. |
boolean |
readConfigFiles(java.lang.String collectFileName)
Reads in the necessary configuration file(s). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String[] ID_MSG_STRARR
public static final java.lang.String TERM_ALL_MSG
public static final java.lang.String TERM_CA_MSG
public static final java.lang.String ACK_CA_MSG
Constructor Detail |
public CollectionAgentSim(LogFile log, CfgProperties cfgPropObj)
log
- a log file object.cfgPropObj
- an object containing the configuration properties
for this collection agent sim.Method Detail |
public boolean readConfigFiles(java.lang.String collectFileName)
public boolean initCORBAservices(java.lang.String[] args, boolean daemonFlag)
args
- array of command line argument strings.
public StationTable getStationsTable()
public java.lang.String getOrbCfgFilePath()
public java.lang.String agentName()
public boolean getSendIDFlag()
public boolean getFastModeFlag()
public void createNewStation()
public static java.lang.String getVersion()
public static int propLogLevel(CfgPropItem tmpProp)
tmpProp
- A CfgPropItem who's string value data represents a
logging level.
public static java.lang.String doesFileExist(java.lang.String fileName)
fileName
- The relative path or full path to a file.
public static java.lang.String doesFileExist(java.lang.String fileName, java.lang.String baseDir, java.lang.String specialDir)
1) use just 'fileName' to search for file existence in the current directory (can be a sub-directory path) or from the root directory as a full pathname (must begin with a '/').
2) if searching for 'fileName' fails to find an existing file then the path '[baseDir][specialDir][fileName]' is used to attempt to find an existing file.If there is no file found by this procedure then an empty string is returned.
fileName
- The relative path or full path to a file.baseDir
- A base directory to fall back upon if 'fileName' is a
relative path and does not point directly to a file somewhere in the
current directory.specialDir
- The special (sub) directory of [baseDir] in which the
file should reside. It can be either 'bin', 'conf', or 'log'.
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |