ptolemy.domains.sdf.lib
Class DelayLine
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.sdf.lib.SDFTransformer
ptolemy.domains.sdf.lib.DelayLine
- All Implemented Interfaces:
- Actor, Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, Executable, Instantiable, ModelErrorHandler, MoMLExportable, Nameable, SequenceActor, java.io.Serializable, TypedActor
- public class DelayLine
- extends SDFTransformer
This actor reads tokens from its input port, and for each token read
outputs an array that contains the current token as the first token,
followed by some number of previously read tokens. The length of the
output array is the same as that of the array in the initialValues
parameter. That parameter also provides the initial values when there
are no previously read tokens.
Note that this actor is not a simple sample delay.
Use the SampleDelay actor to achieve a simple sample delay.
- Since:
- Ptolemy II 1.0
- Version:
- $Id: DelayLine.java,v 1.21 2004/04/13 05:12:27 cxh Exp $
- Author:
- Steve Neuendorffer
- See Also:
SampleDelay,
Serialized Form
- Accepted Rating:
- Proposed Rating:
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
|
Constructor Summary |
DelayLine(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
|
Method Summary |
void |
attributeTypeChanged(Attribute attribute)
Override the base class to allow type changes on
initialValues. |
void |
fire()
Consume a token from the input, push it onto the delay line
and produce the output ArrayToken containing the current state of
the delay line. |
void |
initialize()
Initialize this actor by reading the value of initialValues. |
java.util.List |
typeConstraintList()
Return the type constraint that the type of the elements of the
output array is no less than the type of the input port. |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, postfire, preinitialize, pruneDependencies, removeDependency, setContainer, stop, stopFire, terminate, wrapup |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
initialValues
public Parameter initialValues
- The initial values of the delay line.
This parameter must contain an ArrayToken.
The default value is an array that contains 4 integer tokens.
Changes to this parameter after initialize() has been invoked
are ignored until the next execution of the model.
DelayLine
public DelayLine(CompositeEntity container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
- Construct an actor with the given container and name.
- Parameters:
container - The container.name - The name of this actor.
- Throws:
IllegalActionException - If the actor cannot be contained
by the proposed container.
NameDuplicationException - If the container already has an
actor with this name.
attributeTypeChanged
public void attributeTypeChanged(Attribute attribute)
throws IllegalActionException
- Override the base class to allow type changes on
initialValues.
- Overrides:
attributeTypeChanged in class TypedAtomicActor
- Parameters:
attribute - The attribute whose type changed.
- Throws:
IllegalActionException - If type changes are not
allowed on the specified attribute.
fire
public void fire()
throws IllegalActionException
- Consume a token from the input, push it onto the delay line
and produce the output ArrayToken containing the current state of
the delay line.
- Specified by:
fire in interface Executable- Overrides:
fire in class AtomicActor
- Throws:
IllegalActionException - If not enough tokens are available.
initialize
public void initialize()
throws IllegalActionException
- Initialize this actor by reading the value of initialValues.
- Specified by:
initialize in interface Executable- Overrides:
initialize in class AtomicActor
- Throws:
IllegalActionException - If a derived class throws it.
typeConstraintList
public java.util.List typeConstraintList()
- Return the type constraint that the type of the elements of the
output array is no less than the type of the input port.
- Specified by:
typeConstraintList in interface TypedActor- Overrides:
typeConstraintList in class TypedAtomicActor
- Returns:
- A list of inequalities.
- See Also:
Inequality