An FSM-Controller contains a set of states and transitions. A transition has a guard expression and a trigger expression. A transition is enabled and can be taken when its guard is true. A transition is triggered and must be taken when its trigger is true. A transition can contain a set of actions.
When an FSM-Controller is fired, the outgoing transitions of the current state are examined. An IllegalActionException is thrown if there is more than one enabled transition. If there is exactly one enabled transition then it is chosen and the choice actions contained by the transition are executed. An FSM-Controller does not change state during successive firings in one iteration in order to support simulators that iterate to a fixed point. When the FSM-Controller is postfired, the chosen transition of the latest firing of the actor is committed. The commit actions contained by the transition are executed and the current state of the actor is set to the destination state of the transition.
An FSM-Controller enters its initial state during initialization. The name of the initial state is specified by the initialStateName string attribute.
An FSM-Controller contains a set of variables for the input ports that can be referenced in the guard and trigger expressions of transitions. If an input port is a single port, two variables are created: one is an input status variable with name "portName_isPresent"; the other is input value variable with name "portName". The input status variable always contains a BooleanToken. When this actor is fired, the status variable is set to true if the port has a token, false otherwise. The input value variable always contains the latest token received from the port. If the given port is a multiport, a status variable and a value variable are created for each channel. The status variable is named "portName_channelIndex_isPresent". The value variable is named "portName_channelIndex".
An FSM-Controller can be used in a Hierarchical FSM to represent the mode control logic. A state can have a hierarchical or block refinement. A transition in an FSM-Controller can be preemptive or non-preemptive. When a preemptive transition is chosen, the refinement of its source state is not fired. A non-preemptive transition can only be chosen after the refinement of its source state is fired.
public VisualSim.kernel.util.StringAttribute finalStateNames
public VisualSim.kernel.util.StringAttribute initialStateName
Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator