|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.domains.de.kernel.DEEvent
This class defines the structure of events in Ptolemy II DE domain. Conceptually, an event in the Ptolemy II DE domain contains a token and a tag. In addition, the event has a destination, which is an actor and possibly a receiver (for non-pure events). A pure event has no destination receiver and no token, so methods for accessing those return null. The tag consists of a time stamp, a microstep, and a depth. The microstep represents the phase of execution when processing simultaneous events in directed loops, or when an actor schedules itself for firing later at the current time (using fireAt()). The depth is the index of the destination actor in a topological sort. A larger value of depth represents a lower priority when processing events.
The time stamp, microstep, and depth are compared in that order by the compareTo() method from the Comparable interface.
DEReceiver,
CalendarQueue,
DEDirector
| Green (liuxj) |
| Green (liuj) |
| Constructor Summary | |
DEEvent(ptolemy.actor.Actor actor,
double timeStamp,
int microstep,
int depth)
Construct a pure event with the specified destination actor, time stamp, microstep, and depth. |
|
DEEvent(DEReceiver receiver,
ptolemy.data.Token token,
double timeStamp,
int microstep,
int depth)
Construct an event with the specified destination receiver, token, time stamp, microstep, and depth. |
|
| Method Summary | |
ptolemy.actor.Actor |
actor()
Return the destination actor for this event. |
int |
compareTo(DEEvent event)
Compare the tag of this event with the specified event for order. |
int |
compareTo(java.lang.Object event)
Compare the tag of this event with the specified event for order. |
int |
depth()
Return the depth, which is the position of the destination actor in the topological sort. |
ptolemy.actor.IOPort |
ioPort()
Return the ioPort of the destination actor for this event. |
boolean |
isSimultaneousWith(DEEvent event)
Compare the tag of this event with the specified and return true if they are equal and false otherwise. |
int |
microstep()
Return the microstep. |
DEReceiver |
receiver()
Return the destination receiver of this event. |
double |
timeStamp()
Return the time stamp. |
ptolemy.data.Token |
token()
Return the token contained by this event. |
java.lang.String |
toString()
Return a description of the event, including the contained token (or "null" if there is none) and the time stamp. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DEEvent(DEReceiver receiver,
ptolemy.data.Token token,
double timeStamp,
int microstep,
int depth)
receiver - The destination receiver.token - The transferred token.timeStamp - The time when the event occurs.microstep - The phase of execution within a fixed time.depth - The topological depth of the destination receiver.
java.lang.NullPointerException - If the receiver is null or is
not contained by a port contained by an actor.
public DEEvent(ptolemy.actor.Actor actor,
double timeStamp,
int microstep,
int depth)
actor - The destination actortimeStamp - The time when the event occurs.microstep - The phase of execution within a fixed time.depth - The topological depth of the destination receiver.| Method Detail |
public final ptolemy.actor.Actor actor()
public final int compareTo(java.lang.Object event)
compareTo in interface java.lang.Comparableevent - The event to compare against.
java.lang.ClassCastException - If the argument is not an instance
of DEEvent.public final int compareTo(DEEvent event)
event - The event to compare against.
public final int depth()
public final ptolemy.actor.IOPort ioPort()
public final boolean isSimultaneousWith(DEEvent event)
event - The event to compare against.public final int microstep()
public final DEReceiver receiver()
public final double timeStamp()
public final ptolemy.data.Token token()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||