I have a concern about the Jserial library as written. I work in machine control, unfortunately in my world there are millions of legacy controllers still using the standard RS232 serial port. I write programs as front ends for operators of industrial control equipment, and the serial ports are in a constant state of transmission on all the platforms. At 9600 baud a bit is transmitted every .000104 microsecond, and a byte at 000833 microseconds. Which would technically mean the Async Streams are being interrupted with a new byte every .000833 microseconds. The Jserial Library contains ReadingThreadInterval, this interval is defaulted to 10 milliseconds, which is aproximately 12 bytes of data at 9600 baud. I will be experimenting with this setting, since my reads of the serial port should be when I receive at least 60 bytes of data. This should at least in theory prevent unnecessary interruptions. My concern is that there seems to be no error checking? Since I don't know anything about the receive buffer size, if the foreground program is busy with some other event or Async Stream, there is no way to check for a buffer overrun error and of course parity errors. I have written programs using the compact framework that monitors 6 continuous serial ports and two network ports (TCP data) and also gives the operator the ability to write his own control programs for various PLC's.
Is there a error check that I have missed, since none is implemented in JSerial, and I may have missed something in the Async Streams?