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"
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);
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
virtual bool standby()
TemperatureAdaptor(const QString &id)
Constructor.
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of AccelerometerAdaptor class.
virtual bool resume()
virtual unsigned int evaluateIntervalRequests(int &sessionId) const
Reimplement to allow for 0 interval to be the slowest entry.
virtual void stopSensor()
virtual bool startSensor()
Datatypes for different filters.