mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
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
This commit is contained in:
parent
a75e04b883
commit
e837fd0303
9 changed files with 143 additions and 7 deletions
|
|
@ -46,6 +46,7 @@ when used in combination with [tmux](https://tmux.github.io).
|
|||
* Activate sub-configurations by name or pattern
|
||||
* Redirect I/O to file or IPv4/v6 network socket for scripting or TTY sharing
|
||||
* Pipe input and/or output
|
||||
* Support for simple line request/response handling
|
||||
* Bash completion
|
||||
* Color support
|
||||
* Remapping of prefix key
|
||||
|
|
@ -87,6 +88,8 @@ The command-line interface is straightforward as reflected in the output from
|
|||
-c, --color 0..255|bold|none|list Colorize tio text (default: bold)
|
||||
-S, --socket <socket> Redirect I/O to file or network socket
|
||||
-x, --hexadecimal Enable hexadecimal mode
|
||||
-r, --response-wait Wait for line response then quit
|
||||
--response-timeout <ms> Response timeout (default: 100)
|
||||
-v, --version Display version
|
||||
-h, --help Display help
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue