sensorfw: adaptors/alsadaptor-evdev/alsevdevadaptor.h Source File

sensorfw

alsevdevadaptor.h
Go to the documentation of this file.
1
25#ifndef ALSEVDEVADAPTOR_H
26#define ALSEVDEVADAPTOR_H
27
28#include "inputdevadaptor.h"
29#include "deviceadaptorringbuffer.h"
30#include "datatypes/orientationdata.h"
31#include <QTime>
32
33 class ALSAdaptorEvdev : public InputDevAdaptor
34{
35 Q_OBJECT
36public:
41 static DeviceAdaptor* factoryMethod(const QString& id)
42 {
43 return new ALSAdaptorEvdev(id);
44 }
45
46 virtual bool startSensor();
47
48 virtual void stopSensor();
49
50 virtual bool standby();
51
52 virtual bool resume();
53
54protected:
59 ALSAdaptorEvdev(const QString& id);
60 ~ALSAdaptorEvdev();
61
62private:
63 DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
64
65 unsigned alsValue_;
66
67 void interpretEvent(int src, struct input_event *ev);
68 void commitOutput(struct input_event *ev);
69 void interpretSync(int src, struct input_event *ev);
70 QByteArray powerStatePath_;
71
72};
73
74#endif
ALSAdaptorEvdev
Definition alsevdevadaptor.h:34
ALSAdaptorEvdev::startSensor
virtual bool startSensor()
ALSAdaptorEvdev::resume
virtual bool resume()
ALSAdaptorEvdev::standby
virtual bool standby()
ALSAdaptorEvdev::~ALSAdaptorEvdev
~ALSAdaptorEvdev()
ALSAdaptorEvdev::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition alsevdevadaptor.h:41
ALSAdaptorEvdev::ALSAdaptorEvdev
ALSAdaptorEvdev(const QString &id)
Constructor.
ALSAdaptorEvdev::stopSensor
virtual void stopSensor()
orientationdata.h
Datatypes for different filters.