public class MetroIIPNQueueReceiver extends PNQueueReceiver
MetroIIPNQueueReceiver adapts token transfer to MetroII semantics. Each get() or put() is associated with two MetroII events. The data token transfer will not occur until the associated MetroII events are NOTIFIED.
The implementation is obsolete and needs to be updated.
Modifier and Type | Field and Description |
---|---|
protected MetroIIPNDirector |
_localDirector
The director in charge of this receiver.
|
_boundaryDetector, _director, _readPending, _terminate, _writePending
_queue, INFINITE_CAPACITY
Constructor and Description |
---|
MetroIIPNQueueReceiver() |
Modifier and Type | Method and Description |
---|---|
Token |
get()
Gets a token from this receiver.
|
MetroIIPNDirector |
getDirector()
Returns the director in charge.
|
void |
put(Token token)
Puts a token on the queue contained in this receiver.
|
void |
setContainer(IOPort port)
Sets the container.
|
hasRoom, hasRoom, hasToken, hasToken, isConnectedToBoundary, isConnectedToBoundaryInside, isConnectedToBoundaryOutside, isConsumerReceiver, isInsideBoundary, isOutsideBoundary, isProducerReceiver, isReadBlocked, isWriteBlocked, requestFinish, reset
clear, elementList, elements, get, getCapacity, getHistoryCapacity, historyElementList, historyElements, historySize, setCapacity, setHistoryCapacity, size
getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, elementList, getArray, getContainer, isKnown, putArray, putArrayToAll, putToAll
protected MetroIIPNDirector _localDirector
public MetroIIPNDirector getDirector()
getDirector
in class PNQueueReceiver
public Token get()
get
in interface Receiver
get
in class PNQueueReceiver
public void put(Token token)
put
in interface Receiver
put
in class PNQueueReceiver
token
- The token to be put in the receiver, or null to not put
anything.NoRoomException
- If during initialization, capacity cannot be increased
enough to accommodate initial tokens.public void setContainer(IOPort port) throws IllegalActionException
setContainer
in interface Receiver
setContainer
in class PNQueueReceiver
port
- The container.IllegalActionException
- If the container is not of an appropriate subclass of
IOPort, or if the container's director is not an instance
of PNDirector.AbstractReceiver.getContainer()