PDA

View Full Version : Serial Port



b1
17th January 2007, 04:32
G'Day,

Can anyone telling me how to use Qextserialport interrupt driven? I am currently using it with a Qtimer to poll every few seconds but its slowing the screen display.

Also is it possible to use Qextserialport in an asynchronous mode rather than synchronous?

Any suggestions or pointers would be greatly appreciated...

Thanks, B1.

e8johan
17th January 2007, 09:27
Having looked at the docs it seems to be impossible to not having to poll the port.

If you want to make it asyncronous and non-polling towards the rest of the application you can implement the port-listening part in a separate thread that you access asyncronous. You can then make the port-listening thread emit signals when new data is found (by polling in the thread). Just remember to start the event-loop in your thread if you want to poll using a timer.

b1
18th January 2007, 03:05
Thanks e8johan,

That is a good idea. I would still like to get it interrupt driven in the long term however I will give your idea a go later this week. Thanks for the response and ideas, much appreciated.

B1.