Hi Marco, I just realized: Things might be much more easy than that, even:
What you do sounds like a job for a hierarchical block; if you're not used to that concept: It's just a "subflowgraph", represented as a block with in- and outputs. If you put both your blocks inside, you'll always have them together. And: in the constructor of your hierarchical block, you can for example first construct your cuda block, and then give your "downstream" block the pointer to that in its constructor. To the user, this will look like one block, though there are two (or more) inside. Greetings, Marcus On 04/20/2015 12:29 PM, marco Ribero wrote: > > Thank you very much. Your solution is much cleaner. > > Have a good day, > Marco > > Il giorno lun 20 apr 2015 alle ore 09:29 Marcus Müller > <marcus.muel...@ettus.com <mailto:marcus.muel...@ettus.com>> ha scritto: > > 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 > > > > > > _______________________________________________ > 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