2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUixSensorSensorTypes.h
20 * @brief This is the header file for the common data types used by the SensorData and SensorManager classes.
22 * This header file contains the declarations of the common data types and constants used by the SensorData and SensorManager classes.
25 #ifndef _FUIX_SENSOR_SENSOR_TYPES_H_
26 #define _FUIX_SENSOR_SENSOR_TYPES_H_
28 namespace Tizen { namespace Uix { namespace Sensor
34 * Defines the sensor type.
40 SENSOR_TYPE_ACCELERATION = 0, /**< The acceleration sensor type */
41 SENSOR_TYPE_MAGNETIC, /**< The magnetic sensor type */
42 SENSOR_TYPE_PROXIMITY, /**< The proximity sensor type */
43 SENSOR_TYPE_TILT, /**< The tilt sensor type */
44 SENSOR_TYPE_GYRO, /**< The gyro sensor type */
45 SENSOR_TYPE_LIGHT, /**< The light sensor type */
46 SENSOR_TYPE_MAX, // This enum value is for internal use only.
47 // Using this enum value can cause behavioral,
48 // security-related, and consistency-related
49 // issues in the application.
50 SENSOR_TYPE_NONE = -1, // This enum value is for internal use only.
51 // Using this enum value can cause behavioral,
52 // security-related, and consistency-related
53 // issues in the application.
59 * Defines the default key types for the SensorData class.
63 * @remarks Use actual key type, such as Tizen::Uix::Sensor::AccelerationDataKey, Tizen::Uix::Sensor::MagneticDataKey, Tizen::Uix::Sensor::ProximityDataKey or Tizen::Uix::Sensor::TiltDataKey with type casting. For example, use Tizen::Uix::Sensor::SensorData::GetValue(static_cast<SensorDataKey>(ACCELERATION_DATA_KEY_X), value) to get the acceleration value in x-axis.
67 SENSOR_DATA_KEY_0 = 0,
75 * @enum AccelerationDataKey
77 * Defines the keys to access the acceleration sensor data.
81 enum AccelerationDataKey
83 ACCELERATION_DATA_KEY_TIMESTAMP = 256, /**< The key to the timestamp of the acceleration sensor data */
84 ACCELERATION_DATA_KEY_X, /**< The key to the x-axis of the acceleration sensor data */
85 ACCELERATION_DATA_KEY_Y, /**< The key to the y-axis of the acceleration sensor data */
86 ACCELERATION_DATA_KEY_Z, /**< The key to the z-axis of the acceleration sensor data */
87 ACCELERATION_DATA_KEY_COUNT = 4 /**< The number of indices for the acceleration sensor data */
91 * @enum MagneticDataKey
93 * Defines the keys to access the magnetic sensor data.
99 MAGNETIC_DATA_KEY_TIMESTAMP = 266, /**< The key to the timestamp of the magnetic sensor data */
100 MAGNETIC_DATA_KEY_X, /**< The key to the x-axis of the magnetic sensor data */
101 MAGNETIC_DATA_KEY_Y, /**< The key to the y-axis of the magnetic sensor data */
102 MAGNETIC_DATA_KEY_Z, /**< The key to the z-axis of the magnetic sensor data */
103 MAGNETIC_DATA_KEY_COUNT = 4 /**< The number of indices to access magnetic sensor data */
107 * @enum ProximityDataKey
109 * Defines the keys to access the proximity sensor data.
113 enum ProximityDataKey
115 PROXIMITY_DATA_KEY_TIMESTAMP = 276, /**< The key to the timestamp of the proximity sensor data */
116 PROXIMITY_DATA_KEY_ONOFF, /**< The key to on/off the proximity sensor data */
117 PROXIMITY_DATA_KEY_COUNT = 2 /**< The number of indices to access the proximity sensor data */
123 * Defines the keys to access the tilt sensor data.
129 TILT_DATA_KEY_TIMESTAMP = 286, /**< The key to the timestamp of the tilt sensor data */
130 TILT_DATA_KEY_AZIMUTH, /**< The key to the azimuth of the tilt sensor data */
131 TILT_DATA_KEY_PITCH, /**< The key to the pitch of the tilt sensor data */
132 TILT_DATA_KEY_ROLL, /**< The key to the roll of the tilt sensor data */
133 TILT_DATA_KEY_COUNT = 4 /**< The number of indices to access the tilt sensor data */
136 } } }// Tizen::Uix::Sensor
138 #endif // _FUIX_SENSOR_SENSOR_TYPES_H_