Go to the documentation of this file.00001
00026 #ifndef TAP_SENSOR_CHANNEL_H
00027 #define TAP_SENSOR_CHANNEL_H
00028
00029 #include <QObject>
00030
00031 #include "abstractsensor.h"
00032 #include "tapsensor_a.h"
00033 #include "dataemitter.h"
00034 #include "datatypes/tapdata.h"
00035 #include "deviceadaptor.h"
00036
00037 class Bin;
00038 template <class TYPE> class BufferReader;
00039 class FilterBase;
00040
00051 class TapSensorChannel :
00052 public AbstractSensorChannel,
00053 public DataEmitter<TapData>
00054 {
00055 Q_OBJECT;
00056
00057 public:
00062 static AbstractSensorChannel* factoryMethod(const QString& id)
00063 {
00064 TapSensorChannel* sc = new TapSensorChannel(id);
00065 new TapSensorChannelAdaptor(sc);
00066
00067 return sc;
00068 }
00069
00070 public Q_SLOTS:
00071 bool start();
00072 bool stop();
00073
00074 signals:
00079 void dataAvailable(const Tap& tap);
00080
00081 protected:
00082 TapSensorChannel(const QString& id);
00083 virtual ~TapSensorChannel();
00084
00085 private:
00086 Bin* filterBin_;
00087 Bin* marshallingBin_;
00088 DeviceAdaptor* tapAdaptor_;
00089 BufferReader<TapData>* tapReader_;
00090 RingBuffer<TapData>* outputBuffer_;
00091
00092 void emitData(const TapData& tapData);
00093 };
00094
00095 #endif // TAP_SENSOR_CHANNEL_H