rfnoc_modtool: Correctly describe inheritance in Python blocks

The auto-generated Python-bindings for RFNoC block controllers in OOT
modules is now fixed to include noc_block_base. This is changed in
rfnoc-gain as well as the template that generates new Python bindings.

This means that future calls to

    rfnoc_modtool add $blockname

...will now generate Python bindings with noc_block_base included as
a class parent.
This commit is contained in:
Martin Braun 2025-06-20 10:53:47 +02:00 committed by Jörg Hofrichter
parent b1fc3d307c
commit 7d43629d35
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,8 @@ using namespace rfnoc::gain;
void export_gain_block_control(py::module& m)
{
py::class_<gain_block_control, gain_block_control::sptr>(m, "gain_block_control")
py::class_<gain_block_control, uhd::rfnoc::noc_block_base, gain_block_control::sptr>(
m, "gain_block_control")
.def(py::init(
&uhd::rfnoc::block_controller_factory<gain_block_control>::make_from))
.def("set_gain_value", &gain_block_control::set_gain_value, py::arg("gain"))

View File

@ -13,7 +13,8 @@ using namespace rfnoc::${MODULE_NAME};
void export_${blockname}_block_control(py::module& m)
{
py::class_<${blockname}_block_control, ${blockname}_block_control::sptr>(m, "${blockname}_block_control")
py::class_<${blockname}_block_control, uhd::rfnoc::noc_block_base, ${blockname}_block_control::sptr>(
m, "${blockname}_block_control")
.def(py::init(
&uhd::rfnoc::block_controller_factory<${blockname}_block_control>::make_from))