diff -r 666f914201fb -r 2fe1408b6811 epoc32/include/sensrvtappingsensor.h --- a/epoc32/include/sensrvtappingsensor.h Tue Nov 24 13:55:44 2009 +0000 +++ b/epoc32/include/sensrvtappingsensor.h Tue Mar 16 16:12:26 2010 +0000 @@ -1,1 +1,147 @@ -sensrvtappingsensor.h +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* 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 +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Channel data types definitions +* +*/ + + + +#ifndef SENSRVTAPPINGSENSOR_H +#define SENSRVTAPPINGSENSOR_H + +// INCLUDES +#include +#include +#include + +// TAPPING RELATED CHANNELS + +/** +* - Name: Double tapping event channel type +* - Type: Event +* - Datatype: TSensrvTappingData +* - Description: Double tapping events +*/ +const TSensrvChannelTypeId KSensrvChannelTypeIdAccelerometerDoubleTappingData = 0x10205081; + +// TAPPING RELATED PROPERTIES + +/** +* - Name: Double tapping axis active +* - Type: TInt +* - Scope: Channel item property +* - Mandatory: No +* - Capability: None +* - Description: Indicates is sensor axis activated. +* Value is one if the axis is activated, zero otherwise. +*/ +const TSensrvPropertyId KSensrvPropIdDblTapAxisActive = KSensrvPropIdAxisActive; + +/** +* - Name: Double tap duration threshold +* - Type: TInt +* - Scope: Channel property +* - Mandatory: No +* - Capability: ReadDeviceData, WriteDeviceData +* - Description: Threshold as an offset of the selected range. +*/ +const TSensrvPropertyId KSensrvPropIdDblTapThreshold = 0x00001002; + +/** +* - Name: Double tap duration in milliseconds +* - Type: TInt +* - Scope: Channel property +* - Mandatory: No +* - Capability: None +* - Description: Scalar Integer representing the duration of the tap value. +* Not dependent upon ODR. +*/ +const TSensrvPropertyId KSensrvPropIdDblTapDuration = 0x00001003; + +/** +* - Name: Double tap latency +* - Type: TInt +* - Scope: Channel property +* - Mandatory: No +* - Capability: None +* - Description: Double tap latency in milliseconds +*/ +const TSensrvPropertyId KSensrvPropIdDblTapLatency = 0x00001004; + +/** +* - Name: Double tap interval +* - Type: TInt +* - Scope: Channel property +* - Mandatory: No +* - Capability: None +* - Description: Double tap interval in milliseconds +*/ +const TSensrvPropertyId KSensrvPropIdDblTapInterval = 0x00001005; + +// TAPPING RELATED DATATYPES + +/** +* Direction of the tapping data. If direction (plus or minus) is not known, +* direction is, for example in x-axis case +* KSensrvAccelerometerDirectionXplus | KSensrvAccelerometerDirectionXminus +*/ +const TUint8 KSensrvAccelerometerDirectionXplus = 0x01; +const TUint8 KSensrvAccelerometerDirectionXminus = 0x02; +const TUint8 KSensrvAccelerometerDirectionYplus = 0x04; +const TUint8 KSensrvAccelerometerDirectionYminus = 0x08; +const TUint8 KSensrvAccelerometerDirectionZplus = 0x10; +const TUint8 KSensrvAccelerometerDirectionZminus = 0x20; + +/** +* Tapping data type +*/ +class TSensrvTappingData + { +public: + /** + * Channel data type Id number + */ + static const TSensrvChannelDataTypeId KDataTypeId = 0x1020507F; + + /** + * Channel data type index numbers + */ + enum TSensrvAccelerometerAxisDataIndexes + { + ETimeStamp = 0, + EDirection + }; + +public: + /** + * - Item name: Sampling time. + * - Item Index: 0 + * - Conditions: None + * - Description: Timestamp for a sample. + */ + TTime iTimeStamp; + + /** + * - Item name: Tapping direction bitmask + * - Item Index: 1 + * - Conditions: Binary + * - Description: Direction bitmask of the tapping event. + * See constant definitions above. + */ + TUint32 iDirection; + }; + +#endif //SENSRVTAPPINGSENSOR_H + +// End of File