2017-05-02 18:10:05 +00:00
|
|
|
//
|
|
|
|
|
// Copyright 2017-2018 Ettus Research, a National Instruments Company
|
2019-02-04 15:00:16 +00:00
|
|
|
// Copyright 2019 Ettus Research, a National Instruments Brand
|
2017-05-02 18:10:05 +00:00
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef INCLUDED_UHD_USRP_SUBDEV_SPEC_PYTHON_HPP
|
|
|
|
|
#define INCLUDED_UHD_USRP_SUBDEV_SPEC_PYTHON_HPP
|
|
|
|
|
|
|
|
|
|
#include <uhd/usrp/subdev_spec.hpp>
|
|
|
|
|
|
2019-02-04 15:00:16 +00:00
|
|
|
void export_subdev_spec(py::module& m)
|
2017-05-02 18:10:05 +00:00
|
|
|
{
|
|
|
|
|
using subdev_spec_pair_t = uhd::usrp::subdev_spec_pair_t;
|
|
|
|
|
using subdev_spec_t = uhd::usrp::subdev_spec_t;
|
|
|
|
|
|
2019-02-04 15:00:16 +00:00
|
|
|
py::class_<subdev_spec_pair_t> (m, "subdev_spec_pair")
|
|
|
|
|
.def(py::init<const std::string&, const std::string &>())
|
2017-05-02 18:10:05 +00:00
|
|
|
// Properties
|
2019-02-04 15:00:16 +00:00
|
|
|
.def_readwrite("db_name", &subdev_spec_pair_t::db_name)
|
|
|
|
|
.def_readwrite("sd_name", &subdev_spec_pair_t::sd_name)
|
2017-05-02 18:10:05 +00:00
|
|
|
;
|
|
|
|
|
|
2019-02-04 15:00:16 +00:00
|
|
|
py::class_<subdev_spec_t>(m, "subdev_spec")
|
|
|
|
|
.def(py::init<const std::string &>())
|
2017-05-02 18:10:05 +00:00
|
|
|
|
|
|
|
|
// Methods
|
|
|
|
|
.def("__str__", &subdev_spec_t::to_pp_string)
|
|
|
|
|
.def("to_string", &subdev_spec_t::to_string)
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* INCLUDED_UHD_USRP_SUBDEV_SPEC_PYTHON_HPP */
|