summaryrefslogtreecommitdiff
path: root/gr-uhd/python/uhd
diff options
context:
space:
mode:
authorVictor Wollesen <victor.w@pervices.com>2021-03-01 21:01:51 +0000
committermormj <34754695+mormj@users.noreply.github.com>2021-03-03 06:19:46 -0500
commit34f658646b84699a96a6296336c49a34f4d9898f (patch)
treeda657a7affd470243ea53dfba91148305043afbc /gr-uhd/python/uhd
parent57bf40d82525c711e2f00af6fd43bb4ad6f302fe (diff)
GR-UHD: Add additional gr-uhd bindings.
Signed-off-by: Victor Wollesen <victor.w@pervices.com>
Diffstat (limited to 'gr-uhd/python/uhd')
-rw-r--r--gr-uhd/python/uhd/bindings/uhd_types_python.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gr-uhd/python/uhd/bindings/uhd_types_python.cc b/gr-uhd/python/uhd/bindings/uhd_types_python.cc
index 13f92c7483..c593ce480b 100644
--- a/gr-uhd/python/uhd/bindings/uhd_types_python.cc
+++ b/gr-uhd/python/uhd/bindings/uhd_types_python.cc
@@ -95,10 +95,23 @@ void bind_uhd_types(py::module& m)
py::class_<stream_cmd_t>(m, "stream_cmd_t")
.def(py::init<stream_cmd_t::stream_mode_t>())
// Properties
+ .def_readwrite("stream_mode", &stream_cmd_t::stream_mode)
.def_readwrite("num_samps", &stream_cmd_t::num_samps)
.def_readwrite("time_spec", &stream_cmd_t::time_spec)
.def_readwrite("stream_now", &stream_cmd_t::stream_now);
+ // ::uhd::stream_cmd_t::stream_mode_t
+ py::enum_<stream_cmd_t::stream_mode_t>(m, "stream_mode_t")
+ .value("STREAM_MODE_START_CONTINUOUS",
+ stream_cmd_t::stream_mode_t::STREAM_MODE_START_CONTINUOUS)
+ .value("STREAM_MODE_STOP_CONTINUOUS",
+ stream_cmd_t::stream_mode_t::STREAM_MODE_STOP_CONTINUOUS)
+ .value("STREAM_MODE_NUM_SAMPS_AND_DONE",
+ stream_cmd_t::stream_mode_t::STREAM_MODE_NUM_SAMPS_AND_DONE)
+ .value("STREAM_MODE_NUM_SAMPS_AND_MORE",
+ stream_cmd_t::stream_mode_t::STREAM_MODE_NUM_SAMPS_AND_MORE)
+ .export_values();
+
// ::uhd::meta_range_t
using meta_range_t = ::uhd::meta_range_t;