1
/* cpsups.h - Lookup tables for CyberPower text protocol UPSes
3
Copyright (C) 2003 Walt Holman <waltabbyh@comcast.net>
4
with thanks to Russell Kroll <rkroll@exploits.org>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
{ 2, 6 }, /* Input Voltage */
29
{ 8, 12 }, /* Output Voltage */
30
{ 14, 16 }, /* Current Load */
31
{ 18, 20 }, /* Battery Charge % */
32
{ 22, 24 }, /* Temperature in C */
33
{ 26, 30 }, /* Frequency in Hz */
40
#define POLL_UPSSTATUS 6
42
#define ENDCHAR 13 /* replies end with CR */
44
#define UPSDELAY 50000 /* 50 ms delay required for reliable operation */
45
#define SER_WAIT_SEC 3 /* allow 3.0 sec for ser_get calls */
46
#define SER_WAIT_USEC 10
48
#define CPS_STAT_CAL 8
49
#define CPS_STAT_LB 32
50
#define CPS_STAT_OB 64
51
#define CPS_STAT_OL 144