Hello, After I successfully added an OOT Gain block (checked by the uhd_usrp_probe command), I want to call `set_gain_value()` function in my Python program. Since the default RFNoC block control in Python doesn’t contain the OOT block control, I do some following modifications:
1. Add `gain_block_control.cpp` and `gain_block_control_python.hpp` in `<repo>/host/lib/rfnoc` 2. Add `gain_block_control.hpp` in `<repo>/host/include/uhd/rfnoc` 3. Add `GainBlockControl = lib.rfnoc.gain_block_control` in `<repo>/host/build/python/uhd/rfnoc.py` 4. Add `#include “rfnoc/gain/gain_block_control”` and `export_gain_block_control(rfnoc_module)` in `<repo>/host/python/pyuhd.cpp` Then I implement `make` under the path `<repo>/host/build/python`, but I get the following errors: `[ 0%] Built target usrp_mpm` `[ 0%] Built target copy_mpm_packages` `[ 3%] Built target uhd-resources` `[ 7%] Built target uhd_rpclib` `[ 98%] Built target uhd` `Scanning dependencies of target pyuhd` `[ 98%] Building CXX object python/CMakeFiles/pyuhd.dir/pyuhd.cpp.o` `home/uhd/host/python/pyuhd.cpp: In function ‘void pybind11_init_libpyuhd(pybind11::module_&)’:` `home/uhd/host/python/pyuhd.cpp:113:5: error: ‘export_gain_block_control’ was not declared in this scope` ` export_gain_block_control(rfnoc_module)` ` ^~~~~~~~~~~~~~~~~~~~~~~~~` `home/uhd/host/python/pyuhd.cpp:113:5: note: suggested alternative: ‘export_siggen_block_control’` ` export_gain_block_control(rfnoc_module)` ` ^~~~~~~~~~~~~~~~~~~~~~~~~` ` export_siggen_block_control` `home/uhd/host/python/pyuhd.cpp:117:16: error: ‘cal_module’ was not declared in this scope` ` export_cal(cal_module);` ` ^~~~~~~~~~` `home/uhd/host/python/pyuhd.cpp:117:16: note: suggested alternative: ‘usrp_module’` ` export_cal(cal_module);` ` ^~~~~~~~~~` ` usrp_module` `python/CMakeFiles/pyuhd.dir/build.make:62: recipe for target 'python/CMakeFiles/pyuhd.dir/pyuhd.cpp.o' failed` `make[2]: *** [python/CMakeFiles/pyuhd.dir/pyuhd.cpp.o] Error 1` `CMakeFiles/Makefile2:6657: recipe for target 'python/CMakeFiles/pyuhd.dir/all' failed` `make[1]: *** [python/CMakeFiles/pyuhd.dir/all] Error 2` `Makefile:162: recipe for target 'all' failed` `make: *** [all] Error 2` Did I miss something to add or this is not the correct way to implement Python OOT block control? Thanks a lot to anyone who can help me! Looking forward to your reply.
_______________________________________________ USRP-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
