core
Class DTNSim

java.lang.Object
  extended by core.DTNSim

public class DTNSim
extends java.lang.Object

Simulator's main class


Field Summary
static java.lang.String BATCH_MODE_FLAG
          If this option ("-b") is given to program, batch mode and Text UI are used
static java.lang.String RANGE_DELIMETER
          Delimiter for batch mode index range values (colon)
static java.lang.String RESET_METHOD_NAME
          Name of the static method that all resettable classes must have
 
Constructor Summary
DTNSim()
           
 
Method Summary
static void main(java.lang.String[] args)
          Starts the user interface with given arguments.
static void registerForReset(java.lang.String className)
          Registers a class for resetting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_MODE_FLAG

public static final java.lang.String BATCH_MODE_FLAG
If this option ("-b") is given to program, batch mode and Text UI are used

See Also:
Constant Field Values

RANGE_DELIMETER

public static final java.lang.String RANGE_DELIMETER
Delimiter for batch mode index range values (colon)

See Also:
Constant Field Values

RESET_METHOD_NAME

public static final java.lang.String RESET_METHOD_NAME
Name of the static method that all resettable classes must have

See Also:
registerForReset(String), Constant Field Values
Constructor Detail

DTNSim

public DTNSim()
Method Detail

main

public static void main(java.lang.String[] args)
Starts the user interface with given arguments. If first argument is BATCH_MODE_FLAG, the batch mode and text UI is started. The batch mode option must be followed by the number of runs, or a with a combination of starting run and the number of runs, delimited with a ":". Different settings from run arrays are used for different runs (see Settings.setRunIndex(int)). Following arguments are the settings files for the simulation run (if any). For GUI mode, the number before settings files (if given) is the run index to use for that run.

Parameters:
args - Command line arguments

registerForReset

public static void registerForReset(java.lang.String className)
Registers a class for resetting. Reset is performed after every batch run of the simulator to reset the class' state to initial state. All classes that have static fields that should be resetted to initial values between the batch runs should register using this method. The given class must have a static implementation for the resetting method (a method called "reset" without any parameters).

Parameters:
className - Full name (i.e., containing the packet path) of the class to register. For example: core.SimClock