Go to the documentation of this file.00001
00027 #ifndef ACCELEROMETERCHAIN_H
00028 #define ACCELEROMETERCHAIN_H
00029
00030 #include "abstractsensor.h"
00031 #include "abstractchain.h"
00032 #include "coordinatealignfilter.h"
00033 #include "deviceadaptor.h"
00034
00035 class Bin;
00036 template <class TYPE> class BufferReader;
00037 class FilterBase;
00038
00048 class AccelerometerChain : public AbstractChain
00049 {
00050 Q_OBJECT;
00051
00052 public:
00057 static AbstractChain* factoryMethod(const QString& id)
00058 {
00059 AccelerometerChain* sc = new AccelerometerChain(id);
00060 return sc;
00061 }
00062
00063 public Q_SLOTS:
00064 bool start();
00065 bool stop();
00066
00067 protected:
00068 AccelerometerChain(const QString& id);
00069 ~AccelerometerChain();
00070
00071 private:
00072
00073 bool setMatrixFromString(const QString& str);
00074
00075 double aconv_[3][3];
00076 Bin* filterBin_;
00077
00078 DeviceAdaptor* accelerometerAdaptor_;
00079 BufferReader<AccelerationData>* accelerometerReader_;
00080 FilterBase* accCoordinateAlignFilter_;
00081 RingBuffer<AccelerationData>* outputBuffer_;
00082 };
00083
00084 #endif // ACCELEROMETERCHAIN_H