1
/* bcmxcp.h -- header for (BCM/XCP) protocol module
3
* Copyright (c) 2002, Martin Schroeder
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
11
* 1. Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
* 3. Neither the name of Martin Schroeder nor the names of his contributors
17
* may be used to endorse or promote products derived from this software
18
* without specific prior written permission.
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
41
char *FreqTol[3] = {"+/-2%", "+/-5%", "+/-7"};
42
char *ABMStatus[4] = {"Charging", "Discharging", "Floating", "Resting"};
44
#define PW_MAX_TRY 3 /* How often we try to get valid data from the ups in */
45
/* case of a read error */
61
#define PW_COMMAND_START_BYTE 0xAB
64
#define PW_SYSTEM_INFO1 0x31 /* Model name, ... */
65
#define PW_SYSTEM_MODE 0x33 /* On Line, On Bypass, ... */
66
#define PW_SYSTEM_STATUS 0x34 /* Current UPS status (Load, utility,...) */
67
#define PW_SYSTEM_INFO2 0x36 /* Model serial#, ... */
68
#define PW_ABM_STATUS 0x3B /* Charging, floating, ... */
69
#define PW_SYSTEM_SETTINGS 0x3C /* Configuration (Bypass thresholds,...) */
72
#endif /* _POWERWARE_H */