kaffe.sensors
Class SensorFeature
java.lang.Object
|
+--kaffe.sensors.SensorFeature
- public class SensorFeature
- extends java.lang.Object
A SensorFeature corresponds to a specific feature of a sensor chip and is
used to read and write data.
Field Summary |
static int |
MODE_NO_RW
SensorFeature mode indicating that no reading or writing is allowed. |
static int |
MODE_R
SensorFeature mode indicating that only reading is allowed. |
static int |
MODE_RW
SensorFeature mode indicating that reading and writing is allowed. |
static int |
MODE_W
SensorFeature mode indicating that only writing is allowed. |
Constructor Summary |
protected |
SensorFeature()
Construct an empty SensorFeature. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MODE_NO_RW
public static final int MODE_NO_RW
- SensorFeature mode indicating that no reading or writing is allowed.
MODE_R
public static final int MODE_R
- SensorFeature mode indicating that only reading is allowed.
MODE_W
public static final int MODE_W
- SensorFeature mode indicating that only writing is allowed.
MODE_RW
public static final int MODE_RW
- SensorFeature mode indicating that reading and writing is allowed.
SensorFeature
protected SensorFeature()
- Construct an empty SensorFeature.
getSensor
public Sensor getSensor()
- Returns:
- The sensor that this feature is a part of.
getName
public java.lang.String getName()
- Returns:
- The name of this feature.
setMode
protected void setMode(int mode)
- Parameters:
mode
- The access modes for this feature.
getMode
public int getMode()
- Returns:
- The access modes for this feature.
read
public double read()
throws java.io.IOException
- Returns:
- The current value from this sensor feature.
- Throws:
java.io.IOException
- if there was a problem reading the sensor.
write
public void write(double value)
throws java.io.IOException
- Parameters:
value
- The value to write to this sensor feature.- Throws:
java.io.IOException
- if there was a problem writing to the sensor.
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