summaryrefslogtreecommitdiff
path: root/gr-uhd/python/uhd/bindings/usrp_source_python.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/python/uhd/bindings/usrp_source_python.cc')
-rw-r--r--gr-uhd/python/uhd/bindings/usrp_source_python.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/gr-uhd/python/uhd/bindings/usrp_source_python.cc b/gr-uhd/python/uhd/bindings/usrp_source_python.cc
index 6834e23cd8..19f3d6017d 100644
--- a/gr-uhd/python/uhd/bindings/usrp_source_python.cc
+++ b/gr-uhd/python/uhd/bindings/usrp_source_python.cc
@@ -25,10 +25,26 @@ void bind_usrp_source(py::module& m)
using usrp_source = ::gr::uhd::usrp_source;
- py::class_<usrp_source, gr::uhd::usrp_block, std::shared_ptr<usrp_source>>(
- m, "usrp_source", D(usrp_source))
+ py::class_<usrp_source,
+ gr::uhd::usrp_block,
+ gr::sync_block,
+ gr::block,
+ gr::basic_block,
+ std::shared_ptr<usrp_source>>(m, "usrp_source", D(usrp_source))
+
+ .def(py::init(
+ (std::shared_ptr<gr::uhd::usrp_source>(*)(const ::uhd::device_addr_t&,
+ const ::uhd::stream_args_t&,
+ const bool)) &
+ usrp_source::make),
+ py::arg("device_addr"),
+ py::arg("stream_args"),
+ py::arg("issue_stream_cmd_on_start") = true,
+ D(usrp_source, make))
- .def(py::init(&usrp_source::make),
+ .def(py::init((std::shared_ptr<gr::uhd::usrp_source>(*)(
+ const std::string&, const ::uhd::stream_args_t&, const bool)) &
+ usrp_source::make),
py::arg("device_addr"),
py::arg("stream_args"),
py::arg("issue_stream_cmd_on_start") = true,