sensorfw: adaptors/magnetometeradaptor/magnetometeradaptor.h Source File

sensorfw

magnetometeradaptor.h
Go to the documentation of this file.
1
28#ifndef MAGNETOMETERADAPTOR_H
29#define MAGNETOMETERADAPTOR_H
30
31#include "sysfsadaptor.h"
32#include "deviceadaptorringbuffer.h"
33#include "datatypes/genericdata.h"
34#include <QString>
35#include "datatypes/orientationdata.h"
36
43 class MagnetometerAdaptor : public SysfsAdaptor
44{
45 Q_OBJECT;
46public:
47
48 Q_PROPERTY(int overflowLimit READ overflowLimit WRITE setOverflowLimit);
49
54 static DeviceAdaptor* factoryMethod(const QString& id)
55 {
56 return new MagnetometerAdaptor(id);
57 }
58
59protected:
64 MagnetometerAdaptor(const QString& id);
65 ~MagnetometerAdaptor();
66
67 bool setInterval(const unsigned int value, const int sessionId);
68
69private:
70
78 void processSample(int pathId, int fd);
79
85 void setOverflowLimit(int limit);
86
92 int overflowLimit() const;
93
94 DeviceAdaptorRingBuffer<CalibratedMagneticFieldData>* magnetometerBuffer_;
95 int intervalCompensation_;
96 int overflowLimit_;
97};
98
99#endif
MagnetometerAdaptor
Adaptor for internal magnetometer.
Definition: magnetometeradaptor.h:44
MagnetometerAdaptor::MagnetometerAdaptor
MagnetometerAdaptor(const QString &id)
Constructor.
MagnetometerAdaptor::overflowLimit
int overflowLimit
Definition: magnetometeradaptor.h:45
MagnetometerAdaptor::~MagnetometerAdaptor
~MagnetometerAdaptor()
MagnetometerAdaptor::setInterval
bool setInterval(const unsigned int value, const int sessionId)
MagnetometerAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of MagnetometerAdaptor class.
Definition: magnetometeradaptor.h:54
genericdata.h
Basic datatypes for filters.
orientationdata.h
Datatypes for different filters.