Results 1 to 20 of 30

Thread: QSerialPort High Speed Serial Reading from board and Logging Issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialPort High Speed Serial Reading from board and Logging Issue

    About which loop you speak ? Basically, you do not need an additional thread to handle serial port.

  2. #2
    Join Date
    Nov 2016
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QSerialPort High Speed Serial Reading from board and Logging Issue

    Quote Originally Posted by Lesiok View Post
    About which loop you speak ? Basically, you do not need an additional thread to handle serial port.
    Qt Code:
    1. while(ArrayBuffer.size() >= ExpectedPacketLength)
    To copy to clipboard, switch view to plain text mode 

    here this is the loop i mention about. When parsing is going on readAll can't get the data while loop was going on. I'm thinking creating another thread and when run it arraybuffer will be parsed simultaneously while reading data from serial port is going on.

    Am i thinking wrong ?

    Thanks.

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSerialPort High Speed Serial Reading from board and Logging Issue

    What are You doing in "parsing" ?
    If signal emiter and receiver are both in this same thread sending signal is like normal function calling. So that a new signal is issued only after the previous service.

Similar Threads

  1. Replies: 1
    Last Post: 21st June 2016, 23:32
  2. QSerialPort - speed and performance
    By Wer_Bn in forum Qt Programming
    Replies: 5
    Last Post: 30th April 2015, 17:12
  3. qserialport and reading bytes
    By gab74 in forum Newbie
    Replies: 3
    Last Post: 14th February 2014, 20:11
  4. QSerialPort :: read - Serial Comms noob.
    By llaregyb in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2014, 12:18

Tags for this Thread

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.