public class BlockingFire extends FireMachine
The FireMachine has the following states. Each represents a state of the wrapped actor:
And each of the states BEGIN and END is associated with a 'state event', which is the full name of the actor without model name plus one of the following suffixes:
For example, 'Ramp' is the name of a top level actor in a model 'Test'. The full actor name is 'Test.Ramp'. The MetroII state event associated with the state BEGIN of the actor is 'Ramp.FIRE_BEGIN'.
Neither START nor FINAL is associated with any state event.
To understand the transition table of the FSM,
startOrResume(LinkedList)
.
FireMachine.State
Constructor and Description |
---|
BlockingFire(Actor actor)
Construct a basic wrapper and wrap the input actor.
|
Modifier and Type | Method and Description |
---|---|
void |
startOrResume(java.util.LinkedList<metroIIcomm.Event.Builder> metroIIEventList)
When startOrResume(eventList) is called, the wrapper checks if the MetroII
event associated with the current state is changed to NOTIFIED.
|
actor, getState, getStateEvent, proposeStateEvent, reset, setState, wrapup
public BlockingFire(Actor actor)
actor
- the actor to be wrapped.public void startOrResume(java.util.LinkedList<metroIIcomm.Event.Builder> metroIIEventList) throws IllegalActionException
action: propose FIRE_BEGIN START ---------------------------------------> BEGIN guard: FIRE_BEGIN is notified action: call fire(), propose FIRE_END BEGIN ---------------------------------------> FIRE_END guard: FIRE_BEGIN is not notified action: propose FIRE_BEGIN BEGIN ---------------------------------------> BEGIN
metroIIEventList
- a list of MetroII events that are proposed. It is set by
startOrResume() not the caller.IllegalActionException
- If the wrapped actor is in an illegal state or any called
method throws it.