rcx.rcxdirect
Class Sensor

java.lang.Object
  extended by rcx.rcxdirect.DirectSend
      extended by rcx.rcxdirect.Sensor

public class Sensor
extends DirectSend

Abstraction for a sensor. There are three Sensor instances available: Sensor.S1, Sensor.S2 and Sensor.S3. They correspond to sensor inputs labeled 1, 2 and 3 in the RCX.


Field Summary
static Sensor S1
          Sensor labeled 1 on RCX.
static Sensor S2
          Sensor labeled 1 on RCX.
static Sensor S3
          Sensor labeled 1 on RCX.
 
Method Summary
 boolean readBooleanValue()
          Reads the boolean value of the sensor.
 int readRawValue()
          Reads the raw value of the sensor.
 int readValue()
          Reads the canonical value of the sensor.
 
Methods inherited from class rcx.rcxdirect.DirectSend
getStream, getTimeout, getTimeoutStatic, init, lastResult, lastResultStatic, sendToRCX
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S1

public static final Sensor S1
Sensor labeled 1 on RCX.


S2

public static final Sensor S2
Sensor labeled 1 on RCX.


S3

public static final Sensor S3
Sensor labeled 1 on RCX.

Method Detail

readValue

public final int readValue()
Reads the canonical value of the sensor.


readRawValue

public final int readRawValue()
Reads the raw value of the sensor.


readBooleanValue

public final boolean readBooleanValue()
Reads the boolean value of the sensor.