sensorfw: qt-api/magnetometersensor_i.h Source File

sensorfw

magnetometersensor_i.h
Go to the documentation of this file.
1
28#ifndef MAGNETOMETERSENSOR_I_H
29#define MAGNETOMETERSENSOR_I_H
30
31#include <QtDBus/QtDBus>
32#include <QVector>
33
34#include "abstractsensor_i.h"
35#include <datatypes/magneticfield.h>
36
40 class MagnetometerSensorChannelInterface : public AbstractSensorChannelInterface
41{
42 Q_OBJECT
43 Q_DISABLE_COPY(MagnetometerSensorChannelInterface)
44 Q_PROPERTY(MagneticField magneticField READ magneticField)
45
46public:
50 static const char* staticInterfaceName;
51
59 static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
60
66 MagneticField magneticField();
67
74 MagnetometerSensorChannelInterface(const QString& path, int sessionId);
75
83 static const MagnetometerSensorChannelInterface* listenInterface(const QString& id);
84
92 static MagnetometerSensorChannelInterface* controlInterface(const QString& id);
93
100 static MagnetometerSensorChannelInterface* interface(const QString& id);
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 {
136 typedef ::MagnetometerSensorChannelInterface MagnetometerSensor;
137}
138
139#endif /* MAGNETOMETERSENSOR_I_H */
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
MagneticField
QObject facade for CalibratedMagneticFieldData.
Definition magneticfield.h:38
MagnetometerSensorChannelInterface
Client interface for accessing magnetometer sensor.
Definition magnetometersensor_i.h:41
MagnetometerSensorChannelInterface::dataReceivedImpl
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
MagnetometerSensorChannelInterface::connectNotify
virtual void connectNotify(const QMetaMethod &signal)
MagnetometerSensorChannelInterface::factoryMethod
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
MagnetometerSensorChannelInterface::frameAvailable
void frameAvailable(const QVector< MagneticField > &frame)
Sent when new measurement frame has become available.
MagnetometerSensorChannelInterface::reset
QDBusReply< void > reset()
Reset magnetometer calibration to 0.
MagnetometerSensorChannelInterface::staticInterfaceName
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition magnetometersensor_i.h:50
MagnetometerSensorChannelInterface::dataAvailable
void dataAvailable(const MagneticField &data)
Sent when new measurement is available.
MagnetometerSensorChannelInterface::magneticField
MagneticField magneticField
Definition magnetometersensor_i.h:44
MagnetometerSensorChannelInterface::interface
static MagnetometerSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
MagnetometerSensorChannelInterface::controlInterface
static MagnetometerSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
MagnetometerSensorChannelInterface::listenInterface
static const MagnetometerSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
magneticfield.h
QObject based datatype for CalibratedMagneticFieldData.
local
Definition abstractsensor_i.h:537