sensorfw
rotationsensor_i.h
Go to the documentation of this file.
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
46public:
52 static const char* staticInterfaceName;
53
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
111protected:
112 virtual void connectNotify(const QMetaMethod &signal);
113
114 virtual bool dataReceivedImpl();
115
116private:
117 bool frameAvailableConnected;
119Q_SIGNALS:
125 void dataAvailable(const XYZ& data);
126
134 void frameAvailable(const QVector<XYZ>& frame);
135};
136
137namespace local {
139}
140
141#endif /* ROTATIONSENSOR_I_H */
Base class for sensor interface.
Base-class for client facades of different sensor types.
Client interface for listening device rotation changes.
bool hasZ()
Does reported readings include Z coordinate.
RotationSensorChannelInterface(const QString &path, int sessionId)
Constructor.
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static RotationSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
static const char * staticInterfaceName
Get name of the D-Bus interface for this class.
static const RotationSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
virtual void connectNotify(const QMetaMethod &signal)
XYZ rotation()
Get latest rotation reading from sensor daemon.
static RotationSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
void dataAvailable(const XYZ &data)
Sent when device rotation has changed.
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
QObject facade for XYZData.
Definition: xyz.h:37
::RotationSensorChannelInterface RotationSensor
QObject based datatype for TimedXYZData.