epoc32/include/sensrvorientationsensor.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Channel data types definitions
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
#ifndef SENSRVORIENTATIONSENSOR_H
williamr@2
    21
#define SENSRVORIENTATIONSENSOR_H
williamr@2
    22
williamr@2
    23
//  INCLUDES
williamr@2
    24
#include <e32base.h>
williamr@2
    25
#include <sensrvtypes.h> 
williamr@2
    26
williamr@2
    27
// ORIENTATION RELATED CHANNELS
williamr@2
    28
williamr@2
    29
/**
williamr@2
    30
* - Name:          Orientation event channel type
williamr@2
    31
* - Type:          Event
williamr@2
    32
* - Datatype:      TSensrvOrientationData
williamr@2
    33
* - Description:   Orientation events
williamr@2
    34
*/
williamr@2
    35
const TSensrvChannelTypeId KSensrvChannelTypeIdOrientationData = 0x10205088; 
williamr@2
    36
williamr@2
    37
/**
williamr@2
    38
* - Name:          Rotation event channel type
williamr@2
    39
* - Type:          Event
williamr@2
    40
* - Datatype:      TSensrvRotationData
williamr@2
    41
* - Description:   Rotation events
williamr@2
    42
*/
williamr@2
    43
const TSensrvChannelTypeId KSensrvChannelTypeIdRotationData = 0x10205089; 
williamr@2
    44
williamr@2
    45
// ORIENTATION RELATED DATATYPES
williamr@2
    46
williamr@2
    47
class TSensrvOrientationData
williamr@2
    48
    {
williamr@2
    49
public:
williamr@2
    50
    /**
williamr@2
    51
    * Channel data type Id number
williamr@2
    52
    */      
williamr@2
    53
    static const TSensrvChannelDataTypeId KDataTypeId = 0x10205088;
williamr@2
    54
williamr@2
    55
    /**
williamr@2
    56
    * Channel data type index numbers
williamr@2
    57
    */
williamr@2
    58
    enum TSensrvOrientationEventIndexes
williamr@2
    59
        {
williamr@2
    60
        ETimeStamp = 0,
williamr@2
    61
        EDeviceOrientation
williamr@2
    62
        }; 
williamr@2
    63
williamr@2
    64
    /**
williamr@2
    65
    * Possible device orientations
williamr@2
    66
    */
williamr@2
    67
    enum TSensrvDeviceOrientation
williamr@2
    68
        {
williamr@2
    69
	    EOrientationUndefined = 0,
williamr@2
    70
	    EOrientationDisplayUp,
williamr@2
    71
	    EOrientationDisplayDown,
williamr@2
    72
	    EOrientationDisplayLeftUp,
williamr@2
    73
	    EOrientationDisplayRightUp,
williamr@2
    74
	    EOrientationDisplayUpwards,
williamr@2
    75
	    EOrientationDisplayDownwards	
williamr@2
    76
        };
williamr@2
    77
        
williamr@2
    78
public:
williamr@2
    79
        
williamr@2
    80
    /**
williamr@2
    81
    * - Item name:   Sampling time
williamr@2
    82
    * - Item Index:  0
williamr@2
    83
    * - Description: Timestamp for a sample
williamr@2
    84
    */   
williamr@2
    85
    TTime iTimeStamp;
williamr@2
    86
williamr@2
    87
    /**
williamr@2
    88
    * - Item name:   Device orientation
williamr@2
    89
    * - Item Index:  1
williamr@2
    90
    * - Description: Contains one of the six basic orientations of the device
williamr@2
    91
    */   
williamr@2
    92
    TSensrvDeviceOrientation iDeviceOrientation;    
williamr@2
    93
    };
williamr@2
    94
williamr@2
    95
williamr@2
    96
class TSensrvRotationData
williamr@2
    97
    {
williamr@2
    98
public:
williamr@2
    99
    /**
williamr@2
   100
    * Channel data type Id number
williamr@2
   101
    */      
williamr@2
   102
    static const TSensrvChannelDataTypeId KDataTypeId = 0x10205089;
williamr@2
   103
    
williamr@2
   104
    /**
williamr@2
   105
    * Rotation axis value equals -1 when it cannot be defined. 
williamr@2
   106
    * The undefined situation varies depending on the sensor type. 
williamr@2
   107
    * In the case of an accelerometer, the rotation value cannot be defined 
williamr@2
   108
    * when the corresponding axis is parallel to the gravitational force or
williamr@2
   109
    * the device is in motion. In the case of a magnetometer, there are
williamr@2
   110
    * difficulties in measuring values, when the axis is parallel to the
williamr@2
   111
    * magnetic field.
williamr@2
   112
    */
williamr@2
   113
    static const TInt KSensrvRotationUndefined = -1; 
williamr@2
   114
williamr@2
   115
    /**
williamr@2
   116
    * Channel data type index numbers
williamr@2
   117
    */ 
williamr@2
   118
    enum TSensrvRotationDataIndexes
williamr@2
   119
        {
williamr@2
   120
        ETimeStamp = 0,          
williamr@2
   121
        EDeviceRotationAboutXAxis,
williamr@2
   122
        EDeviceRotationAboutYAxis,
williamr@2
   123
        EDeviceRotationAboutZAxis,
williamr@2
   124
        };
williamr@2
   125
williamr@2
   126
public:
williamr@2
   127
    /**
williamr@2
   128
    * - Item name:   Sampling time.
williamr@2
   129
    * - Item Index:  0
williamr@2
   130
    * - Description: Timestamp for a sample
williamr@2
   131
    */   
williamr@2
   132
    TTime iTimeStamp;
williamr@2
   133
  
williamr@2
   134
    /**
williamr@2
   135
    * - Item name:   Rotation about x-axis
williamr@2
   136
    * - Item Index:  1 
williamr@2
   137
    * - Description: Positive rotation in Cartesian coordinate system about the x-axis.
williamr@2
   138
    *                If the value cannot be defined it is set to KSensrvRotationUndefined.
williamr@2
   139
    */   
williamr@2
   140
    TInt iDeviceRotationAboutXAxis;  
williamr@2
   141
williamr@2
   142
    /**
williamr@2
   143
    * - Item name:   Rotation about y-axis
williamr@2
   144
    * - Item Index:  2
williamr@2
   145
    * - Description: Positive rotation in Cartesian coordinate system about the y-axis.
williamr@2
   146
    *                If the value cannot be defined it is set to KSensrvRotationUndefined.
williamr@2
   147
    */   
williamr@2
   148
    TInt iDeviceRotationAboutYAxis;  
williamr@2
   149
      
williamr@2
   150
williamr@2
   151
    /**
williamr@2
   152
    * - Item name:   Rotation about z-axis
williamr@2
   153
    * - Item Index:  3 
williamr@2
   154
    * - Description: Positive rotation in Cartesian coordinate system about the z-axis.
williamr@2
   155
    *                If the value cannot be defined it is set to KSensrvRotationUndefined.
williamr@2
   156
    */   
williamr@2
   157
    TInt iDeviceRotationAboutZAxis;  
williamr@2
   158
    };
williamr@2
   159
williamr@2
   160
#endif //SENSRVORIENTATIONSENSOR_H
williamr@2
   161
williamr@2
   162
// End of File