diff options
author | Jesse Zhang <65556515+jessezhang-ni@users.noreply.github.com> | 2020-07-22 19:55:05 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-07-30 12:51:11 -0500 |
commit | aca52b700282153760ae9331a791ddd41a2f4dd5 (patch) | |
tree | 0b93362fb169f2fe31258fe93b163ec8050e8dff /host/lib/rfnoc | |
parent | 261197a18ffd36fafddf21158f92ed34a07abf77 (diff) | |
download | uhd-aca52b700282153760ae9331a791ddd41a2f4dd5.tar.gz uhd-aca52b700282153760ae9331a791ddd41a2f4dd5.tar.bz2 uhd-aca52b700282153760ae9331a791ddd41a2f4dd5.zip |
python: Add Switchboard block python bindings
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/switchboard_block_control_python.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/host/lib/rfnoc/switchboard_block_control_python.hpp b/host/lib/rfnoc/switchboard_block_control_python.hpp new file mode 100644 index 000000000..7715b05c0 --- /dev/null +++ b/host/lib/rfnoc/switchboard_block_control_python.hpp @@ -0,0 +1,21 @@ +// +// 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/switchboard_block_control.hpp> + +using namespace uhd::rfnoc; + +void export_switchboard_block_control(py::module& m) +{ + py::class_<switchboard_block_control, + noc_block_base, + switchboard_block_control::sptr>(m, "switchboard_block_control") + .def(py::init(&block_controller_factory<switchboard_block_control>::make_from)) + .def("connect", &switchboard_block_control::connect); +} |