Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Newby - how to observer changes in FIFO pipe
Forum Updated to NodeBB v4.3 + New Features

Newby - how to observer changes in FIFO pipe

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    andsun
    wrote on last edited by
    #1

    Hi all,

    I'm trying to learn Linux coding in Qt c++.

    At the moment I'm struggling with my GUI.
    I have an application (as a controller in the system) connected to some instruments that sends update info to my gui through a FIFO pipe. Is there a way to, within an observer class watch the FIFO for changes, signal to my reader to read the pipe?

    The update data doesn't come regulary rather that now and then between 1 -25 seconds apart.

    /anders

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Francknos
      wrote on last edited by
      #2

      What type of data contain your FIFO ? int double ? string structures ?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andsun
        wrote on last edited by
        #3

        Hi, its a struct that is sent trough the pipe, usually.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Francknos
          wrote on last edited by
          #4

          You know the content of this structure ?
          Do you have more information about your problem.

          1 Reply Last reply
          0
          • tomasz3dkT Offline
            tomasz3dkT Offline
            tomasz3dk
            wrote on last edited by
            #5

            I think, that solution for this will be a "QSocketNotifier":http://doc.qt.io/qt-5/qsocketnotifier.html, and it's activated signal.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andsun
              wrote on last edited by
              #6

              Hi all, I found a solution for my problem. Using inotify does the trick.
              Found help here:
              http://www.thegeekstuff.com/2010/04/inotify-c-program-example/

              The glitch I see now is QFileDialog that doesn't show hidden files/folders, however hardcoding the hidden name and passing it to inotify works

              This can be closed now, from my point of veiw

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved