sensorfw: adaptors/accelerometeradaptor/accelerometeradaptor.h Source File

sensorfw

accelerometeradaptor.h
Go to the documentation of this file.
1
28 #ifndef ACCELEROMETERADAPTOR_H
29 #define ACCELEROMETERADAPTOR_H
30
31 #include "inputdevadaptor.h"
32 #include "deviceadaptorringbuffer.h"
33 #include "datatypes/orientationdata.h"
34
46 class AccelerometerAdaptor : public InputDevAdaptor
47 {
48 Q_OBJECT;
49 public:
54 static DeviceAdaptor* factoryMethod(const QString& id)
55 {
56 return new AccelerometerAdaptor(id);
57 }
58
59 virtual bool startSensor();
60
61 virtual void stopSensor();
62 virtual bool standby();
63 virtual bool resume();
64
65 protected:
70 AccelerometerAdaptor(const QString& id);
71 ~AccelerometerAdaptor();
72
76 virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
77
78 private:
79 DeviceAdaptorRingBuffer<AccelerationData>* accelerometerBuffer_;
80 AccelerationData orientationValue_;
81
82 void interpretEvent(int src, struct input_event *ev);
83 void commitOutput(struct input_event *ev);
84 void interpretSync(int src, struct input_event *ev);
85 QByteArray powerStatePath_;
86 qreal accelMultiplier;
87 };
88
89 #endif
AccelerometerAdaptor
Adaptor for internal accelerometer.
Definition: accelerometeradaptor.h:47
AccelerometerAdaptor::resume
virtual bool resume()
AccelerometerAdaptor::startSensor
virtual bool startSensor()
AccelerometerAdaptor::evaluateIntervalRequests
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
AccelerometerAdaptor::~AccelerometerAdaptor
~AccelerometerAdaptor()
AccelerometerAdaptor::standby
virtual bool standby()
AccelerometerAdaptor::AccelerometerAdaptor
AccelerometerAdaptor(const QString &id)
Constructor.
AccelerometerAdaptor::stopSensor
virtual void stopSensor()
AccelerometerAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition: accelerometeradaptor.h:54
TimedXyzData
Class for vector type measurement data (timestamp, x, y, z).
Definition: genericdata.h:53
orientationdata.h
Datatypes for different filters.