On Aug 6, 2012, at 12:29 AM, Neha Jatav wrote: > I was trying to run the messenger code (from the link provided by you). I > copied the folder to the following location: > nox/src/nox/coreapps/ > > The location nox/build/src/nox/coreapps/messenger looks like this, which I > left as it was: ... > [neha@doorsingdog-dx src]$ ./nox_core -v -i ptcp: pymessenger > 00001|nox|INFO:Starting nox_core > (/home/neha/nox_bak/build/src/.libs/lt-nox_core) > 00002|dso-deployer|ERR:Component 'messenger_core' declared multiple times. > 00003|dso-deployer|ERR:Component 'messenger' declared multiple times. > 00004|dso-deployer|ERR:Component 'jsonmessenger' declared multiple times. > 00005|pyrt|ERR:Component 'pyjsonmessenger' declared multiple times. > 00006|pyrt|ERR:Component 'pymessenger' declared multiple times. ...
You shouldn't be getting any of these "declared multiple times" messages. If I recall correctly, what I posted was a complete replacement for the messenger directory. You should remove everything in the old one and replace it with the new one. You might also want to create a new build tree (e.g., mkdir build ; ../configure)... maybe there's something hanging out in there which is causing this. > The existing messenger.py file was different from that provided by you. The code that used to be in messenger.py was a small library for external programs to use to connect to the (non-JSON) messenger. The name continually confused people. It has been renamed to messenger_client.py. The new messenger.py is actually what people always expected it to be -- a module you import to implement messenger services within NOX. It's the counterpart to jsonmessenger.py, which is used to implement JSON-messenger services within NOX (so it's apparently the one you want to use on the NOX side). > I am confused with what (code files) to place where. As stated above, they should all go in the messenger directory instead of what used to be there. > Also, could you please give me an example messaging code that sends a json > message to the controller (so that I get an idea of how to create a sample > sender)? There's some info about using it in the mailing list archives. For example: https://groups.google.com/d/topic/nox_dev/nbHEFiYAFrk/discussion https://groups.google.com/d/topic/nox_dev/K3rB8a_dKaI/discussion I think it's mostly about implementing the backends in NOX, but there might be some stuff about the client side back in the archive too. Some of the stuff about implementing normal messenger stuff applies to the JSON messenger too. You might check the doxygen. You also might find it useful to take a look at the code for the GUI, as it uses the JSON messenger to communicate with NOX. For the most part, you just open a socket and send a JSON string through it. Good luck. -- Murphy
