public class PtidesReceiver extends DEReceiver
Modifier and Type | Class and Description |
---|---|
static class |
PtidesReceiver.Event
An Event is an aggregation consisting of a Token, a time stamp and
destination Receiver.
|
static class |
PtidesReceiver.TagComparator
Compare two events according to - time stamp - value did not find a way
to compare Tokens, therefore am comparing DoubleTokens and IntTokens
here.
|
_directorVersion, _tokens
Constructor and Description |
---|
PtidesReceiver()
Construct an empty queue with no container.
|
PtidesReceiver(IOPort container)
Construct an empty queue with the specified IOPort container.
|
Modifier and Type | Method and Description |
---|---|
PtidesDirector |
getDirector()
Return the director that created this receiver.
|
void |
put(Token token)
Wrap the token in an DETokenEvent and post the trigger event to the director.
|
void |
putToReceiver(Token token)
Actually put the token into this receiver.
|
void |
remove(Token token)
Remove the token from the list of stored tokens.
|
clear, elementList, get, hasRoom, hasRoom, hasToken, hasToken
getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString
public PtidesReceiver()
public PtidesReceiver(IOPort container) throws IllegalActionException
container
- The IOPort that contains this receiver.IllegalActionException
- If this receiver cannot be contained by the proposed
container.public void put(Token token)
put
in interface Receiver
put
in class DEReceiver
token
- The token to be put, or null to not put a token.public void putToReceiver(Token token)
token
- The token to be put to this receiver, or null to put no token.public void remove(Token token)
token
- The token to be removed.public PtidesDirector getDirector() throws IllegalActionException
IllegalActionException
- If there is no container port, or if the port has no
container actor, or if the actor has no director, or if
the director is not an instance of DEDirector.