Class LuminarySensorHandler
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.domains.ptides.lib.InputDevice
-
- ptolemy.domains.ptides.lib.SensorHandler
-
- ptolemy.domains.ptides.lib.luminary.LuminarySensorHandler
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
GPInputHandler
public abstract class LuminarySensorHandler extends SensorHandler
All input devices for Luminary should extend this class. This class saves the total number of configurations of interrupts. For example, if we only support GPInputHandler, i.e., the only subclass of LuminaryInputDevice is GPInputHandler, and GPInputHandler supports 8 configurations, then numberOfSupportedInputDeviceConfigurations is set to 8. If more devices are implemented, numberOfSupportedInputDeviceConfigurations should be updated.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Jia Zou
- Pt.AcceptedRating:
- Pt.ProposedRating:
- Yellow (jiazou)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description static int
numberOfSupportedInputDeviceConfigurations
The total number of supported configurations for all Luminary sensor input devices.-
Fields inherited from class ptolemy.domains.ptides.lib.SensorHandler
input, output
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description LuminarySensorHandler(CompositeEntity container, java.lang.String name)
Constructs a LuminarySensorHandler object.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.String
configuration()
A sensor device could have multiple access pin and pads (configurations), This method returns the current configuration.abstract java.lang.String
startingConfiguration()
There is a default configuration, which is returned.abstract java.util.List<java.lang.String>
supportedConfigurations()
The set of supported configurations.-
Methods inherited from class ptolemy.domains.ptides.lib.SensorHandler
fire, preinitialize
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, 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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
numberOfSupportedInputDeviceConfigurations
public static int numberOfSupportedInputDeviceConfigurations
The total number of supported configurations for all Luminary sensor input devices. A sensor device could have multiple access pin and pads (configurations), this number keeps track of the total number of configurations available.
-
-
Constructor Detail
-
LuminarySensorHandler
public LuminarySensorHandler(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Constructs a LuminarySensorHandler object.- Parameters:
container
- The container.name
- The name of this actor within the container.- Throws:
IllegalActionException
- if the super constructor throws it.NameDuplicationException
- if the super constructor throws it.
-
-
Method Detail
-
configuration
public abstract java.lang.String configuration() throws IllegalActionException
A sensor device could have multiple access pin and pads (configurations), This method returns the current configuration.- Returns:
- The current configuration captured in a string.
- Throws:
IllegalActionException
-
supportedConfigurations
public abstract java.util.List<java.lang.String> supportedConfigurations()
The set of supported configurations.- Returns:
- The set of supported configurations.
-
startingConfiguration
public abstract java.lang.String startingConfiguration()
There is a default configuration, which is returned.- Returns:
- The default configuration.
-
-