|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.actor.AbstractReceiver
ptolemy.domains.sdf.kernel.SDFReceiver
ptolemy.domains.dt.kernel.DTReceiver
A first-in, first-out (FIFO) queue receiver with variable capacity. Tokens are put into the receiver with the put() method, and removed from the receiver with the get() method. The token removed is the oldest one in the receiver. Time is incremented by a fixed amount delta time every time the get() method is called. Each receiver has its own value of delta time. We calculate delta time as "period / (rate * repetitions)" where:
| Yellow (vogel) |
| Yellow (chf) |
| Field Summary |
| Fields inherited from class ptolemy.domains.sdf.kernel.SDFReceiver |
INFINITE_CAPACITY |
| Constructor Summary | |
DTReceiver()
Construct an empty receiver with no container. |
|
DTReceiver(int size)
Construct an empty receiver with no container and given size. |
|
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. |
|
| Method Summary | |
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()
Return the local time associated with this receiver. |
double |
getDeltaTime()
Return the time interval between tokens for 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. |
void |
put(Token token)
Put a token to the receiver. |
| Methods inherited from class ptolemy.domains.sdf.kernel.SDFReceiver |
clear, get, getArray, getCapacity, getHistoryCapacity, hasRoom, hasRoom, hasToken, historyElements, historySize, putArray, setCapacity, setHistoryCapacity, size |
| Methods inherited from class ptolemy.actor.AbstractReceiver |
getContainer, isKnown, setContainer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DTReceiver()
public DTReceiver(int size)
size - The size of the buffer for the receiver.
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.| Method Detail |
public void calculateDeltaTime()
throws IllegalActionException
IllegalActionException - If there is an error in
getting attribute information from the ports.public void determineEnds()
public Token get()
get in interface Receiverget in class SDFReceiverpublic double getCurrentTime()
getCurrentTime in class AbstractReceiverpublic double getDeltaTime()
public TypedIOPort getSourcePort()
public int getTokenFlowRate()
public void put(Token token)
put in interface Receiverput in class SDFReceivertoken - The token to be put to the receiver.
InternalErrorException - If the source port is null.public boolean hasToken()
hasToken in interface ReceiverhasToken in class SDFReceiver
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||