sensorfw: qt-api/gyroscopesensor_i.h Source File

sensorfw

gyroscopesensor_i.h
Go to the documentation of this file.
1
28 #ifndef GYROSCOPESENSOR_I_H
29 #define GYROSCOPESENSOR_I_H
30
31 #include <QtDBus/QtDBus>
32
33 #include "abstractsensor_i.h"
34 #include <datatypes/xyz.h>
35
39 class GyroscopeSensorChannelInterface : public AbstractSensorChannelInterface
40 {
41 Q_OBJECT;
42 Q_DISABLE_COPY(GyroscopeSensorChannelInterface)
43 Q_PROPERTY(XYZ value READ get)
44
45 public:
49 static const char* staticInterfaceName;
50
58 static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
59
65 XYZ get();
66
73 GyroscopeSensorChannelInterface(const QString &path, int sessionId);
74
82 static const GyroscopeSensorChannelInterface* listenInterface(const QString& id);
83
91 static GyroscopeSensorChannelInterface* controlInterface(const QString& id);
92
99 static GyroscopeSensorChannelInterface* interface(const QString& id);
100
101 protected:
102 virtual void connectNotify(const QMetaMethod & signal);
103 virtual bool dataReceivedImpl();
104
105 private:
106 bool frameAvailableConnected;
108 Q_SIGNALS:
114 void dataAvailable(const XYZ& data);
115
123 void frameAvailable(const QVector<XYZ>& frame);
124 };
125
126 namespace local {
127 typedef ::GyroscopeSensorChannelInterface GyroscopeSensor;
128 }
129
130 #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
GyroscopeSensorChannelInterface
Client interface for accessing gyroscope sensor.
Definition: gyroscopesensor_i.h:40
GyroscopeSensorChannelInterface::connectNotify
virtual void connectNotify(const QMetaMethod &signal)
GyroscopeSensorChannelInterface::GyroscopeSensorChannelInterface
GyroscopeSensorChannelInterface(const QString &path, int sessionId)
Constructor.
GyroscopeSensorChannelInterface::interface
static GyroscopeSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
GyroscopeSensorChannelInterface::listenInterface
static const GyroscopeSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
GyroscopeSensorChannelInterface::get
XYZ get()
Get latest gyroscope reading from sensor daemon.
GyroscopeSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
GyroscopeSensorChannelInterface::value
XYZ value
Definition: gyroscopesensor_i.h:41
GyroscopeSensorChannelInterface::dataAvailable
void dataAvailable(const XYZ &data)
Sent when new measurement data has become available.
GyroscopeSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
GyroscopeSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
GyroscopeSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: gyroscopesensor_i.h:49
GyroscopeSensorChannelInterface::controlInterface
static GyroscopeSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
XYZ
QObject facade for XYZData.
Definition: xyz.h:37
local
Definition: abstractsensor_i.h:516
local::GyroscopeSensor
::GyroscopeSensorChannelInterface GyroscopeSensor
Definition: gyroscopesensor_i.h:127
xyz.h
QObject based datatype for TimedXYZData.