nut/docs/man/libnutclient_variables.3

79 lines
3.7 KiB
Groff
Raw Normal View History

2013-11-24 15:00:12 +00:00
'\" t
.\" Title: libnutclient_variables
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_VARIABL" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
libnutclient_variables, nutclient_get_device_variables, nutclient_get_device_rw_variables, nutclient_has_device_variable, nutclient_get_device_variable_description, nutclient_get_device_variable_values, nutclient_set_device_variable_value, nutclient_set_device_variable_values \- Variable related functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev);
strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var);
char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var);
strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var);
void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value);
void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage variables of devices\&.
.sp
The \fBnutclient_get_device_variables()\fR function retrieve the list of variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_get_device_rw_variables\fR function retrieve the list of read\-write variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_has_device_variable\fR function test if the specified variable is supported by the device\&. Return 1 is supported and 0 if not\&.
.sp
The \fBnutclient_get_device_variable_description\fR function retrieve the variable description, if any\&. The resturned string must be freed\&.
.sp
The \fBnutclient_get_device_variable_values\fR returns variable values (generally only one)\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_set_device_variable_value\fR intend to set the value of the specified variable\&.
.sp
The \fBnutclient_set_device_variable_values\fR intend to set multiple values of the specified variable\&.
.sp
\fIdev\fR is the device name\&.
.sp
\fIvar\fR is the variable name\&.
.sp
\fIvalue\fR is the variable value\&.
.sp
\fIvalues\fR is the variable array of values\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3)