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 
91  static GyroscopeSensorChannelInterface* controlInterface(const QString& id);
92 
99  static GyroscopeSensorChannelInterface* interface(const QString& id);
100 
101 protected:
102  virtual void connectNotify(const char* 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
QObject based datatype for TimedXYZData.
Base class for sensor interface.
GyroscopeSensorChannelInterface(const QString &path, int sessionId)
Constructor.
Client interface for accessing gyroscope sensor.
Base-class for client facades of different sensor types.
int sessionId() const
Get ID of the current session.
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
::GyroscopeSensorChannelInterface GyroscopeSensor
QObject facade for #TimedXYZData.
Definition: xyz.h:36
virtual void connectNotify(const char *signal)
static GyroscopeSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
static GyroscopeSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
XYZ get()
Get latest gyroscope reading from sensor daemon.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
void dataAvailable(const XYZ &data)
Sent when new measurement data has become available.
static const GyroscopeSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.