|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.Port
ptolemy.kernel.ComponentPort
ptolemy.actor.IOPort
ptolemy.actor.TypedIOPort
ptolemy.domains.de.kernel.DEIOPort
This port can be used by actors that are specialized to the discrete-event (DE) domain. It supports annotations that inform the scheduler about delays and about priorities for handling simultaneous inputs. It also provides two additional methods, overloaded versions of broadcast() and send(). The overloaded versions have a second argument for the time delay, allowing actors to send output data with a time delay (relative to current time).
Actors in the DE domain are not required to use this port. If they use the base class, TypedIOPort, then the data they send is sent with zero delay.
| Green (cxh) |
| Green (liuj) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary |
| Fields inherited from class ptolemy.actor.TypedIOPort |
TYPE |
| Fields inherited from class ptolemy.actor.IOPort |
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, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
DEIOPort()
Construct a DEIOPort with no container and no name that is neither an input nor an output. |
|
DEIOPort(ComponentEntity container,
java.lang.String name)
Construct a DEIOPort with the specified container and name that is neither an input nor an output. |
|
DEIOPort(ComponentEntity container,
java.lang.String name,
boolean isInput,
boolean isOutput)
Construct a DEIOPort with the specified container and name that is either an input, an output, or both, depending on the third and fourth arguments. |
|
DEIOPort(Workspace workspace)
Construct a port in the specified workspace with an empty string as a name. |
|
| Method Summary | |
void |
broadcast(Token token)
Broadcast a token to all receivers connected to this output port. |
void |
broadcast(Token token,
double delay)
Broadcast a token to all receivers connected to this output port with the specified time delay. |
java.lang.Object |
clone(Workspace workspace)
Clone this port into the specified workspace. |
void |
delayTo(IOPort output)
Add the specified port to the set of output ports that have delayed events triggered by this input port. |
java.util.Set |
getDelayToPorts()
Return the set of ports that have delayed events triggered by this one (as opposed to instantaneous events). |
void |
send(int channelIndex,
Token token)
Send a token to the receivers connected on the specified channel with the time stamp equaling to the current time of the director. |
void |
send(int channelIndex,
Token token,
double delay)
Send a token with the specified time delay to the receivers connected on the specified channel. |
| Methods inherited from class ptolemy.actor.TypedIOPort |
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _description, addTypeListener, attributeChanged, broadcast, convert, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, send, sendInside, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList |
| Methods inherited from class ptolemy.kernel.ComponentPort |
_deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideLinked, isOpaque, numInsideLinks |
| Methods inherited from class ptolemy.kernel.Port |
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isLinked, linkedRelationList, linkedRelations, numLinks, setName |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DEIOPort()
public DEIOPort(Workspace workspace)
workspace - The workspace that will list the port.
public DEIOPort(ComponentEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container actor.name - The name of the port.
IllegalActionException - If the port is not of an acceptable
class for the container, or if the container does not implement the
Actor interface.
NameDuplicationException - If the name coincides with
a port already in the container.
public DEIOPort(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
Actor interface.
NameDuplicationException - If the name coincides with
a port already in the container.| Method Detail |
public void broadcast(Token token)
throws IllegalActionException
broadcast in class TypedIOPorttoken - The token to send.
IllegalActionException - If the port is not an output.
public void broadcast(Token token,
double delay)
throws IllegalActionException
token - The token to send.delay - The delay of the token being broadcast.
IllegalActionException - If the port is not an output.
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class TypedIOPortworkspace - The workspace for the cloned object.
java.lang.CloneNotSupportedException - If one or more of the
attributes cannot be cloned.
public void delayTo(IOPort output)
throws IllegalActionException
output - The output port with delayed events.
IllegalActionException - If this port is not an input,
or if the argument is not an output port.public java.util.Set getDelayToPorts()
public void send(int channelIndex,
Token token)
throws IllegalActionException,
NoRoomException
send in class TypedIOPortchannelIndex - The index of the channel, from 0 to width-1token - The token to send
IllegalActionException - If the port is not an output,
or if the token to be sent cannot
be converted to the type of this port, or if the token is null.
NoRoomException - If there is no room in the receiver.
This should not occur in the DE domain.
public void send(int channelIndex,
Token token,
double delay)
throws IllegalActionException
channelIndex - The index of the channel, from 0 to width-1.token - The token to send.delay - The time delay of the token being sent.
IllegalActionException - If the port is not an output,
or if the index is out of range.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||