-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with signal sending. #9
Comments
Hi, I think I solve my problem by editing the emitSignal function. The generated stub files seem to have hardcoded interface name and signal name (not the one given in xml file).
After editing them it seems to work fine. BR, Krzysztof |
Hi Krzysztof, Did you see the Signals are intended to be emitted using the The tests illustrate how this is supposed to work, see here for signal emission: https://github.com/Pelagicore/gdbus-codegen-glibmm/blob/master/test/stub/teststubmain.cpp#L315 The automated generation of the
So.. In short, please try using Let me know if this solves your issue - I will make a note of improving documentation around signals! Thanks for raising the issue! |
Hi Jonatan,
in this manner (adding flexible signalName, change the interface name to the one I need and so on):
And after that it finally works fine. Thanks for very nice tool. BR, Krzysztof |
Hi, Alright. This does indeed sound like a bug, which needs to be changed in the code generator. I will flag this as such, and we will work on fixing this. Thanks a lot for the report and the test cases you've supplied. I will update this issue when the bug has been resolved. If you (or anyone else) happen to have a fix in mind for the code generator, feel free to submit it! |
Hi Krzysztof! So, back to your original question, I would need some more information on the crash that you are seeing; can you please paste the backtrace from the debugger? Also, FYI, the |
Hi Alberto, OK thanks. In my case I wanted to generate dbus signal not when property is change but on demand - for example when I need to send some value to the client when something happens in my system. Are the signals only limited to use with properties? Thanks, |
Hi Krzysztof, |
Hi,
I was successfully generated stubs with methods and signals. I am trying to implement the dbus server using them. As it is quite easy to me to use stubs to implement the methods and call them, I have problem with signals implementation using stubs. I would like to evoke signal when by some external function to populate the string with message that something happened to another process.
Could you please give me any hint how to play with that?
This is part generated stub.cpp I am using:
I am trying to call : EventNotification_emmiter("Sample STRING");
This compile but after execution I have Segmentation fault (problem with memory).
EDIT:
It seems that the debuger point those line as problematic:
Glib::Variant<std::vector<Glib::VariantBase> >::create_tuple(paramsList));
In Glib docs I am unable to find such a member function like create_tuple().
BR,
Krzysztof
The text was updated successfully, but these errors were encountered: