sensorfw
accelerometersensor_i.h
Go to the documentation of this file.
1 
27 #ifndef ACCELEROMETERSENSOR_I_H
28 #define ACCELEROMETERSENSOR_I_H
29 
30 #include <QtDBus/QtDBus>
31 #include <QVector>
32 #include "abstractsensor_i.h"
33 #include <datatypes/xyz.h>
34 
39 {
40  Q_OBJECT
42  Q_PROPERTY(XYZ value READ get)
43 
44 public:
48  static const char* staticInterfaceName;
49 
57  static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
58 
64  XYZ get();
65 
73 
81  static const AccelerometerSensorChannelInterface* listenInterface(const QString& id);
82 
91 
98  static AccelerometerSensorChannelInterface* interface(const QString& id);
99 
100 protected:
101 
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 ::AccelerometerSensorChannelInterface AccelerometerSensor;
128 }
129 
130 #endif
AccelerometerSensorChannelInterface::connectNotify
virtual void connectNotify(const QMetaMethod &signal)
local::AccelerometerSensor
::AccelerometerSensorChannelInterface AccelerometerSensor
Definition: accelerometersensor_i.h:127
xyz.h
QObject based datatype for TimedXYZData.
AccelerometerSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
abstractsensor_i.h
Base class for sensor interface.
AccelerometerSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
AccelerometerSensorChannelInterface::listenInterface
static const AccelerometerSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
AccelerometerSensorChannelInterface::dataAvailable
void dataAvailable(const XYZ &data)
Sent when new measurement data has become available.
local
Definition: abstractsensor_i.h:516
AccelerometerSensorChannelInterface::interface
static AccelerometerSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
AbstractSensorChannelInterface::sessionId
int sessionId
Definition: abstractsensor_i.h:49
AbstractSensorChannelInterface
Base-class for client facades of different sensor types.
Definition: abstractsensor_i.h:46
AccelerometerSensorChannelInterface
Client interface for accessing accelerometer sensor.
Definition: accelerometersensor_i.h:39
AccelerometerSensorChannelInterface::controlInterface
static AccelerometerSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
XYZ
QObject facade for XYZData.
Definition: xyz.h:37
AccelerometerSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: accelerometersensor_i.h:48
AccelerometerSensorChannelInterface::AccelerometerSensorChannelInterface
AccelerometerSensorChannelInterface(const QString &path, int sessionId)
Constructor.
AccelerometerSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< XYZ > &frame)
Sent when new measurement frame has become available.
AccelerometerSensorChannelInterface::get
XYZ get()
Get latest accelerometer reading from sensor daemon.
AccelerometerSensorChannelInterface::value
XYZ value
Definition: accelerometersensor_i.h:42