diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-02-19 12:38:30 -0800 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-04-17 07:59:50 -0500 |
commit | a63682f981c3d4b828b5454a7d4849d181b9c8b3 (patch) | |
tree | 738f00e989da67eb89aee3978d05c6615be20cc7 /host/lib/usrp/multi_usrp_python.hpp | |
parent | 1a19bc653ee499545addb2a8718d12069bfd6fcd (diff) | |
download | uhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.tar.gz uhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.tar.bz2 uhd-a63682f981c3d4b828b5454a7d4849d181b9c8b3.zip |
uhd: Add reference power level API to multi_usrp and radio_control
This adds the following API calls:
- multi_usrp::has_{rx,tx}_power_reference()
- multi_usrp::set_{rx,tx}_power_reference()
- multi_usrp::get_{rx,tx}_power_reference()
- radio_control::has_{rx,tx}_power_reference()
- radio_control::set_{rx,tx}_power_reference()
- radio_control::get_{rx,tx}_power_reference()
It also adds a manual page explaining the philosophy of the API.
Note that this does not actually add this feature to any device
implementation. Calling the new API calls will thus result in
`uhd::not_implemented_error` exceptions being thrown. This commit is to
lock down the API and ABI.
Diffstat (limited to 'host/lib/usrp/multi_usrp_python.hpp')
-rw-r--r-- | host/lib/usrp/multi_usrp_python.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp_python.hpp b/host/lib/usrp/multi_usrp_python.hpp index f4e0a73e1..62f34ffa2 100644 --- a/host/lib/usrp/multi_usrp_python.hpp +++ b/host/lib/usrp/multi_usrp_python.hpp @@ -19,6 +19,7 @@ void export_multi_usrp(py::module& m) const auto ALL_CHANS = multi_usrp::ALL_CHANS; const auto ALL_LOS = multi_usrp::ALL_LOS; + // clang-format off py::class_<multi_usrp, multi_usrp::sptr>(m, "multi_usrp") // Factory @@ -125,6 +126,8 @@ void export_multi_usrp(py::module& m) .def("get_rx_gain_profile" , &multi_usrp::get_rx_gain_profile, py::arg("chan") = 0) .def("set_rx_gain_profile" , &multi_usrp::set_rx_gain_profile, py::arg("profile"), py::arg("chan") = 0) .def("get_rx_gain_profile_names", &multi_usrp::get_rx_gain_profile_names, py::arg("chan") = 0) + .def("set_rx_power_reference" , &multi_usrp::set_rx_power_reference, py::arg("power_dbm"), py::arg("chan") = 0) + .def("get_rx_power_reference" , &multi_usrp::get_rx_power_reference, py::arg("chan") = 0) // TX methods .def("set_tx_subdev_spec" , &multi_usrp::set_tx_subdev_spec, py::arg("spec"), py::arg("mboard") = ALL_MBOARDS) @@ -163,6 +166,8 @@ void export_multi_usrp(py::module& m) .def("get_tx_gain_profile" , &multi_usrp::get_tx_gain_profile, py::arg("chan") = 0) .def("set_tx_gain_profile" , &multi_usrp::set_tx_gain_profile, py::arg("profile"), py::arg("chan") = 0) .def("get_tx_gain_profile_names", &multi_usrp::get_tx_gain_profile_names, py::arg("chan") = 0) + .def("set_tx_power_reference" , &multi_usrp::set_tx_power_reference, py::arg("power_dbm"), py::arg("chan") = 0) + .def("get_tx_power_reference" , &multi_usrp::get_tx_power_reference, py::arg("chan") = 0) // GPIO methods .def("get_gpio_banks" , &multi_usrp::get_gpio_banks) @@ -182,6 +187,7 @@ void export_multi_usrp(py::module& m) .def("set_tx_filter" , &multi_usrp::set_tx_filter) // clang-format off ; + // clang-format on } #endif /* INCLUDED_UHD_USRP_MULTI_USRP_PYTHON_HPP */ |