avrora.sim.platform.sensors
Class RandomSensorData

java.lang.Object
  extended byavrora.sim.platform.sensors.RandomSensorData
All Implemented Interfaces:
SensorData

public class RandomSensorData
extends java.lang.Object
implements SensorData


Field Summary
protected  java.util.Random random
           
 
Constructor Summary
RandomSensorData(java.util.Random r)
           
 
Method Summary
 int reading()
          The reading() method is called by the simulation when a new reading of the sensor is requested or needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

protected final java.util.Random random
Constructor Detail

RandomSensorData

public RandomSensorData(java.util.Random r)
Method Detail

reading

public int reading()
Description copied from interface: SensorData
The reading() method is called by the simulation when a new reading of the sensor is requested or needed.

Specified by:
reading in interface SensorData
Returns:
a raw ADC reading which should be returned to the software