So NOX's messenger is a fairly generic method for communicating with external 
applications over a socket.  Built on top of this is jsonmessenger which 
communicates JSON messages over a socket.

If you specifically want to use protobufs (and not JSON messages), then you'd 
want to use the plain messenger.  However, the plain messenger is not exposed 
to Python -- only jsonmessenger is.

So I think your options are:
1) Use JSON messages instead of protobufs, and just use jsonmessenger
2) Expose messenger to Python, and then use this to send/receive protobufs
3) Use protobufs and roll your own method for communicating with your external 
application (probably using Twisted)

-- Murphy

On Dec 20, 2011, at 11:02 PM, Harshil Anil Kumar Shah wrote:

> Hi Murphy.
> Yes, I have external C++ module which I want to communicate with Nox python 
> module using protobuf. I am using libjson library at C++ module.
>  
> -Harshil.
>  
> From: Murphy McCauley [mailto:jam...@nau.edu] 
> Sent: Wednesday, December 21, 2011 1:38 AM
> To: Harshil Anil Kumar Shah
> Cc: Kyriakos Zarifis; nox-dev@noxrepo.org
> Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python
>  
> Do you mean that you have some external program (written in C++) that you 
> want to communicate with a NOX component (written in Python)?
>  
> jsonmessenger works by sending and receiving JSON (http://json.org) messages. 
>  So on the NOX side, you use jsonmessenger.  In the external program, you can 
> use any of several libraries for doing JSON encoding/decoding.
>  
> -- Murphy
>  
> On Dec 20, 2011, at 1:09 AM, Harshil Anil Kumar Shah wrote:
> 
> 
> Hi,
> In my case where external module is C++ then can I use “pyobject” to interact 
> with python module?
>  
> From: Harshil Anil Kumar Shah 
> Sent: Monday, December 19, 2011 3:32 PM
> To: 'Kyriakos Zarifis'
> Cc: nox-dev@noxrepo.org
> Subject: RE: [nox-dev] Nox messenger example for external c++ and nox python
>  
> Thanks Zarifis…
>  
> I looked at GUI example. It seems very useful. But in my case, client is 
> external C++ module. So in that case do I have to use use messenger.cpp??
>  
> -Harshil.
>  
> From: nox-dev-boun...@noxrepo.org [mailto:nox-dev-boun...@noxrepo.org] On 
> Behalf Of Kyriakos Zarifis
> Sent: Monday, December 19, 2011 1:38 PM
> To: Harshil Anil Kumar Shah
> Cc: nox-dev@noxrepo.org
> Subject: Re: [nox-dev] Nox messenger example for external c++ and nox python
>  
> Hi Harshil,
>  
> it might not be the simplest example, but the GUI communicates with NOX using 
> the messenger, so taking a look at that code might be a good starting point.
>  
> Specifically, the file communication.py is responsible on the GUI side. 
> Similarly on the NOX side, the code that uses the messenger to send messages 
> to the GUI is inside the respective component that talks to the GUI. The 
> component "monitoring" is one of them.
> 
> Some of this is documented on the wiki here:
> http://noxrepo.org/noxwiki/index.php/NOX_GUI#Connecting_a_subview_to_a_NOX_component
> 
> On Sun, Dec 18, 2011 at 10:41 PM, Harshil Anil Kumar Shah 
> <harshil_s...@infosys.com> wrote:
> Hi,
>  
> I want to exchange messages between external C++ module and python module  in 
> Nox using protobuf messages. I browsed through couple of posts, I figured out 
> I can  use coreapps/messenger. Can I get some working example how messenger 
> code can be used for message exchange between external c++ and nox python 
> module.
>  
> Regards,
> Harshil Shah,
> Convergence Lab, Infosys Labs
> Infosys | Bangalore
> Mob # : +91 97428 87966.
>  
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
> for the use of the addressee(s). If you are not the intended recipient, 
> please 
> notify the sender by e-mail and delete the original message. Further, you are 
> not 
> to copy, disclose, or distribute this e-mail or its contents to any other 
> person and 
> any such actions are unlawful. This e-mail may contain viruses. Infosys has 
> taken 
> every reasonable precaution to minimize this risk, but is not liable for any 
> damage 
> you may sustain as a result of any virus in this e-mail. You should carry out 
> your 
> own virus checks before opening the e-mail or attachment. Infosys reserves 
> the 
> right to monitor and review the content of all messages sent to or from this 
> e-mail 
> address. Messages sent to or from this e-mail address may be stored on the 
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev
> 
>  
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev
>  

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to