python: Allow SubdevSpec to be implied from a string

This allows the following:

```py
my_usrp.set_rx_subdev_spec("A:0 B:0")
```

Without this change, only the following was possible:

```py
my_usrp.set_rx_subdev_spec(uhd.usrp.SubdevSpec("A:0 B:0"))
```

Because the implicit-from-string version is possible in C++, we now also
enable it in Python.
This commit is contained in:
Martin Braun 2025-11-27 15:03:35 +01:00 committed by Jörg Hofrichter
parent ed2da77bba
commit 768ea58e92

View File

@ -31,6 +31,8 @@ void export_subdev_spec(py::module& m)
[](subdev_spec_t& self, const size_t idx) { return self.at(idx); })
;
py::implicitly_convertible<std::string, uhd::usrp::subdev_spec_t>();
}
#endif /* INCLUDED_UHD_USRP_SUBDEV_SPEC_PYTHON_HPP */