sensorfw: adaptors/steaccelerometeradaptor/steaccelerometeradaptor.h Source File

sensorfw

steaccelerometeradaptor.h
Go to the documentation of this file.
1 #ifndef STEACCELEROMETERADPTOR_H
2 #define STEACCELEROMETERADPTOR_H
3 #include "sysfsadaptor.h"
4 #include <QString>
5 #include <QStringList>
6 #include <linux/input.h>
7 #include "deviceadaptorringbuffer.h"
8 #include "datatypes/orientationdata.h"
9 #include <QTime>
10
11 class SteAccelAdaptor : public SysfsAdaptor {
12 Q_OBJECT
13
14 public:
15 static DeviceAdaptor* factoryMethod (const QString& id) {
16 return new SteAccelAdaptor (id);
17 }
18 SteAccelAdaptor(const QString& id);
19 ~SteAccelAdaptor();
20
21 bool startSensor();
22 void stopSensor();
23
24 protected:
25 void processSample(int pathId, int fd);
26 virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
27
28 private:
29 DeviceAdaptorRingBuffer<OrientationData>* buffer;
30 QString devPath;
31 int devId;
32 QByteArray powerStatePath;
33 QByteArray range;
34 int frequency;
35 bool displayOn;
36 };
37 #endif
SteAccelAdaptor
Definition: steaccelerometeradaptor.h:11
SteAccelAdaptor::SteAccelAdaptor
SteAccelAdaptor(const QString &id)
SteAccelAdaptor::processSample
void processSample(int pathId, int fd)
SteAccelAdaptor::startSensor
bool startSensor()
SteAccelAdaptor::setStandbyOverride
virtual bool setStandbyOverride(const bool override)
Definition: steaccelerometeradaptor.h:26
SteAccelAdaptor::~SteAccelAdaptor
~SteAccelAdaptor()
SteAccelAdaptor::stopSensor
void stopSensor()
SteAccelAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition: steaccelerometeradaptor.h:15
orientationdata.h
Datatypes for different filters.