ui
Class DTNSimUI

java.lang.Object
  extended by ui.DTNSimUI
Direct Known Subclasses:
DTNSimGUI, DTNSimTextUI

public abstract class DTNSimUI
extends java.lang.Object

Abstract superclass for user interfaces; contains also some simulation settings.


Field Summary
protected  double lastUpdate
          simtime of last UI update
static java.lang.String MM_WARMUP_S
          Movement model warmup time -setting id ("MovementModel.warmup").
static java.lang.String NROF_REPORT_S
          Number of reports -setting id ("Report.nrofReports").
static java.lang.String REPORT_S
          Report class name -setting id prefix ("Report.report").
protected  java.util.Vector<Report> reports
          Reports that are loaded for this simulation
protected  SimScenario scen
          Scenario of the current simulation
protected  boolean simCancelled
          is simulation termination requested
protected  boolean simDone
          has simulation terminated normally
protected  World world
          The World where all actors of the simulator are
 
Constructor Summary
DTNSimUI()
          Constructor.
 
Method Summary
protected  void addReport(Report r)
          Adds a new report for simulator
 void done()
          Runs maintenance jobs that are needed before exiting.
protected abstract  void runSim()
          Runs simulation after the model has been initialized.
 void start()
          Starts the simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NROF_REPORT_S

public static final java.lang.String NROF_REPORT_S
Number of reports -setting id ("Report.nrofReports"). Defines how many reports are loaded.

See Also:
Constant Field Values

REPORT_S

public static final java.lang.String REPORT_S
Report class name -setting id prefix ("Report.report"). Defines name(s) of the report classes to load. Must be suffixed with numbers starting from one.

See Also:
Constant Field Values

MM_WARMUP_S

public static final java.lang.String MM_WARMUP_S
Movement model warmup time -setting id ("MovementModel.warmup"). Defines how many seconds of movement simulation is run without connectivity etc. checks before starting the real simulation.

See Also:
Constant Field Values

world

protected World world
The World where all actors of the simulator are


reports

protected java.util.Vector<Report> reports
Reports that are loaded for this simulation


simDone

protected boolean simDone
has simulation terminated normally


simCancelled

protected boolean simCancelled
is simulation termination requested


scen

protected SimScenario scen
Scenario of the current simulation


lastUpdate

protected double lastUpdate
simtime of last UI update

Constructor Detail

DTNSimUI

public DTNSimUI()
Constructor.

Method Detail

start

public void start()
Starts the simulation.


runSim

protected abstract void runSim()
Runs simulation after the model has been initialized.


done

public void done()
Runs maintenance jobs that are needed before exiting.


addReport

protected void addReport(Report r)
Adds a new report for simulator

Parameters:
r - Report to add