public class LimitedRangeChannel extends DelayChannel
Any receiver that is within the specified range when transmit() is called will receive the transmission. The distance between the transmitter and receiver is determined by the protected method _distanceBetween(). 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
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 |
---|
LimitedRangeChannel(CompositeEntity container,
java.lang.String name)
Construct a channel with the given name and container.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isInRange(WirelessIOPort source,
WirelessIOPort destination,
RecordToken properties)
Return true if the specified port is in range of the
specified source port, assuming the source port transmits with
the specified properties.
|
void |
valueChanged(Settable settable)
React to a change of the specified Settable value.
|
_transmitTo, attributeChanged, clone, fire
initialize
_distanceBetween, _locationOf, _receiversInRange, addChannelListener, channelNotify, declareDelayDependency, getChannelPort, listeningInputPorts, listeningOutputPorts, registerPropertyTransformer, removeChannelListener, sendingInputPorts, sendingOutputPorts, transformProperties, 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 LimitedRangeChannel(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 void valueChanged(Settable settable)
valueChanged
in interface ValueListener
valueChanged
in class AtomicWirelessChannel
settable
- The object that has changed value.protected boolean _isInRange(WirelessIOPort source, WirelessIOPort destination, RecordToken properties) throws IllegalActionException
_isInRange
in class AtomicWirelessChannel
source
- The source port.destination
- The destination port.properties
- Properties of the transmission.IllegalActionException
- If it cannot be determined
whether the destination is in range (not thrown in this base
class).