43 lines
1.6 KiB
C++
43 lines
1.6 KiB
C++
#include <pybind11/stl.h>
|
|
#include <stdint.h>
|
|
#include <iostream>
|
|
#include "lasp_deviceinfo.h"
|
|
|
|
using std::cerr;
|
|
namespace py = pybind11;
|
|
|
|
void init_deviceinfo(py::module& m) {
|
|
|
|
/// DeviceInfo
|
|
py::class_<DeviceInfo> devinfo(m, "DeviceInfo");
|
|
devinfo.def("__str__", [](const DeviceInfo& d) {return d.device_name;});
|
|
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);
|
|
|
|
devinfo.def_readonly("physicalOutputQty", &DeviceInfo::physicalOutputQty);
|
|
|
|
}
|
|
|