I'm using a linux configured PC to read data from 4 comports. The
application i supposed to read datapackets of ca 100bytes arriving in a
rate of about 100Hz to each com port. Occationaly, controll & data
requst messages will be sent by the PC to the sources. My main task is
to do quite heavy computations on this data, so I want the
communications to be as effective as possible.
I've used the low level read/write commando. And select to give an
interrupt when sothing is available to read on a com port. This worked
fine for a 1Hz data rate, but when i cranked up the rate, it seems like
I loose caracters while I'm trying to write. I's the write command safe
to use, or will incoming data be thashed when i write?
Do I have to use buffering on the ports (i.e. vbuf and streams) or do I
just simply have to be more carefull when writing, so I'm not thrashing
an incoming message (Using select call to se if it is possible to write
at a given instant)
Best Regards
Oskar Sander