Class TriggeredClock

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

    @Deprecated
    public class TriggeredClock
    extends Clock
    Deprecated.
    Use DiscreteClock.
    This actor is an extension of Clock with a start and stop input. A token at the start input will start the clock. A token at the stop input will stop the clock, if it is still running. If both start and stop are received simultaneously, then the clock will be stopped.

    So that this start and stop ports can be used meaningfully in the CT domain, they are declared DISCRETE, and they should be connected to an event generator. Other domains ignore this declaration.

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

      • start

        public TypedIOPort start
        Deprecated.
        A port that, if connected, is used to specify when the clock starts. This port has undeclared type.
      • stop

        public TypedIOPort stop
        Deprecated.
        A port that, if connected, is used to specify when the clock stops. This port has undeclared type.
    • Method Detail

      • initialize

        public void initialize()
                        throws IllegalActionException
        Deprecated.
        Override the base class to start not being enabled.
        Specified by:
        initialize in interface Initializable
        Overrides:
        initialize in class Clock
        Throws:
        IllegalActionException - If the parent class throws it, or if the values parameter is not a row vector, or if the fireAt() method of the director throws it, or if the director does not agree to fire the actor at the specified time.
      • _updateTentativeValues

        protected void _updateTentativeValues()
                                       throws IllegalActionException
        Deprecated.
        Copy values committed in initialize() or in the last postfire() into the corresponding tentative variables. In effect, this loads the last known good value for these variables, which is particularly important if time has gone backwards. This overrides the base class to check whether the start or stop inputs have values.
        Overrides:
        _updateTentativeValues in class Clock
        Throws:
        IllegalActionException - If thrown accessing start or stop input data.