sensorfw: qt-api/humiditysensor_i.h Source File

sensorfw

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