simulator_lib
Class SimulatorInput

java.lang.Object
  extended by simulator_lib.SimulatorInput

public class SimulatorInput
extends java.lang.Object

The SimulatorInput class assists the TraceSimulator driver program in reading and parsing data from the provided trace file.


Field Summary
private  long generator_seed
          The seed used to generate the trace being read.
private  Globals GLOBALS
          The Network parameterization object.
private  java.io.BufferedReader in
          Input stream/reader from the trace file.
 
Constructor Summary
SimulatorInput(java.lang.String input)
          Construct a SimulatorInput object
 
Method Summary
 long getGenSeed()
          Return the random seed used to to generate the trace file.
 Globals parseGlobals()
          Parse the trace file into a Network parameterization object.
 void parseLibraries(Network nw)
          Parse file data from trace, use it to populate file portion of Network.
 Transaction parseNextTransaction()
          Parse next transaction from the trace file.
 void parseUsers(Network nw)
          Parse user data from trace, use it to populate user portion of Network.
 void shutdown()
          Shutdown (close) the input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBALS

private Globals GLOBALS
The Network parameterization object.


generator_seed

private long generator_seed
The seed used to generate the trace being read.


in

private java.io.BufferedReader in
Input stream/reader from the trace file.

Constructor Detail

SimulatorInput

public SimulatorInput(java.lang.String input)
Construct a SimulatorInput object

Parameters:
input - Filename/path to the trace file to open
Method Detail

parseGlobals

public Globals parseGlobals()
                     throws java.io.IOException
Parse the trace file into a Network parameterization object.

Returns:
A Globals object with parameterization data from the trace
Throws:
java.io.IOException

getGenSeed

public long getGenSeed()
Return the random seed used to to generate the trace file.

Returns:
the random seed used to to generate the trace file

parseUsers

public void parseUsers(Network nw)
                throws java.io.IOException
Parse user data from trace, use it to populate user portion of Network.

Parameters:
nw - The Network whose user data should be populated
Throws:
java.io.IOException

parseLibraries

public void parseLibraries(Network nw)
                    throws java.io.IOException
Parse file data from trace, use it to populate file portion of Network.

Parameters:
nw - The Network whose file data should be populated
Throws:
java.io.IOException

parseNextTransaction

public Transaction parseNextTransaction()
                                 throws java.io.IOException
Parse next transaction from the trace file.

Returns:
A Transaction object wrapping read data
Throws:
java.io.IOException

shutdown

public void shutdown()
              throws java.io.IOException
Shutdown (close) the input stream.

Throws:
java.io.IOException