From 30992add71084bb844719c0d90ec5fc62105ff7f Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Fri, 21 Oct 2022 22:30:06 +0200 Subject: [PATCH] Physical output quantity added in device info --- src/lasp/device/lasp_deviceinfo.h | 14 +++++++++++++- src/lasp/device/lasp_uldaq.cpp | 2 ++ src/lasp/pybind11/lasp_deviceinfo.cpp | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/lasp/device/lasp_deviceinfo.h b/src/lasp/device/lasp_deviceinfo.h index de3a168..11f1a43 100644 --- a/src/lasp/device/lasp_deviceinfo.h +++ b/src/lasp/device/lasp_deviceinfo.h @@ -97,10 +97,22 @@ public: } /** - * @brief Whether the device has an internal monitor of the output signal. + * @brief Whether the device has an internal monitor of the output signal. If + * true, the device is able to monitor output signals internally and able to + * present output signals as virtual input signals. This only works together + * Daq's that are able to run in full duplex mode. */ bool hasInternalOutputMonitor = false; + /** + * @brief The physical quantity of the output signal. For 'normal' audio + * devices, this is typically a 'number' between +/- full scale. For some + * devices however, the output quantity corresponds to a physical signal, + * such a Volts. + */ + DaqChannel::Qty physicalOutputQty = DaqChannel::Qty::Number; + + /** * @brief String representation of DeviceInfo * diff --git a/src/lasp/device/lasp_uldaq.cpp b/src/lasp/device/lasp_uldaq.cpp index 8f0d4c4..8a4965d 100644 --- a/src/lasp/device/lasp_uldaq.cpp +++ b/src/lasp/device/lasp_uldaq.cpp @@ -629,6 +629,8 @@ void fillUlDaqDeviceInfo(std::vector &devinfolist) { name += string(descriptor.productName) + " " + string(descriptor.uniqueId); devinfo.device_name = std::move(name); + devinfo.physicalOutputQty = DaqChannel::Qty::Voltage; + devinfo.api_specific_devindex = i; devinfo.availableDataTypes.push_back( DataTypeDescriptor::DataType::dtype_fl64); diff --git a/src/lasp/pybind11/lasp_deviceinfo.cpp b/src/lasp/pybind11/lasp_deviceinfo.cpp index 3d0ad4a..ad3b9de 100644 --- a/src/lasp/pybind11/lasp_deviceinfo.cpp +++ b/src/lasp/pybind11/lasp_deviceinfo.cpp @@ -1,4 +1,3 @@ -#include #include #include #include "lasp_deviceinfo.h" @@ -36,5 +35,7 @@ void init_deviceinfo(py::module& m) { devinfo.def_readonly("hasInputACCouplingSwitch", &DeviceInfo::hasInputACCouplingSwitch); + devinfo.def_readonly("physicalOutputQty", &DeviceInfo::physicalOutputQty); + }