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 
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 
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
GyroscopeSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: gyroscopesensor_i.h:49
xyz.h
QObject based datatype for TimedXYZData.
GyroscopeSensorChannelInterface::get
XYZ get()
Get latest gyroscope reading from sensor daemon.
abstractsensor_i.h
Base class for sensor interface.
GyroscopeSensorChannelInterface::listenInterface
static const GyroscopeSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
local
Definition: abstractsensor_i.h:516
GyroscopeSensorChannelInterface
Client interface for accessing gyroscope sensor.
Definition: gyroscopesensor_i.h:40
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
GyroscopeSensorChannelInterface::controlInterface
static GyroscopeSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
GyroscopeSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
GyroscopeSensorChannelInterface::connectNotify
virtual void connectNotify(const QMetaMethod &signal)
XYZ
QObject facade for XYZData.
Definition: xyz.h:37
GyroscopeSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
local::GyroscopeSensor
::GyroscopeSensorChannelInterface GyroscopeSensor
Definition: gyroscopesensor_i.h:127
GyroscopeSensorChannelInterface::dataAvailable
void dataAvailable(const XYZ &data)
Sent when new measurement data has become available.
GyroscopeSensorChannelInterface::value
XYZ value
Definition: gyroscopesensor_i.h:41
GyroscopeSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
GyroscopeSensorChannelInterface::interface
static GyroscopeSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
GyroscopeSensorChannelInterface::GyroscopeSensorChannelInterface
GyroscopeSensorChannelInterface(const QString &path, int sessionId)
Constructor.