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"
31#include <QTime>
32
33class GyroAdaptorEvdev : public InputDevAdaptor
34{
35 Q_OBJECT
36public:
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
54protected:
59 GyroAdaptorEvdev(const QString& id);
61
65 virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
66
67private:
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
virtual void stopSensor()
virtual bool resume()
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
GyroAdaptorEvdev(const QString &id)
Constructor.
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
virtual bool standby()
virtual bool startSensor()
Class for vector type measurement data (timestamp, x, y, z).
Definition: genericdata.h:53
Datatypes for different filters.