Api command line options – Thinklogical Configuring the TLX ASCII Interface User Manual

Page 7

Advertising
background image

®

Configuring the TLX ASCII Interface

4

Rev. A - July, 2015

API Command Line Options

Each Matrix Switch model has its own API program. Examples are:

tlx48api

,

tlx320api

and

tlx640api

. The generic name that is used in place of the actual name is:

tlxapi

.

The interface program has several options to control its operation. These options can be listed
by running the API program with the option '

--help'

. See the example below:

~ # tlxapi --help

Version: V5.00 (build: 81)

Usage: tlxapi [options]

---- network options ----

-L|--listen[=]port listen on this port, all addresses

(default: 17567)

-N|--connections[=]n set the maximum number of open connections allowed (default: 12)

--mcast[=IP address] replace broadcasts with multicast to this IP address (default: 239.255.13.9)

---- serial options ----

-S|--serial[=device]

use this serial device

(default: /dev/ttymxc1)

--serial=none disables the API serial port /dev/ttymxc1

-B|--baud[=]speed sets serial baud rate

(default: 9600)

---- generic options ----

--CR output CRLF instead of just LF

--facility[=]name syslog facility reporting level

(default is local4)

valid names: auth, daemon, user, local0 through local7

see the man page for rsyslog.conf for more information

-D|--debug write debug messages to the log file (multiple options increase the debug
level)

--api write API messages received to the log file

(level: NOTICE)

--avr write control commands to the log file

(level: NOTICE)

--clog write connection status changes to the log file

(level: NOTICE)

--delay[=]delay in ms, how long an output must remain off, default is 300 ms.

minimum is 50ms, maximum is 1000ms, 0 will disable the delay

-b|--bcast[=]period in ms, how long between port status broadcasts, default is 4000 ms.

minimum is 500, maximum is 15000, 0 will disable the broadcast

if multicast is enabled, it will use this time setting

--bcast=0 will disable BOTH broadcasts and multicasts

-V|--verbose enable error text in responses

-h|--help display this help and exit

-v|--version output version information and exit

Default (no options) is to listen on socket 17567 at all IP addresses

send to socket 27567 at 127.0.0.1

accept commands from the RS232 port

broadcast switch status every 4000 milliseconds

signal SIGUSR1 will toggle api debug logging

(--api)

signal SIGUSR2 will toggle control debug logging

(--avr)

signal SIGHUP will force the API to reread the P2P csv files located in /var/local/router/p2p/

Advertising