2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Channel data types definitions
20 #ifndef SENSRVORIENTATIONSENSOR_H
21 #define SENSRVORIENTATIONSENSOR_H
25 #include <sensrvtypes.h>
27 // ORIENTATION RELATED CHANNELS
30 * - Name: Orientation event channel type
32 * - Datatype: TSensrvOrientationData
33 * - Description: Orientation events
35 const TSensrvChannelTypeId KSensrvChannelTypeIdOrientationData = 0x10205088;
38 * - Name: Rotation event channel type
40 * - Datatype: TSensrvRotationData
41 * - Description: Rotation events
43 const TSensrvChannelTypeId KSensrvChannelTypeIdRotationData = 0x10205089;
45 // ORIENTATION RELATED DATATYPES
47 class TSensrvOrientationData
51 * Channel data type Id number
53 static const TSensrvChannelDataTypeId KDataTypeId = 0x10205088;
56 * Channel data type index numbers
58 enum TSensrvOrientationEventIndexes
65 * Possible device orientations
67 enum TSensrvDeviceOrientation
69 EOrientationUndefined = 0,
70 EOrientationDisplayUp,
71 EOrientationDisplayDown,
72 EOrientationDisplayLeftUp,
73 EOrientationDisplayRightUp,
74 EOrientationDisplayUpwards,
75 EOrientationDisplayDownwards
81 * - Item name: Sampling time
83 * - Description: Timestamp for a sample
88 * - Item name: Device orientation
90 * - Description: Contains one of the six basic orientations of the device
92 TSensrvDeviceOrientation iDeviceOrientation;
96 class TSensrvRotationData
100 * Channel data type Id number
102 static const TSensrvChannelDataTypeId KDataTypeId = 0x10205089;
105 * Rotation axis value equals -1 when it cannot be defined.
106 * The undefined situation varies depending on the sensor type.
107 * In the case of an accelerometer, the rotation value cannot be defined
108 * when the corresponding axis is parallel to the gravitational force or
109 * the device is in motion. In the case of a magnetometer, there are
110 * difficulties in measuring values, when the axis is parallel to the
113 static const TInt KSensrvRotationUndefined = -1;
116 * Channel data type index numbers
118 enum TSensrvRotationDataIndexes
121 EDeviceRotationAboutXAxis,
122 EDeviceRotationAboutYAxis,
123 EDeviceRotationAboutZAxis,
128 * - Item name: Sampling time.
130 * - Description: Timestamp for a sample
135 * - Item name: Rotation about x-axis
137 * - Description: Positive rotation in Cartesian coordinate system about the x-axis.
138 * If the value cannot be defined it is set to KSensrvRotationUndefined.
140 TInt iDeviceRotationAboutXAxis;
143 * - Item name: Rotation about y-axis
145 * - Description: Positive rotation in Cartesian coordinate system about the y-axis.
146 * If the value cannot be defined it is set to KSensrvRotationUndefined.
148 TInt iDeviceRotationAboutYAxis;
152 * - Item name: Rotation about z-axis
154 * - Description: Positive rotation in Cartesian coordinate system about the z-axis.
155 * If the value cannot be defined it is set to KSensrvRotationUndefined.
157 TInt iDeviceRotationAboutZAxis;
160 #endif //SENSRVORIENTATIONSENSOR_H