|
||||||||||
| 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
ptolemy.domains.wireless.lib.DelayChannel
ptolemy.domains.wireless.lib.LimitedRangeChannel
This is a model of a wireless channel with a specified transmission range. 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. 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) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
ptolemy.kernel.Entity.ContainedObjectsIterator |
| Field Summary |
| Fields inherited from class ptolemy.domains.wireless.lib.DelayChannel |
propagationSpeed |
| Fields inherited from class ptolemy.domains.wireless.lib.ErasureChannel |
_random, distance, lossProbability, seed |
| 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 | |
LimitedRangeChannel(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct a channel with the given name and container. |
|
| Method Summary | |
protected boolean |
_isInRange(WirelessIOPort source,
WirelessIOPort destination,
ptolemy.data.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(ptolemy.kernel.util.Settable settable)
React to a change of the specified Settable value. |
| Methods inherited from class ptolemy.domains.wireless.lib.DelayChannel |
_transmitTo, attributeChanged, fire |
| Methods inherited from class ptolemy.domains.wireless.lib.ErasureChannel |
initialize |
| Methods inherited from class ptolemy.domains.wireless.kernel.AtomicWirelessChannel |
_distanceBetween, _locationOf, _receiversInRange, getChannelPort, listeningInputPorts, listeningOutputPorts, pruneDependencies, registerPropertyTransformer, sendingInputPorts, sendingOutputPorts, transformProperties, transmit, unregisterPropertyTransformer |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, 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 |
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 |
| Constructor Detail |
public LimitedRangeChannel(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
an actor already in the container.| Method Detail |
public void valueChanged(ptolemy.kernel.util.Settable settable)
valueChanged in interface ptolemy.kernel.util.ValueListenervalueChanged in class AtomicWirelessChannelsettable - The object that has changed value.
protected boolean _isInRange(WirelessIOPort source,
WirelessIOPort destination,
ptolemy.data.RecordToken properties)
throws ptolemy.kernel.util.IllegalActionException
_isInRange in class AtomicWirelessChannelsource - The source port.destination - The destination port.properties - Properties of the transmission.
ptolemy.kernel.util.IllegalActionException - If it cannot be determined
whether the destination is in range (not thrown in this base
class).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||