2 * Copyright (c) 2016 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 _SENSOR_UTIL_H_
19 #define _SENSOR_UTIL_H_
26 std::string data_node_path;
27 std::string enable_node_path;
28 std::string interval_node_path;
29 std::string buffer_enable_node_path;
30 std::string buffer_length_node_path;
31 std::string trigger_node_path;
35 bool sensorhub_controlled;
36 std::string sensor_type;
38 std::string iio_enable_node_name;
39 std::string sensorhub_interval_node_name;
44 INPUT_EVENT_METHOD = 1,
54 bool set_enable_node(const std::string &node_path, bool sensorhub_controlled, bool enable, int enable_bit = 0);
56 unsigned long long get_timestamp(void);
57 unsigned long long get_timestamp(timeval *t);
59 bool is_sensorhub_controlled(const std::string &key);
60 bool get_node_info(const node_info_query &query, node_info &info);
61 void show_node_info(node_info &info);
62 bool set_node_value(const std::string &node_path, int value);
63 bool set_node_value(const std::string &node_path, unsigned long long value);
65 #endif /*_SENSOR_UTIL_H_*/