Results 1 to 20 of 32

Thread: QT interface with telnet (hyperterminal) connection. Plotting received data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #21
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT interface with telnet (hyperterminal) connection. Plotting received data

    Your code assumes that the write() calls are blocking. This is not the case in Qt. The write() calls queue data to be sent, but it will not actually be sent until the program returns to the event loop. Some time later the data will have been sent and a result (possibly) received. The other end will probably receive your two commands immediately after each other: how it handles that depends on their software. This is why I suggested some sort of state machine. The complexity involved depends on how flexible the script of commands must be and how fault tolerant you need to be.
    Last edited by ChrisW67; 19th September 2011 at 23:37.

  2. The following user says thank you to ChrisW67 for this useful post:

    Ethan (24th September 2011)

Similar Threads

  1. Telnet connection does not establish...
    By gentlesea in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2011, 09:54
  2. Methods to display received data
    By pupqt in forum Qt Programming
    Replies: 3
    Last Post: 18th April 2011, 09:50
  3. Plotting socket data
    By catto in forum Qwt
    Replies: 4
    Last Post: 6th March 2011, 08:01
  4. Replies: 2
    Last Post: 6th November 2010, 05:06
  5. Widget for data plotting
    By Benjamin in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2009, 15:38

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.