diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2021-03-02 08:04:18 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-03-08 06:33:09 -0500 |
commit | 032ac81a4cddc36f7d184500a5bb2e7d8419014b (patch) | |
tree | 1c4f92f719a2d0ae6570647c01dec11296177c90 /gnuradio-runtime/python/gnuradio | |
parent | c85b2eeffb235b085bd8f934cb52e073510fd3ad (diff) |
runtime: clean up realtime impl namespace
Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
Diffstat (limited to 'gnuradio-runtime/python/gnuradio')
4 files changed, 11 insertions, 89 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt index 1ad05942e9..17b1a30590 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt @@ -46,7 +46,6 @@ messages/msg_queue_python.cc # pycallback_object_python.cc random_python.cc realtime_python.cc - realtime_impl_python.cc # rpcbufferedget_python.cc # rpccallbackregister_base_python.cc # rpcmanager_python.cc diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc index 8c8fe73c17..8307fa8790 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc @@ -56,7 +56,6 @@ void bind_prefs(py::module&); // void bind_pycallback_object(py::module&); void bind_random(py::module&); void bind_realtime(py::module&); -void bind_realtime_impl(py::module&); // void bind_rpcbufferedget(py::module&); // void bind_rpccallbackregister_base(py::module&); // void bind_rpcmanager(py::module&); @@ -157,7 +156,6 @@ PYBIND11_MODULE(gr_python, m) // // bind_pycallback_object(m); bind_random(m); bind_realtime(m); - bind_realtime_impl(m); // // bind_rpcbufferedget(m); // // bind_rpccallbackregister_base(m); // // bind_rpcmanager(m); diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_impl_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_impl_python.cc deleted file mode 100644 index 9ed1664ac3..0000000000 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_impl_python.cc +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -/***********************************************************************************/ -/* This file is automatically generated using bindtool and can be manually edited */ -/* The following lines can be configured to regenerate this file during cmake */ -/* If manual edits are made, the following tags should be modified accordingly. */ -/* BINDTOOL_GEN_AUTOMATIC(0) */ -/* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(realtime_impl.h) */ -/* BINDTOOL_HEADER_FILE_HASH(8b8e4e0cddb41c563e239c4f532d06e1) */ -/***********************************************************************************/ - -#include <pybind11/complex.h> -#include <pybind11/pybind11.h> -#include <pybind11/stl.h> - -namespace py = pybind11; - -#include <gnuradio/realtime_impl.h> -// pydoc.h is automatically generated in the build directory -#include <realtime_impl_pydoc.h> - -void bind_realtime_impl(py::module& m) -{ - - - py::enum_<::gr::rt_status_t>(m, "rt_status_t") - .value("RT_OK", ::gr::RT_OK) // 0 - .value("RT_NOT_IMPLEMENTED", ::gr::RT_NOT_IMPLEMENTED) // 1 - .value("RT_NO_PRIVS", ::gr::RT_NO_PRIVS) // 2 - .value("RT_OTHER_ERROR", ::gr::RT_OTHER_ERROR) // 3 - .export_values(); - py::enum_<::gr::rt_sched_policy>(m, "rt_sched_policy") - .value("RT_SCHED_RR", ::gr::RT_SCHED_RR) // 0 - .value("RT_SCHED_FIFO", ::gr::RT_SCHED_FIFO) // 1 - .export_values(); - - - py::module m_impl = m.def_submodule("impl"); - - using rt_sched_param = ::gr::impl::rt_sched_param; - - - py::class_<rt_sched_param, std::shared_ptr<rt_sched_param>>( - m_impl, "rt_sched_param", D(impl, rt_sched_param)) - - .def(py::init<>(), D(impl, rt_sched_param, rt_sched_param, 0)) - .def(py::init<int, gr::rt_sched_policy>(), - py::arg("priority_"), - py::arg("policy_") = ::gr::rt_sched_policy::RT_SCHED_RR, - D(impl, rt_sched_param, rt_sched_param, 1)) - .def(py::init<gr::impl::rt_sched_param const&>(), - py::arg("arg0"), - D(impl, rt_sched_param, rt_sched_param, 2)) - - ; - - - m_impl.def("rt_priority_min", &::gr::impl::rt_priority_min, D(impl, rt_priority_min)); - - - m_impl.def("rt_priority_max", &::gr::impl::rt_priority_max, D(impl, rt_priority_max)); - - - m_impl.def("rt_priority_default", - &::gr::impl::rt_priority_default, - D(impl, rt_priority_default)); - - - m_impl.def("enable_realtime_scheduling", - &::gr::impl::enable_realtime_scheduling, - py::arg("arg0") = gr::impl::rt_sched_param(), - D(impl, enable_realtime_scheduling)); -} diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_python.cc index 5efd134281..3770ee9aa1 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_python.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/realtime_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(realtime.h) */ -/* BINDTOOL_HEADER_FILE_HASH(3a8add4fc688853c32e8c4c8f8e51d0e) */ +/* BINDTOOL_HEADER_FILE_HASH(4fe8778231103a1a91b8032daec80655) */ /***********************************************************************************/ #include <pybind11/complex.h> @@ -29,12 +29,18 @@ namespace py = pybind11; void bind_realtime(py::module& m) { - + py::enum_<::gr::rt_status_t>(m, "rt_status_t") + .value("RT_OK", ::gr::RT_OK) // 0 + .value("RT_NOT_IMPLEMENTED", ::gr::RT_NOT_IMPLEMENTED) // 1 + .value("RT_NO_PRIVS", ::gr::RT_NO_PRIVS) // 2 + .value("RT_OTHER_ERROR", ::gr::RT_OTHER_ERROR) // 3 + .export_values(); + py::enum_<::gr::rt_sched_policy>(m, "rt_sched_policy") + .value("RT_SCHED_RR", ::gr::RT_SCHED_RR) // 0 + .value("RT_SCHED_FIFO", ::gr::RT_SCHED_FIFO) // 1 + .export_values(); m.def("enable_realtime_scheduling", &::gr::enable_realtime_scheduling, D(enable_realtime_scheduling)); - - - py::module m_impl = m.def_submodule("impl"); } |