1 sensrvtappingsensor.h |
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Channel data types definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SENSRVTAPPINGSENSOR_H |
|
21 #define SENSRVTAPPINGSENSOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <sensrvtypes.h> |
|
26 #include <sensrvaccelerometersensor.h> |
|
27 |
|
28 // TAPPING RELATED CHANNELS |
|
29 |
|
30 /** |
|
31 * - Name: Double tapping event channel type |
|
32 * - Type: Event |
|
33 * - Datatype: TSensrvTappingData |
|
34 * - Description: Double tapping events |
|
35 */ |
|
36 const TSensrvChannelTypeId KSensrvChannelTypeIdAccelerometerDoubleTappingData = 0x10205081; |
|
37 |
|
38 // TAPPING RELATED PROPERTIES |
|
39 |
|
40 /** |
|
41 * - Name: Double tapping axis active |
|
42 * - Type: TInt |
|
43 * - Scope: Channel item property |
|
44 * - Mandatory: No |
|
45 * - Capability: None |
|
46 * - Description: Indicates is sensor axis activated. |
|
47 * Value is one if the axis is activated, zero otherwise. |
|
48 */ |
|
49 const TSensrvPropertyId KSensrvPropIdDblTapAxisActive = KSensrvPropIdAxisActive; |
|
50 |
|
51 /** |
|
52 * - Name: Double tap duration threshold |
|
53 * - Type: TInt |
|
54 * - Scope: Channel property |
|
55 * - Mandatory: No |
|
56 * - Capability: ReadDeviceData, WriteDeviceData |
|
57 * - Description: Threshold as an offset of the selected range. |
|
58 */ |
|
59 const TSensrvPropertyId KSensrvPropIdDblTapThreshold = 0x00001002; |
|
60 |
|
61 /** |
|
62 * - Name: Double tap duration in milliseconds |
|
63 * - Type: TInt |
|
64 * - Scope: Channel property |
|
65 * - Mandatory: No |
|
66 * - Capability: None |
|
67 * - Description: Scalar Integer representing the duration of the tap value. |
|
68 * Not dependent upon ODR. |
|
69 */ |
|
70 const TSensrvPropertyId KSensrvPropIdDblTapDuration = 0x00001003; |
|
71 |
|
72 /** |
|
73 * - Name: Double tap latency |
|
74 * - Type: TInt |
|
75 * - Scope: Channel property |
|
76 * - Mandatory: No |
|
77 * - Capability: None |
|
78 * - Description: Double tap latency in milliseconds |
|
79 */ |
|
80 const TSensrvPropertyId KSensrvPropIdDblTapLatency = 0x00001004; |
|
81 |
|
82 /** |
|
83 * - Name: Double tap interval |
|
84 * - Type: TInt |
|
85 * - Scope: Channel property |
|
86 * - Mandatory: No |
|
87 * - Capability: None |
|
88 * - Description: Double tap interval in milliseconds |
|
89 */ |
|
90 const TSensrvPropertyId KSensrvPropIdDblTapInterval = 0x00001005; |
|
91 |
|
92 // TAPPING RELATED DATATYPES |
|
93 |
|
94 /** |
|
95 * Direction of the tapping data. If direction (plus or minus) is not known, |
|
96 * direction is, for example in x-axis case |
|
97 * KSensrvAccelerometerDirectionXplus | KSensrvAccelerometerDirectionXminus |
|
98 */ |
|
99 const TUint8 KSensrvAccelerometerDirectionXplus = 0x01; |
|
100 const TUint8 KSensrvAccelerometerDirectionXminus = 0x02; |
|
101 const TUint8 KSensrvAccelerometerDirectionYplus = 0x04; |
|
102 const TUint8 KSensrvAccelerometerDirectionYminus = 0x08; |
|
103 const TUint8 KSensrvAccelerometerDirectionZplus = 0x10; |
|
104 const TUint8 KSensrvAccelerometerDirectionZminus = 0x20; |
|
105 |
|
106 /** |
|
107 * Tapping data type |
|
108 */ |
|
109 class TSensrvTappingData |
|
110 { |
|
111 public: |
|
112 /** |
|
113 * Channel data type Id number |
|
114 */ |
|
115 static const TSensrvChannelDataTypeId KDataTypeId = 0x1020507F; |
|
116 |
|
117 /** |
|
118 * Channel data type index numbers |
|
119 */ |
|
120 enum TSensrvAccelerometerAxisDataIndexes |
|
121 { |
|
122 ETimeStamp = 0, |
|
123 EDirection |
|
124 }; |
|
125 |
|
126 public: |
|
127 /** |
|
128 * - Item name: Sampling time. |
|
129 * - Item Index: 0 |
|
130 * - Conditions: None |
|
131 * - Description: Timestamp for a sample. |
|
132 */ |
|
133 TTime iTimeStamp; |
|
134 |
|
135 /** |
|
136 * - Item name: Tapping direction bitmask |
|
137 * - Item Index: 1 |
|
138 * - Conditions: Binary |
|
139 * - Description: Direction bitmask of the tapping event. |
|
140 * See constant definitions above. |
|
141 */ |
|
142 TUint32 iDirection; |
|
143 }; |
|
144 |
|
145 #endif //SENSRVTAPPINGSENSOR_H |
|
146 |
|
147 // End of File |