File: genericups.h

package info (click to toggle)
nut 0.45.5-rel-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,984 kB
  • ctags: 2,146
  • sloc: ansic: 22,216; sh: 1,138; makefile: 405
file content (185 lines) | stat: -rw-r--r-- 5,285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/* genericups.h - contact closure UPS line status definitions

   Copyright (C) 1999, 2000  Russell Kroll <rkroll@exploits.org>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

struct {
	char	*mfr;			/* value for INFO_MFR	*/
	char	*model;			/* value for INFO_MODEL	*/
	char	*desc;			/* used in -l listing	*/
	int	line_norm;
	int	line_ol, val_ol;
	int	line_bl, val_bl;
	int	line_sd;
}	upstab[] =
{
	{ "UPSONIC",
	  "LAN Saver 600",
	  "UPSONIC LAN Saver 600",
	  TIOCM_DTR | TIOCM_RTS,	/* cable power: DTR + RTS	*/
	  TIOCM_CTS, 0,			/* online: CTS off		*/
	  TIOCM_CD, TIOCM_CD,		/* low battery: CD on		*/
	  TIOCM_RTS			/* shutdown: lower DTR		*/
	},

	{ "APC",
	  "Back-UPS",
	  "APC Back-UPS (940-0095A/C cable)",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_RNG, 0,			/* online: RNG off		*/
	  TIOCM_CD, TIOCM_CD,		/* low battery: CD on		*/
	  TIOCM_RTS 			/* shutdown: RTS		*/
	},

	{ "APC",
	  "Back-UPS",
	  "APC Back-UPS (940-0020B cable)",
	  TIOCM_RTS,			/* cable power: RTS		*/
	  TIOCM_CTS, 0,			/* online: CTS off		*/
	  TIOCM_CD, TIOCM_CD,		/* low battery: CD on		*/
	  TIOCM_DTR|TIOCM_RTS		/* shutdown: DTR + RTS		*/
	},

	{ "PowerTech",
	  "Comp1000",
	  "PowerTech Comp1000 with DTR as cable power",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_CTS, 0,			/* online: CTS off		*/
	  TIOCM_CD, TIOCM_CD,		/* low battery: CD on		*/
	  TIOCM_DTR | TIOCM_RTS		/* shutdown: DTR + RTS		*/
	},

	{ "Generic",
	  "Generic RUPS model",
	  "Generic RUPS model",
	  TIOCM_RTS,			/* cable power: RTS		*/
	  TIOCM_CTS, TIOCM_CTS,		/* online: CTS on		*/
	  TIOCM_CD, 0,			/* low battery: CD off		*/
	  0				/* shutdown: drop RTS		*/
	},

	{ "TrippLite",
	  "Internet Office Series",
	  "Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable)",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_CTS, TIOCM_CTS,		/* online: CTS on		*/
	  TIOCM_CD, 0,			/* low battery: CAR off		*/
	  TIOCM_DTR | TIOCM_RTS		/* shutdown: DTR + RTS		*/
	},

	{ "Best",
	  "Patriot",
	  "Best Patriot (INT51 cable)",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_CTS, TIOCM_CTS,		/* online: CTS on		*/
	  TIOCM_CD, 0,			/* low battery: CD off		*/
	  TIOCM_RTS			/* shutdown: set RTS		*/
	},

	{ "CyberPower",
	  "Power99",
	  "CyberPower Power99", 
	  TIOCM_RTS,			/* cable power: RTS		*/
	  TIOCM_CTS, TIOCM_CTS,		/* online: CTS on		*/
	  TIOCM_CD, 0,			/* low battery: CD off		*/
	  TIOCM_DTR			/* shutdown: set DTR		*/
	},

        { "Nitram",
          "Elite UPS",
          "Nitram Elite 500",
          TIOCM_DTR,			/* cable power: DTR		*/
          TIOCM_CTS, TIOCM_CTS,		/* online: CTS on		*/
          TIOCM_CD, 0,			/* low battery: CD off		*/
          -1				/* shutdown: unknown		*/
        },

	{ "APC",
	  "Back-UPS",
	  "APC Back-UPS (940-0023A cable)",
	  0,				/* cable power: none		*/
	  TIOCM_CD, 0,			/* online: CD off		*/
	  TIOCM_CTS, TIOCM_CTS,		/* low battery: CTS on		*/
	  TIOCM_RTS			/* shutdown: RTS		*/
	},
   
	{ "Victron",
	  "Lite",
	  "Victron Lite (crack cable)",
	  TIOCM_RTS,                    /* cable power: RTS             */
	  TIOCM_CTS, TIOCM_CTS,         /* online: CTS on               */
	  TIOCM_CD, 0,                  /* low battery: CD off          */
	  TIOCM_DTR                     /* shutdown: DTR                */
 	},

        
	{ "Powerware",
	  "3115",
	  "Powerware 3115",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_CTS, 0,			/* online: CTS off		*/
	  TIOCM_CD, 0,			/* low battery: CD off		*/
	  TIOCM_ST			/* shutdown: ST			*/
	},

	{ "APC",
	  "Back-UPS Office",
	  "APC Back-UPS Office (940-0119A cable)",
	  TIOCM_RTS,			/* cable power: RTS		*/
	  TIOCM_CTS, 0,			/* online: CTS off		*/
	  TIOCM_CD, TIOCM_CD,		/* low battery: CD on		*/
	  TIOCM_DTR			/* shutdown: raise DTR		*/
	},
	
        { "RPT",
          "Repoteck",
	  "Repoteck RPT-800A, RPT-162A",
	  TIOCM_DTR | TIOCM_RTS,	/* cable power: DTR + RTS	*/
	  TIOCM_CD, TIOCM_CD,		/* On-line : DCD on		*/
	  TIOCM_CTS, 0,			/* Battery low: CTS off		*/
	  TIOCM_ST			/* shutdown: TX BREA		*/
	},

	{ "Online",
	   "P250, P500, P750, P1250",
	   "Online P-series",
	   TIOCM_DTR,			/* cable power: DTR		*/
	   TIOCM_CD, TIOCM_CD,		/* online: CD high		*/
	   TIOCM_CTS, 0,		/* low battery: CTS low		*/
	   TIOCM_RTS			/* shutdown: raise RTS		*/
	},

	{ "Powerware",
	  "5119",
	  "Powerware 5119",
	  TIOCM_DTR,			/* cable power: DTR		*/
	  TIOCM_CTS, TIOCM_CTS,		/* online: CTS high		*/
	  TIOCM_CD, 0,			/* low battery: CD low		*/
	  TIOCM_ST			/* shutdown: ST (break)		*/
	},

	/* add any new entries directly above this line */
          
	{ NULL,
	  NULL,
	  NULL,
	  0,
	  0, 0,
	  0, 0,
	  0
	}
};