/* * 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(26d690b565b0b5c7489e5969d697ebf6) */ /***********************************************************************************/ #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)); }