Signal Handling
-
Hi all,
I want to know is it possible to catch a signal emitted from Linux terminal, through our Qt or qml application.? if yes, how can i do that ?
For ex, there is a simple code running in the background in linux terminal which will be passing a simple string through signal, i want to catch that and print the signal through my qt or qml application.
Thanks -
Hi all,
I want to know is it possible to catch a signal emitted from Linux terminal, through our Qt or qml application.? if yes, how can i do that ?
For ex, there is a simple code running in the background in linux terminal which will be passing a simple string through signal, i want to catch that and print the signal through my qt or qml application.
ThanksNo, it is not. Signal/slot mechanism is really just a wrapper for a method call inside a process. You could use QProcess to capture the terminal application's standard output, if you start it from your application. (Or alternatively, use any standard Linux C++ code for that -- you should be able to find many examples of that.)
-
Hi,
What exact signal do you have in mind ?
-
@SGaist
Hi,
I want to create an api which can connect to the embedded board's lower layer through which i want to get the output of the lower level code to my application UI.For ex, i have a c code which will be running continuously at the board level and giving output, i want to create an api which will connect to this code and whenever i want i can take the output and display it in my application UI or make some changes based on that output in my UI.
-
@SGaist
Hi,
I want to create an api which can connect to the embedded board's lower layer through which i want to get the output of the lower level code to my application UI.For ex, i have a c code which will be running continuously at the board level and giving output, i want to create an api which will connect to this code and whenever i want i can take the output and display it in my application UI or make some changes based on that output in my UI.
-
@yuvaram Hi
Actually i want to know which will be better, I am new to it, Can you elaborate and tell how does it work. -
What kind of board is that ?
What will you extract from it that you want to make available to other application(s) ?
How are you getting the data from that "lower level" ?
-
What kind of board is that ?
What will you extract from it that you want to make available to other application(s) ?
How are you getting the data from that "lower level" ?
What kind of board is that ?
iMX-6 board.
What will you extract from it that you want to make available to other application(s) ?
I have an code running continuously in the backend, from which i want to read the output and based on that make some changes in my application UI.
How are you getting the data from that "lower level" ?
it will be giving the output in the terminal, from which i want to read.
Thanks
-
What is that backend ?
What are you reading from the board ?
-
-
Then, why not integrate that C code directly in your application ?
-
Do you mean contact a REST service to get the data ?
-
Then why do you need to catch signal from the terminal if you have to contact a web service ?
-
Then why do you need to catch signal from the terminal if you have to contact a web service ?
-
Hi...i am a new user here. As per my knowledge you could use QProcess to capture the terminal application's standard output, if you start it from your application. Signal & Slots is applicable within a process.Inorder to communicate between processes, use IPC mechanism.