Hi Murphy,
I got a bit confused with the working of messenger. Thanks for the
clarification.
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 messenger]$ ls
cacert.pem messenger_la-messenger.lo
__init__.py messenger.py
jsonmessenger.la meta.json
jsonmessenger_la-jsonmessenger.lo _pyjsonmsgevent.la
jsonmsg_event.la
_pyjsonmsgevent_la-pyjsonmsgevent_wrap.lo
jsonmsg_event_la-jsonmessenger.lo pyjsonmsgevent.py
Makefile _pyjsonmsgevent.so
messenger_core.la pyjsonmsgevent_wrap.cc
messenger_core_la-messenger_core.lo servercert.pem
messenger.la serverkey.pem
>From nox/build/src, I did the following:
[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.
00007|nox|ERR:Cannot change the state of 'pymessenger' to INSTALLED:
'pymessenger' ran into an error:
cannot import a Python module 'nox.coreapps.messenger.messenger':
Traceback (most recent call last):
File "./nox/coreapps/messenger/messenger.py", line 19, in <module>
from nox.coreapps.messenger.pymsgevent import Msg_event
ImportError: No module named pymsgevent
[neha@doorsingdog-dx src]$ ./nox_core -v -i ptcp: messenger
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.
00007|nox|INFO:nox bootstrap complete
Can you please tell me what I did wrong? The existing messenger.py file was
different from that provided by you. I am confused with what (code files)
to place where. 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)?
Regards,
Neha
On Wed, Aug 1, 2012 at 10:10 AM, Murphy McCauley
<[email protected]>wrote:
> On Jul 31, 2012, at 9:35 PM, Neha Jatav wrote:
>
> > If I use a blocking receive of the messenger, I will still need a while
> loop so that I can receive multiple such messages. So, even if I use the
> messenger, I'll need a separate thread which isn't possible with NOX.
>
> I think one or the other of us is missing something here.
>
> The messenger component raises an event every time a message is received.
> I doesn't require either blocking or a while loop.
>
> -- Murphy