ptolemy.domains.wireless.lib
Class GraphicalLocator

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.kernel.InstantiableNamedObj
          extended byptolemy.kernel.Entity
              extended byptolemy.kernel.ComponentEntity
                  extended byptolemy.actor.AtomicActor
                      extended byptolemy.actor.TypedAtomicActor
                          extended byptolemy.domains.wireless.lib.Locator
                              extended byptolemy.domains.wireless.lib.GraphicalLocator
All Implemented Interfaces:
Actor, Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, Executable, Instantiable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable, TypedActor

public class GraphicalLocator
extends Locator

This class is an extension of the Locator actor that adds an outputRange parameter and an icon that is a circle with a radius defined by the value of this parameter. In addition, this class provides the output channel with a transmit property named "range" with value equal to the value of its outputRange parameter. Thus, if the output channel is an instance of LimitedRangeChannel, then the outputRange parameter will define the range of transmission.

Since:
Ptolemy II 4.0
Version:
$Id: GraphicalLocator.java,v 1.12 2004/05/06 03:44:42 eal Exp $
Author:
Philip Baldwin, Xiaojun Liu, and Edward A. Lee
See Also:
LimitedRangeChannel, Serialized Form
Accepted Rating:
Yellow (cxh)
Proposed Rating:
Green (cxh)

Nested Class Summary
 
Nested classes inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
 
Field Summary
 Parameter outputRange
          The output signal range.
 
Fields inherited from class ptolemy.domains.wireless.lib.Locator
input, inputChannelName, output, outputChannelName
 
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
GraphicalLocator(CompositeEntity container, java.lang.String name)
          Construct an actor with the specified container and name.
 
Method Summary
 void fire()
          Generate an event on the output port that indicates the current position and time of the last input on the input port.
 void initialize()
          Initialize the sensor node by setting its icon color to blue.
 
Methods inherited from class ptolemy.domains.wireless.lib.Locator
_getLocation
 
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, pruneDependencies, 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, attributeChanged, 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.Derivable
getDerivedLevel, getDerivedList, propagateValue
 
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getFullName, getName, getName
 

Field Detail

outputRange

public Parameter outputRange
The output signal range. This is a double that defaults to 100.0. The icon for this sensor node includes a circle with this as its radius.

Constructor Detail

GraphicalLocator

public GraphicalLocator(CompositeEntity container,
                        java.lang.String name)
                 throws NameDuplicationException,
                        IllegalActionException
Construct an actor with the specified container and name.

Parameters:
container - The container.
name - The name.
Throws:
IllegalActionException - If the entity cannot be contained by the proposed container.
NameDuplicationException - If the container already has an actor with this name.
Method Detail

fire

public void fire()
          throws IllegalActionException
Generate an event on the output port that indicates the current position and time of the last input on the input port. Also, change the color of the icon to red and schedule another firing after 1.0 time unit to change it back to blue.

Specified by:
fire in interface Executable
Overrides:
fire in class Locator
Throws:
IllegalActionException

initialize

public void initialize()
                throws IllegalActionException
Initialize the sensor node by setting its icon color to blue.

Specified by:
initialize in interface Executable
Overrides:
initialize in class AtomicActor
Throws:
IllegalActionException - If thrown by the base class.