|
||||||||||
| 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.wireless.kernel.WirelessIOPort
This port communicates via channels without wired connections. Channels are instances of WirelessChannel. The port references channels by name, where the name is specified by the outsideChannel or insideChannel parameter.
This port can be used on the boundary of wireless domain models. A port is outside wireless if an outside channel name is given and a wireless channel with the given name is contained by the container of the port's container (transparent hierarchy is not supported). Specially, it will use the specified wireless channel to communicate on the outside. A port is inside wireless if an inside channel name is given and a wireless channel with the given name is contained by the container of this port. It will use the specified wireless channel to communicate on the inside. If no outside channel or inside channel name is given or the named channel does not exist, then the behavior of the port reverts to that of the base class. Specifically, it will only communicate if it is wired.
it is valid for a model using the wireless director to have both wireless communication and wired communication, i.e. it may contain actors with ports using wireless communication (by specifying a wireless channel) and actors with ports using wired communication. If a port is outside/inside wireless(a wireless channel is specified), it will ignore all the communication through the wired connections to it if there is any on the outside/inside of it.
The width of this port on either side that is using wireless communication is fixed at one. Otherwise, it depends on the number of links to the port.
When this port is used for wireless communications, nothing is connected to it. Consequently, methods that access the topology such as connectedPortList() and deepConnectedInPortList() return an empty list. There are no deeply connected ports. However, sinkPortList() returns the port of the specified wireless channel. A consequence of this is that type constraints are automatically set up between ports that send on the channel and the channel port.
| Yellow (cxh) |
| Green (cxh) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
ptolemy.kernel.util.NamedObj.ContainedObjectsIterator |
| Field Summary | |
ptolemy.data.expr.StringParameter |
insideChannel
The name of the inside channel. |
ptolemy.data.expr.Parameter |
insideTransmitProperties
The transmit properties of this port for inside transmissions. |
ptolemy.data.expr.StringParameter |
outsideChannel
The name of the outside channel. |
ptolemy.data.expr.Parameter |
outsideTransmitProperties
The transmit properties of this port for outside transmissions. |
| 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 | |
WirelessIOPort(ptolemy.kernel.ComponentEntity container,
java.lang.String name)
Construct a port with the specified container and name that is neither an input nor an output. |
|
WirelessIOPort(ptolemy.kernel.ComponentEntity container,
java.lang.String name,
boolean isInput,
boolean isOutput)
Construct a port with a container and a name that is either an input, an output, or both, depending on the third and fourth arguments. |
|
WirelessIOPort(ptolemy.kernel.util.Workspace workspace)
Construct a port in the specified workspace with an empty string as a name. |
|
| Method Summary | |
protected boolean |
_insideIsWireless()
Return true if the port is inside wireless. |
protected boolean |
_outsideIsWireless()
Return true if the port is outside wireless. |
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
If the attribute is one of the properties attributes, make sure its value is a record token. |
void |
broadcast(ptolemy.data.Token token)
Override the base class to delegate to the channel if there is one. |
void |
broadcast(ptolemy.data.Token[] tokenArray,
int vectorLength)
Override the base class to delegate to the channel if there is one. |
void |
broadcastClear()
Override the base class to delegate to the channel if there is one. |
void |
createReceivers()
Override the base class to create receivers for WirelessIOPort. |
WirelessChannel |
getInsideChannel()
Get the channel specified by the insideChannel parameter. |
ptolemy.actor.Receiver[][] |
getInsideReceivers()
Override the base class to return the inside receiver for wireless communication if wireless communication is being used. |
WirelessChannel |
getOutsideChannel()
Get the channel specified by the outsideChannel parameter. |
ptolemy.data.Token |
getProperties(int channelIndex)
Get the properties token associated with the data token most recently retrieved using get(). |
ptolemy.data.Token |
getPropertiesInside(int channelIndex)
Get the properties token associated with the data token most recently retrieved using getInside(). |
ptolemy.actor.Receiver[][] |
getReceivers()
Override the base class to return the outside receiver for wireless communication if wireless communication is being used. |
int |
getWidth()
Get the width of the port. |
int |
getWidthInside()
Return the inside width of this port. |
boolean |
hasRoom(int channelIndex)
Override the base class to always return true if there is a wireless channel, and otherwise, defer to the base class. |
boolean |
hasRoomInside(int channelIndex)
Override the base class to always return true if there is a wireless channel, and otherwise, defer to the base class. |
java.util.List |
insideSinkPortList()
Return a list of the ports that can potentially accept data from this port when it sends on the inside. |
java.util.List |
insideSourcePortList()
Return a list of the ports that can potentially send data to this port from the inside. |
int |
numberOfSinks()
Return 1 if the port is outside wireless, which represents the channel port of the outside wireless channel. |
int |
numberOfSources()
Return 1 if the port is outside wireless,, which represents the channel port of the outside wireless channel. |
void |
send(int channelIndex,
ptolemy.data.Token token)
Override the base class to delegate to the wireless channel if the port is outside wireless. |
void |
send(int channelIndex,
ptolemy.data.Token[] tokenArray,
int vectorLength)
Override the base class to delegate to the wireless channel if the port is outside wireless. |
void |
sendClear(int channelIndex)
Override the base class to delegate to the wireless channel if the port is outside wireless. |
void |
sendClearInside(int channelIndex)
Override the base class to delegate to the wireless channel if the port is inside wireless. |
void |
sendInside(int channelIndex,
ptolemy.data.Token token)
Override the base class to delegate to the wireless channel if the port is inside wireless. |
java.util.List |
sinkPortList()
Return a list of the ports that can potentially accept data from this port when it sends on the outside. |
java.util.List |
sourcePortList()
Return a list of the ports that can potentially send data to this port from the outside. |
| Methods inherited from class ptolemy.actor.TypedIOPort |
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _description, addTypeListener, clone, convert, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList |
| Methods inherited from class ptolemy.actor.IOPort |
_checkLiberalLink, _exportMoMLContents, _getInsideWidth, _newInsideReceiver, _newReceiver, deepConnectedInPortList, deepConnectedInPorts, deepConnectedOutPortList, deepConnectedOutPorts, deepGetReceivers, get, get, getCurrentTime, getInside, getReceivers, getReceivers, getRemoteReceivers, getRemoteReceivers, hasToken, hasToken, hasTokenInside, insertLink, isInput, isKnown, isKnown, isKnownInside, isMultiport, isOutput, liberalLink, link, setContainer, setInput, setMultiport, setOutput, transferInputs, transferOutputs, unlink, unlink, unlinkAll, unlinkAllInside, unlinkInside, unlinkInside |
| 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 ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public ptolemy.data.expr.StringParameter insideChannel
public ptolemy.data.expr.Parameter insideTransmitProperties
public ptolemy.data.expr.StringParameter outsideChannel
public ptolemy.data.expr.Parameter outsideTransmitProperties
| Constructor Detail |
public WirelessIOPort(ptolemy.kernel.util.Workspace workspace)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
workspace - The workspace that will list the port.
ptolemy.kernel.util.IllegalActionException - If creating the parameters
of this port throws it.
ptolemy.kernel.util.NameDuplicationException - If creating the parameters
of this port throws it.
public WirelessIOPort(ptolemy.kernel.ComponentEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container actor.name - The name of the port.
ptolemy.kernel.util.IllegalActionException - If the port is not of an acceptable
class for the container, or if the container does not implement the
Actor interface.
ptolemy.kernel.util.NameDuplicationException - If the name coincides with
a port already in the container.
public WirelessIOPort(ptolemy.kernel.ComponentEntity container,
java.lang.String name,
boolean isInput,
boolean isOutput)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.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.
ptolemy.kernel.util.IllegalActionException - If the port is not of an acceptable
class for the container, or if the container does not implement the
Actor interface.
ptolemy.kernel.util.NameDuplicationException - If the name coincides with
a port already in the container.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
attribute - The attribute that changed.
ptolemy.kernel.util.IllegalActionException - If the change is not acceptable
to this container.
public void broadcast(ptolemy.data.Token token)
throws ptolemy.kernel.util.IllegalActionException
token - The token to send.
ptolemy.kernel.util.IllegalActionException - If the port is not an output,
or if the outsideChannel parameter cannot be evaluated
or if the transmit() method throws an IllegalActionException.
public void broadcast(ptolemy.data.Token[] tokenArray,
int vectorLength)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.actor.NoRoomException
tokenArray - The token array to sendvectorLength - The number of elements of the token
array to send.
ptolemy.actor.NoRoomException - If there is no room in the receiver.
ptolemy.kernel.util.IllegalActionException - If the tokens to be sent cannot
be converted to the type of this port
public void broadcastClear()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If a receiver does not support
clear().
public void createReceivers()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If this port is not
an opaque input port or if there is no director.
public WirelessChannel getInsideChannel()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the insideChannel
parameter value cannot be evaluated.public ptolemy.actor.Receiver[][] getInsideReceivers()
public WirelessChannel getOutsideChannel()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the outsideChannel
parameter value cannot be evaluated.public ptolemy.data.Token getProperties(int channelIndex)
channelIndex - The channel index.
IOPort.get(int),
IOPort.get(int, int)public ptolemy.data.Token getPropertiesInside(int channelIndex)
channelIndex - The channel index.
IOPort.getInside(int)public ptolemy.actor.Receiver[][] getReceivers()
public int getWidth()
public int getWidthInside()
public boolean hasRoom(int channelIndex)
throws ptolemy.kernel.util.IllegalActionException
channelIndex - The channel index.
ptolemy.kernel.util.IllegalActionException - If the receivers do not support
this query, if this is not an output port, or if the channel index
is out of range.
public boolean hasRoomInside(int channelIndex)
throws ptolemy.kernel.util.IllegalActionException
channelIndex - The channel index.
ptolemy.kernel.util.IllegalActionException - If the receivers do not support
this query, if this is not an output port, or if the channel index
is out of range.public java.util.List insideSinkPortList()
public java.util.List insideSourcePortList()
public int numberOfSinks()
public int numberOfSources()
public void send(int channelIndex,
ptolemy.data.Token token)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.actor.NoRoomException
channelIndex - The index of the channel, from 0 to width-1.
If there is an outside channel, then this argument is ignored.token - The token to send.
ptolemy.kernel.util.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.
ptolemy.actor.NoRoomException - If there is no room in the receiver.
This should not occur in the DE domain.
public void send(int channelIndex,
ptolemy.data.Token[] tokenArray,
int vectorLength)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.actor.NoRoomException
channelIndex - The index of the channel, from 0 to width-1
If there is an outside channel, then this argument is ignored.tokenArray - The token array to sendvectorLength - The number of elements of the token
array to send.
ptolemy.actor.NoRoomException - If there is no room in the receiver.
ptolemy.kernel.util.IllegalActionException - If the tokens to be sent cannot
be converted to the type of this port, or if the vectorLength
argument is greater than the length of the tokenArray
argument.
public void sendClear(int channelIndex)
throws ptolemy.kernel.util.IllegalActionException
channelIndex - The index of the channel, from 0 to width-1.
If there is an outside channel, then this argument is ignored.
ptolemy.kernel.util.IllegalActionException - If a receiver does not support
clear().
public void sendClearInside(int channelIndex)
throws ptolemy.kernel.util.IllegalActionException
channelIndex - The index of the channel, from 0 to width-1.
If there is an inside channel, then this argument is ignored.
ptolemy.kernel.util.IllegalActionException - If a receiver does not support
clear().
public void sendInside(int channelIndex,
ptolemy.data.Token token)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.actor.NoRoomException
channelIndex - The index of the channel, from 0 to width-1.
If there is an inside channel, then this argument is ignored.token - The token to send
ptolemy.actor.NoRoomException - If there is no room in the receiver.
ptolemy.kernel.util.IllegalActionException - If conversion to the type of
the destination port cannot be done.public java.util.List sinkPortList()
public java.util.List sourcePortList()
protected boolean _insideIsWireless()
protected boolean _outsideIsWireless()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||