org.openuat.sensors
Class MainboardAccelerometerReader_Linux

java.lang.Object
  extended by org.openuat.sensors.SamplesSource
      extended by org.openuat.sensors.AsciiLineReaderBase
          extended by org.openuat.sensors.MainboardAccelerometerReader_Linux

public class MainboardAccelerometerReader_Linux
extends AsciiLineReaderBase

This class implements a reader for the data format generated by

Version:
1.0
Author:
Rene Mayrhofer

Field Summary
static int VALUE_RANGE
           
 
Fields inherited from class org.openuat.sensors.AsciiLineReaderBase
port, reader, reopenStreamFrom
 
Fields inherited from class org.openuat.sensors.SamplesSource
maxNumLines
 
Constructor Summary
MainboardAccelerometerReader_Linux(int samplerate)
          Initializes the XXXXXXXXXXXXXXX.
 
Method Summary
 TimeSeries_Int.Parameters getParameters_Int()
          Instead of to [-1;1], these integer parameters map to [-1024;1024], i.e.
 TimeSeries.Parameters getParameters()
          Provides appropriate parameters for interpreting the values to normalize to the [-1;1] range.
protected  void parseLine(java.lang.String line)
          This method must be implemented to parse each line of sensor data, and call emitSample after successful parsing to send samples to all registered listeners.
 
Methods inherited from class org.openuat.sensors.AsciiLineReaderBase
dispose, handleSample
 
Methods inherited from class org.openuat.sensors.SamplesSource
addSink, addSink, addSink, emitSample, emitSample, getMaxNumLines, removeSink_Int, removeSink, removeSink, simulateSampling, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_RANGE

public static final int VALUE_RANGE
See Also:
Constant Field Values
Constructor Detail

MainboardAccelerometerReader_Linux

public MainboardAccelerometerReader_Linux(int samplerate)
                                   throws java.io.FileNotFoundException
Initializes the XXXXXXXXXXXXXXX. It only saves the passed parameters and opens the

Parameters:
samplerate - The sample rate in Hz.
Throws:
java.io.FileNotFoundException - When filename does not exist or can not be opened.
Method Detail

parseLine

protected void parseLine(java.lang.String line)
Description copied from class: AsciiLineReaderBase
This method must be implemented to parse each line of sensor data, and call emitSample after successful parsing to send samples to all registered listeners.

Specified by:
parseLine in class AsciiLineReaderBase
Parameters:
line - The line that should be parsed.

getParameters

public TimeSeries.Parameters getParameters()
Provides appropriate parameters for interpreting the values to normalize to the [-1;1] range.

Specified by:
getParameters in class SamplesSource

getParameters_Int

public TimeSeries_Int.Parameters getParameters_Int()
Instead of to [-1;1], these integer parameters map to [-1024;1024], i.e. MAXIMUM_RANGE in TimeSeries_Int.

Specified by:
getParameters_Int in class SamplesSource


2005-2009, Rene Mayrhofer.