sensorfw
adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.h
Go to the documentation of this file.
00001 #ifndef OEMTABLETACCELEROMETERADPTOR_H
00002 #define OEMTABLETACCELEROMETERADPTOR_H
00003 #include "sysfsadaptor.h"
00004 #include <QString>
00005 #include <QStringList>
00006 #include <linux/input.h>
00007 #include "deviceadaptorringbuffer.h"
00008 #include "datatypes/orientationdata.h"
00009 #include <QTime>
00010 
00011 class OemtabletAccelAdaptor : public SysfsAdaptor {
00012     Q_OBJECT
00013 
00014     public:
00015         static DeviceAdaptor* factoryMethod (const QString& id) {
00016             return new OemtabletAccelAdaptor (id);
00017         }
00018         OemtabletAccelAdaptor (const QString& id);
00019         ~OemtabletAccelAdaptor ();
00020 
00021         bool startSensor ();
00022         void stopSensor ();
00023 
00024     protected:
00025         void processSample (int pathId, int fd);
00026 
00027     private:
00028         DeviceAdaptorRingBuffer<OrientationData>* buffer;
00029         QString devPath;
00030         int devId;
00031 };
00032 #endif