2022-07-20 12:58:48 +00:00
|
|
|
#include <pybind11/stl.h>
|
|
|
|
#include <stdint.h>
|
2023-06-14 19:23:53 +00:00
|
|
|
#include <iostream>
|
2022-07-20 12:58:48 +00:00
|
|
|
#include "lasp_deviceinfo.h"
|
|
|
|
|
|
|
|
using std::cerr;
|
|
|
|
namespace py = pybind11;
|
|
|
|
|
|
|
|
void init_deviceinfo(py::module& m) {
|
|
|
|
|
|
|
|
/// DeviceInfo
|
|
|
|
py::class_<DeviceInfo> devinfo(m, "DeviceInfo");
|
2022-09-22 08:18:38 +00:00
|
|
|
devinfo.def("__str__", [](const DeviceInfo& d) {return d.device_name;});
|
2022-07-20 12:58:48 +00:00
|
|
|
devinfo.def_readonly("api", &DeviceInfo::api);
|
|
|
|
devinfo.def_readonly("device_name", &DeviceInfo::device_name);
|
|
|
|
|
|
|
|
devinfo.def_readonly("availableDataTypes", &DeviceInfo::availableDataTypes);
|
|
|
|
devinfo.def_readonly("prefDataTypeIndex", &DeviceInfo::prefDataTypeIndex);
|
|
|
|
|
|
|
|
devinfo.def_readonly("availableSampleRates",
|
|
|
|
&DeviceInfo::availableSampleRates);
|
|
|
|
devinfo.def_readonly("prefSampleRateIndex", &DeviceInfo::prefSampleRateIndex);
|
|
|
|
|
|
|
|
devinfo.def_readonly("availableFramesPerBlock",
|
|
|
|
&DeviceInfo::availableFramesPerBlock);
|
|
|
|
devinfo.def_readonly("prefFramesPerBlockIndex",
|
|
|
|
&DeviceInfo::prefFramesPerBlockIndex);
|
|
|
|
|
|
|
|
devinfo.def_readonly("availableInputRanges",
|
|
|
|
&DeviceInfo::availableInputRanges);
|
|
|
|
devinfo.def_readonly("prefInputRangeIndex", &DeviceInfo::prefInputRangeIndex);
|
|
|
|
|
|
|
|
devinfo.def_readonly("ninchannels", &DeviceInfo::ninchannels);
|
|
|
|
devinfo.def_readonly("noutchannels", &DeviceInfo::noutchannels);
|
|
|
|
devinfo.def_readonly("hasInputIEPE", &DeviceInfo::hasInputIEPE);
|
|
|
|
devinfo.def_readonly("hasInputACCouplingSwitch",
|
|
|
|
&DeviceInfo::hasInputACCouplingSwitch);
|
|
|
|
|
2022-10-21 20:30:06 +00:00
|
|
|
devinfo.def_readonly("physicalOutputQty", &DeviceInfo::physicalOutputQty);
|
|
|
|
|
2022-07-20 12:58:48 +00:00
|
|
|
}
|
|
|
|
|