|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.Simulator
public final class Simulator
the simulator. provides functions for controlling the running of simulator.
| Constructor Summary | |
|---|---|
Simulator()
constructs Simulator object, and load simulator configuration |
|
| Method Summary | |
|---|---|
void |
cleanup()
closes log files and calculate total running time |
void |
confProtocol(Protocol p)
configures a specific protocol using virtual function.(factory patton) |
void |
confTopology()
generates topology from graph file |
static Simulator |
getInstance()
gets the singleton instance of simulator |
ProtocolPanel |
getPP()
gets protocolpanel |
java.util.Properties |
getProperties()
gets simulator properties |
void |
GUIinit()
initializes log, and configure topology. |
void |
GUIstart()
starts a new simulation, to be called from GUI |
boolean |
handle(SimEvent e)
handles simulator level event. |
void |
init()
reads graph file, generate graph object, initialize log, and configure topology |
void |
initLog()
initializes logs |
void |
loadSimulatorConf()
loads simulation properties from configure file |
static void |
main(java.lang.String[] args)
main simulator function |
void |
pauseIt()
pauses simulation |
void |
reset()
stop current simulation, reset simulator |
void |
resumeIt()
resumes paused simulation |
void |
setEnd(int e)
set end time, so that GUI can calculate finished percentage |
void |
setPP(ProtocolPanel p)
sets protocolpanel, the handle to GUI, for GUI purpose |
void |
start()
starts a new simulation |
void |
stopIt()
terminates current simulation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Simulator()
| Method Detail |
|---|
public static Simulator getInstance()
public void initLog()
public void pauseIt()
public void resumeIt()
public void stopIt()
public void start()
public void GUIstart()
public void init()
public void loadSimulatorConf()
public void GUIinit()
public void confTopology()
public void confProtocol(Protocol p)
public void cleanup()
public java.util.Properties getProperties()
public boolean handle(SimEvent e)
handle in interface SimEventHandlere - the event to be handled
public void setPP(ProtocolPanel p)
public ProtocolPanel getPP()
public void setEnd(int e)
public void reset()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||