Re: [Discuss-gnuradio] Callback Function in Blocks for C++

2018-03-20 Thread Luis Felipe Albarracin Sanchez
Thanks both of you for the help,

I am checking the example in the throttle block and also the swig part, i
will let you know if i have further questions.

Kind regards.

On Tue, Mar 20, 2018 at 1:12 PM, Michael Dickens 
wrote:

> Hi Luis - You also have to make sure the function is passed through from
> C++ to Python via SWIG, which means that it must be in the public header in
> the OOT, not just the private header. Hope this helps! - MLD
>
> On Tue, Mar 20, 2018, at 12:40 PM, Luis Felipe Albarracin Sanchez wrote:
>
> Hello Everyone,
> I am trying to build a new block from scratch, that allows me to change
> parameter values while the flowgraph is running.
>
> I have found that for the .XML code i must use:
>
> "Function"($XXX)
>
> My question is, in the c++ code , besides creating the function and
> applying values to the parameter, do i need to do something else so the
> callback work?
>
> Thanks for the response.
>
> *___*
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
>


-- 
Eng. Luis Felipe Albarracin
PMP
CCNA/CCDA/CCNP/CCDP/CCIP
ITIL v3 Foundation
Msc. Telematics / MBA
"Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt"
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Callback Function in Blocks for C++

2018-03-20 Thread Michael Dickens
Hi Luis - You also have to make sure the function is passed through from
C++ to Python via SWIG, which means that it must be in the public header
in the OOT, not just the private header. Hope this helps! - MLD
On Tue, Mar 20, 2018, at 12:40 PM, Luis Felipe Albarracin Sanchez wrote:> Hello 
Everyone, 
> I am trying to build a new block from scratch, that allows me to
> change parameter values while the flowgraph is running.> 
> I have found that for the .XML code i must use:
> 
> "Function"($XXX)
> 
> My question is, in the c++ code , besides creating the function and
> applying values to the parameter, do i need to do something else so
> the callback work?> 
> Thanks for the response.
> 
> _
> 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


Re: [Discuss-gnuradio] Callback Function in Blocks for C++

2018-03-20 Thread Dave NotTelling
Take a look at
https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/throttle.h#L57
,
https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/throttle_impl.h#L49,
and
https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/throttle_impl.cc#L70
as an example.  The XML is at
https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_throttle.xml#L13

On Tue, Mar 20, 2018 at 12:40 PM, Luis Felipe Albarracin Sanchez <
lfasanc...@gmail.com> wrote:

> Hello Everyone,
>
> I am trying to build a new block from scratch, that allows me to change
> parameter values while the flowgraph is running.
>
> I have found that for the .XML code i must use:
>
> "Function"($XXX)
>
> My question is, in the c++ code , besides creating the function and
> applying values to the parameter, do i need to do something else so the
> callback work?
>
> Thanks for the response.
>
>
> ___
> 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