Skip to content

Commit 459d815

Browse files
committed
man: Add missing man pages
Add man pages for iio_genxml, iio_stresstest and iiod. The CMake code will also process the templates of the utilities enabled in the config, instead of hardcoding a list in the script. Signed-off-by: Paul Cercueil <[email protected]>
1 parent d8d66ef commit 459d815

File tree

4 files changed

+236
-9
lines changed

4 files changed

+236
-9
lines changed

man/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ if (WITH_MAN)
3030
message(FATAL_ERROR "Can not build html DOC from man without man2html")
3131
endif()
3232
message(STATUS "Building html doc pages with man2html")
33-
file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man3)
33+
file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man1 ${CMAKE_HTML_DEST_DIR}/man3)
3434
execute_process(
3535
COMMAND ${MAN2HTML} -r
3636
INPUT_FILE ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/libiio.3
3737
OUTPUT_FILE ${CMAKE_HTML_DEST_DIR}/man3/libiio.3.html
3838
)
3939
endif()
4040
if (WITH_TESTS)
41-
list(APPEND MAN1 iio_attr.1 iio_info.1 iio_readdev.1 iio_reg.1 iio_writedev.1)
42-
foreach(_page ${MAN1})
41+
foreach(_page ${IIO_TESTS_TARGETS})
4342
execute_process(
4443
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_util_pages.sh
4544
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_page}.1.in
@@ -49,18 +48,23 @@ if (WITH_MAN)
4948
${CMAKE_CURRENT_BINARY_DIR}/${_page}.1.in
5049
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/${_page}.1 @ONLY
5150
)
52-
endforeach()
53-
if (WITH_DOC)
54-
file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man1)
55-
foreach(_page ${MAN1})
51+
52+
if (WITH_DOC)
5653
execute_process(
5754
COMMAND ${MAN2HTML} -r
5855
INPUT_FILE ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/${_page}
5956
OUTPUT_FILE ${CMAKE_HTML_DEST_DIR}/man1/${_page}.html
6057
)
61-
endforeach()
62-
endif()
58+
endif()
59+
endforeach()
6360
endif()
61+
62+
if (WITH_IIOD)
63+
configure_file(iiod.1.in
64+
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/iiod.1 @ONLY
65+
)
66+
endif()
67+
6468
# install man files into the BINARY directories,
6569
# section 3 = library functions
6670
install(DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}

man/iio_genxml.1.in

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.\" Copyright (c) 2018-2020 Robin Getz
2+
.\" Copyright (c) 2018-2020 Analog Devices Inc.
3+
.\"
4+
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5+
.\" This is free documentation; you can redistribute it and/or
6+
.\" modify it under the terms of the GNU General Public License as
7+
.\" published by the Free Software Foundation; either version 2 of
8+
.\" the License, or (at your option) any later version.
9+
.\"
10+
.\" The GNU General Public License's references to "object code"
11+
.\" and "executables" are to be interpreted as the output of any
12+
.\" document formatting or typesetting system, including
13+
.\" intermediate and printed output.
14+
.\"
15+
.\" This manual is distributed in the hope that it will be useful,
16+
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
.\" GNU General Public License for more details.
19+
.\"
20+
.\" You should have received a copy of the GNU General Public
21+
.\" License along with this manual; if not, see
22+
.\" <http://www.gnu.org/licenses/>.
23+
.\" %%%LICENSE_END
24+
.\"
25+
.TH iio_genxml 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
26+
.IX iio_genxml
27+
.SH NAME
28+
iio_genxml \- Generate XML representation of a Libiio context
29+
.SH SYNOPSIS
30+
.B iio_genxml
31+
[
32+
.I options
33+
]
34+
35+
.SH DESCRIPTION
36+
.B iio_genxml
37+
is a utility for generating a XML representation of a Libiio context.
38+
39+
.SH OPTIONS
40+
##COMMON_COMMANDS_START##
41+
##COMMON_COMMANDS_STOP##
42+
##COMMON_OPTION_START##
43+
##COMMON_OPTION_STOP##
44+
45+
.SH RETURN VALUE
46+
If the specified device is not found, a non-zero exit code is returned.

man/iio_stresstest.1.in

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.\" Copyright (c) 2018-2020 Robin Getz
2+
.\" Copyright (c) 2018-2020 Analog Devices Inc.
3+
.\"
4+
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5+
.\" This is free documentation; you can redistribute it and/or
6+
.\" modify it under the terms of the GNU General Public License as
7+
.\" published by the Free Software Foundation; either version 2 of
8+
.\" the License, or (at your option) any later version.
9+
.\"
10+
.\" The GNU General Public License's references to "object code"
11+
.\" and "executables" are to be interpreted as the output of any
12+
.\" document formatting or typesetting system, including
13+
.\" intermediate and printed output.
14+
.\"
15+
.\" This manual is distributed in the hope that it will be useful,
16+
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
.\" GNU General Public License for more details.
19+
.\"
20+
.\" You should have received a copy of the GNU General Public
21+
.\" License along with this manual; if not, see
22+
.\" <http://www.gnu.org/licenses/>.
23+
.\" %%%LICENSE_END
24+
.\"
25+
.TH iio_stresstest 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
26+
.IX iio_stresstest
27+
.SH NAME
28+
iio_stresstest \- Stress test program for Libiio
29+
.SH SYNOPSIS
30+
.B iio_stresstest
31+
[
32+
.I options
33+
]
34+
-u <uri>
35+
.SH DESCRIPTION
36+
.B iio_stresstest
37+
is a stress-testing program that can be used to find bugs in Libiio or in the Libiio daemon (IIOD).
38+
39+
40+
.SH OPTIONS
41+
##COMMON_COMMANDS_START##
42+
##COMMON_COMMANDS_STOP##
43+
##COMMON_OPTION_START##
44+
##COMMON_OPTION_STOP##
45+
.TP
46+
.B \-a, \-\-auto
47+
Scan for available contexts and if only one is available use it.
48+
.TP
49+
.B \-T, \-\-timeout <arg>
50+
Context timeout in milliseconds. 0 = no timeout (wait forever)
51+
.TP
52+
.B \-b, \-\-buffer\-size <arg>
53+
Size of the capture buffer. Default is 256.
54+
.TP
55+
.B \-s, \-\-samples <arg>
56+
Number of samples to capture, 0 = infinite. Default is 0.
57+
.TP
58+
.B \-d, \-\-duration <arg>
59+
Time to wait (in seconds) before stopping all threads
60+
.TP
61+
.B \-t, \-\-threads <arg>
62+
Number of threads to use
63+
.TP
64+
.B \-v, \-\-verbose
65+
Increase verbosity (-vv and -vvv for more)
66+
67+
.SH RETURN VALUE
68+
If the specified device is not found, a non-zero exit code is returned.
69+

man/iiod.1.in

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
.\" Copyright (c) 2018-2020 Robin Getz
2+
.\" Copyright (c) 2018-2020 Analog Devices Inc.
3+
.\"
4+
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5+
.\" This is free documentation; you can redistribute it and/or
6+
.\" modify it under the terms of the GNU General Public License as
7+
.\" published by the Free Software Foundation; either version 2 of
8+
.\" the License, or (at your option) any later version.
9+
.\"
10+
.\" The GNU General Public License's references to "object code"
11+
.\" and "executables" are to be interpreted as the output of any
12+
.\" document formatting or typesetting system, including
13+
.\" intermediate and printed output.
14+
.\"
15+
.\" This manual is distributed in the hope that it will be useful,
16+
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
.\" GNU General Public License for more details.
19+
.\"
20+
.\" You should have received a copy of the GNU General Public
21+
.\" License along with this manual; if not, see
22+
.\" <http://www.gnu.org/licenses/>.
23+
.\" %%%LICENSE_END
24+
.\"
25+
.TH iiod 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
26+
.IX iiod
27+
.SH NAME
28+
iiod \- IIO Daemon
29+
.SH SYNOPSIS
30+
.B iiod
31+
[
32+
.I options
33+
]
34+
35+
.SH DESCRIPTION
36+
.B iiod
37+
is a server built on top of Libiio which can share a Libiio context across the
38+
network, USB, or a UART link.
39+
40+
.SH COMMANDS
41+
.TP
42+
.B \-V, \-\-version
43+
Display the version of this program.
44+
.TP
45+
.B \-d, \-\-debug
46+
Use alternative (incompatible) debug interface.
47+
.TP
48+
.B \-D, \-\-demux
49+
Demux channels directly on the server.
50+
.TP
51+
.B \-i, \-\-interactive
52+
Run iiod in the controlling terminal.
53+
.TP
54+
.B \-a, \-\-aio
55+
Use asynchronous I/O.
56+
.TP
57+
.B \-F, \-\-ffs <arg>
58+
Use the given FunctionFS mountpoint to serve over USB.
59+
.TP
60+
.B \-n, \-\-nb\-pipes <arg>
61+
Specify the number of USB pipes (ep couples) to use.
62+
.TP
63+
.B \-s, \-\-serial <arg>
64+
Run iiod on the specified UART.
65+
.TP
66+
.B \-p, \-\-port <arg>
67+
Port to listen on (default = 30431).
68+
Using --port 0 will pick an ephemeral port (dynamic / unused in the range between 32768–60999).
69+
.TP
70+
.B \-u, \-\-uri
71+
The Uniform Resource Identifier
72+
.I (uri)
73+
for connecting to devices, can be one of:
74+
.RS
75+
.IP ip:[address]
76+
network address, either numeric (192.168.0.1) or network hostname
77+
.IP ip:
78+
blank, if compiled with zeroconf support, will find an IIO device on network
79+
.IP usb:[device:port:instance]
80+
normally returned from
81+
.B iio_info -S
82+
.IP serial:[port],[baud],[settings]
83+
which are controlled, and need to match the iiod (or tinyiiod) on the other end of the serial port.
84+
.RS
85+
.IP [port]
86+
is something like '/dev/ttyUSB0' on Linux, and 'COM4' on Windows.
87+
.IP [baud]
88+
is is normally one of 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200 [default], 128000 or 256000, but can vary system to system.
89+
.IP [settings]
90+
would normally be configured as '8n1' this is controlled by:
91+
.RS
92+
.IP data_bits:
93+
(5, 6, 7, 8 [default], or 9)
94+
.IP parity_bits:
95+
('n' none [default], 'o' odd, 'e' even, 'm' mark, or 's' space)
96+
.IP stop_bits:
97+
(1 [default, or 2)
98+
.IP flow_control:
99+
('0' none [default], 'x' Xon Xoff, 'r' RTSCTS, or 'd' DTRDSR)
100+
.RE
101+
.RE
102+
.IP local:
103+
with no address part. This is the default.
104+
.RE
105+
.TP
106+
107+
.SH RETURN VALUE
108+
If the specified device is not found, a non-zero exit code is returned.

0 commit comments

Comments
 (0)