On Apr 22, 2014, at 12:10 PM, Thiago Macieira <thiago.macie...@intel.com> wrote:

> Em ter 22 abr 2014, às 19:34:48, Denis Shienkov escreveu:
>> 1. or keep it as is, but then bytesWritten() will be "tell lies"
> 
> It's not lying. It's telling the user that the bytes were written from the 
> QIODevice to the underlying device. That's the best we can do, since now 
> those 
> bytes are no longer under our control.

I fully agree with this assessment. Many platforms don’t even provide any means
of notification that a physical transmit buffer is empty. They could, but they 
don’t.

RS-485 direction switching needs to be done at the driver level, not in the 
userland,
unless the userland implements the driver. So this is possible for user-mode USB
drivers. Incidentally, my experience with user-mode drivers is much better than 
with
kernel drivers, especially for “serial-like” devices.

I think that QSerialPort should provide abstract base classes that could be 
reimplemented
for various types of hardware. For me, the FTDI devices work much better on 
Linux and OS X
with self-written user-mode drivers where I have full control over what’s going 
on. Incidentally,
I have notifications of the USB transactions being finished, and of the device 
FIFOs emptying.
I could do software DTR switching if I needed it. Using stock drivers it’s 
impossible. I only
use it for diagnostics, though.

Cheers, Kuba Ober
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to