sensorfw
adaptors/gyroscopeadaptor/gyroscopeadaptor.h
Go to the documentation of this file.
00001 
00027 #ifndef GYROSCOPEADAPTOR_H
00028 #define GYROSCOPEADAPTOR_H
00029 
00030 #include "sysfsadaptor.h"
00031 #include "datatypes/orientationdata.h"
00032 
00043 class GyroscopeAdaptor : public SysfsAdaptor
00044 {
00045     Q_OBJECT;
00046 public:
00053     static DeviceAdaptor* factoryMethod(const QString& id)
00054     {
00055         return new GyroscopeAdaptor(id);
00056     }
00057 
00058 protected:
00059 
00065     GyroscopeAdaptor(const QString& id);
00066 
00070     ~GyroscopeAdaptor();
00071 
00072     bool setInterval(const unsigned int value, const int sessionId);
00073     unsigned int interval() const;
00074 
00075 private:
00076 
00085     void processSample(int pathId, int fd);
00086 
00087     DeviceAdaptorRingBuffer<TimedXyzData>* gyroscopeBuffer_;
00088     QByteArray dataRatePath_;
00089 };
00090 
00091 #endif