/*************
*
* Copyright: (c) 2013-2022 Sierra Wireless, Inc.
*            All rights reserved.
*
**************/

Note:
stt_exe_YYYYMMDD.7z : contains executable files
stt_src_YYYYMMDD.7z : contains source code

History:
20241022_1220
  - (Win/Lnx) expand no. of digits in split files from 3 (1-999) to 8
  - (Win/Lnx) overwrite old files when split number reaches 1e8
  - (Win/Lnx) improve interrupt handling to save last chunk of log data
  - (Lnx) change read timeout to 200ms to reduce no. of console messages

20230302_1945
  - (Win/Lnx) for PIPE mode, support quitting with "STT-CMD SIGINT" from stdin

20230301_1349
  - (Win) assert RTS when flowctrl is off

20221128_1902
  - (Win/Lnx) disable buffering in stdout
  - (Win/Lnx) support option hwflow for disabling HW-flow
  - (Win/Lnx) support option fwdsin for forwarding stdin to the trace port

20220819_1958
  - (Win/Lnx) support argument options specified with dash, like -p COM4
  - (Win/Lnx) support option for setting baud rate
  - (Win/Lnx) terminate logging on signals - Int(Ctrl+C), Terminate and Close.
  - (Win/Lnx) support option flush-period to flush log file to disk
  - (Win/Lnx) return exit code=2 when trace port is not ready

20171222_1143
  - (Win/Lnx) tidy up the log messages
  - (Win/Lnx) change default option of <log-file-path> as stt-<port-name>.gz
  - (Win/Lnx) <port-name> is now mandatory field
  - (Win/Lnx) fix missing modification time in .gz files

20171221_2102
  - (Win/Lnx) add support of gz and update getlog.sh|bat files
  - (Win/Lnx) update support of split file
  - (Win/Lnx) print help info when running with "stt help"

20151211b
  - (Win/Lnx) updated getlog.bat|sh to wait until the trace port is ready

20151211a
  - (Win) fix incomplete start of coredump/ensure RX buffer is enlarged immediately on opening trace device port
  - (Win/Lnx) swap the order: open the trace log file before opening the trace device port

20150807b
  - move comment about "logging must be ended by using Ctrl+C" to separate lines in getlog.*

20150807a
  - (Win/Lnx) support splitting of log file by given file size
  - (Win/Lnx) update example for using 7z to compress log files

20150804a
  - (Win/Lnx) use 64bit integer in "written bytes" display message

20150619a
  - (Win) fix failure in capturing trace in trace port (no problem on coredump port).
          This is done by assert the DTR pin of the port.

20150612a
  - executable files (stt.exe for Windows, stt for Linux 32bit, stt64 for Linux 64bit)
  - (Win) enable HW flowctrl and fix binary mode in writing output file
  - (Lnx) enable HW flowctrl
  - (Win/Lnx) disable DEBUG macro and print less information message
  - (Win/Lnx) support writing to stdout (no information message) if input filename is -
  - (Win/Lnx) internal read buffer set to 2048 bytes

20150520a
  - executable files (stt.exe for Windows, stt32 for Linux 32bit, stt64 for Linux 64bit)
