javax.microedition.sensor
Class NXTActiveData

java.lang.Object
  extended by javax.microedition.sensor.NXTActiveData

public class NXTActiveData
extends Object

Represents active asynchronous transfers

Author:
Lawrie

Constructor Summary
NXTActiveData(NXTSensorConnection sensor, int bufferSize, DataListener listener, int samplingInterval)
           
 
Method Summary
 int getBufferSize()
           
 DataListener getListener()
           
 int getSamplingInterval()
           
 SensorConnection getSensor()
           
 void process()
          Process the entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTActiveData

public NXTActiveData(NXTSensorConnection sensor,
                     int bufferSize,
                     DataListener listener,
                     int samplingInterval)
Method Detail

getSensor

public SensorConnection getSensor()

getBufferSize

public int getBufferSize()

getListener

public DataListener getListener()

getSamplingInterval

public int getSamplingInterval()

process

public void process()
Process the entry. Check if we are ready to read a new sample and if so, read it. When the buffer is full, call the data listener and start a new buffer