|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Accelerometer sensor raw data implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CACCELERATORSENSORRAWDATA_H |
|
20 #define CACCELERATORSENSORRAWDATA_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "cacceleratorsensor.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * CAcceleratorSensorRawData |
|
30 * |
|
31 * Implementation of the acclerometer sensor which returns raw int values from |
|
32 * the native api |
|
33 */ |
|
34 class CAcceleratorSensorRawData : public CAcceleratorSensor |
|
35 { |
|
36 public:// Constructors and destructor |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 ~CAcceleratorSensorRawData(); |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CAcceleratorSensorRawData* NewL(const TSensrvChannelInfo& aChannelInfo); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 */ |
|
50 static CAcceleratorSensorRawData* NewLC(const TSensrvChannelInfo& aChannelInfo); |
|
51 private: |
|
52 /** |
|
53 * Constructor for performing 1st stage construction |
|
54 */ |
|
55 CAcceleratorSensorRawData(const TSensrvChannelInfo& aChannelInfo); |
|
56 |
|
57 /** |
|
58 * EPOC default constructor for performing 2nd stage construction |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 public: // from CSensorBase |
|
63 virtual CSensorBase* DuplicateL(); |
|
64 virtual TReal InterpretValue(TReal aValue); |
|
65 |
|
66 protected: // From CAcceleratorSensor |
|
67 virtual void Model(TPtr* aPtr); |
|
68 virtual void DataType(TPtr* aPtr); |
|
69 virtual void DataUnit(const RSensrvPropertyList aList, TPtr* aPtr); |
|
70 virtual void DataRange(const RSensrvPropertyList aList, |
|
71 TPtr* aPtr); |
|
72 virtual void CopyData(const TSensrvAccelerometerAxisData aData, |
|
73 TInt aIndex); |
|
74 virtual TInt SensorDescriptionId(); |
|
75 |
|
76 public: // From MSensrvDataListener |
|
77 virtual void DataReceived(CSensrvChannel& aChannel, TInt aCount, TInt aDataLost); |
|
78 }; |
|
79 |
|
80 #endif // CACCELERATORSENSORRAWDATA_H |
|
81 |