sensorfw
temperaturesensor_i.h
Go to the documentation of this file.
1 
26 #ifndef TEMPERATURESENSOR_I_H
27 #define TEMPERATURESENSOR_I_H
28 
29 #include <QtDBus/QtDBus>
30 
31 #include "datatypes/unsigned.h"
32 #include "abstractsensor_i.h"
33 
41 {
42  Q_OBJECT
43  Q_DISABLE_COPY(TemperatureSensorChannelInterface)
44  Q_PROPERTY(Unsigned temperature READ temperature NOTIFY temperatureChanged)
45 
46 public:
50  static const char* staticInterfaceName;
51 
59  static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
60 
67 
74  TemperatureSensorChannelInterface(const QString& path, int sessionId);
75 
83  static const TemperatureSensorChannelInterface* listenInterface(const QString& id);
84 
93 
100  static TemperatureSensorChannelInterface* interface(const QString& id);
101 
102 protected:
103  virtual bool dataReceivedImpl();
104 
105 Q_SIGNALS:
111  void temperatureChanged(const Unsigned& value);
112 };
113 
114 namespace local {
115  typedef ::TemperatureSensorChannelInterface TemperatureSensor;
116 }
117 
118 #endif
TemperatureSensorChannelInterface::listenInterface
static const TemperatureSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
TemperatureSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
abstractsensor_i.h
Base class for sensor interface.
local
Definition: abstractsensor_i.h:516
TemperatureSensorChannelInterface::temperatureChanged
void temperatureChanged(const Unsigned &value)
Sent when measured temperature has changed.
TemperatureSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: temperaturesensor_i.h:50
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
TemperatureSensorChannelInterface::temperature
Unsigned temperature()
Get latest temperature reading from sensor daemon.
unsigned.h
QObject based datatype for TimedUnsigned.
TemperatureSensorChannelInterface::TemperatureSensorChannelInterface
TemperatureSensorChannelInterface(const QString &path, int sessionId)
Constructor.
TemperatureSensorChannelInterface::controlInterface
static TemperatureSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
TemperatureSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
TemperatureSensorChannelInterface
Client interface for accessing temperature sensor.
Definition: temperaturesensor_i.h:41
TemperatureSensorChannelInterface::interface
static TemperatureSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
Unsigned
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
TemperatureSensorChannelInterface::temperature
Unsigned temperature
Definition: temperaturesensor_i.h:44
local::TemperatureSensor
::TemperatureSensorChannelInterface TemperatureSensor
Definition: temperaturesensor_i.h:115