2013-11-24 17:00:12 +02:00
'\" t
. \" Title: libnutclient_commands
. \" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
2015-04-30 16:53:36 +03:00
. \" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
2016-07-18 03:11:41 +03:00
. \" Date: 03/02/2016
2013-11-24 17:00:12 +02:00
. \" Manual: NUT Manual
2016-07-18 03:11:41 +03:00
. \" Source: Network UPS Tools 2.7.3.1
2013-11-24 17:00:12 +02:00
. \" Language: English
. \"
2016-07-18 03:11:41 +03:00
.TH "LIBNUTCLIENT_COMMAND" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual"
2013-11-24 17:00:12 +02: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_commands, nutclient_get_device_commands, nutclient_has_device_command, nutclient_get_device_command_description, nutclient_execute_device_command \- Instant command 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_commands(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd);
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage instant commands of devices\& .
.sp
The \fB nutclient_get_device_commands()\fR function retrieve the list of command names for a device\& . The returned strarr must be freed by \fI strarr_free\fR \& .
.sp
The \fB nutclient_has_device_command\fR function test if the specified command is supported by the device\& . Return 1 is supported and 0 if not\& .
.sp
The \fB nutclient_get_device_command_description\fR function retrieve the command description, if any\& . The resturned string must be freed\& .
.sp
The \fB nutclient_execute_device_command\fR intend to execute the instant command\& .
.sp
\fI dev\fR is the device name\& .
.sp
\fI cmd\fR is the instant command name\& .
.SH "SEE ALSO"
.sp
\fB libnutclient\fR (3) \fB libnutclient_devices\fR (3) \fB libnutclient_general\fR (3)