sensorfw: adaptors/magnetometeradaptor-evdev/magnetometerevdevadaptor.h Source File

sensorfw

magnetometerevdevadaptor.h
Go to the documentation of this file.
1
28#ifndef MAGEVDEVADAPTOR_H
29#define MAGEVDEVADAPTOR_H
30
31#include "inputdevadaptor.h"
32#include "deviceadaptorringbuffer.h"
33#include "datatypes/orientationdata.h"
34#include <QTime>
35
36 class MagAdaptorEvdev : public InputDevAdaptor
37{
38 Q_OBJECT
39public:
44 static DeviceAdaptor* factoryMethod(const QString& id)
45 {
46 return new MagAdaptorEvdev(id);
47 }
48
49 virtual bool startSensor();
50
51 virtual void stopSensor();
52
53 virtual bool standby();
54
55 virtual bool resume();
56
57protected:
62 MagAdaptorEvdev(const QString& id);
63 ~MagAdaptorEvdev();
64
65private:
66 DeviceAdaptorRingBuffer<CalibratedMagneticFieldData>* magnetometerBuffer_;
67
68 void interpretEvent(int src, struct input_event *ev);
69 void commitOutput(struct input_event *ev);
70 void interpretSync(int src, struct input_event *ev);
71 QByteArray powerStatePath_;
72 CalibratedMagneticFieldData magValue_;
73};
74
75#endif
CalibratedMagneticFieldData
Datatype for calibrated magnetometer measurements.
Definition orientationdata.h:59
MagAdaptorEvdev
Definition magnetometerevdevadaptor.h:37
MagAdaptorEvdev::standby
virtual bool standby()
MagAdaptorEvdev::~MagAdaptorEvdev
~MagAdaptorEvdev()
MagAdaptorEvdev::MagAdaptorEvdev
MagAdaptorEvdev(const QString &id)
Constructor.
MagAdaptorEvdev::resume
virtual bool resume()
MagAdaptorEvdev::startSensor
virtual bool startSensor()
MagAdaptorEvdev::stopSensor
virtual void stopSensor()
MagAdaptorEvdev::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition magnetometerevdevadaptor.h:44
orientationdata.h
Datatypes for different filters.