Class TransitionRefinement

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, RefinementActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class TransitionRefinement
    extends Refinement
    Transition refinements provide a way to use composite actors which are run whenever a transition is taken in an FSM modal, much in the same way that State refinements are run every time an FSM is in a particular state. This provides an alternative mechanism for performing calculations during a Transition other than expressions in the Set Actions and Output Actions of that Transition. The expression actions are still executed but only after the Transition refinement has been fired.

    This typed composite actor supports mirroring of its ports in its container (which is required to be a ModalModel), which in turn assures mirroring of ports in each of the refinements and the controller. TransitionRefinement fulfills the CTStepSizeControlActor interface so that it can be used to construct hybrid systems using the CT domain.

    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    David Hermann, Research In Motion Limited
    Pt.AcceptedRating:
    Red (reviewmoderator)
    Pt.ProposedRating:
    Red (eal)
    • Constructor Detail

      • TransitionRefinement

        public TransitionRefinement​(CompositeEntity container,
                                    java.lang.String name)
                             throws IllegalActionException,
                                    NameDuplicationException
        Construct a modal controller with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
    • Method Detail

      • newPort

        public Port newPort​(java.lang.String name)
                     throws NameDuplicationException
        Create a new port with the specified name in the container of this refinement, which in turn creates a port in this refinement all other refinements, and the controller. This method is write-synchronized on the workspace.
        Overrides:
        newPort in class Refinement
        Parameters:
        name - The name to assign to the newly created port.
        Returns:
        The new port.
        Throws:
        NameDuplicationException - If the entity already has a port with the specified name.