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