|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.dde.kernel.DDEActor
ptolemy.domains.dde.kernel.FeedBackDelay
public class FeedBackDelay
FeedBackDelay actors are used to add delay to feedback topologies. If a FeedBackDelay actor consumes a token (real or Null), it has the option of producing an equivalent token on the output with an incremented time stamp value. Alternatively, the FeedBackDelay actor will simply produce the token without altering the time stamp.
Two parameters - nullDelay and realDelay - are available for determining whether an FeedBackDelay actor increments the time stamp of produced output tokens. The default value of nullDelay (realDelay) is true (false). If the nullDelay (realDelay) parameter is set to true, then the time stamps of NullTokens (real tokens) will be incremented as they pass through this actor.
The delay value that is applied (given that one of the above parameters is true) is determined by the setDelay() and getDelay() methods. More elaborate delay values can be made available by overriding the getDelay() method in derived classes.
FeedBackDelay actors are effective for preventing Zeno conditions involving cycles of null tokens. If a DDE model has a feedback topology, a FeedBackDelay actor should be added into the feedback loop.
The delay value of a FeedBackDelay actor must be wisely chosen. The delay value should be smaller than any other successive time stamp increment found in a given DDE model. This means that if a particular model might have any two time stamps with time difference delta, then the delay value should be smaller than delta.
NullToken
,
Serialized Form
Red (yuhong) |
Red (davisj) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
Parameter |
delay
The delay for this actor. |
TypedIOPort |
input
The input port. |
Parameter |
nullDelay
The boolean parameter that indicates whether a delay value will be added to the time stamp of null tokens that are produced by this actor. |
TypedIOPort |
output
The output port. |
Parameter |
realDelay
The boolean parameter that indicates whether a delay value will be added to the time stamp of real tokens that are produced by this actor. |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _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 | |
---|---|
FeedBackDelay()
Construct a FeedBackDelay with no container and a name that is an empty string. |
|
FeedBackDelay(CompositeEntity container,
java.lang.String name)
Construct a FeedBackDelay with the specified container and name. |
|
FeedBackDelay(Workspace workspace)
Construct a FeedBackDelay with the specified workspace and a name that is an empty string. |
Method Summary | |
---|---|
private void |
_sendOutToken(Token token,
Time time)
Syntactic sugar for sending out tokens without depending on IOPort.send(). |
private void |
_setVariables()
Syntactic sugar for initializing parameters. |
void |
fire()
Consume a single input token and produce an identical output token. |
double |
getDelay()
Return the delay value of this actor. |
void |
initialize()
Initialize this actor by setting all receivers so that they do not hide NullTokens. |
Methods inherited from class ptolemy.domains.dde.kernel.DDEActor |
---|
_getNextInput, getNextToken |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
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.actor.Executable |
---|
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public Parameter delay
public TypedIOPort input
public Parameter nullDelay
public TypedIOPort output
public Parameter realDelay
Constructor Detail |
---|
public FeedBackDelay() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.
NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .public FeedBackDelay(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace for this FeedBackDelay.
IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.
NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .public FeedBackDelay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container of this FeedBackDelay.name
- The name of this FeedBackDelay.
IllegalActionException
- If the constructor of the
superclass throws an IllegalActionException.
NameDuplicationException
- If the constructor of the
superclass throws a NameDuplicationException .Method Detail |
---|
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor
IllegalActionException
- If there is an error when
sending the output token or setting the current time.public double getDelay() throws IllegalActionException
IllegalActionException
- If there is a problem reading
the delay token.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor
IllegalActionException
- If there is an error when
when attempting to access the receivers of this actor.NullToken
,
DDEReceiver
private void _sendOutToken(Token token, Time time) throws IllegalActionException
IllegalActionException
private void _setVariables() throws IllegalActionException, NameDuplicationException
IllegalActionException
NameDuplicationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |