From 0f7369481c40f4b841de8d4f6eca825e7e7b4bda Mon Sep 17 00:00:00 2001 From: Josh Morman <mormjb@gmail.com> Date: Wed, 10 Jun 2020 10:30:12 -0400 Subject: uhd: fix pybind11 bindings Instead of relying on the pyuhd pybind11 bindings, create new gr::uhd pybind11 bindings that wrap the underlying types. Trying to use the pyuhd bindings directly has many issues Also, push some of the overloading into the constructors as opposed to in the __init__ functions with constructor interception --- gr-uhd/include/gnuradio/uhd/usrp_source.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gr-uhd/include/gnuradio/uhd/usrp_source.h') diff --git a/gr-uhd/include/gnuradio/uhd/usrp_source.h b/gr-uhd/include/gnuradio/uhd/usrp_source.h index 8165a7edb9..bd08f08641 100644 --- a/gr-uhd/include/gnuradio/uhd/usrp_source.h +++ b/gr-uhd/include/gnuradio/uhd/usrp_source.h @@ -58,6 +58,16 @@ public: const ::uhd::stream_args_t& stream_args, const bool issue_stream_cmd_on_start = true); + static sptr make(const std::string& device_addr_str, + const ::uhd::stream_args_t& stream_args, + const bool issue_stream_cmd_on_start = true) + { + return make(::uhd::device_addr_t(device_addr_str), + stream_args, + issue_stream_cmd_on_start); + } + + /*! * Set the start time for incoming samples. * To control when samples are received, -- cgit v1.2.3