sensorfw: adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptor.h Source File

sensorfw

pegatronaccelerometeradaptor.h
Go to the documentation of this file.
1#ifndef PEGATRONACCELEROMETERADAPTOR_H
2#define PEGATRONACCELEROMETERADAPTOR_H
3
4#include "inputdevadaptor.h"
5#include "deviceadaptorringbuffer.h"
6#include "datatypes/orientationdata.h"
7#include <QTime>
8
9 class PegatronAccelerometerAdaptor : public InputDevAdaptor
10{
11 Q_OBJECT;
12public:
17 static DeviceAdaptor* factoryMethod(const QString& id)
18 {
19 return new PegatronAccelerometerAdaptor(id);
20 }
21
22protected:
27 PegatronAccelerometerAdaptor(const QString& id);
28 ~PegatronAccelerometerAdaptor();
29
30private:
31 DeviceAdaptorRingBuffer<OrientationData>* accelerometerBuffer_;
32 OrientationData orientationValue_;
33 QTime time;
34
35 void interpretEvent(int src, struct input_event *ev);
36 void commitOutput(struct input_event *ev);
37 void interpretSync(int src, struct input_event *ev);
38};
39
40#endif
PegatronAccelerometerAdaptor
Definition pegatronaccelerometeradaptor.h:10
PegatronAccelerometerAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition pegatronaccelerometeradaptor.h:17
PegatronAccelerometerAdaptor::~PegatronAccelerometerAdaptor
~PegatronAccelerometerAdaptor()
PegatronAccelerometerAdaptor::PegatronAccelerometerAdaptor
PegatronAccelerometerAdaptor(const QString &id)
Constructor.
TimedXyzData
Class for vector type measurement data (timestamp, x, y, z).
Definition genericdata.h:53
orientationdata.h
Datatypes for different filters.