Perfect!! Thank you :)

2017-11-17 12:42 GMT+01:00 Marcus Müller <muel...@kit.edu>:

> You'd pass that object – all the objects that you create in Python have
> a name that you can pass around.
>
> Notice that you usually very much would want to avoid this. The blocks
> run in different threads, so you need take care that accesses to your
> shared object are thread save, e.g. by having internal mutexes.
>
> In your case, having a block that manages the socket, and which sends
> GNU Radio messages to your other blocks, would sound easier and safer.
>
> Best regards,
> Marcus
>
> On Fri, 2017-11-17 at 12:13 +0100, Carlos Alberto Ruiz Naranjo wrote:
> > Hi Marcus,
> >
> > I apologize if I have not explained myself well.
> >
> > I want to use a global object (an open socket) inside blocks. Similar to
> using a global variable with the 'Python Module' block.
> >
> > The problem is that I do not know how to access to an object/variable
> created in 'Python Module' inside another module.
> >
> > Thank you.
> >
> > 2017-11-17 11:08 GMT+01:00 Marcus Müller <muel...@kit.edu>:
> > > Hi Carlos,
> > > I'm a little bit confused; this sounds a lot more like you want to
> design a client/server protocol with logical "subchannels" or something
> than a GNU Radio question.
> > >
> > > If you asked me, sounds like you wouldn't go for a single socket, but
> three ZeroMQ sockets of the right usage paradigm (might be pub/sub,
> req/rep, or any of the roundrobin ones).
> > >
> > > In any case, your block has no provisions for talking to a socket, so
> not quite sure what you're asking me – "write a program that talks to
> sockets" isn't really a great question for the GNU Radio mailing list ;)
> > >
> > > Best regards,
> > > Marcus
> > >
> > > On Fri, 2017-11-17 at 10:07 +0100, Carlos Alberto Ruiz Naranjo wrote:
> > > > Hi Marcus,
> > > >
> > > > It is the code: https://pastebin.com/Ts07d0wg
> > > >
> > > > Depends on the data of the block makes a request to the server or
> another. I want to have a common socket for all the blocks, not to use one
> client per block.
> > > >
> > > >
> > > >
> > > >
> > > > 2017-11-16 20:56 GMT+01:00 Marcus Müller <muel...@kit.edu>:
> > > > > Hi Carlos,
> > > > > I don't know the blocks, hence I can't tell you anything about
> them.
> > > > > Best regards,
> > > > > Marcus
> > > > >
> > > > > On 16.11.2017 19:32, Carlos Alberto Ruiz Naranjo wrote:
> > > > > > Thank you Marcus.
> > > > > >
> > > > > > Where do I create the socket and how I pass it to the blocks?
> > > > > >
> > > > > > On Nov 16, 2017 19:07, "Marcus Müller" <muel...@kit.edu> wrote:
> > > > > > > Sure, unless the dataCapture blocks (which I don't know) have
> a bug.
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Marcus
> > > > > > > On Thu, 2017-11-16 at 15:26 +0100, Carlos Alberto Ruiz Naranjo
> wrote:
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > dataCapture blocks are TCP clients with different requests.
> I want use the same socket for the 3 blocks. It is posible?
> > > > > > > >
> > > > > > > > Thank you.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Discuss-gnuradio mailing list
> > > > > > > > Discuss-gnuradio@gnu.org
> > > > > > > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > > > >
> >
> >
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to