Results 1 to 3 of 3

Thread: Serial Port

  1. #1
    Join Date
    Jun 2006
    Posts
    64
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Serial Port

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Serial Port

    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.

  3. #3
    Join Date
    Jun 2006
    Posts
    64
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Serial Port

    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.

Similar Threads

  1. Serial Port communication
    By mgurbuz in forum Qt Programming
    Replies: 12
    Last Post: 22nd January 2011, 03:38
  2. C++ Library for serial communication
    By dec0ding in forum General Programming
    Replies: 7
    Last Post: 8th July 2007, 19:18
  3. Serial Port access in Qt
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 18th October 2006, 22:03
  4. Serial Port Communication
    By soldstatic in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2006, 17:05
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.