Hi,
I'd like to be able to be notified on hi / lo signal changes on serial lines such as the RING, DCD, CTS line.
In this case it's for detecting a time synchronization pulse.
Is this possible with QSerialPort somehow?
Thanks
Jamie
Hi,
I'd like to be able to be notified on hi / lo signal changes on serial lines such as the RING, DCD, CTS line.
In this case it's for detecting a time synchronization pulse.
Is this possible with QSerialPort somehow?
Thanks
Jamie
You have access to the status of these lines through the QSerialPort::pinoutSignals() method. However, except for DTR and RTS, there are no signals emitted when these lines change level. You might be able to look into the implementation of QSerialPort where DTR and RTS are handled to see if at that low level there is access to these lines. If so, you may be able to derive a class from QSerialPort and add level change signals for the lines you are interested in. The assumption here is that if pinoutSignals() can tell you the status of those lines, then somewhere in the internals it must be reading them and maybe responding to changes.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
It is impossible with QSerialPort.
Thanks for the replies.
I did look through the source code and could only calls that emitted the DTR and RTS notifier signals as responses to changes made on the application side rather than actual system events.
I think I'll try and use winAPI to do it.
Thanks
I figured you'd end up having to dip into system calls. QSerialPort is too high-level and abstract.I think I'll try and use winAPI to do it.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks