sensorfw: adaptors/temperatureadaptor/temperatureadaptor.h Source File

sensorfw

temperatureadaptor.h
Go to the documentation of this file.
1
24 #ifndef TEMPERATUREADAPTOR_H
25 #define TEMPERATUREADAPTOR_H
26
27 #include "inputdevadaptor.h"
28 #include "deviceadaptorringbuffer.h"
29 #include "datatypes/orientationdata.h"
30 #include <QTime>
31
32 class TemperatureAdaptor : public InputDevAdaptor
33 {
34 Q_OBJECT
35 public:
40 static DeviceAdaptor* factoryMethod(const QString& id)
41 {
42 return new TemperatureAdaptor(id);
43 }
44
45 virtual bool startSensor();
46
47 virtual void stopSensor();
48
49 virtual bool standby();
50
51 virtual bool resume();
52
53 protected:
58 TemperatureAdaptor(const QString& id);
59 ~TemperatureAdaptor();
60
64 virtual unsigned int evaluateIntervalRequests(int& sessionId) const;
65
66 private:
67 DeviceAdaptorRingBuffer<TimedUnsigned>* temperatureBuffer_;
68
69 unsigned temperatureValue_;
70
71 void interpretEvent(int src, struct input_event *ev);
72 void commitOutput(struct input_event *ev);
73 void interpretSync(int src, struct input_event *ev);
74 QByteArray powerStatePath_;
75
76 };
77
78 #endif
TemperatureAdaptor
Definition: temperatureadaptor.h:33
TemperatureAdaptor::standby
virtual bool standby()
TemperatureAdaptor::TemperatureAdaptor
TemperatureAdaptor(const QString &id)
Constructor.
TemperatureAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
Definition: temperatureadaptor.h:40
TemperatureAdaptor::resume
virtual bool resume()
TemperatureAdaptor::evaluateIntervalRequests
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
TemperatureAdaptor::~TemperatureAdaptor
~TemperatureAdaptor()
TemperatureAdaptor::stopSensor
virtual void stopSensor()
TemperatureAdaptor::startSensor
virtual bool startSensor()
orientationdata.h
Datatypes for different filters.