Skip to content

Add timeout to reading from SerialCom

Karol Krizka requested to merge serial-timeout into devel

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.

Edited by Karol Krizka

Merge request reports