Newby - how to observer changes in FIFO pipe
-
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
-
What type of data contain your FIFO ? int double ? string structures ?
-
Hi, its a struct that is sent trough the pipe, usually.
-
You know the content of this structure ?
Do you have more information about your problem. -
I think, that solution for this will be a "QSocketNotifier":http://doc.qt.io/qt-5/qsocketnotifier.html, and it's activated signal.
-
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