Results 1 to 10 of 10

Thread: QextSerialPort WaitForReadyRead()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    33
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Post Re: QextSerialPort WaitForReadyRead()

    It wont work as they did not implement it .

    Check the win_qextserialport.h line nr. 107

    virtual bool waitForReadyRead(int msecs); ///< @todo implement.

    I wanna give it a shot .. but at the moment I dont have time to do it.

    I used the wysota's way of using the Qtimer method.

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: QextSerialPort WaitForReadyRead()

    Hi,

    I don't want "waitForReadyRead", I want to connect "readyRead" SIGNAL and as I can see it is implemented on Windows using a QThread and Windows API functions.
    I just want to know if "readyRead" SIGNAL works because now I have a polling Thread that increases CPU load.

    Thanks,
    Òscar Llarch i Galán

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QextSerialPort WaitForReadyRead()

    You don't need a separate thread. You can check the port in the main thread. Timers are a bit heavy, so it might be better to use timerEvent() if you experience efficiency problems.

  4. #4
    Join Date
    Jun 2008
    Posts
    35
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QextSerialPort WaitForReadyRead()

    It is possible to do only by polling based on timer and check if data available.
    Or you can make reasonable SIGNAL api yourself to hide polling

  5. #5
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: QextSerialPort WaitForReadyRead()

    Hi,

    I know that I can use a Timer but I want to know if using QextSerialPort 1.2 Alpha, the signal "readyRead" works !!!

    If it works I don't need to use a Timer or a Thread, because it will call the properly SLOT when data arrives.

    So, anyone have tested it?

    Thanks,
    Òscar Llarch i Galán

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QextSerialPort WaitForReadyRead()

    I didn't manage to get it to work properly... Maybe that's why it's alpha

Similar Threads

  1. QextSerialPort and waitForReadyRead problem
    By Ivan Wagner in forum Qt Programming
    Replies: 12
    Last Post: 20th August 2010, 07:52
  2. Problem in QExtserialport program.
    By dheeraj in forum Qt Programming
    Replies: 5
    Last Post: 31st May 2008, 10:24
  3. Replies: 4
    Last Post: 30th January 2008, 10:00
  4. any body using qextserialport?
    By yagabey in forum Newbie
    Replies: 4
    Last Post: 25th December 2007, 22:08
  5. QExtSerialPort with com ports above com9
    By mightymark in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2006, 08:16

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
  •  
Qt is a trademark of The Qt Company.