aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/null_block_control_python.hpp27
-rw-r--r--host/python/pyuhd.cpp2
-rw-r--r--host/python/uhd/rfnoc.py1
3 files changed, 30 insertions, 0 deletions
diff --git a/host/lib/rfnoc/null_block_control_python.hpp b/host/lib/rfnoc/null_block_control_python.hpp
new file mode 100644
index 000000000..732206e02
--- /dev/null
+++ b/host/lib/rfnoc/null_block_control_python.hpp
@@ -0,0 +1,27 @@
+//
+// 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/null_block_control.hpp>
+
+using namespace uhd::rfnoc;
+
+void export_null_block_control(py::module& m)
+{
+ py::class_<null_block_control, noc_block_base, null_block_control::sptr>(
+ m, "null_block_control")
+ .def(py::init(&block_controller_factory<null_block_control>::make_from))
+ .def("issue_stream_cmd", &null_block_control::issue_stream_cmd)
+ .def("reset_counters", &null_block_control::reset_counters)
+ .def("set_bytes_per_packet", &null_block_control::set_bytes_per_packet)
+ .def("set_throttle_cycles", &null_block_control::set_throttle_cycles)
+ .def("get_lines_per_packet", &null_block_control::get_lines_per_packet)
+ .def("get_bytes_per_packet", &null_block_control::get_bytes_per_packet)
+ .def("get_throttle_cycles", &null_block_control::get_throttle_cycles)
+ .def("get_count", &null_block_control::get_count);
+}
diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp
index 9ead86896..eed30ff32 100644
--- a/host/python/pyuhd.cpp
+++ b/host/python/pyuhd.cpp
@@ -18,6 +18,7 @@ namespace py = pybind11;
#include "rfnoc/duc_block_control_python.hpp"
#include "rfnoc/fir_filter_block_control_python.hpp"
#include "rfnoc/fosphor_block_control_python.hpp"
+#include "rfnoc/null_block_control_python.hpp"
#include "rfnoc/radio_control_python.hpp"
#include "rfnoc/rfnoc_python.hpp"
#include "rfnoc/vector_iir_block_control_python.hpp"
@@ -84,6 +85,7 @@ PYBIND11_MODULE(libpyuhd, m)
export_duc_block_control(rfnoc_module);
export_fosphor_block_control(rfnoc_module);
export_fir_filter_block_control(rfnoc_module);
+ export_null_block_control(rfnoc_module);
export_radio_control(rfnoc_module);
export_vector_iir_block_control(rfnoc_module);
diff --git a/host/python/uhd/rfnoc.py b/host/python/uhd/rfnoc.py
index 677b3c893..bc8217d68 100644
--- a/host/python/uhd/rfnoc.py
+++ b/host/python/uhd/rfnoc.py
@@ -22,6 +22,7 @@ DdcBlockControl = lib.rfnoc.ddc_block_control
DucBlockControl = lib.rfnoc.duc_block_control
FosphorBlockControl = lib.rfnoc.fosphor_block_control
FirFilterBlockControl = lib.rfnoc.fir_filter_block_control
+NullBlockControl = lib.rfnoc.null_block_control
RadioControl = lib.rfnoc.radio_control
VectorIirBlockControl = lib.rfnoc.vector_iir_block_control