diff options
author | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-01 15:31:21 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-06-09 07:12:15 -0500 |
commit | 65578ebd055c65f8e3ddf68f97cf1e0a4afdffa7 (patch) | |
tree | 84544bd69de9df366ef8b886bfda65862bbdce16 /host/lib/rfnoc | |
parent | 378287b381edfd15dcb97bb2632ff5fb91933f6b (diff) | |
download | uhd-65578ebd055c65f8e3ddf68f97cf1e0a4afdffa7.tar.gz uhd-65578ebd055c65f8e3ddf68f97cf1e0a4afdffa7.tar.bz2 uhd-65578ebd055c65f8e3ddf68f97cf1e0a4afdffa7.zip |
python: Add null RFNoC block controller bindings
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/null_block_control_python.hpp | 27 |
1 files changed, 27 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); +} |