From dbbabd4b572319fd7630a6828e3c10494ab0a6b1 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 15 Nov 2018 14:14:49 +0100 Subject: [PATCH] SoapySDR support: input and output: display mapped setting elements after applying settings --- .../soapysdroutput/soapysdroutput.cpp | 32 +++++++++++++++++++ .../soapysdrinput/soapysdrinput.cpp | 32 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/plugins/samplesink/soapysdroutput/soapysdroutput.cpp b/plugins/samplesink/soapysdroutput/soapysdroutput.cpp index 447b3e7e5..a821007b8 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutput.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutput.cpp @@ -1193,6 +1193,38 @@ bool SoapySDROutput::applySettings(const SoapySDROutputSettings& settings, bool << " m_globalGain: " << m_settings.m_globalGain << " force: " << force; + QMap::const_iterator doubleIt = m_settings.m_individualGains.begin(); + + for(; doubleIt != m_settings.m_individualGains.end(); ++doubleIt) { + qDebug("SoapySDROutput::applySettings: m_individualGains[%s]: %lf", doubleIt.key().toStdString().c_str(), doubleIt.value()); + } + + doubleIt = m_settings.m_tunableElements.begin(); + + for(; doubleIt != m_settings.m_tunableElements.end(); ++doubleIt) { + qDebug("SoapySDROutput::applySettings: m_tunableElements[%s]: %lf", doubleIt.key().toStdString().c_str(), doubleIt.value()); + } + + QMap::const_iterator varIt = m_settings.m_deviceArgSettings.begin(); + + for(; varIt != m_settings.m_deviceArgSettings.end(); ++varIt) + { + qDebug("SoapySDROutput::applySettings: m_deviceArgSettings[%s] (type %d): %s", + varIt.key().toStdString().c_str(), + (int) varIt.value().type(), // bool: 1, int: 2, double: 6, string: 10 (http://doc.qt.io/archives/qt-4.8/qvariant.html) + varIt.value().toString().toStdString().c_str()); + } + + varIt = m_settings.m_streamArgSettings.begin(); + + for(; varIt != m_settings.m_streamArgSettings.end(); ++varIt) + { + qDebug("SoapySDROutput::applySettings: m_streamArgSettings[%s] (type %d): %s", + varIt.key().toStdString().c_str(), + (int) varIt.value().type(), + varIt.value().toString().toStdString().c_str()); + } + return true; } diff --git a/plugins/samplesource/soapysdrinput/soapysdrinput.cpp b/plugins/samplesource/soapysdrinput/soapysdrinput.cpp index a0ba0989f..2942dec7f 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinput.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinput.cpp @@ -1245,6 +1245,38 @@ bool SoapySDRInput::applySettings(const SoapySDRInputSettings& settings, bool fo << " m_globalGain: " << m_settings.m_globalGain << " force: " << force; + QMap::const_iterator doubleIt = m_settings.m_individualGains.begin(); + + for(; doubleIt != m_settings.m_individualGains.end(); ++doubleIt) { + qDebug("SoapySDRInput::applySettings: m_individualGains[%s]: %lf", doubleIt.key().toStdString().c_str(), doubleIt.value()); + } + + doubleIt = m_settings.m_tunableElements.begin(); + + for(; doubleIt != m_settings.m_tunableElements.end(); ++doubleIt) { + qDebug("SoapySDRInput::applySettings: m_tunableElements[%s]: %lf", doubleIt.key().toStdString().c_str(), doubleIt.value()); + } + + QMap::const_iterator varIt = m_settings.m_deviceArgSettings.begin(); + + for(; varIt != m_settings.m_deviceArgSettings.end(); ++varIt) + { + qDebug("SoapySDRInput::applySettings: m_deviceArgSettings[%s] (type %d): %s", + varIt.key().toStdString().c_str(), + (int) varIt.value().type(), // bool: 1, int: 2, double: 6, string: 10 (http://doc.qt.io/archives/qt-4.8/qvariant.html) + varIt.value().toString().toStdString().c_str()); + } + + varIt = m_settings.m_streamArgSettings.begin(); + + for(; varIt != m_settings.m_streamArgSettings.end(); ++varIt) + { + qDebug("SoapySDRInput::applySettings: m_streamArgSettings[%s] (type %d): %s", + varIt.key().toStdString().c_str(), + (int) varIt.value().type(), + varIt.value().toString().toStdString().c_str()); + } + return true; }