sensorfw
CompassSensorChannelInterface Class Reference

Client interface for accessing compass sensor. More...

#include <compasssensor_i.h>

Inheritance diagram for CompassSensorChannelInterface:
AbstractSensorChannelInterface

List of all members.

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

Detailed Description

Client interface for accessing compass sensor.

Definition at line 38 of file compasssensor_i.h.


Constructor & Destructor Documentation

CompassSensorChannelInterface::CompassSensorChannelInterface ( const QString &  path,
int  sessionId 
)

Constructor.

Parameters:
pathpath.
sessionIdsession ID.

Member Function Documentation

Request a control interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.
void CompassSensorChannelInterface::dataAvailable ( const Compass value) [signal]

Sent when compass direction or calibration level has changed.

Parameters:
valueCurrent compass measurement.
virtual bool CompassSensorChannelInterface::dataReceivedImpl ( ) [protected, virtual]

Callback for subclasses in which they must read their expected data from socket.

Returns:
was read successful.

Implements AbstractSensorChannelInterface.

Returns the currently used declination correction value.

Returns:
Current declination value
static AbstractSensorChannelInterface* CompassSensorChannelInterface::factoryMethod ( const QString &  id,
int  sessionId 
) [static]

Create new instance of the class.

Parameters:
idSensor ID.
sessionIdSession ID.
Returns:
Pointer to new instance of the class.

Get latest compass reading from sensor daemon.

Returns:
compass reading.

Request an interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
static const CompassSensorChannelInterface* CompassSensorChannelInterface::listenInterface ( const QString &  id) [static]

Request a listening interface to the sensor.

Parameters:
idsensor ID.
Returns:
Pointer to interface, or NULL on failure.
Deprecated:
use interface(const QString&) instead.

Sets whether the declination correction should be applied or not.

Parameters:
enableIf 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.

Returns:
True if decliation correction is applied, false otherwise

Member Data Documentation

Name of the D-Bus interface for this class.

Definition at line 50 of file compasssensor_i.h.


Property Documentation

Definition at line 43 of file compasssensor_i.h.


The documentation for this class was generated from the following file: