Open LeeHudsonDLS opened 1 month ago
Have you run the pre-commit linters and checkers on this?
Sorry no I forgot to do the pre-checks, I have tested you changes though and it all seems to work thanks
@abbiemery Are you OK to approve this so it can be merged and released?
Power cycling CI
@LeeHudsonDLS Apologies, some of the CI was not running before
I have now fixed it.
When communicating with a simulated device using an ascii protocol I found that the StreamReader.read() method returns inconsistent number of bytes. Even the documentation alludes to this inconsistency:
If n is positive, this function try to read
n
bytes, and may return less or equal bytes than requested, but at least one byte. If EOF was received before any byte is read, this function returns empty byte object.As the majority of devices that communicate using an ascii based protocol rely on a termination character to determine the end of a message I have added this as an optional parameter in the tickit.adapters.io.TcpIo class.