4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
8 * Jaewon Lim <jaewon81.lim@samsung.com>
9 * Woojin Jung <woojin2.jung@samsung.com>
10 * Juyoung Kim <j0.kim@samsung.com>
12 * This library is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU Lesser General Public License as published by the
14 * Free Software Foundation; either version 2.1 of the License, or (at your option)
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 * License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library; if not, write to the Free Software Foundation, Inc., 51
24 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #ifndef __DA_CHART_H__
32 #define __DA_CHART_H__
39 #define ERR_MAX_CHART_NUMBER -1001 // no more chart or series can be added
40 #define ERR_WRONG_HANDLE -1002 // chart or series handle is wrong handle
41 #define ERR_WRONG_PARAMETER -1003 // wrong parameter
56 CHART_COLOR_GREEN = 2,
58 CHART_COLOR_BROWN = 4,
59 CHART_COLOR_PURPLE = 5,
61 CHART_COLOR_CHOCOLATE = 7,
62 CHART_COLOR_INDIGO = 8,
63 CHART_COLOR_MAGENTA = 9,
70 CHART_INTERVAL_10MSEC = 1,
71 CHART_INTERVAL_100MSEC = 2,
72 CHART_INTERVAL_1SEC = 3
75 typedef int da_handle;
76 typedef float (* da_user_data_2_chart_data) (void* data_addr);
82 extern da_handle da_create_chart (char* chart_name);
83 extern da_handle da_create_series (da_handle charthandle, char* seriesname,
84 series_type type, chart_color color);
85 extern da_handle da_create_default_series (da_handle charthandle, char* seriesname);
86 extern int da_set_callback (da_handle series_handle, da_user_data_2_chart_data callback,
87 void* data_addr, chart_interval interval);
88 extern void da_log (da_handle series_handle, float uservalue);
91 extern void da_mark (chart_color color, char* mark_text);
93 #else // _USE_DA_ (do not use da custom chart)
95 #define da_create_chart(a) 0
96 #define da_create_series(a, b, c, d) 0
97 #define da_create_default_series(a, b) 0
98 #define da_set_callback(a, b, c, d) 0
102 #define da_mark(color, text)
110 #endif // __DA_CHART_H__