sensorfw: qt-api/rotationsensor_i.h Source File

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
39 class RotationSensorChannelInterface: public AbstractSensorChannelInterface
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
68 XYZ rotation();
69
75 bool hasZ();
76
83 RotationSensorChannelInterface(const QString& path, int sessionId);
84
92 static const RotationSensorChannelInterface* listenInterface(const QString& id);
93
101 static RotationSensorChannelInterface* controlInterface(const QString& id);
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 */
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
RotationSensorChannelInterface
Client interface for listening device rotation changes.
Definition: rotationsensor_i.h:40
RotationSensorChannelInterface::interface
static RotationSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
RotationSensorChannelInterface::controlInterface
static RotationSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
RotationSensorChannelInterface::hasZ
bool hasZ
Definition: rotationsensor_i.h:44
RotationSensorChannelInterface::hasZ
bool hasZ()
Does reported readings include Z coordinate.
RotationSensorChannelInterface::RotationSensorChannelInterface
RotationSensorChannelInterface(const QString &path, int sessionId)
Constructor.
RotationSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
RotationSensorChannelInterface::rotation
XYZ rotation
Definition: rotationsensor_i.h:43
RotationSensorChannelInterface::listenInterface
static const RotationSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
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)
RotationSensorChannelInterface::rotation
XYZ rotation()
Get latest rotation reading from sensor daemon.
RotationSensorChannelInterface::dataAvailable
void dataAvailable(const XYZ &data)
Sent when device rotation has changed.
RotationSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
RotationSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
XYZ
QObject facade for XYZData.
Definition: xyz.h:37
local
Definition: abstractsensor_i.h:516
local::RotationSensor
::RotationSensorChannelInterface RotationSensor
Definition: rotationsensor_i.h:138
xyz.h
QObject based datatype for TimedXYZData.