CSensorDataCompensator Class Reference
class CSensorDataCompensator : public CBase |
Class provides operations to compensate sensor data.
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;
sensordatacompensator.lib
- Since
- S60 5.1
Member Functions Documentation
Compensate(TDes8 &)
Parameters
TDes8 & aData | Reference to descriptor where sensor data locates. On return contains compensated data if compensation successful. The following packages can be used in compensating; TSensrvAccelerometerAxisData TSensrvMagnetometerAxisData TSensrvMagneticNorthData TSensrvTappingData |
GetChannelDataType()
Used to get the compensated channel data type.
GetCompensationType()
Used to get the compensation type.
NewL(TSensrvChannelDataTypeId, TSensorCompensationType)
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.