sensorfw: adaptors/gyroscopeadaptor-evdev/gyroevdevadaptor.h Source File

sensorfw

gyroevdevadaptor.h
Go to the documentation of this file.
1
25 #ifndef GYROEVDEVADAPTOR_H
26 #define GYROEVDEVADAPTOR_H
27
28 #include "inputdevadaptor.h"
29 #include "deviceadaptorringbuffer.h"
30 #include "datatypes/orientationdata.h"
31 #include <QTime>
32
33 class GyroAdaptorEvdev : public InputDevAdaptor
34 {
35 Q_OBJECT
36 public:
41 static DeviceAdaptor* factoryMethod(const QString& id)
42 {
43 return new GyroAdaptorEvdev(id);
44 }
45
46 virtual bool startSensor();
47
48 virtual void stopSensor();
49
50 virtual bool standby();
51
52 virtual bool resume();
53
54 protected:
59 GyroAdaptorEvdev(const QString& id);
60 ~GyroAdaptorEvdev();
61
65 virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
66
67 private:
68 DeviceAdaptorRingBuffer<TimedXyzData>* gyroscopeBuffer_;
69
70 void interpretEvent(int src, struct input_event *ev);
71 void commitOutput(struct input_event *ev);
72 void interpretSync(int src, struct input_event *ev);
73 QByteArray powerStatePath_;
74 TimedXyzData gyroValue_;
75
76 };
77
78 #endif
GyroAdaptorEvdev
Definition: gyroevdevadaptor.h:34
GyroAdaptorEvdev::~GyroAdaptorEvdev
~GyroAdaptorEvdev()
GyroAdaptorEvdev::stopSensor
virtual void stopSensor()
GyroAdaptorEvdev::resume
virtual bool resume()
GyroAdaptorEvdev::evaluateIntervalRequests
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
GyroAdaptorEvdev::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition: gyroevdevadaptor.h:41
GyroAdaptorEvdev::GyroAdaptorEvdev
GyroAdaptorEvdev(const QString &id)
Constructor.
GyroAdaptorEvdev::standby
virtual bool standby()
GyroAdaptorEvdev::startSensor
virtual bool startSensor()
TimedXyzData
Class for vector type measurement data (timestamp, x, y, z).
Definition: genericdata.h:53
orientationdata.h
Datatypes for different filters.