sensorfw
magnetometersensor_i.h
Go to the documentation of this file.
28#ifndef MAGNETOMETERSENSOR_I_H
29#define MAGNETOMETERSENSOR_I_H
30
31#include <QtDBus/QtDBus>
32#include <QVector>
33
34#include "abstractsensor_i.h"
36
41{
42 Q_OBJECT
45
46public:
50 static const char* staticInterfaceName;
51
60
67
75
83 static const MagnetometerSensorChannelInterface* listenInterface(const QString& id);
84
93
101
102protected:
103 virtual void connectNotify(const QMetaMethod & signal);
104 virtual bool dataReceivedImpl();
105
106private:
107 bool frameAvailableConnected;
109public Q_SLOTS:
115 QDBusReply<void> reset();
116
117Q_SIGNALS:
123 void dataAvailable(const MagneticField& data);
124
132 void frameAvailable(const QVector<MagneticField>& frame);
133};
134
135namespace local {
137}
138
139#endif /* MAGNETOMETERSENSOR_I_H */
Base class for sensor interface.
Base-class for client facades of different sensor types.
QObject facade for CalibratedMagneticFieldData.
Definition: magneticfield.h:38
Client interface for accessing magnetometer sensor.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
virtual void connectNotify(const QMetaMethod &signal)
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
void frameAvailable(const QVector< MagneticField > &frame)
Sent when new measurement frame has become available.
QDBusReply< void > reset()
Reset magnetometer calibration to 0.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
void dataAvailable(const MagneticField &data)
Sent when new measurement is available.
MagneticField magneticField()
Get latest magnetometer reading from sensor daemon.
static MagnetometerSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
MagnetometerSensorChannelInterface(const QString &path, int sessionId)
Constructor.
static MagnetometerSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
static const MagnetometerSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
QObject based datatype for CalibratedMagneticFieldData.
::MagnetometerSensorChannelInterface MagnetometerSensor