|
From: | Cristian Rodríguez |
Subject: | Re: [Discuss-gnuradio] GRC GUI parameters for custom blocks |
Date: | Mon, 3 Jul 2017 01:54:11 -0500 |
Thanks Cristian.I understand the runtime part. What if I don’t want the parameters to change during runtime. I just want to do some initial initialization through GUI for some parameters.
Do I still need the callback?
Also, it will be helpful if you could point me to some documentation which explains all the guts of GRC framework. The tutorial on gnu radio wiki aren’t that very advanced.
VipinOn Jul 2, 2017, at 1:42 AM, Cristian Rodríguez <address@hiddencom > wrote:On Jul 1, 2017 2:18 PM, "Vipin Sharma" <address@hidden> wrote:Hi,
I have a custom block, say CustomBlock, which takes two arguments, arg0 and arg1. My intention is to have these arguments be configured through gui after the custom block is instantiated. I define <param> entries for these arguments in the xml file for the CustomBlock which allows GRC gui to let me configure the arguments interactively.Hi Vipin.I had a similar question, and Bastian answered as follows:If you want to change the parameter while the flow graph is running (through a slider in the GUI, for example), you will have to extend the block with a callback.
You could have a look at the Frame Equalizer block, for example. It allows changing the algorithm during run-time.
To extend the block you have to:
- add the callback function to the XML description of the block: (see here https://github.com/bastibl/gr-ieee802-11/blob/ )next/grc/ieee802_11_frame_ equalizer.xml#L9
- implement the callback for the block (note that the callback is a public function that has also to be added to the definition in /include/, and the use of a mutex since ‘work’ and the callback are called in different thread contexts).I am trying to understand the relation ship between GRC GUI custom block parameters and the CustomBlock C code’s function arguments. How does GRC framework pass GUI parameters to its associated C function which also has the same arguments?As Bastian said, you can't modify the parameters from the GUI if they don't have a callback function.Best regards,Cristian
Vipin
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |