public class ErasureChannel extends AtomicWirelessChannel
For convenience, a variable named "distance" is available and equal to the distance between the transmitter and the receiver when the lossProbability is evaluated. Thus, the loss probability can be given as an expression that depends on this distance.
The distance between the transmitter and receiver is determined by the protected method _distanceBetween(), which is also used to set the value of the distance variable that can be used in the expression for loss probability. In this base class, that method uses the _location attribute of the transmit and receive actors, which corresponds to the position of the icon in the Vergil visual editor. Subclasses may override this protected method to provide some other notion of distance.
| Yellow (cxh) |
| Green (cxh) |
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
protected java.util.Random |
_random
A random number generator.
|
Variable |
distance
A variable that is set to the distance between the transmitter
and the receiver before the
powerLossFactor expression is evaluated.
|
Parameter |
lossProbability
The probability that a call to transmit() will fail to deliver
the token to a receiver that is in range.
|
Parameter |
seed
The seed that controls the random number generation.
|
_receiversInRangeCacheValid, defaultProperties, name_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
ErasureChannel(CompositeEntity container,
java.lang.String name)
Construct a channel with the given name and container.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_transmitTo(Token token,
WirelessIOPort sender,
WirelessReceiver receiver,
RecordToken properties)
Transmit the specified token to the specified receiver.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
void |
initialize()
Initialize the random number generator with the seed, if it
has been given.
|
_distanceBetween, _isInRange, _locationOf, _receiversInRange, addChannelListener, channelNotify, declareDelayDependency, getChannelPort, listeningInputPorts, listeningOutputPorts, registerPropertyTransformer, removeChannelListener, sendingInputPorts, sendingOutputPorts, transformProperties, transmit, unregisterPropertyTransformer, valueChanged_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, 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, attributeChanged, 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, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListfire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic Parameter lossProbability
public Parameter seed
public Variable distance
protected java.util.Random _random
public ErasureChannel(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of the channel.IllegalActionException - If the container is incompatible.NameDuplicationException - If the name coincides with
a relation already in the container.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone in class AtomicWirelessChannelworkspace - The workspace for the cloned object.java.lang.CloneNotSupportedException - Not thrown in this base classNamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If the parent class throws it.protected void _transmitTo(Token token, WirelessIOPort sender, WirelessReceiver receiver, RecordToken properties) throws IllegalActionException
_transmitTo in class AtomicWirelessChanneltoken - The token to transmit, or null to clear
the specified receiver.sender - The sending port.receiver - The receiver to which to transmit.properties - The transmit properties (ignored in this base class).IllegalActionException - If the token cannot be converted
or if the token argument is null and the destination receiver
does not support clear.