|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.wireless.kernel.AtomicWirelessChannel
ptolemy.domains.wireless.lib.ErasureChannel
Model of a wireless channel with a specified loss probability. If the loss probability is greater than zero then on each call to the transmit() method, for each receiver in range, with the specified probability, the transmission to that receiver will not occur. Whether a transmission occurs to a particular receiver is independent of whether it occurs to any other receiver.
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) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
ptolemy.kernel.Entity.ContainedObjectsIterator |
| Field Summary | |
protected java.util.Random |
_random
A random number generator. |
ptolemy.data.expr.Variable |
distance
A variable that is set to the distance between the transmitter and the receiver before the powerLossFactor expression is evaluated. |
ptolemy.data.expr.Parameter |
lossProbability
The probability that a call to transmit() will fail to deliver the token to a receiver that is in range. |
ptolemy.data.expr.Parameter |
seed
The seed that controls the random number generation. |
| Fields inherited from class ptolemy.domains.wireless.kernel.AtomicWirelessChannel |
_receiversInRangeCacheValid, defaultProperties |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
ErasureChannel(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct a channel with the given name and container. |
|
| Method Summary | |
protected void |
_transmitTo(ptolemy.data.Token token,
WirelessIOPort sender,
WirelessReceiver receiver,
ptolemy.data.RecordToken properties)
Transmit the specified token to the specified receiver. |
void |
initialize()
Initialize the random number generator with the seed, if it has been given. |
| Methods inherited from class ptolemy.domains.wireless.kernel.AtomicWirelessChannel |
_distanceBetween, _isInRange, _locationOf, _receiversInRange, attributeChanged, getChannelPort, listeningInputPorts, listeningOutputPorts, pruneDependencies, registerPropertyTransformer, sendingInputPorts, sendingOutputPorts, transformProperties, transmit, unregisterPropertyTransformer, valueChanged |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, fire, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, removeDependency, setContainer, stop, stopFire, terminate, wrapup |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| 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, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
fire, iterate, postfire, prefire, preinitialize, stop, stopFire, terminate, wrapup |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getContainer, getFullName, getName, getName, setName |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Field Detail |
public ptolemy.data.expr.Parameter lossProbability
public ptolemy.data.expr.Parameter seed
public ptolemy.data.expr.Variable distance
protected java.util.Random _random
| Constructor Detail |
public ErasureChannel(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of the channel.
ptolemy.kernel.util.IllegalActionException - If the container is incompatible.
ptolemy.kernel.util.NameDuplicationException - If the name coincides with
a relation already in the container.| Method Detail |
public void initialize()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the parent class throws it.
protected void _transmitTo(ptolemy.data.Token token,
WirelessIOPort sender,
WirelessReceiver receiver,
ptolemy.data.RecordToken properties)
throws ptolemy.kernel.util.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).
ptolemy.kernel.util.IllegalActionException - If the token cannot be converted
or if the token argument is null and the destination receiver
does not support clear.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||