Class EnabledComposite

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

    public class EnabledComposite
    extends TypedCompositeActor
    A composite actor whose clock ticks only when enabled.

    This actor will only have clock ticks when provided with a true-valued token on the enabled input port. Thus, it can be used to create subclocks of the master clock.

    Note that this mechanism is a hierarchical version of what is provided by the Lustre and SIGNAL clock calculi, but it circumvents the undecidability of clock signals by requiring the model designer to be explicit about subclocks.

    P. Caspi, D. Pilaud, N. Halbwachs, and J. A. Plaice, "LUSTRE: A Declarative Language for Programming Synchronous Systems," Conference Record of the 14th Annual ACM Symp. on Principles of Programming Languages, Munich, Germany, January, 1987.

    A. Benveniste and P. Le Guernic, "Hybrid Dynamical Systems Theory and the SIGNAL Language," IEEE Tr. on Automatic Control, Vol. 35, No. 5, pp. 525-546, May 1990.

    Since:
    Ptolemy II 4.1
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • enable

        public TypedIOPort enable
        The control port for enabling the composite.
    • Method Detail

      • getCausalityInterface

        public CausalityInterface getCausalityInterface()
        Return a causality interface for this actor, which overrides the default behavior of composite actors to ensure that all outputs depend on the enable input port.
        Specified by:
        getCausalityInterface in interface Actor
        Overrides:
        getCausalityInterface in class CompositeActor
        Returns:
        A representation of the dependencies between input ports and output ports.
      • prefire

        public boolean prefire()
                        throws IllegalActionException
        If the enable input is not known, then return false; if the enable input is known and either absent or false, then also return false; if it is known and true, then invoke the prefire() method of the superclass and return what it returns.
        Specified by:
        prefire in interface Executable
        Overrides:
        prefire in class CompositeActor
        Returns:
        True if the iteration can proceed.
        Throws:
        IllegalActionException - If the superclass throws it.