1LIBNUTCLIENT_VARIABL(3) NUT Manual LIBNUTCLIENT_VARIABL(3)
2
3
4
6 libnutclient_variables, nutclient_get_device_variables,
7 nutclient_get_device_rw_variables, nutclient_has_device_variable,
8 nutclient_get_device_variable_description,
9 nutclient_get_device_variable_values,
10 nutclient_set_device_variable_value,
11 nutclient_set_device_variable_values - Variable related functions in
12 Network UPS Tools high-level client access library
13
15 #include <nutclient.h>
16
17 typedef void* NUTCLIENT_t;
18
19 typedef char** strarr;
20
21 strarr nutclient_get_device_variables(NUTCLIENT_t client,
22 const char* dev);
23
24 strarr nutclient_get_device_rw_variables(NUTCLIENT_t client,
25 const char* dev);
26
27 int nutclient_has_device_variable(NUTCLIENT_t client,
28 const char* dev, const char* var);
29
30 char* nutclient_get_device_variable_description(NUTCLIENT_t client,
31 const char* dev, const char* var);
32
33 strarr nutclient_get_device_variable_values(NUTCLIENT_t client,
34 const char* dev, const char* var);
35
36 void nutclient_set_device_variable_value(NUTCLIENT_t client,
37 const char* dev, const char* var, const char* value);
38
39 void nutclient_set_device_variable_values(NUTCLIENT_t client,
40 const char* dev, const char* var, const strarr values);
41
43 These functions allow to manage variables of devices.
44
45 The nutclient_get_device_variables() function retrieves the list of
46 variables names for a device. The returned strarr must be freed by
47 strarr_free.
48
49 The nutclient_get_device_rw_variables function retrieves the list of
50 read-write variables names for a device. The returned strarr must be
51 freed by strarr_free.
52
53 The nutclient_has_device_variable function tests if the specified
54 variable is supported by the device. Return 1 is supported and 0 if
55 not.
56
57 The nutclient_get_device_variable_description function retrieves the
58 variable description, if any. The returned string must be freed.
59
60 The nutclient_get_device_variable_values returns variable values
61 (generally only one). The returned strarr must be freed by strarr_free.
62
63 The nutclient_set_device_variable_value intends to set the value of the
64 specified variable.
65
66 The nutclient_set_device_variable_values intends to set multiple values
67 of the specified variable.
68
69 Common arguments:
70
71 • dev is the device name.
72
73 • var is the variable name.
74
75 • value is the variable value.
76
77 • values is the variable array of values.
78
80 libnutclient(3) libnutclient_devices(3) libnutclient_general(3)
81
82
83
84Network UPS Tools 2.8.0 04/26/2022 LIBNUTCLIENT_VARIABL(3)