public class DTReceiver extends SDFReceiver
Yellow (vogel) |
Yellow (chf) |
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
overrideHasToken |
_waitingTokens, INFINITE_CAPACITY
Constructor and Description |
---|
DTReceiver()
Construct an empty receiver with no container.
|
DTReceiver(IOPort container)
Construct an empty receiver with the specified container.
|
DTReceiver(IOPort container,
int size)
Construct an empty receiver with the specified container and size.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
_debugViewReceiverInfo()
For debugging purposes.
|
void |
calculateDeltaTime()
Calculate the constant time increment for this receiver.
|
void |
determineEnds()
Determine the source and destination ports that use this
receiver in their communications.
|
Token |
get()
Remove the first token (the oldest one) from the receiver and
return it.
|
double |
getCurrentTime()
Deprecated.
As of Ptolemy II 4.1, replaced by
getModelTime() |
double |
getDeltaTime()
Return the time interval between tokens for this receiver.
|
Time |
getModelTime()
Return the local time associated with this receiver.
|
TypedIOPort |
getSourcePort()
Return the port that feeds this Receiver
The port returned by this method is precalculated
during the determineEnds() method call.
|
int |
getTokenFlowRate()
Return the token flow rate for this receiver
In DT, the token flow rate has the value
"rate * repetitions"; where 'rate' is the
port rate and 'repetitions' is the firing
count of the actor that contains this
receiver.
|
boolean |
hasToken()
Return true if get() will succeed in returning a token.
|
(package private) void |
initializeLocalTime(Time time)
Initialize the local time to the specified time.
|
void |
put(Token token)
Put a token to the receiver.
|
void |
reset()
Reset this receiver to its initial state, which includes
calling clear() and resetting the current time to 0.0.
|
clear, elementList, get, getArray, getCapacity, getHistoryCapacity, hasRoom, hasRoom, hasToken, historyElements, historySize, setCapacity, setHistoryCapacity, size
getContainer, isKnown, putArray, putArrayToAll, putToAll, setContainer, toString
public DTReceiver()
public DTReceiver(IOPort container) throws IllegalActionException
container
- The container of the receiver.IllegalActionException
- If the container does
not accept this receiver.public DTReceiver(IOPort container, int size) throws IllegalActionException
container
- The container of the receiver.size
- The size of the buffer for the receiver.IllegalActionException
- If the container does
not accept this receiver.public void calculateDeltaTime() throws IllegalActionException
IllegalActionException
- If there is an error in
getting attribute information from the ports.public void determineEnds() throws IllegalActionException
IllegalActionException
public Token get()
get
in interface Receiver
get
in class SDFReceiver
@Deprecated public double getCurrentTime()
getModelTime()
getCurrentTime
in class AbstractReceiver
public double getDeltaTime()
public Time getModelTime()
getModelTime
in class AbstractReceiver
public TypedIOPort getSourcePort()
public int getTokenFlowRate()
public boolean hasToken()
hasToken
in interface Receiver
hasToken
in class SDFReceiver
public void put(Token token)
put
in interface Receiver
put
in class SDFReceiver
token
- The token to be put to the receiver, or null to put no token.InternalErrorException
- If the source port is null.public void reset() throws IllegalActionException
reset
in interface Receiver
reset
in class AbstractReceiver
IllegalActionException
- If there is no director.void _debugViewReceiverInfo()
void initializeLocalTime(Time time)
time
- The desired local time.