|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.Director
ptolemy.actor.sched.StaticSchedulingDirector
ptolemy.domains.sdf.kernel.SDFDirector
ptolemy.domains.dt.kernel.DTDirector
The Discrete Time (DT) domain director.
The DT director has a period parameter which specifies the amount of time per iteration. For hierarchical DT, this period parameter only makes sense on the top-level. The user cannot explicitly set the period parameter for a DT subsystem inside another DT system. For heterogeneous hierarchies (e.g. DT inside DE or DT inside CT), the period parameter specifies the time interval between firings of the DT subsystem. The DT subsystem will not fire on times that are not integer multiples of the period parameter.
.
Top-level DT Directors have a period parameter that can be set by the user. Setting the period parameter of a non-top-level DT Director under hierarchical DT has no meaning; and hence will be ignored.
Domain-polymorphic actors that want to take advantage of the multi-rate timing capabilities of DT should call getCurrentTime(channel_number) for every get(channel_number). Moreover, the call sequence should be ordered as follows: getCurrentTime(channel_number) before get(channel_number). Known bugs:
1.) Put more tests on this case: when events come in faster than the period of a DT composite actor (e.g clock feeding DT) 2.) Put more tests on this case: when DT composite actor doesn't fire because there aren't enough tokens. 3.) Domain-polymorphic actors that use getCurrentTime() should be modified to use DT's multirate timing capabilities. CurrentTime - modified TimedPlotter - modified TimedScope - modified SequentialClock - no input ports, gets global time only PoissonClock - under investigation Clock - under investigation Expression - under investigation
DTReceiver,
SDFDirector,
SDFReceiver,
SDFScheduler,
Serialized Form
| Yellow (vogel) |
| Yellow (chf) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
ptolemy.kernel.util.NamedObj.ContainedObjectsIterator |
| Field Summary | |
ptolemy.data.expr.Parameter |
period
The period of the model. |
| Fields inherited from class ptolemy.domains.sdf.kernel.SDFDirector |
allowDisconnectedGraphs, allowRateChanges, iterations, vectorizationFactor |
| Fields inherited from class ptolemy.actor.Director |
_currentTime, _stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
DTDirector()
Construct a director in the default workspace with an empty string as its name. |
|
DTDirector(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
DTDirector(ptolemy.kernel.util.Workspace workspace)
Construct a director in the workspace with an empty name. |
|
| Method Summary | |
protected int |
_getRepetitions(ptolemy.actor.Actor actor)
Get the number of times an actor repeats in the schedule of an SDF graph. |
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
React to a change in an attribute. |
void |
fire()
Go through the schedule and iterate every actor with calls to prefire() , fire() , and postfire(). |
double |
getCurrentTime()
Return the DT global time. |
double |
getNextIterationTime()
Return the time value of the next iteration. |
double |
getPeriod()
Get the global time increment per iteration for this director. |
void |
initialize()
Initialize all the actors associated with this director by calling super.initialize(). |
void |
invalidateSchedule()
Process the mutation that occurred. |
ptolemy.actor.Receiver |
newReceiver()
Return a new receiver consistent with the DT domain. |
boolean |
postfire()
Request the outside director to fire this director's container again for the next period. |
boolean |
prefire()
Check the input ports of the container composite actor (if there are any) to see whether they have enough tokens. |
void |
setActorLocalTime(double newTime,
ptolemy.actor.Actor actor)
Set the local time of an actor in the model under this director. |
void |
setCurrentTime(double newTime)
Set a new value to the current time of the model, where the new time may be earlier than the current time. |
boolean |
transferInputs(ptolemy.actor.IOPort port)
Override the base class method to make sure that enough tokens are available to complete one iteration. |
boolean |
transferOutputs(ptolemy.actor.IOPort port)
This is called by the outside director to get tokens from an opaque composite actor. |
void |
wrapup()
Reset this director to an uninitialized state. |
| Methods inherited from class ptolemy.domains.sdf.kernel.SDFDirector |
_writeAccessRequired, preinitialize |
| Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
_setScheduler, addDebugListener, getScheduler, isScheduleValid, removeDebugListener, setScheduler, setScheduleValid |
| Methods inherited from class ptolemy.actor.Director |
_description, _isEmbedded, _isTopLevel, domainPolymorphicTransferInputs, domainPolymorphicTransferOutputs, fireAt, fireAtCurrentTime, getTimeResolution, initialize, invalidateResolvedTypes, iterate, needWriteAccess, requestInitialization, setContainer, setTimeResolution, stop, stopFire, terminate |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, clone, getContainer, setName |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public ptolemy.data.expr.Parameter period
| Constructor Detail |
public DTDirector()
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
public DTDirector(ptolemy.kernel.util.Workspace workspace)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
workspace - The workspace of this object.
public DTDirector(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - Container of the director.name - Name of this director.
ptolemy.kernel.util.IllegalActionException - If the
director is not compatible with the specified container.
ptolemy.kernel.util.NameDuplicationException - If the container is not a
CompositeActor and the name collides with an entity in the container.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
attributeChanged in class SDFDirectorattribute - The attribute that changed.
ptolemy.kernel.util.IllegalActionException - Not thrown in this base class.
public void fire()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If an actor executed by this
director returns false in its prefire().public double getCurrentTime()
public double getNextIterationTime()
public double getPeriod()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the period parameter is
is not of type DoubleToken or IntToken.
public void initialize()
throws ptolemy.kernel.util.IllegalActionException
initialize in interface ptolemy.actor.Executableinitialize in class SDFDirectorptolemy.kernel.util.IllegalActionException - If the initialize() method of
one of the associated actors throws it.public void invalidateSchedule()
NamedObj.attributeChanged(ptolemy.kernel.util.Attribute),
NamedObj.attributeTypeChanged(ptolemy.kernel.util.Attribute)public ptolemy.actor.Receiver newReceiver()
newReceiver in class SDFDirector
public boolean postfire()
throws ptolemy.kernel.util.IllegalActionException
postfire in interface ptolemy.actor.Executablepostfire in class SDFDirectorptolemy.kernel.util.IllegalActionException - If the parent class throws
it.
public boolean prefire()
throws ptolemy.kernel.util.IllegalActionException
prefire in interface ptolemy.actor.Executableprefire in class SDFDirectorptolemy.kernel.util.IllegalActionException - If the parent class throws
it.
public void setActorLocalTime(double newTime,
ptolemy.actor.Actor actor)
newTime - The new current simulation time.actor - The actor to be assigned a new local timepublic void setCurrentTime(double newTime)
newTime - The new current simulation time.
public boolean transferInputs(ptolemy.actor.IOPort port)
throws ptolemy.kernel.util.IllegalActionException
transferInputs in class SDFDirectorport - The port to transfer tokens from.
ptolemy.kernel.util.IllegalActionException - If the port is not an opaque
input port.
public boolean transferOutputs(ptolemy.actor.IOPort port)
throws ptolemy.kernel.util.IllegalActionException
transferOutputs in class SDFDirectorport - The port to transfer tokens from.
ptolemy.kernel.util.IllegalActionException - If the port is not an opaque
output port.
public void wrapup()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the parent class
throws it
protected int _getRepetitions(ptolemy.actor.Actor actor)
throws ptolemy.kernel.util.IllegalActionException
actor - The actor whose firing count is needed
ptolemy.kernel.util.IllegalActionException - If actor does not exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||