mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
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:
parent
b1fc3d307c
commit
7d43629d35
@ -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"))
|
||||
|
||||
@ -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))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user