sensorfw: adaptors/gyroscopeadaptor/gyroscopeadaptor.h Source File

sensorfw

gyroscopeadaptor.h
Go to the documentation of this file.
1
27#ifndef GYROSCOPEADAPTOR_H
28#define GYROSCOPEADAPTOR_H
29
30#include "sysfsadaptor.h"
31#include "datatypes/orientationdata.h"
32
43 class GyroscopeAdaptor : public SysfsAdaptor
44{
45 Q_OBJECT;
46public:
53 static DeviceAdaptor* factoryMethod(const QString& id)
54 {
55 return new GyroscopeAdaptor(id);
56 }
57
58protected:
59
65 GyroscopeAdaptor(const QString& id);
66
70 ~GyroscopeAdaptor();
71
72 bool setInterval(const int sessionId, const unsigned int interval_us);
73 unsigned int interval() const;
74
75private:
76
85 void processSample(int pathId, int fd);
86
87 DeviceAdaptorRingBuffer<TimedXyzData>* gyroscopeBuffer_;
88 QByteArray dataRatePath_;
89};
90
91#endif
GyroscopeAdaptor
Adaptor for internal gyroscope.
Definition gyroscopeadaptor.h:44
GyroscopeAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of this adaptor class.
Definition gyroscopeadaptor.h:53
GyroscopeAdaptor::~GyroscopeAdaptor
~GyroscopeAdaptor()
Destructor.
GyroscopeAdaptor::interval
unsigned int interval() const
GyroscopeAdaptor::setInterval
bool setInterval(const int sessionId, const unsigned int interval_us)
GyroscopeAdaptor::GyroscopeAdaptor
GyroscopeAdaptor(const QString &id)
Constructor.
orientationdata.h
Datatypes for different filters.