Add timeout based timestamps in hex output mode

This change reintroduces timestamping in hex output mode but based on
timeout instead of new lines which made no sense. This means that
timestamps will only be printed when timeout time has elapsed with no
output activity from serial device.

Adds option --timestamp-timeout <ms> for setting the timeout value in
milliseconds.

Defaults to 200 ms.
This commit is contained in:
Martin Lund 2024-04-18 15:45:50 +02:00
parent a8e0d2693d
commit 6fff4939e4
8 changed files with 76 additions and 20 deletions

View file

@ -43,7 +43,8 @@ when used in combination with [tmux](https://tmux.github.io).
* Pulse serial lines with configurable pulse duration
* Local echo support
* Remapping of characters (nl, cr-nl, bs, lowercase to uppercase, etc.)
* Line timestamps
* Per line timestamps in normal output mode
* Timeout based timestamps in hex output mode
* Support for delayed output per character
* Support for delayed output per line
* Switchable independent input and output mode (normal vs hex)
@ -94,6 +95,7 @@ Options:
--output-mode normal|hex Select output mode (default: normal)
-t, --timestamp Enable line timestamp
--timestamp-format <format> Set timestamp format (default: 24hour)
--timestamp-timeout <ms> Set timestamp timeout (default: 200)
-L, --list-devices List available serial devices by ID
-l, --log Enable log to file
--log-file <filename> Set log filename