|
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: Channel data types definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SENSRVILLUMINATIONSENSOR_H |
|
21 #define SENSRVILLUMINATIONSENSOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <sensrvtypes.h> |
|
26 |
|
27 |
|
28 // ILLUMINATION RELATED CHANNELS |
|
29 |
|
30 /** |
|
31 * - Name: Ambient light event channel type |
|
32 * - Type: Event |
|
33 * - Datatype: TSensrvAmbientLightData |
|
34 * - Description: Ambient light events |
|
35 */ |
|
36 const TSensrvChannelTypeId KSensrvChannelTypeIdAmbientLightData = 0x2000BF16; |
|
37 |
|
38 |
|
39 // ILLUMINATION RELATED DATATYPES |
|
40 |
|
41 class TSensrvAmbientLightData |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Brighness constants for ambien light sensor data channel. |
|
47 */ |
|
48 static const TUint8 KAmbientLightVeryDark = 0; |
|
49 static const TUint8 KAmbientLightDark = 20; |
|
50 static const TUint8 KAmbientLightTwilight = 40; |
|
51 static const TUint8 KAmbientLightLight = 60; |
|
52 static const TUint8 KAmbientLightBright = 80; |
|
53 static const TUint8 KAmbientLightSunny = 100; |
|
54 |
|
55 /** |
|
56 * Channel data type Id number |
|
57 */ |
|
58 static const TSensrvChannelDataTypeId KDataTypeId = 0x2000BF16; |
|
59 |
|
60 /** |
|
61 * Channel data type index numbers |
|
62 */ |
|
63 enum TSensrvAmbientLightDataIndexes |
|
64 { |
|
65 ETimeStamp = 0, |
|
66 EAmbientLight |
|
67 }; |
|
68 |
|
69 public: |
|
70 |
|
71 /** |
|
72 * - Item name: Sampling time |
|
73 * - Item Index: 0 |
|
74 * - Description: Timestamp for a sample |
|
75 */ |
|
76 TTime iTimeStamp; |
|
77 |
|
78 /** |
|
79 * - Item name: Ambient light |
|
80 * - Item Index: 1 |
|
81 * - Description: Percentage value (0..100) of Ambient light sensor's brightness. |
|
82 */ |
|
83 TUint8 iAmbientLight; |
|
84 }; |
|
85 |
|
86 |
|
87 #endif //SENSRVILLUMINATIONSENSOR_H |
|
88 |
|
89 // End of File |