public class PowerLossChannel extends LimitedRangeChannel
The default value of powerPropagationFactor is
1.0 / (4 * PI * distance * distance).This assumes that the transmit power is uniformly distributed on a sphere of radius distance. The result of multiplying this by a transmit power is a power density (power per unit area). The receiver should multiply this power density by the area of the sensor it uses to capture the energy (such as antenna area) and also an efficiency factor which represents how effectively it capture the energy.
The power field of the transmit properties can be supplied by the transmitter as a record with a power field of type double. The default value provided by this channel is Infinity, which when multiplied by any positive constant will yield Infinity, which presumably will be above any threshold. Thus, the default behavior is to encounter no power loss and no limits to communication due to power.
In addition, this channel can have a specified limited transmission range. If a transmission range less than Infinity (the default) is specified, then receivers outside the specified range will not be notified of transmission, irrespective of power loss. The transmission range can be specified in one of two ways. Either it is the value of the range field in the defaultProperties parameter (a record) of this channel, or it is provided by the transmitter on each call to transmit() as a property argument. To use the latter mechanism, it is necessary that the property token be an instance of RecordToken with a field named "range" that can be converted to a double (i.e., it can be a double, an int, or a byte). The default value for range is Infinity, which indicates that by default, there is no range limit.
Any receiver that is within the specified range when transmit() is called will receive the transmission, unless the lossProbability parameter is set to greater than zero.
Yellow (cxh) |
Green (cxh) |
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
powerPropagationFactor
The default formula for the power loss factor.
|
propagationSpeed
_random, distance, lossProbability, seed
_receiversInRangeCacheValid, defaultProperties, name
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
PowerLossChannel(CompositeEntity container,
java.lang.String name)
Construct a channel with the given name and container.
|
Modifier and Type | Method and Description |
---|---|
RecordToken |
transformProperties(RecordToken properties,
WirelessIOPort source,
WirelessIOPort destination)
Transform the properties to take into account channel losses,
noise, etc., for transmission between the specified sender
and the specified receiver.
|
_isInRange, valueChanged
_transmitTo, attributeChanged, clone, fire
initialize
_distanceBetween, _locationOf, _receiversInRange, addChannelListener, channelNotify, declareDelayDependency, getChannelPort, listeningInputPorts, listeningOutputPorts, registerPropertyTransformer, removeChannelListener, sendingInputPorts, sendingOutputPorts, transmit, unregisterPropertyTransformer
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, 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, 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
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public Parameter powerPropagationFactor
public PowerLossChannel(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
an actor already in the container.public RecordToken transformProperties(RecordToken properties, WirelessIOPort source, WirelessIOPort destination) throws IllegalActionException
transformProperties
in interface PropertyTransformer
transformProperties
in class AtomicWirelessChannel
properties
- The transmit properties.source
- The sending port.destination
- The receiving port.IllegalActionException
- If the properties cannot
be transformed. Not thrown in this base class.AtomicWirelessChannel.registerPropertyTransformer(PropertyTransformer, WirelessIOPort)