From 463dbf9ac3bca7b69331a4315404a6e6e6d29674 Mon Sep 17 00:00:00 2001 From: Aaron Rossetto Date: Mon, 1 Jun 2020 14:48:02 -0500 Subject: python: Add DDC RFNoC block controller bindings --- host/lib/rfnoc/ddc_block_control_python.hpp | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 host/lib/rfnoc/ddc_block_control_python.hpp (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/ddc_block_control_python.hpp b/host/lib/rfnoc/ddc_block_control_python.hpp new file mode 100644 index 000000000..75a44e1ea --- /dev/null +++ b/host/lib/rfnoc/ddc_block_control_python.hpp @@ -0,0 +1,32 @@ +// +// 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 + +using namespace uhd::rfnoc; + +void export_ddc_block_control(py::module& m) +{ + py::class_( + m, "ddc_block_control") + .def(py::init(&block_controller_factory::make_from)) + .def("set_freq", + &ddc_block_control::set_freq, + py::arg("freq"), + py::arg("chan"), + py::arg("time") = boost::optional()) + .def("get_freq", &ddc_block_control::get_freq) + .def("get_frequency_range", &ddc_block_control::get_frequency_range) + .def("get_input_rate", &ddc_block_control::get_input_rate) + .def("set_input_rate", &ddc_block_control::set_input_rate) + .def("get_output_rate", &ddc_block_control::get_output_rate) + .def("get_output_rates", &ddc_block_control::get_output_rates) + .def("set_output_rate", &ddc_block_control::set_output_rate) + .def("issue_stream_cmd", &ddc_block_control::issue_stream_cmd); +} -- cgit v1.2.3