|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.kernel.util.NamedObj ptolemy.kernel.Port ptolemy.kernel.ComponentPort ptolemy.actor.IOPort ptolemy.actor.TypedIOPort ptolemy.actor.lib.vhdl.QueuedTypedIOPort
public class QueuedTypedIOPort
Delays each fixed point token sent on the port by the specified latency parameter and then outputs it via the parent TypedIOPort. Initially will output NIL until one input can be sent.
Red (mankit) |
Red (mankit) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private Token |
_oldToken
The previous token. |
private Token |
initialToken
The initial output value of the port. |
private int |
latency
The latency of the port. |
private java.util.LinkedList<Token> |
myQueue
The token queue. |
Fields inherited from class ptolemy.actor.TypedIOPort |
---|
TYPE |
Fields inherited from class ptolemy.actor.IOPort |
---|
_hasPortEventListeners, _portEventListeners, CONFIGURATION, RECEIVERS, REMOTERECEIVERS |
Fields inherited from class ptolemy.kernel.Port |
---|
_insideLinks, _relationsList |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
QueuedTypedIOPort(ComponentEntity container,
java.lang.String name,
boolean isInput,
boolean isOutput)
Construct a QueuedTypedIOPort with a container and a name that is either an input, an output, or both, depending on the third and fourth arguments. |
Method Summary | |
---|---|
private void |
_createQueue()
Create a token queue for the port. |
void |
clear()
Clear the queue. |
void |
resend(int channelIndex)
Resend the token from the given channel index. |
void |
resize(int size)
Set the size of the queue. |
void |
send(int channelIndex,
Token token)
Enqueue the token that is being sent and send to the parent whatever is at the end of the queue. |
void |
setInitToken(Token initialValue)
Set the initial token value. |
void |
setSize(int size,
Token initialValue)
Set the size of the queue. |
Methods inherited from class ptolemy.actor.TypedIOPort |
---|
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _description, addTypeListener, attributeChanged, broadcast, broadcast, clone, convert, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, send, sendInside, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentPort |
---|
_deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideGroupLinked, isInsideLinked, isOpaque, numInsideLinks |
Methods inherited from class ptolemy.kernel.Port |
---|
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isGroupLinked, isLinked, linkedRelationList, linkedRelations, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, numLinks, setName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.LinkedList<Token> myQueue
private Token _oldToken
private int latency
private Token initialToken
Constructor Detail |
---|
public QueuedTypedIOPort(ComponentEntity container, java.lang.String name, boolean isInput, boolean isOutput) throws IllegalActionException, NameDuplicationException
container
- The container actor.name
- The name of the port.isInput
- True if this is to be an input port.isOutput
- True if this is to be an output port.
IllegalActionException
- If the port is not of an acceptable
class for the container, or if the container does not implement the
TypedActor interface.
NameDuplicationException
- If the name coincides with
a port already in the container.Method Detail |
---|
public void setSize(int size, Token initialValue)
size
- The size of the queue.initialValue
- The initial value of the queue.public void resize(int size)
size
- The size of the queue.public void clear()
public void setInitToken(Token initialValue)
initialValue
- The initial value of the token.private void _createQueue()
public void send(int channelIndex, Token token) throws IllegalActionException, NoRoomException
send
in class TypedIOPort
channelIndex
- The channel on which to send the token.token
- The token to be sent.
IllegalActionException
- If thrown while sending to the
channel.
NoRoomException
- If thrown while sending to the channel.public void resend(int channelIndex) throws IllegalActionException, NoRoomException
channelIndex
- The given channel index.
IllegalActionException
- If super class throws it.
NoRoomException
- If super class throws it.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |