public class VariableDelaySwitch extends BasicSwitch
CommunicationAspect
actor that applies packet-size and priority
dependent delay to incoming packets. Intended to use with RecordTokens only.
Assumes record token includes the encapsulated packages with a label "packets"
and a TCP header with label "TCPlabel"Red (ilgea) |
BasicSwitch.BasicSwitchAttributes
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected boolean |
_allowPDV
Aallow or disallow input buffer packet delay variation.
|
protected boolean |
_allowPriority
Allow or disallow priority switching.
|
protected int |
_channelBandwidth
The channel bandwidth that will be used to determine the delay (in bits/sec).
|
protected int |
_unitTokenSize
The unit token size in bits.
|
Parameter |
allowPDV
A Boolean to enable/disable packet-length dependent input delay.
|
Parameter |
allowPriority
A Boolean to enable/disable priority dependent input delay.
|
Parameter |
channelBandwidth
The channel bandwidth in bits/second.
|
protected static int |
TCPHeaderSize
The default header size for TCP.
|
Parameter |
unitTokenSize
The size of one data token in bits.
|
_inputBufferDelay, _inputTokens, _ioPortToSwitchInPort, _ioPortToSwitchOutPort, _nextFireTime, _numberOfPorts, _outputBufferDelay, _outputTokens, _switchFabricDelay, inputBufferDelay, numberOfPorts, outputBufferDelay, switchFabricDelay
_parameters, _tokenCount
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
decoratorHighlightColorName
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
VariableDelaySwitch(CompositeEntity container,
java.lang.String name)
Construct a VariableDelaySwitch.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
Process the attributes.
|
void |
sendToken(Receiver source,
Receiver receiver,
Token token)
Initiate a send of the specified token to the specified
receiver.
|
_getNextFireTime, _getPortID, _scheduleRefire, clone, createDecoratorAttributes, createIntermediateReceiver, fire, getReceiver, initialize, postfire, reset, setContainer, setPortIn, setPortOut
_sendToReceiver, decoratedObjects, isGlobalDecorator, registerListener, sendCommunicationEvent
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName, setName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
public Parameter allowPDV
public Parameter allowPriority
public Parameter channelBandwidth
public Parameter unitTokenSize
protected int _channelBandwidth
protected int _unitTokenSize
protected boolean _allowPDV
protected boolean _allowPriority
protected static final int TCPHeaderSize
public VariableDelaySwitch(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- the container.name
- the name.IllegalActionException
- If there is a problem with
construction.NameDuplicationException
- If there is a name collision.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class BasicSwitch
attribute
- The attribute that changed.IllegalActionException
- If value is inappropriate.public void sendToken(Receiver source, Receiver receiver, Token token) throws IllegalActionException
sendToken
in interface CommunicationAspect
sendToken
in class BasicSwitch
source
- Sender of the token.receiver
- The sending receiver.token
- The token to send.IllegalActionException
- If the refiring request fails.