Link against: sensordatacompensator.lib
#include <sensordatacompensator.h>
Usage:
#include <sensordatacompensator.h> #include <sensrvaccelerometersensor.h> // Client creates the compensator instance as a member. // This compensates the axis data received from accelerometer. // The data is compensated according to both device and UI rotation. // See sensrvtypes.h and sensordatacompensationtypes.h for more information. iDataCompensator = CSensorDataCompensator::NewL( KSensrvChannelTypeIdAccelerometerXYZAxisData, ESensorCompensateDeviceAndUIOrientation ); // Data compensation is done in client's MSensrvDataListener::DataReceived() implementation // where 'iSensorChannel' contains the accelerometer channel instance. TPckgBuf<TSensrvAccelerometerAxisData> dataPckgBuf; // Get data from accelerometer ( iSensorChannel->GetData( dataPckgBuf ) ) TInt err( iDataCompensator->Compensate( dataPckgBuf ) ); // Client deletes the compensator instance in destructor. delete iDataCompensator;
Public Member Functions | |
virtual TInt | Compensate (TDes8 &aData)=0 |
Compensates sensor data. | |
virtual TSensrvChannelDataTypeId | GetChannelDataType () const =0 |
Used to get the compensated channel data type. | |
virtual TSensorCompensationType | GetCompensationType () const =0 |
Used to get the compensation type. | |
Static Public Member Functions | |
static IMPORT_C CSensorDataCompensator * | NewL (TSensrvChannelDataTypeId aDataType, TSensorCompensationType aType) |
Two-phase constructor. |
|
Compensates sensor data.
|
|
Used to get the compensated channel data type.
|
|
Used to get the compensation type.
|
|
Two-phase constructor.
|