2 * safenet.h - defines/macros for the safenet driver
4 * Copyright (C) 2003 Arjen de Korte <adkorte-guest@alioth.debian.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
22 * The following commands where traced on the serial port. From these, the
23 * COM_POLL_STAT command is just an example of how this command looks.
24 * Inside the driver, we'll overwrite the default with specially crafted
25 * 'random' data (see the comments).
27 #define COM_INITIALIZE "ZCADLIOPERJD\r"
28 #define COM_MAINS_TEST "ZFSDERBTRFGY\r"
29 #define COM_BATT_TEST "ZAVLEJFICOPR\r"
30 #define COM_STOP_TEST "ZGWLEJFICOPR\r"
31 #define COM_TOGGLE_BEEP "ZELWSABPMBEQ\r"
32 #define COM_POLL_STAT "ZHDGFGDJELBC\r"
35 * The following command is "ZBASdddWLPGE\r", where 'ddd' equals the number of
36 * seconds delay before the UPS switches off. Value must be greater than or
37 * equal to 1. Mapping of the numerals is 0=A, 1=B, 2=C, etc.
39 #define SHUTDOWN_RETURN "ZBASAAAWLPGE\r" /* shutdown in 1 second */
42 * The following commands are "ZAFdddRrrrrO\r", where 'ddd' equals the number
43 * of seconds delay before the UPS switches off and 'rrrr' the number of
44 * minutes before it restarts. Both values must be greater than or equal to 1.
45 * Mapping of the numerals is 0=A, 1=B, 2=C, etc.
47 #define SHUTDOWN_REBOOT "ZAFAAARAAAAO\r" /* shutdown in 1 second, return after 1 minute */