aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/fe_connection_python.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-04 16:00:16 +0100
committerMartin Braun <martin.braun@ettus.com>2019-02-22 16:56:52 -0800
commit692ddc71b17196487dcad982836e074cab9a0f25 (patch)
treecf76abf577dde6128e03561c52d9c31dca302026 /host/lib/usrp/fe_connection_python.hpp
parent51bbf548c9b442d0b53b6c8de5f89403de274424 (diff)
downloaduhd-692ddc71b17196487dcad982836e074cab9a0f25.tar.gz
uhd-692ddc71b17196487dcad982836e074cab9a0f25.tar.bz2
uhd-692ddc71b17196487dcad982836e074cab9a0f25.zip
python: Replace Boost.Python with PyBind11
This does not change the Python API itself, but it is still a significant change. Most importantly, it removes the dependency on Boost.Python.
Diffstat (limited to 'host/lib/usrp/fe_connection_python.hpp')
-rw-r--r--host/lib/usrp/fe_connection_python.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/fe_connection_python.hpp b/host/lib/usrp/fe_connection_python.hpp
index 29bba1746..d1304909e 100644
--- a/host/lib/usrp/fe_connection_python.hpp
+++ b/host/lib/usrp/fe_connection_python.hpp
@@ -1,5 +1,6 @@
//
// Copyright 2017-2018 Ettus Research, a National Instruments Company
+// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
@@ -9,22 +10,22 @@
#include <uhd/usrp/fe_connection.hpp>
-void export_fe_connection()
+void export_fe_connection(py::module& m)
{
using fe_connection_t = uhd::usrp::fe_connection_t;
using sampling_t = fe_connection_t::sampling_t;
- bp::enum_<sampling_t>("sampling")
+ py::enum_<sampling_t>(m, "sampling")
.value("QUADRATURE", sampling_t::QUADRATURE)
.value("HETERODYNE", sampling_t::HETERODYNE)
.value("REAL" , sampling_t::REAL )
;
- bp::class_<fe_connection_t>
- ("fe_connection", bp::init<sampling_t, bool, bool, bool, double>())
+ py::class_<fe_connection_t>(m, "fe_connection")
// Constructors
- .def(bp::init<const std::string&, double>())
+ .def(py::init<sampling_t, bool, bool, bool, double>())
+ .def(py::init<const std::string&, double>())
// Methods
.def("get_sampling_mode", &fe_connection_t::get_sampling_mode)