|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexperiment.Scenario
public class Scenario
Created by IntelliJ IDEA. User: andy Date: Mar 11, 2010 Based on the real set of data a number of scenarios can be specified. For example, a failure can be simulated by disabling a node or modifying the rssi value on a link at a certain moment in time. As the real data will be used in simulators, WiseML provides a section in the description in which these scenarios can be specified.
Constructor Summary | |
---|---|
Scenario(java.lang.String id)
Default Constructor |
Method Summary | |
---|---|
void |
addEvent(Event ev)
Add an ecent to the scenario's queue |
boolean |
apply(double visualizationWindow,
ExperimentState state)
Applies the youngest event after checking if it's time. |
java.lang.String |
getId()
|
boolean |
isTime(ExperimentState state,
double visualizationWindow)
Tests if it's the right time to apply the younger event. |
Event |
pullEvent()
Returns the younger event |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scenario(java.lang.String id)
id
- the scenario's idMethod Detail |
---|
public void addEvent(Event ev)
ev
- the event to be addedpublic boolean apply(double visualizationWindow, ExperimentState state) throws badSyntaxException
visualizationWindow
- the time window in milliseconds before the next updatestate
- defines which of the experiment states to apply it to.
badSyntaxException
- in case of a malformed event.public java.lang.String getId()
public boolean isTime(ExperimentState state, double visualizationWindow)
state
- defines which of the experiment states to check.visualizationWindow
- the time window in milliseconds before the next update.
public Event pullEvent()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |