Add timeout to reading from SerialCom
Compare changes
GitLab service scheduled maintenance on Monday, August 18th 2025 as of 07h00 Geneva time for a period of 3 hours. Further information under OTG0157026.
A timeout is implemented to prevent reading from a serial device getting stuck when no data is available. The timeout is defined as the amount of time to wait between bytes being received.
SerialCom
: Reading zero bytes is valid and does not return an error.TextSerialCom
: Reading zero bytes before termination is reached throws an exception.On Linux, this is done using the VMIN
/VTIME
parameters. This means that the timeout setting is rounded to the nearest tenth of a second.
Also sneaking in a few updates to gpibscan
. Cleans up the code by using TextSerialCom
.