|
||||||||||
| 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 |
NamedObj.ContainedObjectsIterator |
| Field Summary | |
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(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
DTDirector(Workspace workspace)
Construct a director in the workspace with an empty name. |
|
| Method Summary | |
protected int |
_getRepetitions(Actor actor)
Get the number of times an actor repeats in the schedule of an SDF graph. |
void |
attributeChanged(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. |
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,
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(IOPort port)
Override the base class method to make sure that enough tokens are available to complete one iteration. |
boolean |
transferOutputs(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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public Parameter period
| Constructor Detail |
public DTDirector()
throws IllegalActionException,
NameDuplicationException
public DTDirector(Workspace workspace)
throws IllegalActionException,
NameDuplicationException
workspace - The workspace of this object.
public DTDirector(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - Container of the director.name - Name of this director.
IllegalActionException - If the
director is not compatible with the specified container.
NameDuplicationException - If the container is not a
CompositeActor and the name collides with an entity in the container.| Method Detail |
public void attributeChanged(Attribute attribute)
throws IllegalActionException
attributeChanged in class SDFDirectorattribute - The attribute that changed.
IllegalActionException - Not thrown in this base class.
public void fire()
throws IllegalActionException
fire in interface Executablefire in class StaticSchedulingDirectorIllegalActionException - If an actor executed by this
director returns false in its prefire().public double getCurrentTime()
getCurrentTime in class Directorpublic double getNextIterationTime()
getNextIterationTime in class Director
public double getPeriod()
throws IllegalActionException
IllegalActionException - If the period parameter is
is not of type DoubleToken or IntToken.
public void initialize()
throws IllegalActionException
initialize in interface Executableinitialize in class SDFDirectorIllegalActionException - If the initialize() method of
one of the associated actors throws it.public void invalidateSchedule()
invalidateSchedule in class StaticSchedulingDirectorNamedObj.attributeChanged(ptolemy.kernel.util.Attribute),
NamedObj.attributeTypeChanged(ptolemy.kernel.util.Attribute)public Receiver newReceiver()
newReceiver in class SDFDirector
public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class SDFDirectorIllegalActionException - If the parent class throws
it.
public boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class SDFDirectorIllegalActionException - If the parent class throws
it.
public void setActorLocalTime(double newTime,
Actor actor)
newTime - The new current simulation time.actor - The actor to be assigned a new local timepublic void setCurrentTime(double newTime)
setCurrentTime in class DirectornewTime - The new current simulation time.
public boolean transferInputs(IOPort port)
throws IllegalActionException
transferInputs in class SDFDirectorport - The port to transfer tokens from.
IllegalActionException - If the port is not an opaque
input port.
public boolean transferOutputs(IOPort port)
throws IllegalActionException
transferOutputs in class SDFDirectorport - The port to transfer tokens from.
IllegalActionException - If the port is not an opaque
output port.
public void wrapup()
throws IllegalActionException
wrapup in interface Executablewrapup in class DirectorIllegalActionException - If the parent class
throws it
protected int _getRepetitions(Actor actor)
throws IllegalActionException
actor - The actor whose firing count is needed
IllegalActionException - If actor does not exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||