|
|||||||||
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 |
APPCOUNT_S
setting name for the number of applications |
static java.lang.String |
APPTYPE_NS
namespace for application type settings ("Application") |
static java.lang.String |
APPTYPE_S
application type -setting id ("type") |
static java.lang.String |
END_TIME_S
end time -setting id ("endTime") |
static java.lang.String |
GAPPNAME_S
application name in the group -setting id ("application") |
static java.lang.String |
GROUP_ID_S
group id -setting id ("groupID") |
static java.lang.String |
GROUP_NS
namespace for host group settings ("Group") |
protected java.util.List<DTNHost> |
hosts
List of hosts in this simulation |
static java.lang.String |
INTERFACENAME_S
interface name in the group -setting id ("interface") |
static java.lang.String |
INTNAME_S
interface name -setting id ("name") |
static java.lang.String |
INTTYPE_NS
namespace for interface type settings ("Interface") |
static java.lang.String |
INTTYPE_S
interface type -setting id ("type") |
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 |
NROF_INTERF_S
number of interfaces in the group -setting id ("nrofInterfaces") |
static java.lang.String |
NROF_INTTYPES_S
number of interface types -setting id ("nrofInterfaceTypes") |
static java.lang.String |
ROUTER_S
router class -setting id ("router") |
static java.lang.String |
SCAN_INTERVAL_S
scanning interval -setting id ("scanInterval") |
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 |
UP_INT_S
update interval -setting id ("updateInterval") |
Constructor Summary | |
---|---|
protected |
SimScenario()
Creates a scenario based on Settings object. |
Method Summary | |
---|---|
void |
addApplicationListener(ApplicationListener al)
Adds a new application event listener for all nodes. |
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 |
protected void |
createHosts()
Creates hosts for the scenario |
java.util.List<ApplicationListener> |
getApplicationListeners()
Returns the list of registered application event listeners |
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. |
static SimScenario |
getInstance()
Returns the SimScenario instance and creates one if it doesn't exist yet |
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 |
World |
getWorld()
Returns the World object of this scenario |
int |
getWorldSizeX()
Returns the width of the world |
int |
getWorldSizeY()
Returns the height of the world |
static void |
reset()
|
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 NROF_INTTYPES_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 INTTYPE_NS
public static final java.lang.String INTTYPE_S
public static final java.lang.String INTNAME_S
public static final java.lang.String APPTYPE_NS
public static final java.lang.String APPTYPE_S
public static final java.lang.String APPCOUNT_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 SCAN_INTERVAL_S
public static final java.lang.String MOVEMENT_MODEL_S
public static final java.lang.String ROUTER_S
public static final java.lang.String NROF_INTERF_S
public static final java.lang.String INTERFACENAME_S
public static final java.lang.String GAPPNAME_S
protected java.util.List<DTNHost> hosts
Constructor Detail |
---|
protected SimScenario()
Method Detail |
---|
public static void reset()
public static SimScenario getInstance()
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 addApplicationListener(ApplicationListener al)
al
- The listenerpublic java.util.List<ApplicationListener> getApplicationListeners()
protected void createHosts()
public java.util.List<DTNHost> getHosts()
public World getWorld()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |