sensorfw: adaptors/tapadaptor/tapadaptor.h Source File

sensorfw

tapadaptor.h
Go to the documentation of this file.
1
28#ifndef TAPADAPTOR_H
29#define TAPADAPTOR_H
30
31#include "inputdevadaptor.h"
32#include "deviceadaptorringbuffer.h"
33#include "datatypes/tapdata.h"
34
41 class TapAdaptor : public InputDevAdaptor
42{
43 Q_OBJECT;
44public:
49 static DeviceAdaptor* factoryMethod(const QString& id)
50 {
51 return new TapAdaptor(id);
52 }
53
54protected:
59 TapAdaptor(const QString& id);
60 ~TapAdaptor();
61
62 virtual bool setInterval(const unsigned int value, const int sessionId);
63
64private:
65 DeviceAdaptorRingBuffer<TapData>* tapBuffer_;
67 void interpretEvent(int src, struct input_event *ev);
68 void interpretSync(int src, struct input_event *ev);
69 void commitOutput(const TapData& data);
70};
71
72#endif
TapAdaptor
Adaptor class for detecting device tap events.
Definition: tapadaptor.h:42
TapAdaptor::setInterval
virtual bool setInterval(const unsigned int value, const int sessionId)
TapAdaptor::~TapAdaptor
~TapAdaptor()
TapAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of TapAdaptor class.
Definition: tapadaptor.h:49
TapAdaptor::TapAdaptor
TapAdaptor(const QString &id)
Constructor.
TapData
Datatype for device tap events.
Definition: tapdata.h:36
tapdata.h
Datatype for device tap events.