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.
- Ptolemy II 11.0
- Liangpeng Guo
- Red (glp)
- Red (glp)
Fields Modifier and Type Field Description
_localDirectorThe director in charge of this receiver.
Fields inherited from class ptolemy.domains.pn.kernel.PNQueueReceiver
_boundaryDetector, _director, _readPending, _terminate, _writePending
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
get()Gets a token from this receiver.
getDirector()Returns the director in charge.
put(Token token)Puts a token on the queue contained in this receiver.
setContainer(IOPort port)Sets the container.
Methods inherited from class ptolemy.domains.pn.kernel.PNQueueReceiver
hasRoom, hasRoom, hasToken, hasToken, isConnectedToBoundary, isConnectedToBoundaryInside, isConnectedToBoundaryOutside, isConsumerReceiver, isInsideBoundary, isOutsideBoundary, isProducerReceiver, isReadBlocked, isWriteBlocked, requestFinish, reset
Methods inherited from class ptolemy.actor.QueueReceiver
clear, elementList, elements, get, getCapacity, getHistoryCapacity, historyElementList, historyElements, historySize, setCapacity, setHistoryCapacity, size
Methods inherited from class ptolemy.actor.AbstractReceiver
getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected MetroIIPNDirector _localDirectorThe director in charge of this receiver.
public MetroIIPNDirector getDirector()Returns the director in charge.
public Token get()Gets a token from this receiver. If the receiver is empty then block until a token becomes available. If this receiver is terminated during the execution of this method, then throw a TerminateProcessException. The method will not return until the 'xxx.get.end' MetroII event is NOTIFIED.
public void put(Token token)Puts a token on the queue contained in this receiver. The 'put' will not occur until the associated MetroII event '*.put.begin' is NOTIFIED.
public void setContainer(IOPort port) throws IllegalActionExceptionSets the container. This overrides the base class to record the director.
- Specified by:
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.
- See Also: