discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Specify which methods show up in SWIG version of C++


From: Ethan Trewhitt
Subject: [Discuss-gnuradio] Specify which methods show up in SWIG version of C++ block
Date: Wed, 9 Oct 2013 16:36:29 -0400

I'm working on some custom C++ blocks. I would like to have a few
methods in the C++ world visible to Python so that they can be called
directly. My understanding is that GRC can then make such things
visible through the <callback> tag in the block's XML specification.

Looking at the GR3.7 version of fir_filter, for instance, shows that
it has a "set_taps" method and an "update_tap" method, both of which
are public. However, only "set_taps" gets translated into the SWIG
Python version of the fir_filter block, while "update_tap" does not.
What part of the gr-filter source tree instructs SWIG to include one
but not the other? Does it have something to do with the way the
GR_SWIG_BLOCK_MAGIC2() macro works within filter_swig.i?

Short version: how do I instruct the SWIG build process to translate a
particular method of a C++ GR block into its Python version?

Thanks in advance.

Ethan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]