|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.sensors.SamplesSource
org.openuat.sensors.j2me.SymbianTCPAccelerometerReader
public class SymbianTCPAccelerometerReader
This class implements an accelerometer sensor reader that gets its data from a small Symbian/C++ wrapper around the Nokia sensor SDK. It opens a TCP socket to which the Symbian program will connect. In the future, this should be the other way around with the Symbian wrapper being a service.
| Field Summary | |
|---|---|
static int |
SAMPLERATE
This is only approximate, we can't control the sample rate on the device. |
static int |
VALUE_RANGE
|
| Fields inherited from class org.openuat.sensors.SamplesSource |
|---|
maxNumLines |
| Constructor Summary | |
|---|---|
SymbianTCPAccelerometerReader()
Initializes the reader. |
|
| 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 boolean |
handleSample()
Implementation of SamplesSource.handleSample. |
void |
start()
This overrides the SamplesSource.start implementation, because we need to open the outgoing control connection to get the incoming data connection. |
void |
stop()
This overrides the SamplesSource.stop implementation to also properly close all resources the may be in use (the sockets). |
| Methods inherited from class org.openuat.sensors.SamplesSource |
|---|
addSink, addSink, addSink, dispose, emitSample, emitSample, getMaxNumLines, removeSink_Int, removeSink, removeSink, simulateSampling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SAMPLERATE
public static final int VALUE_RANGE
| Constructor Detail |
|---|
public SymbianTCPAccelerometerReader()
| Method Detail |
|---|
public void start()
start in class SamplesSourcepublic void stop()
stop in class SamplesSourceprotected boolean handleSample()
handleSample in class SamplesSourcepublic TimeSeries.Parameters getParameters()
getParameters in class SamplesSourcepublic TimeSeries_Int.Parameters getParameters_Int()
getParameters_Int in class SamplesSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||