mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Bindings: Python: Migrate to smart_holder
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
namespace icsneo {
|
||||
|
||||
void init_devicetype(pybind11::module_& m) {
|
||||
pybind11::class_<DeviceType> deviceType(m, "DeviceType");
|
||||
pybind11::classh<DeviceType> deviceType(m, "DeviceType");
|
||||
pybind11::native_enum<DeviceType::Enum>(deviceType, "Enum", "enum.IntEnum")
|
||||
.value("Unknown", DeviceType::Enum::Unknown)
|
||||
.value("BLUE", DeviceType::Enum::BLUE)
|
||||
|
||||
@@ -16,7 +16,7 @@ struct DeviceSettingsNamespace {
|
||||
};
|
||||
|
||||
void init_idevicesettings(pybind11::module_& m) {
|
||||
pybind11::class_<DeviceSettingsNamespace> settings(m, "Settings");
|
||||
pybind11::classh<DeviceSettingsNamespace> settings(m, "Settings");
|
||||
|
||||
pybind11::enum_<DeviceSettingsNamespace::EthLinkMode>(settings, "EthernetLinkMode")
|
||||
.value("Auto", DeviceSettingsNamespace::EthLinkMode::AE_LINK_AUTO)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace icsneo {
|
||||
|
||||
void init_versionreport(pybind11::module_& m) {
|
||||
pybind11::class_<VersionReport>(m, "VersionReport")
|
||||
pybind11::classh<VersionReport>(m, "VersionReport")
|
||||
.def_readonly("id", &VersionReport::id)
|
||||
.def_readonly("name", &VersionReport::name)
|
||||
.def_readonly("major", &VersionReport::major)
|
||||
|
||||
Reference in New Issue
Block a user