~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to man/upscli_getlist.3

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-07-20 19:48:50 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050720194850-oo61wjr33rrx2mre
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH UPSCLI_GETLIST 3 "Sun Oct  6 2002" "" "Network UPS Tools (NUT)"
2
 
.SH NAME
3
 
upscli_getlist \- retrieve a variable list from a UPS
4
 
.SH SYNOPSIS
5
 
.nf
6
 
.B #include <upsclient.h>
7
 
.sp
8
 
.BI "int upscli_getlist(UPSCONN *ups, const char *upsname, "
9
 
.BI "                   int listtype, char *buf, size_t buflen);"
10
 
.fi
11
 
.SH DESCRIPTION
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.
15
 
.PP
16
 
The \fIlisttype\fP may be one of the following values:
17
 
.PP
18
 
.nf
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")
22
 
.fi
23
 
 
24
 
Upon success, up to \fIbuflen\fP bytes of the response will be copied
25
 
into the character array \fIbuf\fP.
26
 
.PP
27
 
.SH OLD FUNCTION
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).
33
 
.PP
34
 
.SH "RETURN VALUE"
35
 
The \fBupscli_getlist()\fP function returns 0 on success, or -1 if an
36
 
error occurs.
37
 
.SH "SEE ALSO"
38
 
.BR upscli_getvar "(3), " upscli_strerror "(3), "upscli_upserror "(3) "