public class PtidesPort extends MirrorPort
TypedIOPort.RunTimeTypeCheckException
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
actuateAtEventTimestamp
Actuate at event timestamp parameter that defaults to the boolean value TRUE.
|
Parameter |
deviceDelay
Device delay parameter that defaults to the double value 0.0.
|
Parameter |
deviceDelayBound
Device delay bound parameter that defaults to the double value 0.0.
|
Parameter |
isNetworkPort
Flag that is true if the port is a network receiver or transmitter.
|
Parameter |
networkDelayBound
An assumed upper bound on the network delay, used if this is a network
receiver port (isNetworkPort is true and the port is an input).
|
Parameter |
platformDelayBound
An assumed upper bound on the difference between platform time and
the event timestamp sent to a network transmitter port
(isNetworkPort is true and the port is an output),
where platform time is smaller than the event timestamp.
|
Parameter |
sourcePlatformDelayBound
An assumed upper bound on the difference between platform time and
the event timestamp received at a network receiver port
(isNetworkPort is true and the port is an output),
where platform time is smaller than the event timestamp.
|
_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 |
---|
PtidesPort(CompositeEntity container,
java.lang.String name)
Create a new PtidesPort with a given container and a name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
actuateAtEventTimestamp()
Return true if actuation should happen at event timestamp and false if
actuation can happen sooner.
|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
int |
getMicrostepForToken(Token t)
Get the microstep of the event that contained the token.
|
java.lang.Object[] |
getTimestampForToken(Token t)
Return the timestamp and sourceTimestamp for a specific token.
|
boolean |
isActuatorPort()
Check whether port is output and network port parameter is not set.
|
boolean |
isNetworkReceiverPort()
Check whether port is input and network port parameter is set.
|
boolean |
isNetworkTransmitterPort()
Check whether port is output and network port parameter is set.
|
boolean |
isSensorPort()
Check whether port is input and network port parameter is not set.
|
void |
send(int channelIndex,
Token token)
Save token and remember timestamp of the token.
|
void |
setInput(boolean isInput)
Make port input port and update visual representation.
|
void |
setOutput(boolean isInput)
Make port output port and update visual representation.
|
clone, getAssociatedPort, setAssociatedPort, setContainer, setMultiport, setName
_checkContainer, _checkLiberalLink, _checkLink, _checkType, _checkTypedIOPortContainer, _description, addTypeListener, broadcast, broadcast, convert, getAutomaticTypeConversion, getType, getTypeTerm, isTypeAcceptable, removeTypeListener, 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, setDefaultWidth, 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
_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 Parameter actuateAtEventTimestamp
public Parameter deviceDelay
public Parameter deviceDelayBound
public Parameter isNetworkPort
public Parameter networkDelayBound
public Parameter platformDelayBound
public Parameter sourcePlatformDelayBound
This is used to indicate that the designer knows that the execution time on the sending platform is bigger than the time delay on the sending platform.
Together with the networkDelayBound and the clockSychronizationErrorBound parameters, this parameter is used to determine whether an event is arriving at a network receiver too late.
The value specified for the platformDelayBound on a network transmitter and the value specified for the sourcePlatformDelayBound on a network receiver should ideally match, however, this is not enforced. This is a double that defaults to 0.0.
public PtidesPort(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container of the port.name
- The name of the port.IllegalActionException
- If parameters cannot be set.NameDuplicationException
- If name already exists.public boolean actuateAtEventTimestamp()
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class TypedIOPort
attribute
- The attribute that changed.IllegalActionException
- If the change is not acceptable
to this container.public java.lang.Object[] getTimestampForToken(Token t)
t
- The token.public int getMicrostepForToken(Token t)
t
- The token.public boolean isActuatorPort()
public boolean isSensorPort()
public boolean isNetworkReceiverPort()
public boolean isNetworkTransmitterPort()
public void setInput(boolean isInput) throws IllegalActionException
setInput
in class MirrorPort
isInput
- True to make this an input port.IllegalActionException
- If changing the port status is
not permitted.public void setOutput(boolean isInput) throws IllegalActionException
setOutput
in class MirrorPort
isInput
- True to make this an output port.IllegalActionException
- If changing the port status is
not permitted.public void send(int channelIndex, Token token) throws IllegalActionException, NoRoomException
send
in class TypedIOPort
channelIndex
- The index of the channel, from 0 to width-1.token
- The token to send, or null to send no token.IllegalActionException
- 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.