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
33 virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
34
35private:
36 DeviceAdaptorRingBuffer<OrientationData>* accelerometerBuffer_;
37 OrientationData orientationValue_;
38 QTime time;
39
40 void interpretEvent(int src, struct input_event *ev);
41 void commitOutput(struct input_event *ev);
42 void interpretSync(int src, struct input_event *ev);
43};
44
45#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::evaluateIntervalRequests
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
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.