epoc32/include/sensrvtappingsensor.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/sensrvtappingsensor.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/sensrvtappingsensor.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,147 @@
     1.4 -sensrvtappingsensor.h
     1.5 +/*
     1.6 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Channel data types definitions
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +#ifndef SENSRVTAPPINGSENSOR_H
    1.25 +#define SENSRVTAPPINGSENSOR_H
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <e32base.h>
    1.29 +#include <sensrvtypes.h> 
    1.30 +#include <sensrvaccelerometersensor.h>
    1.31 +
    1.32 +// TAPPING RELATED CHANNELS 
    1.33 +
    1.34 +/**
    1.35 +* - Name:          Double tapping event channel type
    1.36 +* - Type:          Event
    1.37 +* - Datatype:      TSensrvTappingData
    1.38 +* - Description:   Double tapping events 
    1.39 +*/
    1.40 +const TSensrvChannelTypeId KSensrvChannelTypeIdAccelerometerDoubleTappingData = 0x10205081;
    1.41 +
    1.42 +// TAPPING RELATED PROPERTIES
    1.43 +
    1.44 +/**
    1.45 +* - Name:         Double tapping axis active
    1.46 +* - Type:         TInt 
    1.47 +* - Scope:        Channel item property
    1.48 +* - Mandatory:    No
    1.49 +* - Capability:   None
    1.50 +* - Description:  Indicates is sensor axis activated.
    1.51 +*                 Value is one if the axis is activated, zero otherwise.
    1.52 +*/
    1.53 +const TSensrvPropertyId KSensrvPropIdDblTapAxisActive = KSensrvPropIdAxisActive;
    1.54 +
    1.55 +/**
    1.56 +* - Name:         Double tap duration threshold
    1.57 +* - Type:         TInt
    1.58 +* - Scope:        Channel property
    1.59 +* - Mandatory:    No
    1.60 +* - Capability:   ReadDeviceData, WriteDeviceData
    1.61 +* - Description:  Threshold as an offset of the selected range.
    1.62 +*/
    1.63 +const TSensrvPropertyId KSensrvPropIdDblTapThreshold = 0x00001002;
    1.64 +
    1.65 +/**
    1.66 +* - Name:         Double tap duration in milliseconds
    1.67 +* - Type:         TInt
    1.68 +* - Scope:        Channel property
    1.69 +* - Mandatory:    No
    1.70 +* - Capability:   None
    1.71 +* - Description:  Scalar Integer representing the duration of the tap value.
    1.72 +*                 Not dependent upon ODR.
    1.73 +*/
    1.74 +const TSensrvPropertyId KSensrvPropIdDblTapDuration = 0x00001003;
    1.75 +
    1.76 +/**
    1.77 +* - Name:         Double tap latency 
    1.78 +* - Type:         TInt
    1.79 +* - Scope:        Channel property
    1.80 +* - Mandatory:    No
    1.81 +* - Capability:   None
    1.82 +* - Description:  Double tap latency in milliseconds
    1.83 +*/
    1.84 +const TSensrvPropertyId KSensrvPropIdDblTapLatency = 0x00001004;
    1.85 +
    1.86 +/**
    1.87 +* - Name:         Double tap interval
    1.88 +* - Type:         TInt
    1.89 +* - Scope:        Channel property
    1.90 +* - Mandatory:    No
    1.91 +* - Capability:   None
    1.92 +* - Description:  Double tap interval in milliseconds
    1.93 +*/
    1.94 +const TSensrvPropertyId KSensrvPropIdDblTapInterval = 0x00001005;
    1.95 +
    1.96 +// TAPPING RELATED DATATYPES
    1.97 +
    1.98 +/**
    1.99 +* Direction of the tapping data. If direction (plus or minus) is not known, 
   1.100 +* direction is, for example in x-axis case 
   1.101 +* KSensrvAccelerometerDirectionXplus | KSensrvAccelerometerDirectionXminus
   1.102 +*/
   1.103 +const TUint8 KSensrvAccelerometerDirectionXplus 	= 0x01;
   1.104 +const TUint8 KSensrvAccelerometerDirectionXminus 	= 0x02;
   1.105 +const TUint8 KSensrvAccelerometerDirectionYplus 	= 0x04;
   1.106 +const TUint8 KSensrvAccelerometerDirectionYminus 	= 0x08;
   1.107 +const TUint8 KSensrvAccelerometerDirectionZplus 	= 0x10;
   1.108 +const TUint8 KSensrvAccelerometerDirectionZminus 	= 0x20;
   1.109 +
   1.110 +/**
   1.111 +* Tapping data type
   1.112 +*/
   1.113 +class TSensrvTappingData 
   1.114 +    {
   1.115 +public:
   1.116 +    /**
   1.117 +    * Channel data type Id number
   1.118 +    */      
   1.119 +    static const TSensrvChannelDataTypeId KDataTypeId = 0x1020507F;
   1.120 +
   1.121 +	/**
   1.122 +    * Channel data type index numbers
   1.123 +    */
   1.124 +	enum TSensrvAccelerometerAxisDataIndexes
   1.125 +          {
   1.126 +          ETimeStamp = 0,
   1.127 +          EDirection
   1.128 +          };
   1.129 +
   1.130 +public:
   1.131 +    /**
   1.132 +    * - Item name:   Sampling time.
   1.133 +    * - Item Index:  0
   1.134 +    * - Conditions:  None
   1.135 +    * - Description: Timestamp for a sample.
   1.136 +    */   
   1.137 +    TTime iTimeStamp;    
   1.138 +    
   1.139 +    /**
   1.140 +    * - Item name:   Tapping direction bitmask
   1.141 +    * - Item Index:  1
   1.142 +    * - Conditions:  Binary
   1.143 +    * - Description: Direction bitmask of the tapping event. 
   1.144 +    *                See constant definitions above.
   1.145 +    */
   1.146 +    TUint32 iDirection;  
   1.147 +    };
   1.148 +
   1.149 +#endif //SENSRVTAPPINGSENSOR_H
   1.150 +
   1.151 +// End of File