tio/src
Martin Lund e837fd0303 Add line response feature
Add a simple line response feature to make it possible to send e.g. a
command string to your serial device and easily receive and parse a line
response.

This is a convenience feature for simple request/response interaction
based on lines. For more advanced interaction the socket feature should
be used instead.

The line response feature is detailed via the following options:

 -r, --response-wait

Wait for line response then quit. A line is considered any string ending
with either CR or NL character. If no line is received tio will quit
after response timeout.

Any tio text is automatically muted when piping a string to tio while in
response mode to make it easy to parse the response.

 --response-timeout <ms>

Set timeout [ms] of line response (default: 100).

Example:

Sending a string (SCPI command) to a test instrument (Korad PSU) and
print line response:

 $ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
 KORAD KD3305P V4.2 SN:32477045
2022-08-15 19:58:28 +02:00
..
bash-completion Add line response feature 2022-08-15 19:58:28 +02:00
configfile.c Add line response feature 2022-08-15 19:58:28 +02:00
configfile.h Fix command-line tty-device|config parsing 2022-06-11 22:56:03 +02:00
error.c Cleanup error printing routines 2022-07-11 23:18:19 +02:00
error.h Cleanup error printing routines 2022-07-11 23:18:19 +02:00
log.c Enable line buffering of log 2022-07-23 09:53:12 +02:00
log.h Cleanup log code 2022-06-22 00:22:18 +02:00
main.c Add line response feature 2022-08-15 19:58:28 +02:00
meson.build Simplify arbitrary baudrate code 2022-07-12 12:09:09 +02:00
misc.c Rework toggle and pulse feature to support all lines 2022-07-19 12:54:40 +02:00
misc.h Add support for remapping prefix key 2022-07-15 12:18:40 +02:00
options.c Add line response feature 2022-08-15 19:58:28 +02:00
options.h Add line response feature 2022-08-15 19:58:28 +02:00
print.c Cleanup 2022-07-25 12:48:20 +02:00
print.h Add line response feature 2022-08-15 19:58:28 +02:00
setspeed.c Add missing include 2022-07-12 22:27:42 +02:00
setspeed.h Simplify arbitrary baudrate code 2022-07-12 12:09:09 +02:00
signals.c Quit from non-interactive mode using ctrl-c 2022-07-20 18:18:16 +02:00
signals.h Handle SIGHUP 2022-03-18 19:19:11 +01:00
socket.c Cleanup error printing routines 2022-07-11 23:18:19 +02:00
socket.h Add support for external control via a Unix domain socket. 2022-04-18 14:06:33 -07:00
tty.c Add line response feature 2022-08-15 19:58:28 +02:00
tty.h Change 'ctrl-t T' to 'ctrl-t t' for timestamp toggle 2022-07-15 12:26:36 +02:00