4 * Copyright (c) 2014 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 _PROXI_SENSOR_DEVICE_H_
21 #define _PROXI_SENSOR_DEVICE_H_
23 #include <sensor_device_base.h>
25 class proxi_sensor_device : public sensor_device_base
28 proxi_sensor_device();
29 virtual ~proxi_sensor_device();
31 int get_poll_fd(void);
32 bool get_sensors(std::vector<sensor_handle_t> &sensors);
33 bool enable(uint32_t id);
34 bool disable(uint32_t id);
35 bool set_interval(uint32_t id, unsigned long ms_interval);
36 bool set_batch_latency(uint32_t id, unsigned long val);
37 bool set_command(uint32_t id, std::string command, std::string value);
38 bool is_data_ready(void);
39 bool get_sensor_data(uint32_t id, sensor_data_t &data);
40 int get_sensor_event(uint32_t id, sensor_event_t **event);
41 bool get_properties(uint32_t id, sensor_properties_s &properties);
46 unsigned long long m_fired_time;
47 bool m_sensorhub_controlled;
49 std::string m_data_node;
50 std::string m_enable_node;
52 bool update_value(void);
54 #endif /*_PROXI_SENSOR_DEVICE_H_*/