2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __PEDOMETER_SENSOR_H__
19 #define __PEDOMETER_SENSOR_H__
21 #include <fusion_sensor.h>
22 #include <sensor_types.h>
24 #include "pedometer.h"
26 class pedometer_sensor : public fusion_sensor {
29 virtual ~pedometer_sensor();
31 int get_sensor_info(const sensor_info2_t **info);
32 int get_required_sensors(const required_sensor_s **sensors);
34 int update(uint32_t id, sensor_data_t *data, int len);
35 int get_data(sensor_data_t **data, int *len);
37 int start(observer_h ob);
38 int stop(observer_h ob);
41 long long m_step_count;
43 float m_step_total_length;
45 unsigned long long m_time;
47 pedometer m_pedometer;
50 #endif /* __PEDOMETER_SENSOR_H__ */