public class NonStrictDelay extends Transformer
This actor provides a one-tick delay. On each firing, it produces on the output port whatever value it read on the input port in the previous tick of the clock. If the input was absent on the previous tick of the clock, then the output will be absent. On the first tick, the output is initialValue if it is given, and absent otherwise. In contrast to the Pre actor, this actor is non-strict, and hence can break causality loops. Whereas Pre provides a one-step delay of non-absent values, this actor simply delays by one clock tick.
Pre,
SampleDelay,
TimedDelay| Yellow (cxh) |
| Yellow (celaine) |
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
protected Token |
_previousToken
The token received on the previous iteration to be output on the
current iteration.
|
Parameter |
initialValue
Initial token value.
|
input, output_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
NonStrictDelay(CompositeEntity container,
java.lang.String name)
Construct an actor in the specified container with the specified
name.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Set<Inequality> |
_customTypeConstraints()
Return the a type constraint that requires the initial value to
be less than or equal to the type of the output.
|
void |
declareDelayDependency()
Declare that the output does not depend on the input in a firing but
has a delay of one period of the SRDirector.
|
void |
fire()
Send to the output the previous token received.
|
void |
initialize()
Initialize the state of the actor.
|
boolean |
isStrict()
Return false.
|
boolean |
postfire()
If the input is known, then read it and record
it for the next tick.
|
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, 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, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, iterate, prefire, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic Parameter initialValue
protected Token _previousToken
public NonStrictDelay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of this actor within the container.IllegalActionException - If the actor cannot be contained
by the proposed container.NameDuplicationException - If the name coincides with
an actor already in the container.public void declareDelayDependency()
throws IllegalActionException
declareDelayDependency in class AtomicActor<TypedIOPort>IllegalActionException - If the causality interface
cannot be computed.AtomicActor.getCausalityInterface()public void fire()
throws IllegalActionException
fire in interface Executablefire in class AtomicActor<TypedIOPort>IllegalActionException - If there is no director.public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If there is no director.public boolean isStrict()
isStrict in interface ExecutableisStrict in class AtomicActor<TypedIOPort>public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class AtomicActor<TypedIOPort>IllegalActionException - If the input is not
known, or if there is no director.protected java.util.Set<Inequality> _customTypeConstraints()
_customTypeConstraints in class TypedAtomicActor