sensorfw
proximitysensor_i.h
Go to the documentation of this file.
1 
27 #ifndef PROXIMITYSENSOR_I_H
28 #define PROXIMITYSENSOR_I_H
29 
30 #include <QtDBus/QtDBus>
31 
32 #include "abstractsensor_i.h"
33 #include <datatypes/unsigned.h>
34 #include <datatypes/proximity.h>
35 
40 {
41  Q_OBJECT
42  Q_DISABLE_COPY(ProximitySensorChannelInterface)
43  Q_PROPERTY(Unsigned proximity READ proximity);
45 
46 public:
52  static const char* staticInterfaceName;
53 
61  static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
62 
70 
77 
84  ProximitySensorChannelInterface(const QString& path, int sessionId);
85 
93  static const ProximitySensorChannelInterface* listenInterface(const QString& id);
94 
103 
110  static ProximitySensorChannelInterface* interface(const QString& id);
111 
112 protected:
113  virtual bool dataReceivedImpl();
114 
115 Q_SIGNALS:
124  void dataAvailable(const Unsigned& data);
125 
132 };
133 
134 namespace local {
135  typedef ::ProximitySensorChannelInterface ProximitySensor;
136 }
137 
138 #endif
ProximitySensorChannelInterface::proximity
Unsigned proximity
Definition: proximitysensor_i.h:43
local::ProximitySensor
::ProximitySensorChannelInterface ProximitySensor
Definition: proximitysensor_i.h:135
abstractsensor_i.h
Base class for sensor interface.
ProximitySensorChannelInterface::proximityReflectance
Proximity proximityReflectance()
Get latest proximity reading from sensor daemon.
ProximitySensorChannelInterface::listenInterface
static const ProximitySensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
local
Definition: abstractsensor_i.h:516
ProximitySensorChannelInterface::ProximitySensorChannelInterface
ProximitySensorChannelInterface(const QString &path, int sessionId)
Constructor.
ProximitySensorChannelInterface::proximityReflectance
Proximity proximityReflectance
Definition: proximitysensor_i.h:43
proximity.h
QObject based datatype for ProximityData.
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
ProximitySensorChannelInterface::controlInterface
static ProximitySensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
ProximitySensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
Proximity
QObject facade for ProximityData.
Definition: proximity.h:38
unsigned.h
QObject based datatype for TimedUnsigned.
ProximitySensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
ProximitySensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
Definition: proximitysensor_i.h:44
ProximitySensorChannelInterface::interface
static ProximitySensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
ProximitySensorChannelInterface::proximity
Unsigned proximity()
Get latest proximity reading from sensor daemon.
ProximitySensorChannelInterface::dataAvailable
void dataAvailable(const Unsigned &data)
Sent when new measurement data has become available.
Unsigned
QObject facae for TimedUnsigned.
Definition: unsigned.h:37
ProximitySensorChannelInterface::reflectanceDataAvailable
void reflectanceDataAvailable(const Proximity &data)
Sent when new measurement data has become available.
ProximitySensorChannelInterface
Client interface for listening proximity sensor state changes.
Definition: proximitysensor_i.h:40