M
M
mihmig2017-02-08 13:31:37
Java
mihmig, 2017-02-08 13:31:37

COM port - how to make sure that the data has arrived completely?

I use the jSSC library in my project .
Everything works great. When reading a barcode with a scanner in USB-serial mode, I immediately receive the entire burst of data (from 8 to 600+ bytes depending on the barcode):
...
serialPort.setEventsMask(SerialPort.MASK_RXCHAR);
serialPort.addEventListener(this);
...
The data arrives in one piece, after which the call to my handler is triggered.
As I understand it - due to the fact that the data is received via a USB interface that emulates COM - the sizes of the receive / transmit buffers do not matter.
The question is - is it possible to be sure that if a device sending data through an iron COM port will send a burst of data without pauses (after the stop bitimmediately starts) then the interrupt / event will be the same?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question