D-Bus Communication done right?

Hi!
I need to do some IPC with D-Bus in my current project and as I am using Qt anyway, the QDBus module came in quite handy.
In the project, a Daemon has to send some information over to another process. Replies or checks aren't needed and so I got my communication setup pretty quickly.
Then, I stumbled over the Qt chat-example: http://doc.qt.nokia.com/4.7/dbus-dbus-chat.html
In it, they inherit from QDBusAbstractAdaptor and QDBusAbstractInterface. These classes are then used to establish a working D-Bus communication.
In my daemon I simply did this:
QDBusMessage msg = QDBusMessage::createSignal("/", "com.foo", "test");
msg << testString;
QDBusConnection::sessionBus().send(msg);
And in the receiving class constructor:
QDBusConnection::sessionBus().connect(QString(), QString(), "com.foo","test", this, SLOT(print(QString)));
This also works...can anyone explain to me why ?

Thanks!
I simply couldn't understand why the example uses such an elaborate method compared to mine.
But now that I look at it with your explanation in mind, it does make sense. The chat-example uses bi-directional communication and my project doesn't.
I could imagine that a double registration of the same interface from two different programs could lead to confusion, like the signal sent by one process is received by the process which is ought to receive AND the sender, because both have a slot connected to the signal.
Last edited by n0stradamus (2010-11-11 16:05:57)

Similar Messages

  • Bible study software done right: ISA2

    The reason I write this post is that sometimes it's hard to find the right tool for the right job, and this software isn't ranking too high on SERPs.
    Having struggled with buggy Xiphos recently, I'd like to raise awareness on alternatives: ISA 2 is an amazing software, it's free, but needs to run through wine.
    Introduction
    ISA (Interlinear Scripture Analyzer) is an Interlinear Bible and Concordance Search tool.
    Etymological and idiomatic sublinears are closing the gap between translations and the original Bible text. ISA is designed to be dynamic and transparent, hereby enhancing objectivity. ISA has unique functions to present the interlinear renderings in a concise, systematic way and showing the connection between them. This will greatly improve word studies. Even possible errors in any of the databases are easily detected by this method.
    The objective of Scripture4all (read "Scripture for all") is to make the original Scriptures accessible for a broad public by developing tools to bridge the gap between the original Bible texts and Bible translations.
    Xiphos is great for comparing between more versions, has more resourses, but this program goes far beyond what Xiphos has to offer. IMHO, it's Bible study software done right.
    Doing a packer -Ss Bible, doesn't give you too much despite the 15 hits. If I'm not the only one here appreciating such software, maybe we could help arch users stumble upon this blessing by including it into the AUR.
    Last edited by distrohopperarched (2012-03-08 14:24:44)

    I just failed a second time to contact the author on a different address, but I can't get around rfc-ignorant.org. Any ideas ?
    Until I get an answer from the developer, those installing manually might find the following information useful.
    Known issues:
    Running ISA from the command line, can be a bit tricky, but this works for me:
    bash -c "cd \"$HOME/.wine/drive_c/ISA2/\" ; env WINEPREFIX=$HOME/.wine/ wine \"ISA.exe\""
    As already noted somewhere above, rendering hebrew isn't perfect. Among the few fonts that display niqqudim (vocals) too, none are willing to render them in their proper place, though Ezra SIL, Frank Ruehl CLM, and particularly Deja Vu Sans do a more acceptable job, ALL of them fails to display a final niqqud, thus you can't tell whether a final shin is read "s" or "sh" for example. So if anyone is trying to learn hebrew, take note of this bug as you'll be mislead on a few occasions.
    This is a wine issue, as leafpad renders well. Does anyone know how to fix this ?...
    Note, only one interlinear level displays niqqudim: WLC_v.

  • MXF Done Right! (but codec still done wrong)

    "Uniting video, audio and metadata into a single file, the Canon XF305 and XF300 use an MXF (Material eXchange Format) File Wrapper..."
    I've been saying all along it was entirely possible.  Much as I like Panny, they really muffed their first attempt at tapeless with the whole "folder structure" idea. (Sony, too)
    Unfortunately, Canon muffed the one thing Panny did right (I-frame only) by making the new models Long GOP.
    I don't get it.  It seems pretty simple to me.  When will camera makers do this HD thing right?  We need affordable (under $5,000) cameras with 3 full raster CCDs, recording at full resolution in I-frame 4:2:2 to a single file on affordable media - preferably something which is not hamstrung by a 4GB file size limit.  (Damn Mac users and their 'compatibility' issues.)

    Panasonic  Debuts First Micro Four Thirds Pro Camcorder
    "Equally new to the camera format is...dual SDXC slots that, combined, can handle at least 128 GB of total storage and more as larger memory cards ship."
    Unfortunately, the recording format is AVCHD.  But it is encouraging to see SDXC coming to market, as it does not suffer the dreaded 4 GB file size limit.  The only clip breaks will be between cards, as it should be.
    We're getting closer.

  • HP15-DO17TU PCI device & PCI bus communication

    SIr I use model HP15-Do17TU & sir i intstalled windows 7 ultimate 64 bit. Sir want to install driver...
    PCI Device
    PCI\VEN_10EC&DEV_5229&SUBSYS_218F103C&REV_01
    PCI\VEN_10EC&DEV_5229&SUBSYS_218F103C
    PCI\VEN_10EC&DEV_5229&CC_FF0000
    PCI\VEN_10EC&DEV_5229&CC_FF00
    PCI Simple communication controller perperties
    PCI\VEN_8086&DEV_1E3A&SUBSYS_218F103C&REV_04
    PCI\VEN_8086&DEV_1E3A&SUBSYS_218F103C
    PCI\VEN_8086&DEV_1E3A&CC_078000
    PCI\VEN_8086&DEV_1E3A&CC_0780
    SM BUS CONTROLLER
    PCI\VEN_8086&DEV_1E22&SUBSYS_218F103C&REV_04
    PCI\VEN_8086&DEV_1E22&SUBSYS_218F103C
    PCI\VEN_8086&DEV_1E22&CC_0C0500
    PCI\VEN_8086&DEV_1E22&CC_0C05

    Hi Inder_kkp
    PCI Device (Realtek PCIE CardReader)
    http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=15&PFid=25&Level=4&Conn=3&DownT...
    PCI Simple communication controller perperties
    Intel Management Engine Interface
    SM BUS CONTROLLER
    Intel Chipset Installation Utility and Driver

  • I want to transfer files from my Mac Pro top Mac Air. i'M WRITING A BOOK SO I WANT TO MAKE SURE IT, WHICH IS ON PAGES, COMES ALONG AND IS IN TACT. iS THIS HARD TO DO FOR A SLIGHTLY ELDERLY PERSON WHO WANTS IT DONE RIGHT AND SO THAT I CAN GET TO WORK

    I am buying an Apple Air and want to transfer files including a book I am writing on Pages.
    I am not very tech savy. I have been told, however, by a number of friends I can save $1000 and do this myself.
    I don't mind giving it a whirl, but i don';t want to loose anything in the transfer, And, I was hoping this was a fairly quick, fool-proof, process.
    I have looked into this a bit and was wondering if I need two (2) Ethernet cables? That is,one from the Mac Pro to the Ethernet and one from the Apple Air to the Ethernet? Or, is it one just one cable to the Ethernet? And, if so, from the Apple Pro or the Apple Air to the Ehternet?
    I'm assuming a dsiplay box appears on either or both of the notebooks? Perhaps prompting you to transfer everthing you have on the Apple Pro hard drive to the
    the Apple Air hard drive? Or, to selection files? Dumb question: I assume my book, which is written on Pages is on The Apprle Pro hard drive? Correct? Or is it on a file folder separately?
    I appreciate any feedback yuou may have.
    Again, is it striaghtforward and easy to accomplish?
    Thanks,
    -Larry

    The following may help: http://support.apple.com/kb/HT5872
    Note that the MacBook Air does not have an ethernet port so you can either use wi-fi if you have that, or you can buy an ethernet adpater such as: http://store.apple.com/us/product/MC704ZM/A/apple-usb-ethernet-adapter or you could use an external disk.
    Also, if you took it to a local shop that specializes in Macs the cost shouldn't be anywhere near $1000 for them to assist. More like $100 and could even be free if they sell Macs and you buy the new one there.

  • LabVIEW done right: Requesting advice for a large LabVIEW project

    Hello Everyone,
    I have been coding LabVIEW for about 2 years now, off and on as my company requires it, and although my coding abilities and neatness have improved greatly since I first started I still end up with large, messy looking programs.
    I have a great understanding of SubVIs and use them regularly and often. I am also familiar with the various code structures such as a producer/consumer or state machine. But I keep finding that too much of my main code is interdependent on common variables, indexes, and values that it seems impossible to simplify any of them into subVIs because I would need like 10+ inputs or a custom cluster for each one. This seems counter productive and time consuming.
    I have searched far and wide for good programming technique for larger labview programs and I have only been able to find the most basic advice such as "Use subVIs" or "Use a state machine" and all the examples I can find are laughably simple.
    I can reduce my program to 3 while loops. One captures Events and gives commands on a queue, another takes those queued items and performs actions, and the third performs data gathering, plotting, and saving once each second. This starts out good, but by the time I've incrementally added all the features my company requires, each loop is a huge interconnected mess of wires with no clear way to section them up into subVIs.
    A solution would be to make everything either a global variable or FG but as a native C programmer I was always taught to avoid globals. And if I went the FG route I would need somewhere around 100+ different VIs just to handle them all. 
    Is there something I'm missing? I want to know how you pass data between the various loops of your program. Do you use one big cluster? Globals? FGs? None of these options seem ideal to me but maybe I'm missing something obvious.
    If anyone has any advice for me, it would be well appreciated. Better yet, if anyone has, or could point me to, an example program exhibiting an ideal programming structure for a project similar to the one I mentioned above, I would love to take some time to look it over. Hopefully I'll be able to pick up some good tips and tricks for keeping my main VI to one screen size, and effectively passing all the required data to all the subVIs that require it.
    Thanks in advance,
    -Aaron

    AaronMcCollough wrote:
    I have a great understanding of SubVIs and use them regularly and often. I am also familiar with the various code structures such as a producer/consumer or state machine. But I keep finding that too much of my main code is interdependent on common variables, indexes, and values that it seems impossible to simplify any of them into subVIs because I would need like 10+ inputs or a custom cluster for each one. This seems counter productive and time consuming.
    I can reduce my program to 3 while loops. One captures Events and gives commands on a queue, another takes those queued items and performs actions, and the third performs data gathering, plotting, and saving once each second. This starts out good, but by the time I've incrementally added all the features my company requires, each loop is a huge interconnected mess of wires with no clear way to section them up into subVIs.
    Do you try to identify related information that can be used by a whole set of related subVI's?  For example, you might have several parameters related to a specific piece of hardware.  These can be grouped into a typedef cluster (or, even better, an object with all the related subVIs part of the object class).  You definitely don't want to be using custom cluster for each subVI, but well designed subVI's shouldn't have more than a few custom inputs once related information is grouped.  
    As for data in the loops, I usually just have one big cluster in a shift register.  This is never itself sent into a subVI, but parts of it (the typedef clusters or objects from above) are unbundled and sent into subVI's.  It's basically just serves as a cleaner way of holding all the parameters.  I'll attach an image of a "state" of the program I'm now working on.  There are only a few wires unbundled in each individual "state", even though the full cluster (the top shift register in the image) has 20-odd components (and some of them are subclusters/objects that themselves have many components, such as the "Selected Record" object in the image which itself is a 15 element cluster).
    BTW, I'm using the "JKI state machine toolkit" which you might want to look at to get some ideas.
    -- James
    Attachments:
    Code example.png ‏45 KB

  • Bus / Sends don't seem to be working...

    hello,
    i got a Logic project from a friend that im mixing and the bus / send isnt working. i'll assign it the send to a bus, pull up a reverb and it dose not work.
    any thoughts?
    thanks!
    Luke.

    with a bit more tinkering i was able to get the issue fixed.
    i went into the environment window and it ended up being that the outputs of the buses were not assigned to the master out.
    thanks guys!
    Luke.

  • Erec Internal Server Error : works fine when done right-click & refresh.

    Hi,
    On portal, while accessing erec standard applications like job posting or questionnaire maintenance, I am getting error message " An internal error occurred. Please try again later."
    But when I right click on the message and click refresh, the application starts working fine.
    The same happens again when I leave the application and come to the application again.
    Any clues are welcome.
    Thanks.
    Tejas

    More information about the question, that is I got "Error Sending Request body" message in the mod_jk.log file. Is it I should restart the Apache and Tomcat at the same time?

  • Windows Server Technical Preview Done Right

    Thank You, thank you, thank you, thank you!  This is how Windows Server 2012/2012 R2 should have been from the start.

    The different reactions are interesting on this.  I pretty much stopped using the Start menu when Vista and 2008 came out.  Yes, I would click the button (or pearl) but then I would immediately start typing and the system would find what I was
    looking for a heck of a lot faster than I could trying to navigate the menu.  So when Windows 8/Windows Server 2012 came along, I never even missed it.  Got used to hitting the Windows key and typing what I'm looking for.  That way I can keep
    my hands on the keyboard.
    But, variety is the spice of life.  Whatever makes you happy, happy, happy.
    . : | : . : | : . tim
    Well, now it allows it to be done both ways and it doesn't bounce you out of the desktop for the search.
    I found it convenient to have frequently used items pinned to the Start Menu and Task Bar, but if it was a less-used item that was buried levels deep in hierarchy of the Start Menu, I would use the search field in the Start Menu.
    Searching was rarely needed because I didn't use that many different apps.

  • GPU Acceleration Done Right

    "Today's release of a beta version of the brand new 2.0 Stream SDK [offers] compliant OpenCL 1.0 support for everything from the HD 4350  up, including multi-GPU SKUs.  The kit supports Windows and Linux, both 32- and 64-bit, and multiple  compilers (including ICC) too"
    "NVIDIA have released certified OpenCL drivers for Windows and Linux,  after passing conformance tests at Khronos in June.  The Windows version  is available for XP, Vista and 7, both 32- and 64-bit in all cases...and any CUDA-capable GPU is an OpenCL compatible one"
    OK, Adobe.  ATI and nVidia have done their part.  The ball to make this work is in your court.  Make it a winner!  OpenCL acceleration for ALL transitions and effects.

    You may want to hold on to your wallet just now.  Read posts 14, 16 and 29 in this thread:
    http://forums.adobe.com/message/2370434#2370434
    -Jeff

  • Required software for communication not right

    I've received my new Ipod 30 GB. I've installed the software, but Itunes gives me the following message when I connect my Ipod;
    The required software for communication with the Ipod is not installed correct. Install Itunes again to install the Ipod software. (translated from Dutch, so is=t is possible different in English).
    I did installed the software again but it still not works. I've called Apple but the can not help me. I really want to put some music on my Ipod! Please help wat can I do?

    I have the same issue for a client trying to get their ipod to work. Their computer, a < 3 yr old Dell, doesn't have high speed USB 2.0 (incredible!).
    I'm afraid this may be the problem.
    Does anyone know if this is a feasible diagnosis, and workaround?
    Thanks

  • CAN Bus communication problem

    Hello,
    I'm trying to use the NI Visual Basic test sample program Single Sample Output.vbp installed from the CAN CD, directory "MS Visual Basic\Channel API examples\Single Sample Output".
    When running on the controller with the CAN card (self test all right), I get the error BFF62201 from the function nctInitStart with text: "Error 0xbff62201 (nctErrUndefinedChannel); Channel not found in MAX or the CAN database file. Solutions: Check for proper spelling using MAX; For Get/Set Property, ensure that the channel name exists in the task."
    What can be the problem / solution ?
    With thanks,
    best regards,
    Geert

    To use this example it is essentialy to import the example.ncd file from the NI-CAN Folder. Therefore go to CAN Channels in MAX and import this file. Now the MAX knows the channels used in your example.
    Hope thats it.

  • (Reference#1433074) Using Configurator II to set up Profi bus communication with Siemens CPU S7 314 2dp

    I'm trying to connect to Siemens CPU S7 314 2dp with the Comsoft Configurator II.
    I set up up the DF profi II (PCIe card) as master (address 10) and the Cpu 314 as slave (address 2).
    Baud rate is for both devices 1500 kb/sec.
    I download configuratoin to DF Profi II and get "download complete" response and everhing is looking OK.
    The green LED on the DF Profi II has a steady light.
    When I push "Monitor / Modify Connect" the green, yellow and red LEDs all have steady light.
    Also the square around slave-module CPU 314 is red in Configurator II.
    When I look in the diagnostic I get this message:
    "(2) CPU 314-2C DP not OK!
    Bit 1.0: Station_Not_Existent"
    There are several other modules on bus...
    Do I need to dowload GSD-files for these as well?
    Also the CPU 314 is configured as master...
    But as far as I can see I can't put the CPU314 as master in the bus configuration...?
    What could be wrong?

    I'm trying to connect to Siemens CPU S7 314 2dp with the Comsoft Configurator II.
    I set up up the DF profi II (PCIe card) as master (address 10) and the Cpu 314 as slave (address 2).
    Baud rate is for both devices 1500 kb/sec.
    I download configuratoin to DF Profi II and get "download complete" response and everhing is looking OK.
    The green LED on the DF Profi II has a steady light.
    When I push "Monitor / Modify Connect" the green, yellow and red LEDs all have steady light.
    Also the square around slave-module CPU 314 is red in Configurator II.
    When I look in the diagnostic I get this message:
    "(2) CPU 314-2C DP not OK!
    Bit 1.0: Station_Not_Existent"
    There are several other modules on bus...
    Do I need to dowload GSD-files for these as well?
    Also the CPU 314 is configured as master...
    But as far as I can see I can't put the CPU314 as master in the bus configuration...?
    What could be wrong?

  • Bus communications for 660x counter timer cards

    I believe I have a new application for 660x counter timer cards. I propose to build some additional circuitry on a blank PCI card to be installed in the same PC as the 660x card. If my sequence of pulses is generated on my home-built card, can this pulse sequence be fed via the PCI bus to the 660x card or must the 68 way connector be used. Can the PCI 6602 use the PCI bus for data receipt and transmission? Can the PXI 6602 use the PXI bus in a similar manner? Please note, my application will still be viable if the PCI/PXI bus cannot be used in this manner but it would give me more options and probably a 'cleaner' solution.
    Thanks and regards.

    Hello,
    This sounds like a really interesting project. I�m not exactly sure what the details of your application are, but I can tell you that the counter input and output signals are only available on the 68-pin connector of the 660x card.
    If there are any other questions you have about this card or how to interface to it, please let me know.
    Have a great day!
    Ken S.
    National Instruments

  • Interface Mode vs. QoS in Communication Channel

    Hello everybody,
    i am not sure if i understand the idea of the QoS-Option in the communication channel right!
    First of all you define an interface having a mode which specifies if it is synchronous or asynchronous in ESR.
    If your ready for configuration you use a communication channel in a sender agreement (if needed) which has got a QoS-Parameter. As far is i know, the communication channel is not bound to a specific interface, i guess this is done, so that you can reuse a communcation channel, right?
    But why is it possible to choose a communication channel with QoS-Best effort in a sender agreement which has got a asynchronous interface? Does this make sense? Or having a synchrouns interface with a cc with QoS-EOIO?
    It is written that the QoS-Parameter defines how the pipeline processes the messages, right?
    But how can i process a message from a synchrous interface with QoS-Best Effort for example? I am a bit confused...
    Thanks in advance for your replies!
    Best regards
    Markus

    Even if it is possible to select the channel (QoS = BE) in a sender agreement where you have used Async Interface, during runtime you will get an error due to mismatch.....channel with QoS = BE can be used only to process SYNC interfaces. (vice-versa with QoS = EO/ EOIO and Async interface).
    It is written that the QoS-Parameter defines how the pipeline processes the messages, right?
    yes.
    But how can i process a message from a synchrous interface with QoS-Best Effort for example?
    you need to have a SYNC interface at the receiving end also (your target should be able to process SYNC messages)....unless you implement some custom logic inbetween.
    What is your end-to-end scenario.

Maybe you are looking for

  • Raid Volumes Randomly Dismounting

    Okay first a warning .. this is going to be a long post! Overview: When my raid is connected through my Fibre Channel Switch it randomly dismounts. Specifics: Xserve G5 (10.4.7) with the LSI Dual-Channel 2GB Fibre Channel PCI-X HBA & Fibre Channel Ut

  • Wipe a file

    How do I wipe a file on OS 10.6.8?

  • How to replace home folder after yosemite erase-reinstall?

    Hi, I did an erase-reinstall and then simply copied my backed-up home folder (administrator's home folder) back into the new home folder but this has not worked well. Can anyone tell me the correct procedure of how to restore the home folder. I have

  • Theme editor: Portal Runtime Error

    We've installed EP 7.0, when trying to access the theme editor, the following exception occured. The Theme transporter got no problem. Thanks. Weiming. An exception occurred while processing a request for : iView : pcd:portal_content/administrator/su

  • Error in creating purchase order/ requisition/ quotation..

    Hi techies, I amunable to create a po and getting an error message as below. I tried ob08, ob07, obbs commands but of no use... can anyone please guide me....thanks in advance Ambiguous EUR/INR exchange rate relations Message no. SG028 Diagnosis The