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

« back to all changes in this revision

Viewing changes to man/upscli_get.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:
11
11
.SH DESCRIPTION
12
12
The \fBupscli_get()\fP function takes the pointer \fIups\fP to a
13
13
UPSCONN state structure, and the pointer \fIquery\fP to an array of
14
 
\fInumq\fP query elements.  It builds a properly-formatted request from
 
14
\fInumq\fP query elements.  It builds a properly\(hyformatted request from
15
15
those elements and transmits it to \fBupsd\fP(8).
16
16
.PP
17
17
Upon success, the response will be split into separate components.  A
23
23
result, you can use it to request many different things from the server.
24
24
Some examples are:
25
25
.PP
26
 
 - GET NUMLOGINS <ups>
27
 
 - GET UPSDESC <ups>
28
 
 - GET VAR <ups> <var>
29
 
 - GET TYPE <ups> <var>
30
 
 - GET DESC <ups> <var>
31
 
 - GET CMDDESC <ups> <cmd>
 
26
 \(hy GET NUMLOGINS <ups>
 
27
 \(hy GET UPSDESC <ups>
 
28
 \(hy GET VAR <ups> <var>
 
29
 \(hy GET TYPE <ups> <var>
 
30
 \(hy GET DESC <ups> <var>
 
31
 \(hy GET CMDDESC <ups> <cmd>
32
32
 
33
33
.SH QUERY FORMATTING
34
34
To generate a request for "GET NUMLOGINS su700", you would populate
64
64
\fBupsd\fP.  For example, if you send "VAR" "su700" "ups.status", it
65
65
will expect to see those at the beginning of the response. 
66
66
.PP
67
 
If the results from \fBupsd\fP do not pass this case-insensitive test
 
67
If the results from \fBupsd\fP do not pass this case\(hyinsensitive test
68
68
against your request, this function will return an error.   When this
69
69
happens, \fBupscli_upserror\fP(3) will return \fIUPSCLI_ERR_PROTOCOL\fP.
70
70
.PP
84
84
access after that point is also undefined.
85
85
.PP
86
86
.SH "RETURN VALUE"
87
 
The \fBupscli_get()\fP function returns 0 on success, or -1 if an
 
87
The \fBupscli_get()\fP function returns 0 on success, or \-1 if an
88
88
error occurs.
89
89
.SH "SEE ALSO"
90
90
.BR upscli_list_start "(3), " upscli_list_next "(3), "