Thanks wysota,
I got your point, but my scenario is quit different, It's like below
I have created 2 process
1) Qt Process (for GUI)
2) ./MyApplication (for hardware stuff)
QT Process would do all GUI related stuff and content functions that can change/modify the display by adding or removing widgets, this function would be call by MyApplication.
Qt Process CODE
main(int argc, char *argv[])
{
Widget w;
// get connected to DBus
// registered service & object
}
main(int argc, char *argv[])
{
QApplication a(argc, argv)
Widget w;
// get connected to DBus
// registered service & object
}
To copy to clipboard, switch view to plain text mode
Myapplication will create interface to this sevice and call the methods of this Qt process(I am able to do this)
MyApplication Code
main()
{
// Create interface to dbus service.
// Call function of Qt process from this MyApplication process
interface.call("method_name",arg1,arg2,...)
}
main()
{
// Create interface to dbus service.
// Call function of Qt process from this MyApplication process
interface.call("method_name",arg1,arg2,...)
}
To copy to clipboard, switch view to plain text mode
I will(my device) get messages from another device [ master ] in my case, master will send commands and messages to MyApplication process.
Master's command & mesg. would be the information, what to show on display(what widget, color, font size, widget string etc.) .
MyApplication process will interpret this messages and call function of Qt Process to show widgets on the display according the argument passed from MyApplication process.
Now,I want signal / or message from Qt on click of any widget.
In MyApplication I have not registered any object and service, I have just created interface and calling function directly, Because my MyApplication code is just like below
main()
{
// system initialization
// create Interface of service registered by Qt Process
while()
{
//driver events to poll
// DSP message queue to poll(check for messg and command )
// other time critical tasks
// call function of Qt process if Display need to change the content
interface.call("method_name",arg1,arg2,...)
}
}
main()
{
// system initialization
// create Interface of service registered by Qt Process
while()
{
//driver events to poll
// DSP message queue to poll(check for messg and command )
// other time critical tasks
// call function of Qt process if Display need to change the content
interface.call("method_name",arg1,arg2,...)
}
}
To copy to clipboard, switch view to plain text mode
Now if I register object from MyApplication, I need to use Q_OBJECT and I must call exec() to get into the event loop. if I call exec(), process will go in wait state and my time critical data would be missed.
What should I do? how can it possible to manage communication with dbus without affection other time Critical tasks ?
Your suggestion would be great help for me.
Bookmarks