|
|||||||||
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.util.Attribute
ptolemy.actor.Director
ptolemy.actor.gt.ModelExecutor.Wrapper.WrapperDirector
private class ModelExecutor.Wrapper.WrapperDirector
The director to be used in the wrapper that handles requests from the directors of the models to be executed.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private java.util.PriorityQueue<TimedEvent> |
_eventQueue
The event queue. |
Fields inherited from class ptolemy.actor.Director |
---|
_actorsFinishedExecution, _currentTime, _finishRequested, _initializables, _stopRequested, timeResolution |
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 | |
---|---|
ModelExecutor.Wrapper.WrapperDirector(CompositeEntity container,
java.lang.String name)
Construct a director in the given container with the given name. |
Method Summary | |
---|---|
private boolean |
_hasToken()
Test whether there is an input token in any channel of any input port. |
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
void |
fire()
Fire the contained actor if there is any token available or if there is an request in the event queue. |
Time |
fireAt(Actor actor,
Time time)
Handle a fireAt request from the contained actor by recording it in the event queue. |
Time |
getModelNextIterationTime()
Return the next time of interest in the model being executed by this director or the director of any enclosing model up the hierarchy. |
Receiver |
newReceiver()
Return a new receiver of a type compatible with this director. |
boolean |
postfire()
Return false if the contained actor has finished executing. |
boolean |
prefire()
Return true if the event queue is not empty or there are input tokens. |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.PriorityQueue<TimedEvent> _eventQueue
Constructor Detail |
---|
public ModelExecutor.Wrapper.WrapperDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this director.
IllegalActionException
- If the name has a period in it, or
the director is not compatible with the specified container, or if
the time resolution parameter is malformed.
NameDuplicationException
- If the container already contains
an entity with the specified name.Method Detail |
---|
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class Attribute
workspace
- The workspace for the cloned object.
java.lang.CloneNotSupportedException
- Not thrown in this base classNamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class Director
IllegalActionException
- If thrown when the actor is
fired.public Time fireAt(Actor actor, Time time) throws IllegalActionException
fireAt
in class Director
actor
- The actor that requests to be fired.time
- The time to fire the actor.
IllegalActionException
- Not thrown in this class.Director.fireAtCurrentTime(Actor)
public Time getModelNextIterationTime()
This method is useful for domains that perform speculative execution (such as CT). Such a domain in a hierarchical model (i.e. CT inside DE) uses this method to determine how far into the future to execute.
Derived classes should override this method to provide an appropriate value, if possible. For example, the DEDirector class returns the time value of the next event in the event queue.
getModelNextIterationTime
in class Director
Director.getModelTime()
public Receiver newReceiver()
newReceiver
in class Director
public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class Director
IllegalActionException
- If the superclass throws it.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
prefire
in class Director
IllegalActionException
- If the availability of input
tokens cannot be tested.private boolean _hasToken() throws IllegalActionException
IllegalActionException
- If the availability of input
tokens cannot be tested.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |