sensorfw
adaptors/magnetometeradaptor-ascii/magnetometeradaptor-ascii.h
Go to the documentation of this file.
00001 
00032 #ifndef MAGNETOMETERADAPTOR_ASCII_H
00033 #define MAGNETOMETERADAPTOR_ASCII_H
00034 
00035 #include "sysfsadaptor.h"
00036 #include "deviceadaptorringbuffer.h"
00037 #include "datatypes/timedunsigned.h"
00038 
00039 class MagnetometerAdaptorAscii : public SysfsAdaptor
00040 {
00041     Q_OBJECT;
00042 public:
00043     static DeviceAdaptor* factoryMethod(const QString& id)
00044     {
00045         return new MagnetometerAdaptorAscii(id);
00046     }
00047 
00048 protected:
00049     MagnetometerAdaptorAscii(const QString& id);
00050     ~MagnetometerAdaptorAscii();
00051 
00052 private:
00053     void processSample(int pathId, int fd);
00054     char buf[32];
00055 
00056     DeviceAdaptorRingBuffer<TimedXyzData>* magnetBuffer_;
00057 };
00058 
00059 #endif