Package ptolemy.distributed.actor
Class DistributedDirector
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.Director
-
- ptolemy.distributed.actor.DistributedDirector
-
- All Implemented Interfaces:
java.lang.Cloneable
,Executable
,Initializable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class DistributedDirector extends Director
The DistributedDirector extends Director to function on a distributed environment. It provides receivers of the type DistributedSDFReceiver. //TODO: Make it more generic that the type of receivers it provides can be changed in case different MoC are to be implemented.- Since:
- Ptolemy II 5.1
- Version:
- $Id$
- Author:
- Daniel Lazaro Cuadrado (kapokasa@kom.aau.dk)
- See Also:
Director
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (kapokasa)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.Director
_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime
-
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 DistributedDirector()
Construct a director in the default workspace with an empty string as its name.DistributedDirector(CompositeEntity container, java.lang.String name)
Construct a director in the given container with the given name.DistributedDirector(Workspace workspace)
Construct a director in the workspace with an empty name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.HashMap
getIdsReceiversMap()
Return the map from ID to the receiver containing the ID.Receiver
newReceiver()
Return a DistributedSDFReceiver.void
setListOfIds(java.util.LinkedList list)
Specify the list of IDs to be used for Receiver creation by the newReceiver method.-
Methods inherited from class ptolemy.actor.Director
_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _schedule, _transferInputs, _transferOutputs, addInitializable, attributeChanged, clone, createSchedule, defaultDependency, delayDependency, elapsedTimeSinceStart, finish, fire, fireAt, fireAt, fireAt, fireAtCurrentTime, fireContainerAt, fireContainerAt, getCausalityInterface, getCurrentTime, getDeadline, getEnvironmentTime, getExecutionAspect, getGlobalTime, getModelNextIterationTime, getModelStartTime, getModelStopTime, getModelTime, getNextIterationTime, getStartTime, getStopTime, getTimeResolution, implementsStrictActorSemantics, initialize, initialize, invalidateResolvedTypes, invalidateSchedule, isEmbedded, isFireFunctional, isStopRequested, isStrict, iterate, mutexLockObject, notifyTokenSentToCommunicationAspect, postfire, prefire, preinitialize, preinitialize, removeInitializable, requestInitialization, resume, resumeActor, scheduleContainedActors, setContainer, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, stop, stopFire, suggestedModalModelDirectors, supportMultirateFiring, suspend, terminate, transferInputs, transferOutputs, transferOutputs, wrapup
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Constructor Detail
-
DistributedDirector
public DistributedDirector() throws IllegalActionException, NameDuplicationException
Construct a director in the default workspace with an empty string as its name.- Throws:
NameDuplicationException
- If construction of Time objects fails.IllegalActionException
- If construction of Time objects fails.
-
DistributedDirector
public DistributedDirector(Workspace workspace) throws IllegalActionException, NameDuplicationException
Construct a director in the workspace with an empty name.- Parameters:
workspace
- The workspace of this object.- Throws:
NameDuplicationException
- If construction of Time objects fails.IllegalActionException
- If construction of Time objects fails.
-
DistributedDirector
public DistributedDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a director in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string.- Parameters:
container
- The container.name
- The name of this director.- Throws:
IllegalActionException
- If the name has a period in it, or the director is not compatible with the specified container, or if the time resolution parameter is malformed.NameDuplicationException
- If the container already contains an entity with the specified name.
-
-
Method Detail
-
getIdsReceiversMap
public java.util.HashMap getIdsReceiversMap()
Return the map from ID to the receiver containing the ID.- Returns:
- A HashMap from ID to the receiver containing the ID.
-
newReceiver
public Receiver newReceiver()
Return a DistributedSDFReceiver. The receiver created will have the next available ID in the listOfIds that has been previously set. In case the listOfIds is empty, the ID will be a number starting from 1000 (lastID). This should never occur! It is there for testing purposes and could be removed.- Overrides:
newReceiver
in classDirector
- Returns:
- A DistributedSDFReceiver with the next available ID in the listOfIds.
-
setListOfIds
public void setListOfIds(java.util.LinkedList list)
Specify the list of IDs to be used for Receiver creation by the newReceiver method.- Parameters:
list
- A list of IDs.
-
-