Class DDEActor

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

    public class DDEActor
    extends TypedAtomicActor
    An optional base class for DDE actors. DDEActors are intended to execute as autonomous processes that maintain a distributed notion of time. In a DDE model, each actor is controlled by a unique DDEThread. Each DDEThread maintains its actor's local notion of time. Local time information is dependent on the time stamps associated with tokens that are consumed by an actor. More precisely, an actor's local notion of time is equivalent to the maximum time stamp of all tokens that the actor has consumed. Constraints on the consumption of tokens are described in the documentation for DDEThread. Note that consumed tokens may include NullTokens. A NullToken is a subclass of Token that is communicated solely for the purpose of advancing the local notion of time of the actor that consumes the NullToken.

    The DDE model of computation supports typed, polymorphic actors and does not require this base class for implementation; this class is purely optional. This class provides convenient syntactic shortcuts for developing actors that operate according to DDE semantics.

    Since:
    Ptolemy II 0.3
    Version:
    $Id$
    Author:
    John S. Davis II
    See Also:
    DDEThread, NullToken
    Pt.AcceptedRating:
    Yellow (yuhong)
    Pt.ProposedRating:
    Yellow (davisj)
    • Constructor Detail

      • DDEActor

        public DDEActor()
        Construct a DDEActor with no container and a name that is an empty string.
      • DDEActor

        public DDEActor​(Workspace workspace)
        Construct a DDEActor with the specified workspace and a name that is an empty string.
        Parameters:
        workspace - The workspace for this DDEActor.
      • DDEActor

        public DDEActor​(CompositeEntity container,
                        java.lang.String name)
                 throws IllegalActionException,
                        NameDuplicationException
        Construct a DDEActor with the specified container and name. The name must be unique with respect to the container or an exception is thrown.
        Parameters:
        container - The container of this DDEActor.
        name - The name of this DDEActor.
        Throws:
        IllegalActionException - If the constructor of the superclass throws an IllegalActionException.
        NameDuplicationException - If the constructor of the superclass throws a NameDuplicationException .
    • Method Detail

      • getNextToken

        public Token getNextToken()
                           throws IllegalActionException
        Return a non-NullToken from the receiver that has the minimum, non-negative receiver time of all receivers contained by this actor. If there exists a set of multiple receivers that share a common minimum receiver time, then return the token contained by the highest priority receiver within this set. If this actor contains no receivers then return null. This method may block as it calls several blocking methods.
        Returns:
        Return a non-NullToken that has the minimum, nonnegative receiver time of all receivers contained by this actor.
        Throws:
        IllegalActionException - If there is a problem getting the next input.