Class NonInterruptibleTimer

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

    @Deprecated
    public class NonInterruptibleTimer
    extends Timer
    Deprecated.
    Use ptolemy.actor.lib.ResettableTimer.
    A NonInterruptibleTimer actor works similar to the Timer actor, except that if a NonInterruptibleTimer actor has not finished processing the previous input, a new input has to be delayed for processing. In other words, it can not be interrupted to respond new inputs. Instead, the new inputs will be queued and processed in a first come first serve (FCFS) fashion. This actor extends the Timer actor.

    The key difference between the NonInterruptibleTimer actor and the Server actor is how the service time is specified. In the NonInterruptibleTimer actor, whenever an input arrives, the value of the input token specifies the service time. This actor will guarantee that much service time to be given to that input. In the Server actor, service times for inputs ar decided by the ServiceTime parameter, which may change any time during an execution. In particular, how much service time an input actually gets is decided the value of the ServiceTime parameter at the time the server is ready to serve that input.

    Since:
    Ptolemy II 4.1
    Version:
    $Id$
    Author:
    Haiyang Zheng
    See Also:
    Timer
    Pt.AcceptedRating:
    Red (hyzheng)
    Pt.ProposedRating:
    Yellow (hyzheng)
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        Deprecated.
        Read one token from the input. Send out a token that is scheduled to produce at the current time to the output.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class Timer
        Throws:
        IllegalActionException - If the delay value is negative, or this actor can not send tokens to ports, or this actor can not get tokens from ports.
      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Deprecated.
        If there are delayed inputs that are not processed and the timer is not busy, begin processing the earliest input and schedule a future firing to produce it.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class Timer
        Returns:
        True if execution can continue into the next iteration.
        Throws:
        IllegalActionException - If there is no director or can not schedule future firings to handle delayed input events.