UPSTAB(5)

NAME
upstab - UPS capability data base

DESCRIPTION
upstab is a data base describing UPS used for bkpupsd(8). upstab based on termcap(5) style format, consist of a number of `:'-separated fields. The first entry for each UPS gives the names that are known for the UPS, separated by `|' characters. The first name given is the most common abbreviation for the UPS. The last name given should be a long name fully identifying the UPS, and all others are understood as synonyms for the UPS name. All names but the last should be in lower case and contain no blanks; the last name may well contain upper case characters and blanks for readability.

CAPABILITIES
The characters in the Notes field in the table have the following meanings and

    s	indicated status is set by program
    r	indicated status is read from UPS

Name Type Note Description
init | str | s | Initilize UPS.
status | str | r | UPS ready status.
line | str | r | line lost status.
low | str | r | battery low status.
sleep | str | s | make UPS in sleep mode.
noaction | bool |  | Don't set status for UPS.
timeout | bool |  | Use timeout, don't wait for battery low.
kernel | bool |  | Use kernel supported serial port control when shutdown.

Each string type capabilities represent which modem bits check or set. modem bit strings are separated by comma, it is set or reset by its order when setting serial port.

Each modem bit string are preceeded by plus (+) or minus (-) character. `+' means the bit will be set or check the bit has set, `-' means the bit will be reset or check the bit hasn't set.

Supported modem bits are represented as following strings.

Name Note Description
CTS |  | Clear To Send
DSR |  | Data Set Ready
DTR |  | Data Terminal Ready
LE | r | Line Enable
RNG |  | Ring
RTS |  | Request To Send
SR | r | Secondary Receive
ST | r | Secondary Transmit

If Notes field in the table has `r', the bit should be used for showing status by bkpupsd(8) only, and shouldn't be used for upstab.

EXAMPLE
A simple example is here:

    bkpro|BK Pro with 940-0095A:\
    	:init=-RTS,+DTR:status=-RTS,-DTR,+DTR:line=+RNG:low=+CAR:\
    	:sleep=-DTR,+DTR,-RTS:

In this case, reset DTR then set DTR on startup. Reset RTS, DTR then set DTR before get serial port status. And check the status; line power lost if RNG is set, battery is low if CAR is set. Reset DTR, set DTR then reset RTS sequence make UPS in sleep mode.

    freqf|FreqUPS F seriese:\
    	:init=-DTR,-RTS,+RTS:startup=+CTS,+CAR:line=-CTS:low=-CAR:\
    	:sleep=+DTR:

In this case, after setting serial port on startup, then wait for CTS and CAR are set.

FILES

/usr/pkg/etc/upstab

SEE ALSO
getcap(3)

BUGS
Not all of modem bits could be really set to UPS from bkpupsd(8).

AUTHOR
upstab is written by Takahiro Kambe <taca@back-street.net>.

HISTORY
The upstab appeared after FreeBSD 2.2.8, and should works on NetBSD 1.4 and later.