|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnz.ac.waikato.modeljunit.Model
nz.ac.waikato.modeljunit.timing.TimedModel
public class TimedModel
An extension of the model class which supports timed models.
Field Summary |
---|
Fields inherited from class nz.ac.waikato.modeljunit.Model |
---|
fsmActions_, fsmModel_, fsmSequence_, fsmState_, output_, VOID_ARGS |
Constructor Summary | |
---|---|
TimedModel(TimedFsmModel model)
|
Method Summary | |
---|---|
boolean |
doAction(int index)
Try to take the given Action from the current state. |
void |
doReset(java.lang.String reason)
Reset the FSM to its initial state. |
int |
enabled(int index)
Partitioning actions to make sure that only tick actions can happen when in a tick state |
java.lang.reflect.Field |
getLowestTimeout()
Gets the timeout that will expire next in the model. |
int |
getLowestTimeoutValue()
Gets the value of the lowest enabled timeout. |
int |
getTime()
Gets the current Time of the model. |
java.lang.String |
getTimeoutName(int index)
|
double |
getTimeoutProbability()
|
boolean |
incrementTime()
Increment the current time by a random value between the minimum and maximum delays. |
void |
loadModelClass(java.lang.Class fsm)
Loads the given class and finds its @Action methods. |
void |
setTime(int value)
Sets the current time in the FSM object. |
void |
setTimeoutProbability(double value)
|
Methods inherited from class nz.ac.waikato.modeljunit.Model |
---|
addListener, addListener, doReset, enabledGuards, getActionName, getActionNumber, getCurrentState, getGraphListener, getListener, getListenerNames, getModel, getModelClass, getModelName, getNumActions, getOutput, getTesting, getVersion, isEnabled, isInitialState, isTerminal, notifyDoneGuard, notifyDoneReset, notifyDoneTransition, notifyFailure, notifyStartAction, printMessage, printWarning, removeAllListeners, removeListener, setOutput, setTesting |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimedModel(TimedFsmModel model)
Method Detail |
---|
public void loadModelClass(java.lang.Class fsm)
loadModelClass
in class Model
public int enabled(int index)
enabled
in class Model
index
- Index into the fsmActions_ array.
public void doReset(java.lang.String reason)
Model
doReset
in class Model
reason
- Why the reset was performed (an adjective).public boolean doAction(int index)
Model
doAction
in class Model
index
- Index into the fsmTransitions array.
public int getTime()
public void setTime(int value)
value
- public boolean incrementTime()
public java.lang.reflect.Field getLowestTimeout()
public int getLowestTimeoutValue()
public java.lang.String getTimeoutName(int index)
public double getTimeoutProbability()
public void setTimeoutProbability(double value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |