discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Bidirectional communication between attached bloc


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Bidirectional communication between attached blocks
Date: Mon, 20 Apr 2015 09:28:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hi marco,

what you describe as ID already exist: every block has a function alias(), giving it a string "name", which can be used with global_block_registry::block_lookup(name) [1].

You will need to wrap your alias in a pmt::intern to get it into a stream tag, so use that with block_lookup, and cast the result to your_block_type::sptr.

Greetings,
Marcus

[1] http://gnuradio.org/doc/doxygen/classgr_1_1block__registry.html#a67a83c42e2030bba463c99d51e7a8f92

On 04/19/2015 05:58 PM, marco Ribero wrote:
Hi all,
I'd like to establish a bidirectional communication between two attached blocks, without asking the user to write code like msg_connect().  One way could be: the upstream block generate an id like
ID=typeBlock+pseudorandomNumber
and send it to the next block using a tag.
After what the upstream block create a publish port called ID+"alice" and a subscribe to a port called ID+"bob".
Can you tip me a better/cleaner way?

I need this bidirectional channel in order to comunicate device pointer, send kernel code(thanks to CUDA 7),etc..

Thanks for your time,
marco


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]