kaffe.sensors
Class Sensor
java.lang.Object
|
+--kaffe.sensors.Sensor
- public class Sensor
- extends java.lang.Object
A Sensor corresponds to a chip that contains several features that can be
read from or written to. This class is relatively primitive and should
probably be extended by more capable classes.
Constructor Summary |
protected |
Sensor()
Construct an empty Sensor object. |
Method Summary |
static java.util.Hashtable |
detect()
Detect and return a table of sensors. |
static java.util.Hashtable |
detect(java.lang.Class sensorClass,
java.lang.Class featureClass)
Detect and return a table of sensors. |
boolean |
equals(java.lang.Object obj)
|
SensorFeature |
getFeature(java.lang.String name)
|
java.util.Enumeration |
getFeatures()
|
java.lang.String |
getName()
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Sensor
protected Sensor()
- Construct an empty Sensor object.
detect
public static java.util.Hashtable detect(java.lang.Class sensorClass,
java.lang.Class featureClass)
- Detect and return a table of sensors.
- Parameters:
sensorClass
- The class to use when creating Sensor objects.featureClass
- The class to use when creating SensorFeature
objects.- Returns:
- A Hashtable that maps sensor chip names to Sensor objects.
detect
public static java.util.Hashtable detect()
- Detect and return a table of sensors.
- Returns:
- A Hashtable that maps sensor chip names to Sensor objects.
getName
public java.lang.String getName()
- Returns:
- The name of the sensor.
getFeatures
public java.util.Enumeration getFeatures()
- Returns:
- An Enumeration of all the sensor's features.
getFeature
public SensorFeature getFeature(java.lang.String name)
- Parameters:
name
- The specific name of a sensor feature.- Returns:
- The SensorFeature corresponding to the given name or null if it
couldn't be found.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003