Hi Vipin.

2017-07-02 23:12 GMT-05:00 Vipin Sharma <vipinsha...@photonpace.com>:

> 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.
>

The GUI is launched just when the simulation has started, so if you want to
change from GUI it is already runtime.


> Do I still need the callback?
>

Yes, you will need.


> 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.
>

I learned a lot of these pages, about creating the blocks:

https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_Python
https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_C%2B%2B

About the buffers on GNURadio, Marcus made a very useful entry:

https://www.gnuradio.org/blog/buffers/

About the PMT Types, you can read the reference page and these other pages:

https://gnuradio.org/doc/doxygen/namespacepmt.html#a7ab95721db5cbda1852f13a92eee5362

https://gnuradio.org/doc/doxygen/page_pmt.html
https://wiki.gnuradio.org/index.php/Guided_Tutorial_Programming_Topics#5.3.2_Adding_Message_Passing_to_the_Code

In general I have been a bit of time with GNURadio, but the best way to
learn is to read the codes of the blocks. It apply specially in the
callbacks.

Best regards,

Cristian


>
> Vipin
>
> On Jul 2, 2017, at 1:42 AM, Cristian Rodríguez <
> cristian.rodriguez...@gmail.com> wrote:
>
>
>
> On Jul 1, 2017 2:18 PM, "Vipin Sharma" <vipinsha...@photonpace.com> 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
> 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

Reply via email to