GNU Radio block for interfacing with various radio hardware
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
637 B

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
#include <osmosdr/device.h>
void bind_device(py::module& m)
using device_t = ::osmosdr::device_t;
py::class_<device_t>(m, "device_t")
.def(py::init<std::string&>(), py::arg("args") = "")
.def("to_pp_string", &device_t::to_pp_string)
.def("to_string", &device_t::to_string);
using devices_t = ::osmosdr::devices_t;
py::class_<devices_t>(m, "devices_t");
using device = ::osmosdr::device;
py::class_<device>(m, "device")
.def_static("find", &device::find, py::arg("hint") = device_t());