Package ptolemy.domains.sdf.kernel
Class SDFIOPort
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.Port
-
- ptolemy.kernel.ComponentPort
-
- ptolemy.actor.IOPort
-
- ptolemy.actor.TypedIOPort
-
- ptolemy.domains.sdf.kernel.SDFIOPort
-
- All Implemented Interfaces:
java.lang.Cloneable
,HasTypeConstraints
,Typeable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
@Deprecated public final class SDFIOPort extends TypedIOPort
Deprecated.It is preferable to declare the rate parameters directly in the actors, instead of using this class. This allows the dependence of rates to be understood by various SDF schedulers.This class extends IOPort with convenience methods for handling the token production and consumption rates. These are merely convenience methods, as the pertinent attributes can be added to any IOPort and the SDF domain will respect them.It is not recommended to use this port as a port for composite actors because the presence of the rate parameters will prevent the inner SDF scheduler from propagating it rates to the outside. That is, if the parameters are present, the scheduler does not override them.
- Since:
- Ptolemy II 0.2
- Version:
- $Id$
- Author:
- Stephen Neuendorffer
- Pt.AcceptedRating:
- Yellow (johnr)
- Pt.ProposedRating:
- Yellow (neuendor)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.actor.TypedIOPort
TypedIOPort.RunTimeTypeCheckException
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
tokenConsumptionRate
Deprecated.The number of tokens consumed on this port each firing.Parameter
tokenInitProduction
Deprecated.The number of tokens produced on this port during initialization.Parameter
tokenProductionRate
Deprecated.The number of tokens produced on this port each firing.-
Fields inherited from class ptolemy.actor.TypedIOPort
_resolvedType, TYPE
-
Fields inherited from class ptolemy.actor.IOPort
_constantLimit, _constantToken, _constantTokensSent, _hasPortEventListeners, _portEventListeners, CONFIGURATION, defaultValue, RECEIVERS, REMOTERECEIVERS
-
Fields inherited from class ptolemy.kernel.Port
_insideLinks, _relationsList
-
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
-
-
Constructor Summary
Constructors Constructor Description SDFIOPort()
Deprecated.Construct an SDFIOPort with no container and no name that is neither an input nor an output.SDFIOPort(ComponentEntity container, java.lang.String name)
Deprecated.Construct an SDFIOPort with a containing actor and a name that is neither an input nor an output.SDFIOPort(ComponentEntity container, java.lang.String name, boolean isInput, boolean isOutput)
Deprecated.Construct an SDFIOPort with a container and a name that is either an input, an output, or both, depending on the third and fourth arguments.SDFIOPort(Workspace workspace)
Deprecated.Construct a port in the specified workspace with an empty string as a name.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Deprecated.Clone the port into the specified workspace.int
getTokenConsumptionRate()
Deprecated.Get the number of tokens that are consumed on every channel of this port.int
getTokenInitProduction()
Deprecated.Get the number of tokens that are produced on this port during initialization.int
getTokenProductionRate()
Deprecated.Get the number of tokens that are produced on the designated port of this Actor during each firing.void
setInput(boolean isInput)
Deprecated.Set whether or not this port is an input.void
setOutput(boolean isOutput)
Deprecated.Set whether or not this port is an output.void
setTokenConsumptionRate(int rate)
Deprecated.Set the number of tokens that are consumed on the appropriate port of this Actor during each firing by setting the value of the tokenConsumptionRate parameter.void
setTokenInitProduction(int count)
Deprecated.Set the number of tokens that are produced on the appropriate port of this Actor during initialize by setting the value of the tokenInitProduction parameter.void
setTokenProductionRate(int rate)
Deprecated.Set the number of tokens that are produced on the appropriate port of this Actor during each firing by setting the value of the tokenProductionRate parameter.-
Methods inherited from class ptolemy.actor.TypedIOPort
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _checkTypedIOPortContainer, _description, addTypeListener, attributeChanged, broadcast, broadcast, convert, getAutomaticTypeConversion, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, send, send, sendInside, setAutomaticTypeConversion, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.IOPort
_checkLiberalLink, _exportMoMLContents, _getInsideWidth, _getOutsideWidth, _getReceiversLinkedToGroup, _newInsideReceiver, _newInsideReceiver, _newReceiver, _newReceiver, _notifyPortEventListeners, _removeReceivers, _setConstant, _wrapReceiver, addIOPortEventListener, broadcastClear, checkWidthConstraints, createReceivers, deepConnectedInPortList, deepConnectedInPorts, deepConnectedOutPortList, deepConnectedOutPorts, deepGetReceivers, get, get, getChannelForReceiver, getCommunicationAspects, getCurrentTime, getDefaultWidth, getInside, getInsideReceivers, getIOPortEventListeners, getModelTime, getModelTime, getReceivers, getReceivers, getReceivers, getRelationIndex, getRemoteReceivers, getRemoteReceivers, getWidth, getWidthFromConstraints, getWidthInside, hasNewToken, hasNewTokenInside, hasRoom, hasRoomInside, hasToken, hasToken, hasTokenInside, hasWidthConstraints, insertLink, insideSinkPortList, insideSourcePortList, invalidateCommunicationAspects, isInput, isInsideConnected, isKnown, isKnown, isKnownInside, isMultiport, isOutput, isOutsideConnected, liberalLink, link, numberOfSinks, numberOfSources, removeIOPortEventListener, reset, sendClear, sendClearInside, setContainer, setDefaultWidth, setMultiport, setWidthEquals, setWidthEquals, sinkPortList, sourcePortList, transferInputs, transferOutputs, unlink, unlink, unlinkAll, unlinkAllInside, unlinkInside, unlinkInside
-
Methods inherited from class ptolemy.kernel.ComponentPort
_deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideGroupLinked, isInsideLinked, isOpaque, numInsideLinks
-
Methods inherited from class ptolemy.kernel.Port
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isGroupLinked, isLinked, linkedRelationList, linkedRelations, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, numLinks, setName
-
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, _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
-
-
-
-
Field Detail
-
tokenConsumptionRate
public Parameter tokenConsumptionRate
Deprecated.The number of tokens consumed on this port each firing.
-
tokenInitProduction
public Parameter tokenInitProduction
Deprecated.The number of tokens produced on this port during initialization.
-
tokenProductionRate
public Parameter tokenProductionRate
Deprecated.The number of tokens produced on this port each firing.
-
-
Constructor Detail
-
SDFIOPort
public SDFIOPort()
Deprecated.Construct an SDFIOPort with no container and no name that is neither an input nor an output.
-
SDFIOPort
public SDFIOPort(Workspace workspace) throws IllegalActionException
Deprecated.Construct a port in the specified workspace with 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. The object is added to the workspace directory. Increment the version number of the workspace.- Parameters:
workspace
- The workspace that will list the port.- Throws:
IllegalActionException
- If port parameters cannot be initialized.
-
SDFIOPort
public SDFIOPort(ComponentEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Deprecated.Construct an SDFIOPort with a containing actor and a name that is neither an input nor an output. The specified container must implement the Actor interface, or an exception will be thrown.- Parameters:
container
- The container actor.name
- The name of the port.- Throws:
IllegalActionException
- If the port is not of an acceptable class for the container, or if the container does not implement the Actor interface.NameDuplicationException
- If the name coincides with a port already in the container.
-
SDFIOPort
public SDFIOPort(ComponentEntity container, java.lang.String name, boolean isInput, boolean isOutput) throws IllegalActionException, NameDuplicationException
Deprecated.Construct an SDFIOPort with a container and a name that is either an input, an output, or both, depending on the third and fourth arguments. The specified container must implement the Actor interface or an exception will be thrown.- Parameters:
container
- The container actor.name
- The name of the port.isInput
- True if this is to be an input port.isOutput
- True if this is to be an output port.- Throws:
IllegalActionException
- If the port is not of an acceptable class for the container, or if the container does not implement the Actor interface.NameDuplicationException
- If the name coincides with a port already in the container.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Deprecated.Clone the port into the specified workspace. This calls the base class and then creates new parameters. The new port will have the same parameter values as the old.- Overrides:
clone
in classTypedIOPort
- Parameters:
workspace
- The workspace for the new object.- Returns:
- A new SDFIOPort.
- Throws:
java.lang.CloneNotSupportedException
- If one of the attributes cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,NamedObj.setDeferringChangeRequests(boolean)
-
getTokenConsumptionRate
public int getTokenConsumptionRate() throws IllegalActionException
Deprecated.Get the number of tokens that are consumed on every channel of this port.- Returns:
- The number of tokens consumed on this port, as specified in the tokenConsumptionRate Parameter.
- Throws:
IllegalActionException
- If calling getToken() throws it.- See Also:
setTokenConsumptionRate(int)
-
getTokenInitProduction
public int getTokenInitProduction() throws IllegalActionException
Deprecated.Get the number of tokens that are produced on this port during initialization.- Returns:
- The number of tokens produced on the port, as specified in the tokenInitProduction parameter.
- Throws:
IllegalActionException
- If calling getToken() throws it.- See Also:
setTokenInitProduction(int)
-
getTokenProductionRate
public int getTokenProductionRate() throws IllegalActionException
Deprecated.Get the number of tokens that are produced on the designated port of this Actor during each firing.- Returns:
- The number of tokens produced on the port, as specified in the tokenProductionRate parameter.
- Throws:
IllegalActionException
- If calling getToken() throws it.- See Also:
setTokenProductionRate(int)
-
setInput
public void setInput(boolean isInput) throws IllegalActionException
Deprecated.Set whether or not this port is an input. In addition to the base class operation, set the port rate parameters to reasonable values. If setting the port to be an input, then set the consumption rate to be 1. If setting the port to not be an input, then set the consumption rate to be 0.- Overrides:
setInput
in classIOPort
- Parameters:
isInput
- True to make the port an input.- Throws:
IllegalActionException
- If changing the port status is not permitted.
-
setOutput
public void setOutput(boolean isOutput) throws IllegalActionException
Deprecated.Set whether or not this port is an output. In addition to the base class operation, set the port rate parameters to reasonable values. If setting the port to be an output, then set the consumption rate to be 1. If setting the port to not be an output, then set the consumption rate to be 0.- Overrides:
setOutput
in classIOPort
- Parameters:
isOutput
- True to make the port an output.- Throws:
IllegalActionException
- If changing the port status is not permitted.
-
setTokenConsumptionRate
public void setTokenConsumptionRate(int rate) throws IllegalActionException
Deprecated.Set the number of tokens that are consumed on the appropriate port of this Actor during each firing by setting the value of the tokenConsumptionRate parameter.- Parameters:
rate
- The number of tokens that are consumed- Throws:
IllegalActionException
- If the rate is less than zero, or the port is not an input port.- See Also:
getTokenConsumptionRate()
-
setTokenInitProduction
public void setTokenInitProduction(int count) throws IllegalActionException
Deprecated.Set the number of tokens that are produced on the appropriate port of this Actor during initialize by setting the value of the tokenInitProduction parameter.- Parameters:
count
- The number of tokens that are produced- Throws:
IllegalActionException
- If the count is less than zero, or the port is not an output port.- See Also:
getTokenInitProduction()
-
setTokenProductionRate
public void setTokenProductionRate(int rate) throws IllegalActionException
Deprecated.Set the number of tokens that are produced on the appropriate port of this Actor during each firing by setting the value of the tokenProductionRate parameter.- Parameters:
rate
- The number of tokens that are produced.- Throws:
IllegalActionException
- If port is not contained in this actor, the rate is less than zero, or the port is not an output port.- See Also:
getTokenProductionRate()
-
-