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
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);
60 ~GyroAdaptorEvdev();
61
62private:
63 DeviceAdaptorRingBuffer<TimedXyzData>* gyroscopeBuffer_;
64
65 void interpretEvent(int src, struct input_event *ev);
66 void commitOutput(struct input_event *ev);
67 void interpretSync(int src, struct input_event *ev);
68 QByteArray powerStatePath_;
69 TimedXyzData gyroValue_;
70
71};
72
73#endif
GyroAdaptorEvdev
Definition gyroevdevadaptor.h:34
GyroAdaptorEvdev::~GyroAdaptorEvdev
~GyroAdaptorEvdev()
GyroAdaptorEvdev::stopSensor
virtual void stopSensor()
GyroAdaptorEvdev::resume
virtual bool resume()
GyroAdaptorEvdev::GyroAdaptorEvdev
GyroAdaptorEvdev(const QString &id)
Constructor.
GyroAdaptorEvdev::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition gyroevdevadaptor.h:41
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.