Package ptolemy.domains.taskpt.lib
Class Task
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class Task extends TypedCompositeActor
A task in the taskpt domain. It consumes all input tokens at the beginning and produces all output tokens at the end.Input and output tokens are not passed directly, but via pointers that point to an address (range) in a shared memory that is controlled by the director of the container of a task. That's why a task has input/output ports for specifying the outputs. The token on the outside of this port specifies the address, where the tokens have to be stored in the shared memory. The inside of this port receives the tokens to be stored. A task works on copies of the data read from memory. A TaskDirector takes care of transferring the outputs and inputs. The TaskDirector also provides a shared memory that is exclusive to all actors within this task. This ensures that a task is free of side effects.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Bastian Ristau
- Pt.AcceptedRating:
- red (ristau)
- Pt.ProposedRating:
- red (ristau)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity
CompositeEntity.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.CompositeActor
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
-
Fields inherited from class ptolemy.kernel.CompositeEntity
_levelCrossingLinks
-
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 Task(CompositeEntity container, java.lang.String name)
Construct a Task with a name and a container.
-
Method Summary
-
Methods inherited from class ptolemy.actor.TypedCompositeActor
_addEntity, _addPort, _addRelation, _checkTypesFromTo, _destinationTypeConstraints, attributeChanged, attributeTypeChanged, isBackwardTypeInferenceEnabled, newPort, newRelation, resolveTypes, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.CompositeActor
_actorFiring, _actorFiring, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, preinitialize, recordFiring, registerPublisherPort, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort, wrapup
-
Methods inherited from class ptolemy.kernel.CompositeEntity
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, clone, 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, 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
-
Task
public Task(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a Task with a name and a container. The container argument must not be null, or a NullPointerException will be thrown. This actor will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace. The director of the Task is set to be a TaskDirector.- Parameters:
container
- The container.name
- The name of this actor.- Throws:
IllegalActionException
- Thrown if the container is incompatible with this actor.NameDuplicationException
- Thrown if the name coincides with an actor already in the container.
-
-