2 * emulator-plugin-accel
4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
7 * SooYoung Ha <yoosah.ha@samsnung.com>
8 * Sungmin Ha <sungmin82.ha@samsung.com>
10 * This library is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU Lesser General Public License as published by the
12 * Free Software Foundation; either version 2.1 of the License, or (at your option)
15 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
16 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation, Inc., 51
22 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 class caccel_sim : public csensor_module
29 enum accel_sim_cmd_property_t {
30 PROPERTY_CMD_START = 0,
39 virtual ~caccel_sim();
41 const char *name(void);
45 bool is_data_ready(bool wait=false);
47 long value(const char *port);
50 bool update_name(char *name);
51 bool update_version(int ver);
52 bool update_id(int id);
55 const char *port(int idx);
57 bool need_polling(void);
58 long polling_interval(void);
59 bool update_polling_interval(unsigned long val);
60 int get_sensor_type(void);
61 long set_cmd(int type , int property , long input_value);
62 int get_property(unsigned int property_level , void *property_data);
63 int get_struct_value(unsigned int struct_type , void *struct_values);
65 bool calibration(int iteration);
67 int check_hw_node(void);
76 static const char *m_port[];
81 unsigned long m_polling_interval;
90 int m_calibration_flag;
92 unsigned long long m_fired_time;
94 bool update_value(void);