Shyamnath wrote: > I am trying to incorporate a few modifications to the DBPSK > implementation in gnuradio for which I need to implement feedback > between the different signal. So my question, is there a clean way to > implement feedback between the different signal processing blocks. > More specifically if my flow graph is BLOCK1 --> BLOCK2 -> BLOCK3 and > I want to have a feedback from block3 to block1 is it possible? I am > interested in feedback of a flag bit.
There are a few ways you can do this, depending on how frequently you need to update the value of this flag. As you mentioned, you can create a shared variable and pass a reference to this to your blocks. You'll need to write your own blocks, however, in order to add the code in the 'work' function that acts on the flag value. You'll need to protect your shared data with a mutex or other synchronization primitive, as there is no guarantee that the work functions of your blocks will run in the same thread. (Currently they do; this will definitely change in the future.) But there is still no guarantee how frequently the work functions will get called by the flow graph scheduler, so there could be an arbitrary delay between setting the flag in one block and the opportunity for another block to act upon the changed value. If you only need to update the value infrequently, you can instead do it from a custom thread from within Python. For example, from a custom thread, you can wake up once a second, call a read method on one block to get the flag value, then call a method on the other block to set it. There are variations of the above but we'd need to know more about what you're trying to accomplish. -- Johnathan Corgan Corgan Enterprises LLC http://corganenterprises.com _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
