discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] OOT blocks not imported when using extern variabl


From: Laura Arjona
Subject: Re: [Discuss-gnuradio] OOT blocks not imported when using extern variables in C++
Date: Sat, 20 Oct 2018 11:20:32 -0700

Thank you again, I really appreciate your collaboration.

One last question, is there any simple example online, about passing an int value (for example) between two OOT blocks in C++?

I know there is this example in python, but I was wondering if there is simple but complete one in C++.
https://wiki.gnuradio.org/index.php/Guided_Tutorial_Programming_Topics#5.3_Message_Passing,

From reading the previous tutorial, I have set the following in my block2_impl.cc class

set_msg_handler(
    pmt::mp("in_port_block2"), // This is the port identifier
    boost::bind(&block2_impl::msg_handler_method, this, _1) 
);


And then I declare the methon in the block2_impl.h file
void msg_handler_method(pmt::pmt_t msg);

Then, how do I send an int value from block2 to block1 in the general_work function, and how do I retrieve the value in block1 in also the general_work function ?

Thanks!

On Sat, Oct 20, 2018 at 9:28 AM, Sylvain Munaut <address@hidden> wrote:
> Then, it let's say you have this system uhd_source -> block1 -> block2 -> block3 -> uhd_sink,
> how would you trigger different actions on block1 based on the result of one function of block3?

https://www.gnuradio.org/doc/doxygen/page_msg_passing.html

 Cheers,

     Sylvain



--
Laura Arjona 
Washington Research Foundation Innovation Postdoctoral Fellow in Neuroengineering

Paul G. Allen Center for Computer Science & Engineering
185 E Stevens Way NE
University of Washington
Seattle, WA 98195-2350

reply via email to

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