|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kaffe.sensors.SensorFeature
A SensorFeature corresponds to a specific feature of a sensor chip and is used to read and write data.
Field Summary | |
private kaffe.util.Ptr |
internal
The internal data for this feature. |
private int |
mode
The access modes for this feature. |
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. |
private java.lang.String |
name
The name of this feature. |
(package private) SensorFeature |
next
Link to next node in the list. |
private Sensor |
sensor
The sensor that this feature is a part of. |
Constructor Summary | |
protected |
SensorFeature()
Construct an empty SensorFeature. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
int |
getMode()
|
java.lang.String |
getName()
|
Sensor |
getSensor()
|
int |
hashCode()
|
double |
read()
|
protected void |
setMode(int mode)
|
java.lang.String |
toString()
|
void |
write(double value)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait, wait0 |
Field Detail |
public static final int MODE_NO_RW
public static final int MODE_R
public static final int MODE_W
public static final int MODE_RW
SensorFeature next
private Sensor sensor
private java.lang.String name
private int mode
private kaffe.util.Ptr internal
Constructor Detail |
protected SensorFeature()
Method Detail |
public Sensor getSensor()
public java.lang.String getName()
protected void setMode(int mode)
mode
- The access modes for this feature.public int getMode()
public double read() throws java.io.IOException
java.io.IOException
- if there was a problem reading the sensor.public void write(double value) throws java.io.IOException
value
- The value to write to this sensor feature.java.io.IOException
- if there was a problem writing to the sensor.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |