Client interface for accessing magnetometer sensor.
More...
#include <magnetometersensor_i.h>
|
QDBusReply< void > | reset () |
| Reset magnetometer calibration to 0.
|
|
|
virtual void | connectNotify (const QMetaMethod &signal) |
|
virtual bool | dataReceivedImpl () |
| Callback for subclasses in which they must read their expected data from socket.
|
|
| AbstractSensorChannelInterface (const QString &path, const char *interfaceName, int sessionId) |
| Constructor.
|
|
bool | read (void *buffer, int size) |
| Read data from socket into buffer.
|
|
template<typename T > |
bool | read (QVector< T > &values) |
| Read data from socket into passed container.
|
|
virtual bool | dataReceivedImpl ()=0 |
| Callback for subclasses in which they must read their expected data from socket.
|
|
template<typename T > |
T | getAccessor (const char *name) |
| Utility for calling DBus methods from current connection which return value and take no args.
|
|
template<typename T > |
void | setAccessor (const char *name, const T &value) |
| Utility for calling DBus methods from current connection which return nothing and take one arg.
|
|
QDBusMessage | call (QDBus::CallMode mode, const QString &method, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant()) |
| Wrapper for function of QDBusAbstractInterface.
|
|
QDBusMessage | callWithArgumentList (QDBus::CallMode mode, const QString &method, const QList< QVariant > &args) |
| Wrapper for function of QDBusAbstractInterface.
|
|
void | dbusConnectNotify (const QMetaMethod &signal) |
| Wrapper for function of QDBusAbstractInterface.
|
|
Client interface for accessing magnetometer sensor.
Definition at line 40 of file magnetometersensor_i.h.
◆ MagnetometerSensorChannelInterface()
MagnetometerSensorChannelInterface::MagnetometerSensorChannelInterface |
( |
const QString & |
path, |
|
|
int |
sessionId |
|
) |
| |
Constructor.
- Parameters
-
path | path. |
sessionId | session id. |
◆ connectNotify()
virtual void MagnetometerSensorChannelInterface::connectNotify |
( |
const QMetaMethod & |
signal | ) |
|
|
protectedvirtual |
◆ controlInterface()
◆ dataAvailable
void MagnetometerSensorChannelInterface::dataAvailable |
( |
const MagneticField & |
data | ) |
|
|
signal |
Sent when new measurement is available.
- Parameters
-
data | Current magnetic field measurement. |
◆ dataReceivedImpl()
virtual bool MagnetometerSensorChannelInterface::dataReceivedImpl |
( |
| ) |
|
|
protectedvirtual |
Callback for subclasses in which they must read their expected data from socket.
- Returns
- was read successful.
Implements AbstractSensorChannelInterface.
◆ factoryMethod()
Create new instance of the class.
- Parameters
-
id | Sensor ID. |
sessionId | Session ID. |
- Returns
- Pointer to new instance of the class.
◆ frameAvailable
void MagnetometerSensorChannelInterface::frameAvailable |
( |
const QVector< MagneticField > & |
frame | ) |
|
|
signal |
Sent when new measurement frame has become available.
If app doesn't connect to this signal content of frames will be sent through dataAvailable signal.
- Parameters
-
frame | New measurement frame. |
◆ interface()
Request an interface to the sensor.
- Parameters
-
- Returns
- Pointer to interface, or NULL on failure.
◆ listenInterface()
◆ magneticField()
MagneticField MagnetometerSensorChannelInterface::magneticField |
( |
| ) |
|
Get latest magnetometer reading from sensor daemon.
- Returns
- magnetometer reading.
◆ reset
QDBusReply< void > MagnetometerSensorChannelInterface::reset |
( |
| ) |
|
|
slot |
Reset magnetometer calibration to 0.
- Returns
- DBus reply.
◆ staticInterfaceName
const char* MagnetometerSensorChannelInterface::staticInterfaceName |
|
static |
◆ magneticField
The documentation for this class was generated from the following file: