Package ptolemy.domains.dde.kernel
Class DDEActor
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.domains.dde.kernel.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description DDEActor()
Construct a DDEActor with no container and a name that is an empty string.DDEActor(CompositeEntity container, java.lang.String name)
Construct a DDEActor with the specified container and name.DDEActor(Workspace workspace)
Construct a DDEActor with the specified workspace and a name that is an empty string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
getNextToken()
Return a non-NullToken from the receiver that has the minimum, non-negative receiver time of all receivers contained by this actor.-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
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.
-
-