public class DDEIOPort extends TypedIOPort
DDEIOPorts are not necessary to facilitate communication between actors executing in a DDE model; standard TypedIOPorts are sufficient for most communication. DDEIOPorts become useful when the time stamp to be associated with an outgoing token is greater than the current time of the sending actor.
The designers of models that incorporate DDEIOPorts should be careful to make sure that output time stamp ordering information is correct. Since the output time stamp of a token being sent through a DDEIOPort can be greater then the sending actor's current time, it is possible on a subsequent token production to create an outgoing token with a time stamp that is greater than the current time but less then the previously produced time stamp. In such cases, an IllegalArgumentException will be thrown.
DDEReceiver
TypedIOPort.RunTimeTypeCheckException
NamedObj.ContainedObjectsIterator
_resolvedType, TYPE
_constantLimit, _constantToken, _constantTokensSent, _hasPortEventListeners, _portEventListeners, CONFIGURATION, defaultValue, RECEIVERS, REMOTERECEIVERS
_insideLinks, _relationsList
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
DDEIOPort()
Construct a DDEIOPort with no container and an empty
string as a name.
|
DDEIOPort(ComponentEntity container,
java.lang.String name)
Construct a DDEIOPort with a containing actor and the
specified name that is neither an input nor an output.
|
DDEIOPort(ComponentEntity container,
java.lang.String name,
boolean isInput,
boolean isOutput)
Construct a DDEIOPort with a container and the specified
name that is either an input, an output, or both, depending
on the third and fourth arguments.
|
Modifier and Type | Method and Description |
---|---|
void |
broadcast(Token token,
Time sendTime)
Send a token to all connected receivers by calling send on
all of the remote receivers connected to this port.
|
void |
send(int chIndex,
Token token,
Time sendTime)
Send the specified token to all receivers connected to the
specified channel.
|
void |
setContainer(ComponentEntity container)
Constrain DDEIOPorts to only be contained by non-atomic
entities.
|
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _checkTypedIOPortContainer, _description, addTypeListener, attributeChanged, broadcast, broadcast, clone, convert, getAutomaticTypeConversion, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, send, send, sendInside, setAutomaticTypeConversion, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, typeConstraintList, typeConstraints
_checkLiberalLink, _exportMoMLContents, _getInsideWidth, _getOutsideWidth, _getReceiversLinkedToGroup, _newInsideReceiver, _newInsideReceiver, _newReceiver, _newReceiver, _notifyPortEventListeners, _removeReceivers, _setConstant, _wrapReceiver, addIOPortEventListener, broadcastClear, checkWidthConstraints, createReceivers, deepConnectedInPortList, deepConnectedInPorts, deepConnectedOutPortList, deepConnectedOutPorts, deepGetReceivers, get, get, getChannelForReceiver, getCommunicationAspects, getCurrentTime, getDefaultWidth, getInside, getInsideReceivers, getIOPortEventListeners, getModelTime, getModelTime, getReceivers, getReceivers, getReceivers, getRelationIndex, getRemoteReceivers, getRemoteReceivers, getWidth, getWidthFromConstraints, getWidthInside, hasNewToken, hasNewTokenInside, hasRoom, hasRoomInside, hasToken, hasToken, hasTokenInside, hasWidthConstraints, insertLink, insideSinkPortList, insideSourcePortList, invalidateCommunicationAspects, isInput, isInsideConnected, isKnown, isKnown, isKnownInside, isMultiport, isOutput, isOutsideConnected, liberalLink, link, numberOfSinks, numberOfSources, removeIOPortEventListener, reset, sendClear, sendClearInside, setContainer, setDefaultWidth, setInput, setMultiport, setOutput, setWidthEquals, setWidthEquals, sinkPortList, sourcePortList, transferInputs, transferOutputs, unlink, unlink, unlinkAll, unlinkAllInside, unlinkInside, unlinkInside
_deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideGroupLinked, isInsideLinked, isOpaque, numInsideLinks
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isGroupLinked, isLinked, linkedRelationList, linkedRelations, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, numLinks, setName
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public DDEIOPort()
public DDEIOPort(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, or if the container
is not atomic.NameDuplicationException
- If the name coincides
with a port already in the container.public DDEIOPort(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. , or if the container is
not atomic.NameDuplicationException
- If the name coincides with
a port already in the container.public void broadcast(Token token, Time sendTime) throws IllegalActionException, NoRoomException
token
- The token to sendsendTime
- The output time of the token being sent.IllegalActionException
- If the port is not an output
or the delay is negative.NoRoomException
- If a send to one of the channels
throws it.public void send(int chIndex, Token token, Time sendTime) throws IllegalActionException, NoRoomException
chIndex
- The index of the channel, between (inclusive)
0 to width-1.token
- The token to send.sendTime
- The output time of the token being sent.NoRoomException
- If there is no room in the receiver.IllegalActionException
- If the port is not an output,
if the index is out of range.public void setContainer(ComponentEntity container) throws IllegalActionException, NameDuplicationException
container
- The container in which to put this DDEIOPort.IllegalActionException
- If the container argument
is not atomic.NameDuplicationException
- If the name of this
port is not unique with respect to other objects
contained by this port's container.