ukcrobots.simplecore
Class RotationSensor

java.lang.Object
  |
  +--ukcrobots.simplecore.Sensor
        |
        +--ukcrobots.simplecore.RotationSensor

public class RotationSensor
extends Sensor

Model a rotation sensor.

Version:
2001.12.20
Author:
d.j.barnes @at@ kent.ac.uk

Constructor Summary
RotationSensor(int id)
          Create a rotation sensor.
 
Method Summary
 void setPreviousValue(int aValue)
          Resets the canonical sensor value.
 
Methods inherited from class ukcrobots.simplecore.Sensor
activate, getDevice, passivate, readValue, readValueAsInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

RotationSensor

public RotationSensor(int id)
               throws NoSuchDeviceException
Create a rotation sensor.

Parameters:
id - Which input port the sensor is connected to: 1, 2, or 3.
Throws:
NoSuchDeviceException - if the device id is not recognised.
Method Detail

setPreviousValue

public void setPreviousValue(int aValue)
Resets the canonical sensor value.