~iheino+ub/+junk/nut-upsconf-docfix

« back to all changes in this revision

Viewing changes to docs/man/nutscan_get_serial_ports_list.txt

  • Committer: Tuomas Heino
  • Author(s): Laurent Bigonville
  • Date: 2014-04-22 20:46:12 UTC
  • Revision ID: iheino+ub@cc.hut.fi-20140422204612-1x2gh3nkezfsdao4
Tags: upstream-2.7.2
ImportĀ upstreamĀ versionĀ 2.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
NUTSCAN_GET_SERIAL_PORTS_LIST(3)
 
2
================================
 
3
 
 
4
NAME
 
5
----
 
6
 
 
7
nutscan_get_serial_ports_list - Get a port list name from a range of port.
 
8
 
 
9
SYNOPSIS
 
10
--------
 
11
 
 
12
 #include <nut-scan.h>
 
13
 
 
14
 char ** nutscan_get_serial_ports_list(const char *ports_range);
 
15
 
 
16
DESCRIPTION
 
17
-----------
 
18
 
 
19
The *nutscan_get_serial_ports_list()* function returns a null terminated array of string generated from a port range.
 
20
'ports_range' may be one of:
 
21
 
 
22
 - a single character from 0 to 9 or a to z representing a serial communication port depending on the operating system. For instance "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; "1" is converted to COM1 on Windows; "c" is converted to /dev/ttyc on solaris...
 
23
 - a range of character in the form "X-Y". For instance "0-1" will be converted to /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0 and /dev/ttyUSB1 on Linux; "1-3" will be converted to COM1, COM2 and COM3 on Windows; "a-c" will be converted to /dev/ttya, /dev/ttyb and /dev/ttyc on Solaris.
 
24
 - a single port name (/dev/ttyS5, COM4...).
 
25
 - a list of port names separated with comas : "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"...
 
26
 
 
27
The returned array can be used in a call to *nutscan_scan_eaton_serial* to get the serial device on a system.
 
28
 
 
29
RETURN VALUE
 
30
------------
 
31
 
 
32
The *nutscan_get_serial_ports_list()* function returns NULL if an error occured (invalid port range) or a pointer to a nll terminated array of string on success.
 
33
 
 
34
SEE ALSO
 
35
--------
 
36
linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], 
 
37
linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], 
 
38
linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], 
 
39
linkman:nutscan_scan_eaton_serial[3],
 
40
linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3]