sensorfw
rotationsensor_i.h
Go to the documentation of this file.
1 
27 #ifndef ROTATIONSENSOR_I_H
28 #define ROTATIONSENSOR_I_H
29 
30 #include <QtDBus/QtDBus>
31 #include <QVector>
32 
33 #include "abstractsensor_i.h"
34 #include <datatypes/xyz.h>
35 
40 {
41  Q_OBJECT
42  Q_DISABLE_COPY(RotationSensorChannelInterface)
43  Q_PROPERTY(XYZ rotation READ rotation)
44  Q_PROPERTY(bool hasZ READ hasZ)
45 
46 public:
52  static const char* staticInterfaceName;
53 
61  static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
62 
69 
75  bool hasZ();
76 
83  RotationSensorChannelInterface(const QString& path, int sessionId);
84 
92  static const RotationSensorChannelInterface* listenInterface(const QString& id);
93 
102 
109  static RotationSensorChannelInterface* interface(const QString& id);
110 
111 protected:
112  virtual void connectNotify(const QMetaMethod &signal);
113 
114  virtual bool dataReceivedImpl();
115 
116 private:
117  bool frameAvailableConnected;
119 Q_SIGNALS:
125  void dataAvailable(const XYZ& data);
126 
134  void frameAvailable(const QVector<XYZ>& frame);
135 };
136 
137 namespace local {
138  typedef ::RotationSensorChannelInterface RotationSensor;
139 }
140 
141 #endif /* ROTATIONSENSOR_I_H */
RotationSensorChannelInterface::rotation
XYZ rotation
Definition: rotationsensor_i.h:43
xyz.h
QObject based datatype for TimedXYZData.
RotationSensorChannelInterface::interface
static RotationSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
RotationSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
abstractsensor_i.h
Base class for sensor interface.
RotationSensorChannelInterface::rotation
XYZ rotation()
Get latest rotation reading from sensor daemon.
RotationSensorChannelInterface
Client interface for listening device rotation changes.
Definition: rotationsensor_i.h:40
local
Definition: abstractsensor_i.h:516
RotationSensorChannelInterface::RotationSensorChannelInterface
RotationSensorChannelInterface(const QString &path, int sessionId)
Constructor.
RotationSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
RotationSensorChannelInterface::hasZ
bool hasZ
Definition: rotationsensor_i.h:44
RotationSensorChannelInterface::hasZ
bool hasZ()
Does reported readings include Z coordinate.
XYZ
QObject facade for XYZData.
Definition: xyz.h:37
RotationSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
Definition: rotationsensor_i.h:52
RotationSensorChannelInterface::connectNotify
virtual void connectNotify(const QMetaMethod &signal)
local::RotationSensor
::RotationSensorChannelInterface RotationSensor
Definition: rotationsensor_i.h:138
RotationSensorChannelInterface::listenInterface
static const RotationSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
RotationSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
RotationSensorChannelInterface::dataAvailable
void dataAvailable(const XYZ &data)
Sent when device rotation has changed.
RotationSensorChannelInterface::controlInterface
static RotationSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.