1LIBNUTCLIENT_COMMAND(3)           NUT Manual           LIBNUTCLIENT_COMMAND(3)
2
3
4

NAME

6       libnutclient_commands, nutclient_get_device_commands,
7       nutclient_has_device_command, nutclient_get_device_command_description,
8       nutclient_execute_device_command - Instant command related functions in
9       Network UPS Tools high-level client access library
10

SYNOPSIS

12       #include <nutclient.h>
13
14       typedef void* NUTCLIENT_t;
15
16       typedef char** strarr;
17
18       strarr nutclient_get_device_commands(
19               NUTCLIENT_t client,
20               const char* dev);
21
22       int nutclient_has_device_command(
23               NUTCLIENT_t client,
24               const char* dev, const char* cmd);
25
26       char* nutclient_get_device_command_description(
27               NUTCLIENT_t client,
28               const char* dev, const char* cmd);
29
30       void nutclient_execute_device_command(
31               NUTCLIENT_t client,
32               const char* dev, const char* cmd,
33               const char* param="");
34

DESCRIPTION

36       These functions allow to manage instant commands of devices.
37
38       •   The nutclient_get_device_commands() function retrieves the list of
39           command names for a device.
40
41           The returned strarr must be freed by strarr_free.
42
43       •   The nutclient_has_device_command function tests if the specified
44           command is supported by the device.
45
46           Return 1 is supported and 0 if not.
47
48       •   The nutclient_get_device_command_description function retrieves the
49           command description, if any.
50
51           The returned string must be freed.
52
53       •   The nutclient_execute_device_command intends to execute the instant
54           command, with an optional parameter.
55
56       Common arguments:
57
58dev is the device name.
59
60cmd is the instant command name.
61

SEE ALSO

63       libnutclient(3) libnutclient_devices(3) libnutclient_general(3)
64
65
66
67Network UPS Tools 2.8.0           04/26/2022           LIBNUTCLIENT_COMMAND(3)
Impressum