|
||||||||||
| 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.giotto.kernel.GiottoDirector
This class implements a director for the Giotto model of computation without Giotto modes. Schedules are generated according to the Giotto semantics. The GiottoScheduler class contains methods to compute the schedules. The GiottoReceiver class implements the data flow between actors using double-buffering.
If the parameter synchronizeToRealTime is set to true,
then the director will not process events until the real time elapsed
since the model started matches the time stamp of the event.
This ensures that the director does not get ahead of real time,
but, of course, it does not ensure that the director keeps up with
real time.
GiottoScheduler,
GiottoReceiver,
Serialized Form
| Red (eal) |
| Yellow (cm) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary | |
protected static double |
_DEFAULT_GIOTTO_PERIOD
The static default Giotto period is 100ms. |
Parameter |
iterations
The number of times that postfire may be called before it returns false. |
Parameter |
period
The period of an iteration. |
Parameter |
synchronizeToRealTime
Specify whether the execution should synchronize to the real time. |
Parameter |
timeResolution
The resolution in comparing time. |
| 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 | |
GiottoDirector()
Construct a director in the default workspace with an empty string as its name. |
|
GiottoDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
|
GiottoDirector(Workspace workspace)
Construct a director in the given workspace with an empty name. |
|
| Method Summary | |
protected boolean |
_writeAccessRequired()
Override the base class to indicate that this director does not need write access on the workspace during an iteration. |
void |
attributeChanged(Attribute attribute)
If the specified attribute is filename, then close the current file (if there is one) and open the new one. |
void |
fire()
Iterate the actors in the next minor cycle of the schedule. |
int |
getIntPeriod()
Get the period of the giotto director in ms |
double |
getNextIterationTime()
Return the next time that this director expects activity. |
double |
getPeriod()
Get the period of the giotto director in ms |
void |
initialize()
Initialize the actors associated with this director. |
Receiver |
newReceiver()
Return a new receiver consistent with the Giotto domain. |
boolean |
postfire()
Return false if the system has finished executing, either by reaching the iteration limit, or by having an actor in the model return false in postfire. |
boolean |
prefire()
Return true if the current time of the outside domain is greater than or equal to the current time. |
void |
preinitialize()
Preinitialize the actors associated with this director. |
boolean |
transferInputs(IOPort port)
Transfer data from an input port of the container to the ports it is connected to on the inside. |
boolean |
transferOutputs(IOPort port)
Transfer data from this port to the ports it is connected to on the outside. |
| Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector |
_setScheduler, addDebugListener, getScheduler, invalidateSchedule, isScheduleValid, removeDebugListener, setScheduler, setScheduleValid |
| Methods inherited from class ptolemy.actor.Director |
_description, _isEmbedded, _isTopLevel, domainPolymorphicTransferInputs, domainPolymorphicTransferOutputs, fireAt, fireAtCurrentTime, getCurrentTime, getTimeResolution, initialize, invalidateResolvedTypes, iterate, needWriteAccess, requestInitialization, setContainer, setCurrentTime, setTimeResolution, stop, stopFire, terminate, wrapup |
| 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 iterations
public Parameter period
public Parameter synchronizeToRealTime
public Parameter timeResolution
protected static double _DEFAULT_GIOTTO_PERIOD
| Constructor Detail |
public GiottoDirector()
public GiottoDirector(Workspace workspace)
workspace - The workspace for this object.
public GiottoDirector(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 name collides with an
attribute in the container.| Method Detail |
public void attributeChanged(Attribute attribute)
throws IllegalActionException
attributeChanged in class NamedObjattribute - The attribute that has changed.
IllegalActionException - If the specified attribute
is filename and the file cannot be opened.public double getNextIterationTime()
getNextIterationTime in class Director
public boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class StaticSchedulingDirectorIllegalActionException - Not thrown in this base class.
public void fire()
throws IllegalActionException
fire in interface Executablefire in class StaticSchedulingDirectorIllegalActionException - If this director does not have a
container.
public void initialize()
throws IllegalActionException
initialize in interface Executableinitialize in class DirectorIllegalActionException - If the initialize() method of
one of the associated actors throws it.public Receiver newReceiver()
newReceiver in class Director
public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class StaticSchedulingDirectorIllegalActionException - If the iterations parameter does
not have a valid token.
public void preinitialize()
throws IllegalActionException
preinitialize in interface Executablepreinitialize in class DirectorIllegalActionException - If the preinitialize() method of
one of the associated actors throws it.
public boolean transferInputs(IOPort port)
throws IllegalActionException
transferInputs in class Directorport - The port to transfer tokens from.
IllegalActionException - If the port is not an opaque
input port.IOPort.transferInputs()
public boolean transferOutputs(IOPort port)
throws IllegalActionException
transferOutputs in class Directorport - The port to transfer tokens from.
IllegalActionException - If the port is not an opaque
output port.IOPort.transferOutputs()public double getPeriod()
public int getIntPeriod()
throws IllegalActionException
IllegalActionExceptionprotected boolean _writeAccessRequired()
_writeAccessRequired in class Director
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||