4 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #ifndef __ACCEL_SENSOR_H__
21 #define __ACCEL_SENSOR_H__
23 #include <physical_sensor.h>
25 class accel_sensor : public physical_sensor {
30 std::string get_uri(void);
31 physical_sensor *clone(void) const;
33 int start(observer_h ob);
34 int stop(observer_h ob);
36 int set_interval(observer_h ob, uint32_t interval);
37 int set_batch_latency(observer_h ob, uint32_t latency);
38 int set_attribute(observer_h ob, int32_t attr, int32_t value);
39 int set_attribute(observer_h ob, int32_t attr, const char *value, int len);
40 int flush(observer_h ob);
41 int on_event(sensor_data_t *data, int32_t len, int32_t remains);
44 #endif /* __ACCEL_SENSOR_H__ */