nut/docs/man/libnutclient_devices.3

121 lines
2.8 KiB
Groff
Raw Normal View History

2013-11-24 15:00:12 +00:00
'\" t
.\" Title: libnutclient_devices
2022-06-29 10:37:36 +00:00
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 04/26/2022
2013-11-24 15:00:12 +00:00
.\" Manual: NUT Manual
2022-06-29 10:37:36 +00:00
.\" Source: Network UPS Tools 2.8.0
2013-11-24 15:00:12 +00:00
.\" Language: English
.\"
2022-06-29 10:37:36 +00:00
.TH "LIBNUTCLIENT_DEVICES" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual"
2013-11-24 15:00:12 +00:00
.\" -----------------------------------------------------------------
.\" * 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_devices, nutclient_get_devices, nutclient_has_device, nutclient_get_device_description \- Device 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
2022-06-29 10:37:36 +00:00
typedef char** strarr;
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
strarr nutclient_get_devices(NUTCLIENT_t client);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
int nutclient_has_device(NUTCLIENT_t client, const char* dev);
2022-06-29 10:37:36 +00:00
.fi
.sp
.nf
2013-11-24 15:00:12 +00:00
char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage devices\&.
.sp
2022-06-29 10:37:36 +00:00
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
\fBnutclient_get_devices()\fR
function retrieves the list of devices monitored by a client\&.
.sp
The returned strarr must be freed by
\fIstrarr_free\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
\fBnutclient_has_device()\fR
function tests if a device is monitored by a client\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The
\fBnutclient_get_device_description()\fR
function retrieves the device description\&.
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
The returned description string must be freed\&.
.RE
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
Common arguments:
2013-11-24 15:00:12 +00:00
.sp
2022-06-29 10:37:36 +00:00
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIdev\fR
is the device name\&.
.RE
2013-11-24 15:00:12 +00:00
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_commands\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3) \fBlibnutclient_variables\fR(3)