ptolemy.domains.tdl.kernel
Class TDLModule
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.CompositeActor
ptolemy.actor.TypedCompositeActor
ptolemy.domains.ct.kernel.CTCompositeActor
ptolemy.domains.fsm.modal.ModalModel
ptolemy.domains.tdl.kernel.TDLModule
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, CTDynamicActor, CTEventGenerator, CTStatefulActor, CTStepSizeControlActor, CTWaveformGenerator, Changeable, ChangeListener, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class TDLModule
- extends ModalModel
A TDL module forms a unit that consists of sensors, actuators, and modes.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: TDLModule.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Patricia Derler
- See Also:
- Serialized Form
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
TDLModule(CompositeEntity container,
java.lang.String name)
Construct a tdl module with a name and a container. |
TDLModule(Workspace workspace)
Construct a tdl module in the specified workspace with no container and
an empty string as a name. |
Method Summary |
private void |
_init()
Initialize the model. |
void |
attributeChanged(Attribute attribute)
React to a change of the director or other property. |
java.lang.Object |
clone(Workspace workspace)
Override the base class to ensure that the _controller private variable
is reset to the controller of the cloned object. |
CausalityInterface |
getCausalityInterface()
Get representation of dependencies between input ports and
output ports. |
Port |
newPort(java.lang.String name)
Create a new port with the specified name in this entity, the controller,
and all the refinements. |
Methods inherited from class ptolemy.actor.CompositeActor |
_actorFiring, _actorFiring, _finishedAddEntity, _getPublishedPort, _setDirector, addActorFiringListener, addInitializable, addPiggyback, connectionsChanged, createReceivers, createSchedule, fire, getDirector, getExecutiveDirector, getManager, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, preinitialize, recordFiring, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, wrapup |
Methods inherited from class ptolemy.kernel.CompositeEntity |
_adjustDeferrals, _deepOpaqueEntityList, _description, _exportMoMLContents, _recordDecoratedAttributes, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allCompositeEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepEntityList, deepGetEntities, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, 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.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, attributeTypeChanged, clone, 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, propagateValue, propagateValues, removeChangeListener, removeDebugListener, 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 |
TDLModule
public TDLModule(Workspace workspace)
throws IllegalActionException,
NameDuplicationException
- Construct a tdl module in the specified workspace with no container and
an empty string as a name. You can then change the name with setName().
If the workspace argument is null, then use the default workspace.
- Parameters:
workspace
- The workspace that will list the actor.
- Throws:
IllegalActionException
- If the name has a period in it, or the director is not
compatible with the specified container.
NameDuplicationException
- If the container already contains an entity with the
specified name.
TDLModule
public TDLModule(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct a tdl module with a name and a container. The container
argument must not be null, or a NullPointerException will be thrown.
- Parameters:
container
- The container.name
- The name of this actor.
- Throws:
IllegalActionException
- If the container is incompatible with this actor.
NameDuplicationException
- If the name coincides with an actor already in the
container.
attributeChanged
public void attributeChanged(Attribute attribute)
throws IllegalActionException
- React to a change of the director or other property.
needs to be overridden because of the director class that should always
be TDLModuleDirector.
- Overrides:
attributeChanged
in class ModalModel
- Parameters:
attribute
- Attribute to be changed.
- Throws:
IllegalActionException
- Thrown if director of the module, the TDLModuleDirector,
cannot be set.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Override the base class to ensure that the _controller private variable
is reset to the controller of the cloned object.
- Overrides:
clone
in class ModalModel
- Parameters:
workspace
- The workspace for the cloned object.
- Returns:
- The new Entity.
- Throws:
java.lang.CloneNotSupportedException
- If cloned ports cannot have as their container the cloned
entity (this should not occur), or if one of the
attributes cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
getCausalityInterface
public CausalityInterface getCausalityInterface()
- Description copied from class:
ModalModel
- Get representation of dependencies between input ports and
output ports.
- Specified by:
getCausalityInterface
in interface Actor
- Overrides:
getCausalityInterface
in class ModalModel
- Returns:
- A representation of the dependencies between input ports
and output ports.
newPort
public Port newPort(java.lang.String name)
throws NameDuplicationException
- Create a new port with the specified name in this entity, the controller,
and all the refinements. Link these ports so that if the new port is set
to be an input, output, or multiport, then the change is mirrored in the
other ports. The new port will be an instance of ModalPort, which extends
TypedIOPort. This method is write-synchronized on the workspace, and
increments its version number.
- Overrides:
newPort
in class ModalModel
- Parameters:
name
- The name to assign to the newly created port.
- Returns:
- The new port.
- Throws:
NameDuplicationException
- If the entity already has a port with the specified name.
_init
private void _init()
throws IllegalActionException,
NameDuplicationException
- Initialize the model.
- Throws:
IllegalActionException
NameDuplicationException