sensorfw
|
Client interface for accessing compass sensor. More...
#include <compasssensor_i.h>
Signals | |
void | dataAvailable (const Compass &value) |
Sent when compass direction or calibration level has changed. | |
Public Member Functions | |
Compass | get () |
Get latest compass reading from sensor daemon. | |
bool | useDeclination () |
Returns whether the sensor is applying declination correction to the output value and returning true north, or not applying it and returning magnetic north. | |
void | setUseDeclination (bool enable) |
Sets whether the declination correction should be applied or not. | |
int | declinationValue () |
Returns the currently used declination correction value. | |
CompassSensorChannelInterface (const QString &path, int sessionId) | |
Constructor. | |
Static Public Member Functions | |
static AbstractSensorChannelInterface * | factoryMethod (const QString &id, int sessionId) |
Create new instance of the class. | |
static const CompassSensorChannelInterface * | listenInterface (const QString &id) |
Request a listening interface to the sensor. | |
static CompassSensorChannelInterface * | controlInterface (const QString &id) |
Request a control interface to the sensor. | |
static CompassSensorChannelInterface * | interface (const QString &id) |
Request an interface to the sensor. | |
Static Public Attributes | |
static const char * | staticInterfaceName |
Name of the D-Bus interface for this class. | |
Protected Member Functions | |
virtual bool | dataReceivedImpl () |
Callback for subclasses in which they must read their expected data from socket. | |
Properties | |
Compass | value |
bool | usedeclination |
int | declinationvalue |
Client interface for accessing compass sensor.
Definition at line 38 of file compasssensor_i.h.
CompassSensorChannelInterface::CompassSensorChannelInterface | ( | const QString & | path, |
int | sessionId | ||
) |
Constructor.
path | path. |
sessionId | session ID. |
static CompassSensorChannelInterface* CompassSensorChannelInterface::controlInterface | ( | const QString & | id | ) | [static] |
Request a control interface to the sensor.
id | sensor ID. |
void CompassSensorChannelInterface::dataAvailable | ( | const Compass & | value | ) | [signal] |
Sent when compass direction or calibration level has changed.
value | Current compass measurement. |
virtual bool CompassSensorChannelInterface::dataReceivedImpl | ( | ) | [protected, virtual] |
Callback for subclasses in which they must read their expected data from socket.
Implements AbstractSensorChannelInterface.
Returns the currently used declination correction value.
static AbstractSensorChannelInterface* CompassSensorChannelInterface::factoryMethod | ( | const QString & | id, |
int | sessionId | ||
) | [static] |
Create new instance of the class.
id | Sensor ID. |
sessionId | Session ID. |
Get latest compass reading from sensor daemon.
static CompassSensorChannelInterface* CompassSensorChannelInterface::interface | ( | const QString & | id | ) | [static] |
Request an interface to the sensor.
id | sensor ID. |
static const CompassSensorChannelInterface* CompassSensorChannelInterface::listenInterface | ( | const QString & | id | ) | [static] |
Request a listening interface to the sensor.
id | sensor ID. |
void CompassSensorChannelInterface::setUseDeclination | ( | bool | enable | ) |
Sets whether the declination correction should be applied or not.
enable | If true, declination correction will be applied, if false, it will not be applied |
Returns whether the sensor is applying declination correction to the output value and returning true north, or not applying it and returning magnetic north.
const char* CompassSensorChannelInterface::staticInterfaceName [static] |
Name of the D-Bus interface for this class.
Definition at line 50 of file compasssensor_i.h.
Definition at line 44 of file compasssensor_i.h.
bool CompassSensorChannelInterface::usedeclination [read, write] |
Definition at line 43 of file compasssensor_i.h.
Definition at line 42 of file compasssensor_i.h.