1 /* upsimagearg.h - arguments passed between upsstats and upsimage
3 Copyright (C) 2002 Russell Kroll <rkroll@exploits.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 int val
; /* hex digits, ala HTML */
29 int min
; /* minimum reasonable value */
30 int max
; /* maximum reasonable value */
33 { "width", 100, 50, 200 },
34 { "height", 350, 100, 500 },
35 { "scale_height", 300, 100, 500 },
36 { "back_col", 0x000000, 0x000000, 0xffffff },
37 { "scale_num_col", 0xffff00, 0x000000, 0xffffff },
38 { "summary_col", 0xffff00, 0x000000, 0xffffff },
39 { "ok_zone_maj_col", 0x00ff00, 0x000000, 0xffffff },
40 { "ok_zone_min_col", 0x007800, 0x000000, 0xffffff },
41 { "neutral_zone_maj_col", 0xffffff, 0x000000, 0xffffff },
42 { "neutral_zone_min_col", 0x646464, 0x000000, 0xffffff },
43 { "warn_zone_maj_col", 0xff0000, 0x000000, 0xffffff },
44 { "warn_zone_min_col", 0x960000, 0x000000, 0xffffff },
45 { "bar_col", 0x00ff00, 0x000000, 0xffffff },
46 { "tempmin", 0, -100, 150 },
47 { "tempmax", 40, -100, 150 },
48 { "nom_in_freq", 50, 0, 100 },
49 { "nom_out_freq", 50, 0, 100 },
54 char *name
; /* name of the UPS variable */
55 char *minimum
; /* name of minimum value UPS variable
56 or variable in imgarg table */
57 char *nominal
; /* as above, only for nominal value */
58 char *maximum
; /* as above, only for maximum value */
59 int deviation
; /* variable deviation - width of green zone */
60 char *format
; /* format string to generate summary text */
62 /* pointer to drawing function */
63 void (*drawfunc
)(double, int, int, int, int, const char*);
66 extern imgvar_t imgvar
[];