|
1 // ssyreferencemagnetometer.h |
|
2 |
|
3 /* |
|
4 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 * All rights reserved. |
|
6 * This component and the accompanying materials are made available |
|
7 * under the terms of "Eclipse Public License v1.0" |
|
8 * which accompanies this distribution, and is available |
|
9 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 * |
|
11 * Initial Contributors: |
|
12 * Nokia Corporation - initial contribution. |
|
13 * |
|
14 * Contributors: |
|
15 * |
|
16 * Description: |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalAll Sensor framework Reference SSY header file |
|
26 @test |
|
27 */ |
|
28 |
|
29 |
|
30 #ifndef SSYREFERENCEMAGNETOMETER_H |
|
31 #define SSYREFERENCEMAGNETOMETER_H |
|
32 |
|
33 // INCLUDES |
|
34 #include <e32base.h> |
|
35 #include <sensors/sensrvtypes.h> |
|
36 |
|
37 |
|
38 // MAGNETOMETER RELATED CHANNELS |
|
39 |
|
40 /** |
|
41 * - Name: Magnetometer XYZ-axis data channel type |
|
42 * - Type: Rawdata |
|
43 * - Datatype: TSensrvMagnetometerAxisData |
|
44 * - Description: Magnetometer x-, y-, z-axis data |
|
45 */ |
|
46 const TSensrvChannelTypeId KSensrvChannelTypeIdMagnetometerXYZAxisData = 0x2000BEE0; |
|
47 |
|
48 |
|
49 // MAGNETOMETER RELATED PROPERTIES |
|
50 |
|
51 /** |
|
52 * - Name: Name of the property |
|
53 * - Type: Defines type of the property (TInt/TReal/TBuf) |
|
54 * - Scope: Defines a property scope. Property can be defined for a channel, |
|
55 * for a specific item in a channel or for a server related to |
|
56 * channel. |
|
57 * - Mandatory: Defines is property mandatory |
|
58 * - Capability: Capabilities needed to set this property |
|
59 * - Description: Description of the property |
|
60 */ |
|
61 |
|
62 /** |
|
63 * - Name: Auto calibration active |
|
64 * - Type: TInt |
|
65 * - Scope: Channel item property |
|
66 * - Mandatory: No |
|
67 * - Capability: None |
|
68 * - Description: Indicates is auto calibration active. |
|
69 * Value is one if calibration is activated, zero otherwise. |
|
70 */ |
|
71 const TSensrvPropertyId KSensrvPropAutoCalibrationActive = 0x00001006; |
|
72 |
|
73 /** |
|
74 * - Name: Calibration status |
|
75 * - Type: TInt |
|
76 * - Scope: Channel item property |
|
77 * - Mandatory: No |
|
78 * - Capability: None |
|
79 * - Description: Indicates the calibration level. |
|
80 * Calibration level scales between minimum and maximum value. |
|
81 * Maximum indicates that calibration level is at its best |
|
82 * level. Minimum indicates that calibration is undefined. |
|
83 */ |
|
84 const TSensrvPropertyId KSensrvPropCalibrationLevel = 0x00001007; |
|
85 |
|
86 // MAGNETOMETER RELATED DATATYPES |
|
87 |
|
88 /** |
|
89 * Magnetometer axis data type |
|
90 */ |
|
91 class TSensrvMagnetometerAxisData |
|
92 { |
|
93 public: |
|
94 /** |
|
95 * Channel data type Id number |
|
96 */ |
|
97 static const TSensrvChannelDataTypeId KDataTypeId = 0x2000BEE0; |
|
98 |
|
99 /** |
|
100 * Channel data type index numbers |
|
101 */ |
|
102 enum TSensrvMagnetometerAxisDataIndexes |
|
103 { |
|
104 ETimeStamp = 0, |
|
105 EAxisX, |
|
106 EAxisY, |
|
107 EAxisZ |
|
108 }; |
|
109 |
|
110 public: |
|
111 |
|
112 /** |
|
113 * - Item name: Sampling time. |
|
114 * - Item Index: 0 |
|
115 * - Conditions: None |
|
116 * - Description: Timestamp for a sample. |
|
117 */ |
|
118 TTime iTimeStamp; |
|
119 |
|
120 /** |
|
121 * - Item name: Magnetometer x-axis |
|
122 * - Item Index: 1 |
|
123 * - Conditions: Single limit and range |
|
124 * - Description: Magnetometer values from x-axis |
|
125 */ |
|
126 TInt iAxisXRaw; |
|
127 |
|
128 /** |
|
129 * - Item name: Magnetometer y-axis |
|
130 * - Item Index: 2 |
|
131 * - Conditions: Single limit and range |
|
132 * - Description: Magnetometer values from y-axis |
|
133 */ |
|
134 TInt iAxisYRaw; |
|
135 |
|
136 /** |
|
137 * - Item name: Magnetometer z-axis |
|
138 * - Item Index: 3 |
|
139 * - Conditions: Single limit and range |
|
140 * - Description: Magnetometer values from z-axis |
|
141 */ |
|
142 TInt iAxisZRaw; |
|
143 |
|
144 /** |
|
145 * - Item name: Magnetometer x-axis |
|
146 * - Item Index: 1 |
|
147 * - Conditions: Single limit and range |
|
148 * - Description: Magnetometer values from x-axis |
|
149 */ |
|
150 TInt iAxisXCalibrated; |
|
151 |
|
152 /** |
|
153 * - Item name: Magnetometer y-axis |
|
154 * - Item Index: 2 |
|
155 * - Conditions: Single limit and range |
|
156 * - Description: Magnetometer values from y-axis |
|
157 */ |
|
158 TInt iAxisYCalibrated; |
|
159 |
|
160 /** |
|
161 * - Item name: Magnetometer z-axis |
|
162 * - Item Index: 3 |
|
163 * - Conditions: Single limit and range |
|
164 * - Description: Magnetometer values from z-axis |
|
165 */ |
|
166 TInt iAxisZCalibrated; |
|
167 }; |
|
168 |
|
169 #endif //SSYREFERENCEMAGNETOMETER_H |
|
170 |