diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-01 14:51:53 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-09 07:09:34 -0500 |
commit | 5d861ec14f5fdbdaa709d560946a3b77499c7858 (patch) | |
tree | 65292c931bb80db8f960a2a41e685f132e9c8261 /host/lib | |
parent | 463dbf9ac3bca7b69331a4315404a6e6e6d29674 (diff) | |
download | uhd-5d861ec14f5fdbdaa709d560946a3b77499c7858.tar.gz uhd-5d861ec14f5fdbdaa709d560946a3b77499c7858.tar.bz2 uhd-5d861ec14f5fdbdaa709d560946a3b77499c7858.zip |
python: Add DUC RFNoC block controller bindings
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/rfnoc/duc_block_control_python.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/host/lib/rfnoc/duc_block_control_python.hpp b/host/lib/rfnoc/duc_block_control_python.hpp new file mode 100644 index 000000000..b34b06227 --- /dev/null +++ b/host/lib/rfnoc/duc_block_control_python.hpp @@ -0,0 +1,31 @@ +// +// Copyright 2020 Ettus Research, a National Instruments Brand +// +// SPDX-License-Identifier: GPL-3.0-or-later +// + +#pragma once + +#include "block_controller_factory_python.hpp" +#include <uhd/rfnoc/duc_block_control.hpp> + +using namespace uhd::rfnoc; + +void export_duc_block_control(py::module& m) +{ + py::class_<duc_block_control, noc_block_base, duc_block_control::sptr>( + m, "duc_block_control") + .def(py::init(&block_controller_factory<duc_block_control>::make_from)) + .def("set_freq", + &duc_block_control::set_freq, + py::arg("freq"), + py::arg("chan"), + py::arg("time") = boost::optional<uhd::time_spec_t>()) + .def("get_freq", &duc_block_control::get_freq) + .def("get_frequency_range", &duc_block_control::get_frequency_range) + .def("get_input_rate", &duc_block_control::get_input_rate) + .def("get_output_rate", &duc_block_control::get_output_rate) + .def("set_output_rate", &duc_block_control::set_output_rate) + .def("get_input_rates", &duc_block_control::get_input_rates) + .def("set_input_rate", &duc_block_control::set_input_rate); +} |