sensord: enable rotation vector/orientation sensors
[platform/core/system/sensord.git] / src / sensor / rotation_vector / gyro_rv_sensor.h
1 /*
2  * sensord
3  *
4  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __GYRO_RV_SENSOR_H__
21 #define __GYRO_RV_SENSOR_H__
22
23 #include <fusion_sensor.h>
24 #include <sensor_types.h>
25 #include "gyro_fusion.h"
26
27 class gyro_rv_sensor : public fusion_sensor {
28 public:
29         gyro_rv_sensor();
30         virtual ~gyro_rv_sensor();
31
32         int get_sensor_info(const sensor_info2_t **info);
33         int get_required_sensors(const required_sensor_s **sensors);
34
35         int update(uint32_t id, sensor_data_t *data, int len);
36         int get_data(sensor_data_t **data, int *len);
37
38 private:
39         gyro_fusion m_fusion;
40
41         float m_x;
42         float m_y;
43         float m_z;
44         float m_w;
45         unsigned long long m_time;
46         unsigned long m_interval;
47         int m_accuracy;
48 };
49
50 #endif /* __GYRO_SENSOR_H__ */