2017-06-25 5:23 GMT-05:00 Bastian Bloessl <m...@bastibl.net>:

> Hi Christian,
>
> > On 24. Jun 2017, at 22:50, Cristian Rodríguez <
> cristian.rodriguez...@gmail.com> wrote:
> >
> > This parameter is no global, I mean, when I use the wifi_phy_hier.grc in
> the transceiver.grc or tx.grc, etc, If I modify the parameter before launch
> the simulation it is ok, the change has effect in the flowgraph, but if i
> add a QT GUI Range, and I modify it after the beginning of the simulation
> it doesn't have effect. Then I think the "set" of the parameter is no
> global (thinking in OOP).
>
> Currently, the sensitivity is only through the constructor of the Sync
> Short block. That means it’s set when the block is instantiated and cannot
> be changed afterwards.
>
> 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
> Sync Short 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 Sync Short 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).
>
> If you implement this, please make a pull-request :-)
>
> Thanks a lot for your answer Bastian.

I'll implement this and after i write again.


> >
> > Besides, this parameter is used in the WiFi Sync Short, and i want to
> modify this block to set that parameter as an input, and create another
> block in which i'm going to include a fuzzy system to set the parameter
> depending on other parameters.
>
> For that use-case, I would extend the Sync Short block with an async
> message input (the gray ports in GRC) and let your fuzzy system send PMTs
> with the updated sensitivity values.
>
>
First i'll do the change in the xml, and when it is working i will
introduce the other block.

Thanks for your time to read.

Best regards,

Cristian


> Best,
> Bastian
>
>
>
>
> > But at the very first, I need to be able to modify the parameter
> Threshold (sensitivity) globally.
> >
> > <image.png>
> >
> > Thanks a lot for your time Marcus.
> >
> > Best regards,
> >
> > Cristian.
> >
> >
> >
> > Best regards,
> >
> > Marcus
> >
> >
> > On 06/24/2017 11:17 PM, Cristian Rodríguez wrote:
> >> Hi all,
> >>
> >> I hope all is going well.
> >>
> >> I was trying to modify the code of some blocks, where is usually the
> code of an specific block or flowgraph?
> >>
> >> Specifically, I want to modify the number of inputs in the
> wifi_phy_hier.grc, and put the variable Sensitivity as global, I mean, that
> i can modify it while the code is running, as rx_gain or tx_gain.
> >>
> >> But in general, where can i find the codes? Are there some predefined
> folders?
> >>
> >> Thanks in advance.
> >>
> >> Best regards,
> >>
> >> Cristian
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to