|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.SimScenario
public class SimScenario
A simulation scenario used for getting and storing the settings of a simulation run.
Field Summary | |
---|---|
static java.lang.String |
END_TIME_S
end time -setting id ("endTime") |
static java.lang.String |
GROUP_ID_S
group id -setting id ("groupID") |
static java.lang.String |
GROUP_NS
namespace for host group settings ("Group") |
static java.lang.String |
MOVEMENT_MODEL_S
movement model class -setting id ("movementModel") |
static java.lang.String |
NAME_S
scenario name -setting id ("name") |
static java.lang.String |
NROF_GROUPS_S
number of host groups -setting id ("nrofHostGroups") |
static java.lang.String |
NROF_HOSTS_S
number of hosts in the group -setting id ("nrofHosts") |
static java.lang.String |
ROUTER_S
router class -setting id ("router") |
static java.lang.String |
SCENARIO_NS
namespace of scenario settings ("Scenario") |
static java.lang.String |
SIM_CON_S
simulate connections -setting id ("simulateConnections") |
static java.lang.String |
TRANSMIT_RANGE_S
transmit range -setting id ("transmitRange") |
static java.lang.String |
TRANSMIT_SPEED_S
transmit speed -setting id ("transmitSpeed") |
static java.lang.String |
UP_INT_S
update interval -setting id ("updateInterval") |
Constructor Summary | |
---|---|
SimScenario()
Creates a scenario based on Settings object. |
Method Summary | |
---|---|
void |
addConnectionListener(ConnectionListener cl)
Adds a new connection listener for all nodes |
void |
addMessageListener(MessageListener ml)
Adds a new message listener for all nodes |
void |
addMovementListener(MovementListener ml)
Adds a new movement listener for all nodes |
void |
addUpdateListener(UpdateListener ul)
Adds a new update listener for the world |
void |
createHosts()
Creates hosts for the scenario |
double |
getEndTime()
Returns simulation's end time |
java.util.List<EventQueue> |
getExternalEvents()
Returns the (external) event queue(s) of this scenario or null if there aren't any |
java.util.List<DTNHost> |
getHosts()
Returns the list of nodes for this scenario. |
SimMap |
getMap()
Returns the SimMap this scenario uses, or null if scenario doesn't use any map |
double |
getMaxHostRange()
Returns how long range the hosts' radios have |
java.lang.String |
getName()
Returns the name of the simulation run |
double |
getUpdateInterval()
Returns update interval (simulated seconds) of the simulation |
java.util.List<UpdateListener> |
getUpdateListeners()
Returns the list of registered update listeners |
int |
getWorldSizeX()
Returns the width of the world |
int |
getWorldSizeY()
Returns the height of the world |
boolean |
simulateConnections()
Returns true if connections should be simulated |
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 SCENARIO_NS
public static final java.lang.String NROF_GROUPS_S
public static final java.lang.String NAME_S
public static final java.lang.String END_TIME_S
public static final java.lang.String UP_INT_S
public static final java.lang.String SIM_CON_S
public static final java.lang.String GROUP_NS
public static final java.lang.String GROUP_ID_S
public static final java.lang.String NROF_HOSTS_S
public static final java.lang.String TRANSMIT_RANGE_S
public static final java.lang.String TRANSMIT_SPEED_S
public static final java.lang.String MOVEMENT_MODEL_S
public static final java.lang.String ROUTER_S
Constructor Detail |
---|
public SimScenario()
Method Detail |
---|
public java.lang.String getName()
public boolean simulateConnections()
public int getWorldSizeX()
public int getWorldSizeY()
public double getEndTime()
public double getUpdateInterval()
public double getMaxHostRange()
public java.util.List<EventQueue> getExternalEvents()
public SimMap getMap()
public void addConnectionListener(ConnectionListener cl)
cl
- The listenerpublic void addMessageListener(MessageListener ml)
ml
- The listenerpublic void addMovementListener(MovementListener ml)
ml
- The listenerpublic void addUpdateListener(UpdateListener ul)
ul
- The listenerpublic java.util.List<UpdateListener> getUpdateListeners()
public void createHosts()
public java.util.List<DTNHost> getHosts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |