1
.TH UPSCLI_GETLIST 3 "Sun Oct 6 2002" "" "Network UPS Tools (NUT)"
3
upscli_getlist \- retrieve a variable list from a UPS
6
.B #include <upsclient.h>
8
.BI "int upscli_getlist(UPSCONN *ups, const char *upsname, "
9
.BI " int listtype, char *buf, size_t buflen);"
12
The \fBupscli_getlist()\fP function takes the pointer \fIups\fP to a
13
UPSCONN state structure and generates a request for a list of type
14
\fIlisttype\fP on the UPS called \fIupsname\fP.
16
The \fIlisttype\fP may be one of the following values:
19
\fBUPSCLI_LIST_VARS\fP - all variables ("LISTVARS")
20
\fBUPSCLI_LIST_RW\fP - only read/write variables ("LISTRW")
21
\fBUPSCLI_LIST_CMDS\fP - instant commands ("LISTINSTCMDS")
24
Upon success, up to \fIbuflen\fP bytes of the response will be copied
25
into the character array \fIbuf\fP.
28
This function is provided for compatibility with older versions of
29
\fBupsd\fP and will be removed at some point in the future. It also
30
only operates with older variable names like STATUS and command names
31
like OFF. To use new names like ups.status or load.off, use
32
\fBupscli_list_start\fP(3) and \fBupscli_list_next\fP(3).
35
The \fBupscli_getlist()\fP function returns 0 on success, or -1 if an
38
.BR upscli_getvar "(3), " upscli_strerror "(3), "upscli_upserror "(3) "