Add hexN output mode

Adds support for hexN mode where N is a number in the range 1 to 4096
which defines how many hex values will be printed before a line break.

In short, it defines the width of the hex output.

In this mode, if timestamps are enabled they will be added to each hex
line.
This commit is contained in:
Martin Lund 2024-04-27 15:22:41 +02:00
parent 4113a072c2
commit 42ff234204
5 changed files with 151 additions and 22 deletions

View file

@ -119,7 +119,7 @@ Options:
-n, --no-reconnect Do not reconnect
-e, --local-echo Enable local echo
--input-mode normal|hex|line Select input mode (default: normal)
--output-mode normal|hex Select output mode (default: normal)
--output-mode normal|hex|hexN Select output mode (default: normal, N <= 4096)
-t, --timestamp Enable line timestamp
--timestamp-format <format> Set timestamp format (default: 24hour)
--timestamp-timeout <ms> Set timestamp timeout (default: 200)