sensorfw
wristgesturesensor.h
Go to the documentation of this file.
28#ifndef WRISTGESTURE_SENSOR_CHANNEL_H
29#define WRISTGESTURE_SENSOR_CHANNEL_H
30
31#include <QObject>
32
33#include "deviceadaptor.h"
34#include "abstractsensor.h"
36#include "dataemitter.h"
38#include "datatypes/unsigned.h"
39
40class Bin;
41template <class TYPE> class BufferReader;
42class FilterBase;
43
52 public AbstractSensorChannel,
53 public DataEmitter<TimedUnsigned>
54{
55 Q_OBJECT;
56 Q_PROPERTY(Unsigned wristgesture READ wristgesture);
57
58public:
59
64 static AbstractSensorChannel* factoryMethod(const QString& id)
65 {
68
69 return sc;
70 }
71
77 {
78 return prevWristGesture;
79 }
80
81public Q_SLOTS:
82 bool start();
83 bool stop();
84
85signals:
91
92protected:
93 WristGestureSensorChannel(const QString& id);
95
96private:
97 TimedUnsigned prevWristGesture;
98 Bin* filterBin_;
99 Bin* marshallingBin_;
100
101 DeviceAdaptor* wristGestureAdaptor_;
102
103 BufferReader<TimedUnsigned>* wristgestureReader_;
104
105 RingBuffer<TimedUnsigned>* outputBuffer_;
106
111 void emitData(const TimedUnsigned& value);
112};
113
114#endif // WRISTGESTURE_SENSOR_CHANNEL_H
Datatype for unsigned integer value with timestamp.
Definition: timedunsigned.h:34
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
Sensor for accessing device wristgesture.
static AbstractSensorChannel * factoryMethod(const QString &id)
Factory method for WristGestureSensorChannel.
virtual ~WristGestureSensorChannel()
WristGestureSensorChannel(const QString &id)
void wristgestureChanged(const int &wristgesture)
Sent whenever wristgesture interpretation has changed.
Unsigned wristgesture() const
Property method returning current wristgesture.
Datatype for unsigned values.
QObject based datatype for TimedUnsigned.
D-Bus Adaptor for WristGestureSensor.