From fed7f72da130a85f264b7e2498d49c9c4d9a8a8b Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 12 Sep 2018 00:36:30 +0200 Subject: [PATCH] REST API: Renamed UDPSrc to UDPSink --- ReadmeDeveloper.md | 23 +- plugins/channelrx/udpsrc/udpsink.cpp | 142 ++++++------ plugins/channelrx/udpsrc/udpsinkgui.cpp | 2 +- sdrbase/resources/res.qrc | 2 +- sdrbase/resources/webapi/doc/html2/index.html | 210 +++++++++--------- .../include/{UDPSrc.yaml => UDPSink.yaml} | 6 +- .../resources/webapi/doc/swagger/swagger.yaml | 8 +- sdrbase/webapi/webapirequestmapper.cpp | 14 +- .../include/{UDPSrc.yaml => UDPSink.yaml} | 6 +- swagger/sdrangel/api/swagger/swagger.yaml | 8 +- swagger/sdrangel/code/html2/index.html | 210 +++++++++--------- .../code/qt5/client/SWGChannelReport.cpp | 32 +-- .../code/qt5/client/SWGChannelReport.h | 10 +- .../code/qt5/client/SWGChannelSettings.cpp | 32 +-- .../code/qt5/client/SWGChannelSettings.h | 10 +- .../code/qt5/client/SWGModelFactory.h | 16 +- ...GUDPSrcReport.cpp => SWGUDPSinkReport.cpp} | 40 ++-- .../{SWGUDPSrcReport.h => SWGUDPSinkReport.h} | 18 +- ...SrcSettings.cpp => SWGUDPSinkSettings.cpp} | 100 ++++----- ...GUDPSrcSettings.h => SWGUDPSinkSettings.h} | 20 +- swagger/sdrangel/examples/rx_test.py | 14 +- 21 files changed, 461 insertions(+), 462 deletions(-) rename sdrbase/resources/webapi/doc/swagger/include/{UDPSrc.yaml => UDPSink.yaml} (96%) rename swagger/sdrangel/api/swagger/include/{UDPSrc.yaml => UDPSink.yaml} (96%) rename swagger/sdrangel/code/qt5/client/{SWGUDPSrcReport.cpp => SWGUDPSinkReport.cpp} (84%) rename swagger/sdrangel/code/qt5/client/{SWGUDPSrcReport.h => SWGUDPSinkReport.h} (88%) rename swagger/sdrangel/code/qt5/client/{SWGUDPSrcSettings.cpp => SWGUDPSinkSettings.cpp} (83%) rename swagger/sdrangel/code/qt5/client/{SWGUDPSrcSettings.h => SWGUDPSinkSettings.h} (92%) diff --git a/ReadmeDeveloper.md b/ReadmeDeveloper.md index 9fd3e31ac..09785d3a1 100644 --- a/ReadmeDeveloper.md +++ b/ReadmeDeveloper.md @@ -62,8 +62,7 @@ At present the following plugins are available: - `NFMDemodXxx` classes in `plugins/channelrx/demodnfm`: Narrowband FM demodulator with audio output. - `SSBDemodXxx` classes in `plugins/channelrx/demodssb`: SSB/DSB/CW demodulator with audio output. - `WFMDemodXxx` classes in `plugins/channelrx/demodwfm`: Wideband FM demodulator with audio output. This is a basic demodulator. - - `TCPSrcXxx` classes in `plugins/channelrx/tcpsrc`: Sends channel I/Q samples via TCP - - `UDPSrcXxx` classes in `plugins/channelrx/udpsrc`: Sends channel I/Q or FM demodulated samples via UDP + - `UDPSinkXxx` classes in `plugins/channelrx/udpsink`: Sends channel I/Q or FM demodulated samples via UDP

Channel transmitter (Tx) plugins

@@ -104,11 +103,11 @@ The `plugins` subdirectory contains the associated plugins used to manage device - `xxxanalyzergui.h/cpp` : Analyzer GUI - `xxxanalyzerplugin.h/cpp` : Analyzer plugin manager - `xxxanalyzer.pro` : Qt .pro file for Windows/Android build - - `xxxsrc` : Interface to the outside (e.g xxx = udp): - - `xxxsrc.h/cpp` : Interface core - - `xxxsrcgui.h/cpp` : Interface GUI - - `xxxsrcplugin/h/cpp` : Interface plugin manager - - `xxxsrc.pro` : Qt .pro file for Windows/Android build + - `xxxsink` : Interface to the outside (e.g xxx = udp): + - `xxxsink.h/cpp` : Interface core + - `xxxsinkgui.h/cpp` : Interface GUI + - `xxxsinkplugin/h/cpp` : Interface plugin manager + - `xxxsink.pro` : Qt .pro file for Windows/Android build - Transmitter functions (Tx): - `samplesink`: Device managers: @@ -130,11 +129,11 @@ The `plugins` subdirectory contains the associated plugins used to manage device - `xxxgeneratorgui.h/cpp` : Generator GUI - `xxxgeneratorplugin.h/cpp` : Generator plugin manager - `xxxgenerator.pro` : Qt .pro file for Windows/Android build - - `xxxsink` : Interface to the outside (e.g xxx = udp): - - `xxxsink.h/cpp` : Interface core - - `xxxsinkgui.h/cpp` : Interface GUI - - `xxxsinklugin/h/cpp` : Interface plugin manager - - `xxxsink.pro` : Qt .pro file for Windows/Android build + - `xxxsource` : Interface to the outside (e.g xxx = udp): + - `xxxsource.h/cpp` : Interface core + - `xxxsourcegui.h/cpp` : Interface GUI + - `xxxsourceplugin/h/cpp` : Interface plugin manager + - `xxxsource.pro` : Qt .pro file for Windows/Android build

Device interface and GUI lifecycle

diff --git a/plugins/channelrx/udpsrc/udpsink.cpp b/plugins/channelrx/udpsrc/udpsink.cpp index b6976189e..1e2e2a235 100644 --- a/plugins/channelrx/udpsrc/udpsink.cpp +++ b/plugins/channelrx/udpsrc/udpsink.cpp @@ -19,9 +19,9 @@ #include #include "SWGChannelSettings.h" -#include "SWGUDPSrcSettings.h" +#include "SWGUDPSinkSettings.h" #include "SWGChannelReport.h" -#include "SWGUDPSrcReport.h" +#include "SWGUDPSinkReport.h" #include "dsp/dspengine.h" #include "util/db.h" @@ -38,8 +38,8 @@ MESSAGE_CLASS_DEFINITION(UDPSink::MsgConfigureUDPSrc, Message) MESSAGE_CLASS_DEFINITION(UDPSink::MsgConfigureChannelizer, Message) MESSAGE_CLASS_DEFINITION(UDPSink::MsgUDPSrcSpectrum, Message) -const QString UDPSink::m_channelIdURI = "sdrangel.channel.udpsrc"; -const QString UDPSink::m_channelId = "UDPSrc"; +const QString UDPSink::m_channelIdURI = "sdrangel.channel.udpsink"; +const QString UDPSink::m_channelId = "UDPSink"; UDPSink::UDPSink(DeviceSourceAPI *deviceAPI) : ChannelSinkAPI(m_channelIdURI), @@ -90,12 +90,12 @@ UDPSink::UDPSink(DeviceSourceAPI *deviceAPI) : if (m_audioSocket->bind(QHostAddress::LocalHost, m_settings.m_audioPort)) { - qDebug("UDPSrc::UDPSrc: bind audio socket to port %d", m_settings.m_audioPort); + qDebug("UDPSink::UDPSink: bind audio socket to port %d", m_settings.m_audioPort); connect(m_audioSocket, SIGNAL(readyRead()), this, SLOT(audioReadyRead()), Qt::QueuedConnection); } else { - qWarning("UDPSrc::UDPSrc: cannot bind audio port"); + qWarning("UDPSink::UDPSink: cannot bind audio port"); } m_agc.setClampMax(SDR_RX_SCALED*SDR_RX_SCALED); @@ -310,7 +310,7 @@ void UDPSink::feed(const SampleVector::const_iterator& begin, const SampleVector } } - //qDebug() << "UDPSrc::feed: " << m_sampleBuffer.size() * 4; + //qDebug() << "UDPSink::feed: " << m_sampleBuffer.size() * 4; if((m_spectrum != 0) && (m_spectrumEnabled)) { @@ -335,7 +335,7 @@ bool UDPSink::handleMessage(const Message& cmd) if (DownChannelizer::MsgChannelizerNotification::match(cmd)) { DownChannelizer::MsgChannelizerNotification& notif = (DownChannelizer::MsgChannelizerNotification&) cmd; - qDebug() << "UDPSrc::handleMessage: MsgChannelizerNotification: m_inputSampleRate: " << notif.getSampleRate() + qDebug() << "UDPSink::handleMessage: MsgChannelizerNotification: m_inputSampleRate: " << notif.getSampleRate() << " frequencyOffset: " << notif.getFrequencyOffset(); applyChannelSettings(notif.getSampleRate(), notif.getFrequencyOffset()); @@ -346,7 +346,7 @@ bool UDPSink::handleMessage(const Message& cmd) else if (MsgConfigureChannelizer::match(cmd)) { MsgConfigureChannelizer& cfg = (MsgConfigureChannelizer&) cmd; - qDebug() << "UDPSrc::handleMessage: MsgConfigureChannelizer:" + qDebug() << "UDPSink::handleMessage: MsgConfigureChannelizer:" << " sampleRate: " << cfg.getSampleRate() << " centerFrequency: " << cfg.getCenterFrequency(); @@ -359,7 +359,7 @@ bool UDPSink::handleMessage(const Message& cmd) else if (MsgConfigureUDPSrc::match(cmd)) { MsgConfigureUDPSrc& cfg = (MsgConfigureUDPSrc&) cmd; - qDebug("UDPSrc::handleMessage: MsgConfigureUDPSrc"); + qDebug("UDPSink::handleMessage: MsgConfigureUDPSrc"); applySettings(cfg.getSettings(), cfg.getForce()); @@ -371,7 +371,7 @@ bool UDPSink::handleMessage(const Message& cmd) m_spectrumEnabled = spc.getEnabled(); - qDebug() << "UDPSrc::handleMessage: MsgUDPSrcSpectrum: m_spectrumEnabled: " << m_spectrumEnabled; + qDebug() << "UDPSink::handleMessage: MsgUDPSrcSpectrum: m_spectrumEnabled: " << m_spectrumEnabled; return true; } @@ -398,7 +398,7 @@ void UDPSink::audioReadyRead() { qint64 pendingDataSize = m_audioSocket->pendingDatagramSize(); qint64 udpReadBytes = m_audioSocket->readDatagram(m_udpAudioBuf, pendingDataSize, 0, 0); - //qDebug("UDPSrc::audioReadyRead: %lld", udpReadBytes); + //qDebug("UDPSink::audioReadyRead: %lld", udpReadBytes); if (m_settings.m_audioActive) { @@ -418,7 +418,7 @@ void UDPSink::audioReadyRead() if (res != m_audioBufferFill) { - qDebug("UDPSrc::audioReadyRead: (stereo) lost %u samples", m_audioBufferFill - res); + qDebug("UDPSink::audioReadyRead: (stereo) lost %u samples", m_audioBufferFill - res); } m_audioBufferFill = 0; @@ -440,7 +440,7 @@ void UDPSink::audioReadyRead() if (res != m_audioBufferFill) { - qDebug("UDPSrc::audioReadyRead: (mono) lost %u samples", m_audioBufferFill - res); + qDebug("UDPSink::audioReadyRead: (mono) lost %u samples", m_audioBufferFill - res); } m_audioBufferFill = 0; @@ -450,19 +450,19 @@ void UDPSink::audioReadyRead() if (m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 0) != m_audioBufferFill) { - qDebug("UDPSrc::audioReadyRead: lost samples"); + qDebug("UDPSink::audioReadyRead: lost samples"); } m_audioBufferFill = 0; } } - //qDebug("UDPSrc::audioReadyRead: done"); + //qDebug("UDPSink::audioReadyRead: done"); } void UDPSink::applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force) { - qDebug() << "UDPSrc::applyChannelSettings:" + qDebug() << "UDPSink::applyChannelSettings:" << " inputSampleRate: " << inputSampleRate << " inputFrequencyOffset: " << inputFrequencyOffset; @@ -486,7 +486,7 @@ void UDPSink::applyChannelSettings(int inputSampleRate, int inputFrequencyOffset void UDPSink::applySettings(const UDPSinkSettings& settings, bool force) { - qDebug() << "UDPSrc::applySettings:" + qDebug() << "UDPSink::applySettings:" << " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset << " m_audioActive: " << settings.m_audioActive << " m_audioStereo: " << settings.m_audioStereo @@ -602,11 +602,11 @@ void UDPSink::applySettings(const UDPSinkSettings& settings, bool force) if (m_audioSocket->bind(QHostAddress::LocalHost, settings.m_audioPort)) { connect(m_audioSocket, SIGNAL(readyRead()), this, SLOT(audioReadyRead()), Qt::QueuedConnection); - qDebug("UDPSrc::handleMessage: audio socket bound to port %d", settings.m_audioPort); + qDebug("UDPSink::handleMessage: audio socket bound to port %d", settings.m_audioPort); } else { - qWarning("UDPSrc::handleMessage: cannot bind audio socket"); + qWarning("UDPSink::handleMessage: cannot bind audio socket"); } } @@ -646,8 +646,8 @@ int UDPSink::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage __attribute__((unused))) { - response.setUdpSrcSettings(new SWGSDRangel::SWGUDPSrcSettings()); - response.getUdpSrcSettings()->init(); + response.setUdpSinkSettings(new SWGSDRangel::SWGUDPSinkSettings()); + response.getUdpSinkSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } @@ -662,63 +662,63 @@ int UDPSink::webapiSettingsPutPatch( bool frequencyOffsetChanged = false; if (channelSettingsKeys.contains("outputSampleRate")) { - settings.m_outputSampleRate = response.getUdpSrcSettings()->getOutputSampleRate(); + settings.m_outputSampleRate = response.getUdpSinkSettings()->getOutputSampleRate(); } if (channelSettingsKeys.contains("sampleFormat")) { - settings.m_sampleFormat = (UDPSinkSettings::SampleFormat) response.getUdpSrcSettings()->getSampleFormat(); + settings.m_sampleFormat = (UDPSinkSettings::SampleFormat) response.getUdpSinkSettings()->getSampleFormat(); } if (channelSettingsKeys.contains("inputFrequencyOffset")) { - settings.m_inputFrequencyOffset = response.getUdpSrcSettings()->getInputFrequencyOffset(); + settings.m_inputFrequencyOffset = response.getUdpSinkSettings()->getInputFrequencyOffset(); frequencyOffsetChanged = true; } if (channelSettingsKeys.contains("rfBandwidth")) { - settings.m_rfBandwidth = response.getUdpSrcSettings()->getRfBandwidth(); + settings.m_rfBandwidth = response.getUdpSinkSettings()->getRfBandwidth(); } if (channelSettingsKeys.contains("fmDeviation")) { - settings.m_fmDeviation = response.getUdpSrcSettings()->getFmDeviation(); + settings.m_fmDeviation = response.getUdpSinkSettings()->getFmDeviation(); } if (channelSettingsKeys.contains("channelMute")) { - settings.m_channelMute = response.getUdpSrcSettings()->getChannelMute() != 0; + settings.m_channelMute = response.getUdpSinkSettings()->getChannelMute() != 0; } if (channelSettingsKeys.contains("gain")) { - settings.m_gain = response.getUdpSrcSettings()->getGain(); + settings.m_gain = response.getUdpSinkSettings()->getGain(); } if (channelSettingsKeys.contains("squelchDB")) { - settings.m_squelchdB = response.getUdpSrcSettings()->getSquelchDb(); + settings.m_squelchdB = response.getUdpSinkSettings()->getSquelchDb(); } if (channelSettingsKeys.contains("squelchGate")) { - settings.m_squelchGate = response.getUdpSrcSettings()->getSquelchGate(); + settings.m_squelchGate = response.getUdpSinkSettings()->getSquelchGate(); } if (channelSettingsKeys.contains("squelchEnabled")) { - settings.m_squelchEnabled = response.getUdpSrcSettings()->getSquelchEnabled() != 0; + settings.m_squelchEnabled = response.getUdpSinkSettings()->getSquelchEnabled() != 0; } if (channelSettingsKeys.contains("agc")) { - settings.m_agc = response.getUdpSrcSettings()->getAgc() != 0; + settings.m_agc = response.getUdpSinkSettings()->getAgc() != 0; } if (channelSettingsKeys.contains("audioActive")) { - settings.m_audioActive = response.getUdpSrcSettings()->getAudioActive() != 0; + settings.m_audioActive = response.getUdpSinkSettings()->getAudioActive() != 0; } if (channelSettingsKeys.contains("audioStereo")) { - settings.m_audioStereo = response.getUdpSrcSettings()->getAudioStereo() != 0; + settings.m_audioStereo = response.getUdpSinkSettings()->getAudioStereo() != 0; } if (channelSettingsKeys.contains("volume")) { - settings.m_volume = response.getUdpSrcSettings()->getVolume(); + settings.m_volume = response.getUdpSinkSettings()->getVolume(); } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getUdpSrcSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getUdpSinkSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - settings.m_udpPort = response.getUdpSrcSettings()->getUdpPort(); + settings.m_udpPort = response.getUdpSinkSettings()->getUdpPort(); } if (channelSettingsKeys.contains("audioPort")) { - settings.m_audioPort = response.getUdpSrcSettings()->getAudioPort(); + settings.m_audioPort = response.getUdpSinkSettings()->getAudioPort(); } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getUdpSrcSettings()->getRgbColor(); + settings.m_rgbColor = response.getUdpSinkSettings()->getRgbColor(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getUdpSrcSettings()->getTitle(); + settings.m_title = *response.getUdpSinkSettings()->getTitle(); } if (frequencyOffsetChanged) @@ -732,7 +732,7 @@ int UDPSink::webapiSettingsPutPatch( MsgConfigureUDPSrc *msg = MsgConfigureUDPSrc::create(settings, force); m_inputMessageQueue.push(msg); - qDebug("UDPSrc::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); + qDebug("getUdpSinkSettings::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); if (m_guiMessageQueue) // forward to GUI if any { MsgConfigureUDPSrc *msgToGUI = MsgConfigureUDPSrc::create(settings, force); @@ -748,50 +748,50 @@ int UDPSink::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage __attribute__((unused))) { - response.setUdpSrcReport(new SWGSDRangel::SWGUDPSrcReport()); - response.getUdpSrcReport()->init(); + response.setUdpSinkReport(new SWGSDRangel::SWGUDPSinkReport()); + response.getUdpSinkReport()->init(); webapiFormatChannelReport(response); return 200; } void UDPSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const UDPSinkSettings& settings) { - response.getUdpSrcSettings()->setOutputSampleRate(settings.m_outputSampleRate); - response.getUdpSrcSettings()->setSampleFormat((int) settings.m_sampleFormat); - response.getUdpSrcSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); - response.getUdpSrcSettings()->setRfBandwidth(settings.m_rfBandwidth); - response.getUdpSrcSettings()->setFmDeviation(settings.m_fmDeviation); - response.getUdpSrcSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); - response.getUdpSrcSettings()->setGain(settings.m_gain); - response.getUdpSrcSettings()->setSquelchDb(settings.m_squelchdB); - response.getUdpSrcSettings()->setSquelchGate(settings.m_squelchGate); - response.getUdpSrcSettings()->setSquelchEnabled(settings.m_squelchEnabled ? 1 : 0); - response.getUdpSrcSettings()->setAgc(settings.m_agc ? 1 : 0); - response.getUdpSrcSettings()->setAudioActive(settings.m_audioActive ? 1 : 0); - response.getUdpSrcSettings()->setAudioStereo(settings.m_audioStereo ? 1 : 0); - response.getUdpSrcSettings()->setVolume(settings.m_volume); + response.getUdpSinkSettings()->setOutputSampleRate(settings.m_outputSampleRate); + response.getUdpSinkSettings()->setSampleFormat((int) settings.m_sampleFormat); + response.getUdpSinkSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + response.getUdpSinkSettings()->setRfBandwidth(settings.m_rfBandwidth); + response.getUdpSinkSettings()->setFmDeviation(settings.m_fmDeviation); + response.getUdpSinkSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); + response.getUdpSinkSettings()->setGain(settings.m_gain); + response.getUdpSinkSettings()->setSquelchDb(settings.m_squelchdB); + response.getUdpSinkSettings()->setSquelchGate(settings.m_squelchGate); + response.getUdpSinkSettings()->setSquelchEnabled(settings.m_squelchEnabled ? 1 : 0); + response.getUdpSinkSettings()->setAgc(settings.m_agc ? 1 : 0); + response.getUdpSinkSettings()->setAudioActive(settings.m_audioActive ? 1 : 0); + response.getUdpSinkSettings()->setAudioStereo(settings.m_audioStereo ? 1 : 0); + response.getUdpSinkSettings()->setVolume(settings.m_volume); - if (response.getUdpSrcSettings()->getUdpAddress()) { - *response.getUdpSrcSettings()->getUdpAddress() = settings.m_udpAddress; + if (response.getUdpSinkSettings()->getUdpAddress()) { + *response.getUdpSinkSettings()->getUdpAddress() = settings.m_udpAddress; } else { - response.getUdpSrcSettings()->setUdpAddress(new QString(settings.m_udpAddress)); + response.getUdpSinkSettings()->setUdpAddress(new QString(settings.m_udpAddress)); } - response.getUdpSrcSettings()->setUdpPort(settings.m_udpPort); - response.getUdpSrcSettings()->setAudioPort(settings.m_audioPort); - response.getUdpSrcSettings()->setRgbColor(settings.m_rgbColor); + response.getUdpSinkSettings()->setUdpPort(settings.m_udpPort); + response.getUdpSinkSettings()->setAudioPort(settings.m_audioPort); + response.getUdpSinkSettings()->setRgbColor(settings.m_rgbColor); - if (response.getUdpSrcSettings()->getTitle()) { - *response.getUdpSrcSettings()->getTitle() = settings.m_title; + if (response.getUdpSinkSettings()->getTitle()) { + *response.getUdpSinkSettings()->getTitle() = settings.m_title; } else { - response.getUdpSrcSettings()->setTitle(new QString(settings.m_title)); + response.getUdpSinkSettings()->setTitle(new QString(settings.m_title)); } } void UDPSink::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) { - response.getUdpSrcReport()->setChannelPowerDb(CalcDb::dbPower(getInMagSq())); - response.getUdpSrcReport()->setOutputPowerDb(CalcDb::dbPower(getMagSq())); - response.getUdpSrcReport()->setSquelch(m_squelchOpen ? 1 : 0); - response.getUdpSrcReport()->setInputSampleRate(m_inputSampleRate); + response.getUdpSinkReport()->setChannelPowerDb(CalcDb::dbPower(getInMagSq())); + response.getUdpSinkReport()->setOutputPowerDb(CalcDb::dbPower(getMagSq())); + response.getUdpSinkReport()->setSquelch(m_squelchOpen ? 1 : 0); + response.getUdpSinkReport()->setInputSampleRate(m_inputSampleRate); } diff --git a/plugins/channelrx/udpsrc/udpsinkgui.cpp b/plugins/channelrx/udpsrc/udpsinkgui.cpp index c38e01db7..dc457b89b 100644 --- a/plugins/channelrx/udpsrc/udpsinkgui.cpp +++ b/plugins/channelrx/udpsrc/udpsinkgui.cpp @@ -264,7 +264,7 @@ void UDPSinkGUI::displaySettings() ui->squelch->setValue(m_settings.m_squelchdB); ui->squelchText->setText(tr("%1").arg(ui->squelch->value()*1.0, 0, 'f', 0)); - qDebug("UDPSrcGUI::deserialize: m_squelchGate: %d", m_settings.m_squelchGate); + qDebug("UDPSinkGUI::deserialize: m_squelchGate: %d", m_settings.m_squelchGate); ui->squelchGate->setValue(m_settings.m_squelchGate); ui->squelchGateText->setText(tr("%1").arg(m_settings.m_squelchGate*10.0, 0, 'f', 0)); diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index a64c82c95..51145dc6a 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -31,7 +31,7 @@ webapi/doc/swagger/include/Structs.yaml webapi/doc/swagger/include/TestSource.yaml webapi/doc/swagger/include/UDPSource.yaml - webapi/doc/swagger/include/UDPSrc.yaml + webapi/doc/swagger/include/UDPSink.yaml webapi/doc/swagger/include/WFMDemod.yaml webapi/doc/swagger/include/WFMMod.yaml webapi/doc/swagger-ui/swagger-ui.js.map diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 5fd2008f2..c6de6f988 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1425,8 +1425,8 @@ margin-bottom: 20px; "UDPSourceReport" : { "$ref" : "#/definitions/UDPSourceReport" }, - "UDPSrcReport" : { - "$ref" : "#/definitions/UDPSrcReport" + "UDPSinkReport" : { + "$ref" : "#/definitions/UDPSinkReport" }, "WFMDemodReport" : { "$ref" : "#/definitions/WFMDemodReport" @@ -1485,8 +1485,8 @@ margin-bottom: 20px; "UDPSourceSettings" : { "$ref" : "#/definitions/UDPSourceSettings" }, - "UDPSrcSettings" : { - "$ref" : "#/definitions/UDPSrcSettings" + "UDPSinkSettings" : { + "$ref" : "#/definitions/UDPSinkSettings" }, "WFMDemodSettings" : { "$ref" : "#/definitions/WFMDemodSettings" @@ -3712,6 +3712,106 @@ margin-bottom: 20px; } }, "description" : "TestSource" +}; + defs.UDPSinkReport = { + "properties" : { + "outputPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power transmitted in channel (dB)" + }, + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power received in channel (dB)" + }, + "squelch" : { + "type" : "integer", + "description" : "squelch status (1 if open else 0)" + }, + "inputSampleRate" : { + "type" : "integer" + } + }, + "description" : "UDPSink" +}; + defs.UDPSinkSettings = { + "properties" : { + "outputSampleRate" : { + "type" : "number", + "format" : "float" + }, + "sampleFormat" : { + "type" : "integer" + }, + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "rfBandwidth" : { + "type" : "number", + "format" : "float" + }, + "fmDeviation" : { + "type" : "integer" + }, + "channelMute" : { + "type" : "integer", + "description" : "channel mute (1 if muted else 0)" + }, + "gain" : { + "type" : "number", + "format" : "float" + }, + "squelchDB" : { + "type" : "integer", + "description" : "power dB" + }, + "squelchGate" : { + "type" : "integer", + "description" : "100ths seconds" + }, + "squelchEnabled" : { + "type" : "integer", + "description" : "squelch enable (1 if enabled else 0)" + }, + "agc" : { + "type" : "integer", + "description" : "AGC enable (1 if enabled else 0)" + }, + "audioActive" : { + "type" : "integer", + "description" : "Audio return enable (1 if enabled else 0)" + }, + "audioStereo" : { + "type" : "integer", + "description" : "Audio return stereo (1 if stereo else 0)" + }, + "volume" : { + "type" : "integer" + }, + "udpAddress" : { + "type" : "string", + "description" : "destination UDP address (remote)" + }, + "udpPort" : { + "type" : "integer", + "format" : "uint16", + "description" : "destination UDP port (remote)" + }, + "audioPort" : { + "type" : "integer", + "format" : "uint16", + "description" : "audio return UDP port (local)" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + } + }, + "description" : "UDPSink" }; defs.UDPSourceReport = { "properties" : { @@ -3810,106 +3910,6 @@ margin-bottom: 20px; } }, "description" : "UDPSource" -}; - defs.UDPSrcReport = { - "properties" : { - "outputPowerDB" : { - "type" : "number", - "format" : "float", - "description" : "power transmitted in channel (dB)" - }, - "channelPowerDB" : { - "type" : "number", - "format" : "float", - "description" : "power received in channel (dB)" - }, - "squelch" : { - "type" : "integer", - "description" : "squelch status (1 if open else 0)" - }, - "inputSampleRate" : { - "type" : "integer" - } - }, - "description" : "UDPSink" -}; - defs.UDPSrcSettings = { - "properties" : { - "outputSampleRate" : { - "type" : "number", - "format" : "float" - }, - "sampleFormat" : { - "type" : "integer" - }, - "inputFrequencyOffset" : { - "type" : "integer", - "format" : "int64" - }, - "rfBandwidth" : { - "type" : "number", - "format" : "float" - }, - "fmDeviation" : { - "type" : "integer" - }, - "channelMute" : { - "type" : "integer", - "description" : "channel mute (1 if muted else 0)" - }, - "gain" : { - "type" : "number", - "format" : "float" - }, - "squelchDB" : { - "type" : "integer", - "description" : "power dB" - }, - "squelchGate" : { - "type" : "integer", - "description" : "100ths seconds" - }, - "squelchEnabled" : { - "type" : "integer", - "description" : "squelch enable (1 if enabled else 0)" - }, - "agc" : { - "type" : "integer", - "description" : "AGC enable (1 if enabled else 0)" - }, - "audioActive" : { - "type" : "integer", - "description" : "Audio return enable (1 if enabled else 0)" - }, - "audioStereo" : { - "type" : "integer", - "description" : "Audio return stereo (1 if stereo else 0)" - }, - "volume" : { - "type" : "integer" - }, - "udpAddress" : { - "type" : "string", - "description" : "destination UDP address (remote)" - }, - "udpPort" : { - "type" : "integer", - "format" : "uint16", - "description" : "destination UDP port (remote)" - }, - "audioPort" : { - "type" : "integer", - "format" : "uint16", - "description" : "audio return UDP port (local)" - }, - "rgbColor" : { - "type" : "integer" - }, - "title" : { - "type" : "string" - } - }, - "description" : "UDPSrc" }; defs.WFMDemodReport = { "properties" : { @@ -23066,7 +23066,7 @@ except ApiException as e:
- Generated 2018-09-11T22:44:27.082+02:00 + Generated 2018-09-12T00:14:34.357+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/UDPSrc.yaml b/sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml similarity index 96% rename from sdrbase/resources/webapi/doc/swagger/include/UDPSrc.yaml rename to sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml index 0cdf81093..0e81847cb 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/UDPSrc.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml @@ -1,5 +1,5 @@ -UDPSrcSettings: - description: UDPSrc +UDPSinkSettings: + description: UDPSink properties: outputSampleRate: type: number @@ -56,7 +56,7 @@ UDPSrcSettings: title: type: string -UDPSrcReport: +UDPSinkReport: description: UDPSink properties: outputPowerDB: diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index d659f35c1..d2fbbaa23 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1874,8 +1874,8 @@ definitions: $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodSettings" UDPSourceSettings: $ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceSettings" - UDPSrcSettings: - $ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcSettings" + UDPSinkSettings: + $ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkSettings" WFMDemodSettings: $ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodSettings" WFMModSettings: @@ -1913,8 +1913,8 @@ definitions: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" UDPSourceReport: $ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceReport" - UDPSrcReport: - $ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcReport" + UDPSinkReport: + $ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkReport" WFMDemodReport: $ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodReport" WFMModReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 6e38970c1..92b424c3d 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2222,14 +2222,14 @@ bool WebAPIRequestMapper::validateChannelSettings( return false; } } - else if (*channelType == "UDPSrc") + else if (*channelType == "UDPSink") { if (channelSettings.getTx() == 0) { - QJsonObject udpSrcSettingsJsonObject = jsonObject["UDPSrcSettings"].toObject(); - channelSettingsKeys = udpSrcSettingsJsonObject.keys(); - channelSettings.setUdpSrcSettings(new SWGSDRangel::SWGUDPSrcSettings()); - channelSettings.getUdpSrcSettings()->fromJsonObject(udpSrcSettingsJsonObject); + QJsonObject udpSinkSettingsJsonObject = jsonObject["UDPSinkSettings"].toObject(); + channelSettingsKeys = udpSinkSettingsJsonObject.keys(); + channelSettings.setUdpSinkSettings(new SWGSDRangel::SWGUDPSinkSettings()); + channelSettings.getUdpSinkSettings()->fromJsonObject(udpSinkSettingsJsonObject); return true; } else { @@ -2416,7 +2416,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); channelSettings.setUdpSourceSettings(0); - channelSettings.setUdpSrcSettings(0); + channelSettings.setUdpSinkSettings(0); channelSettings.setWfmDemodSettings(0); channelSettings.setWfmModSettings(0); } @@ -2436,7 +2436,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan channelReport.setSsbDemodReport(0); channelReport.setSsbModReport(0); channelReport.setUdpSourceReport(0); - channelReport.setUdpSrcReport(0); + channelReport.setUdpSinkReport(0); channelReport.setWfmDemodReport(0); channelReport.setWfmModReport(0); } diff --git a/swagger/sdrangel/api/swagger/include/UDPSrc.yaml b/swagger/sdrangel/api/swagger/include/UDPSink.yaml similarity index 96% rename from swagger/sdrangel/api/swagger/include/UDPSrc.yaml rename to swagger/sdrangel/api/swagger/include/UDPSink.yaml index 0cdf81093..0e81847cb 100644 --- a/swagger/sdrangel/api/swagger/include/UDPSrc.yaml +++ b/swagger/sdrangel/api/swagger/include/UDPSink.yaml @@ -1,5 +1,5 @@ -UDPSrcSettings: - description: UDPSrc +UDPSinkSettings: + description: UDPSink properties: outputSampleRate: type: number @@ -56,7 +56,7 @@ UDPSrcSettings: title: type: string -UDPSrcReport: +UDPSinkReport: description: UDPSink properties: outputPowerDB: diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index a126ae966..497a6619b 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1874,8 +1874,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodSettings" UDPSourceSettings: $ref: "http://localhost:8081/api/swagger/include/UDPSource.yaml#/UDPSourceSettings" - UDPSrcSettings: - $ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcSettings" + UDPSinkSettings: + $ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkSettings" WFMDemodSettings: $ref: "http://localhost:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodSettings" WFMModSettings: @@ -1913,8 +1913,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport" UDPSourceReport: $ref: "http://localhost:8081/api/swagger/include/UDPSource.yaml#/UDPSourceReport" - UDPSrcReport: - $ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcReport" + UDPSinkReport: + $ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkReport" WFMDemodReport: $ref: "http://localhost:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodReport" WFMModReport: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 5fd2008f2..c6de6f988 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1425,8 +1425,8 @@ margin-bottom: 20px; "UDPSourceReport" : { "$ref" : "#/definitions/UDPSourceReport" }, - "UDPSrcReport" : { - "$ref" : "#/definitions/UDPSrcReport" + "UDPSinkReport" : { + "$ref" : "#/definitions/UDPSinkReport" }, "WFMDemodReport" : { "$ref" : "#/definitions/WFMDemodReport" @@ -1485,8 +1485,8 @@ margin-bottom: 20px; "UDPSourceSettings" : { "$ref" : "#/definitions/UDPSourceSettings" }, - "UDPSrcSettings" : { - "$ref" : "#/definitions/UDPSrcSettings" + "UDPSinkSettings" : { + "$ref" : "#/definitions/UDPSinkSettings" }, "WFMDemodSettings" : { "$ref" : "#/definitions/WFMDemodSettings" @@ -3712,6 +3712,106 @@ margin-bottom: 20px; } }, "description" : "TestSource" +}; + defs.UDPSinkReport = { + "properties" : { + "outputPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power transmitted in channel (dB)" + }, + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power received in channel (dB)" + }, + "squelch" : { + "type" : "integer", + "description" : "squelch status (1 if open else 0)" + }, + "inputSampleRate" : { + "type" : "integer" + } + }, + "description" : "UDPSink" +}; + defs.UDPSinkSettings = { + "properties" : { + "outputSampleRate" : { + "type" : "number", + "format" : "float" + }, + "sampleFormat" : { + "type" : "integer" + }, + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "rfBandwidth" : { + "type" : "number", + "format" : "float" + }, + "fmDeviation" : { + "type" : "integer" + }, + "channelMute" : { + "type" : "integer", + "description" : "channel mute (1 if muted else 0)" + }, + "gain" : { + "type" : "number", + "format" : "float" + }, + "squelchDB" : { + "type" : "integer", + "description" : "power dB" + }, + "squelchGate" : { + "type" : "integer", + "description" : "100ths seconds" + }, + "squelchEnabled" : { + "type" : "integer", + "description" : "squelch enable (1 if enabled else 0)" + }, + "agc" : { + "type" : "integer", + "description" : "AGC enable (1 if enabled else 0)" + }, + "audioActive" : { + "type" : "integer", + "description" : "Audio return enable (1 if enabled else 0)" + }, + "audioStereo" : { + "type" : "integer", + "description" : "Audio return stereo (1 if stereo else 0)" + }, + "volume" : { + "type" : "integer" + }, + "udpAddress" : { + "type" : "string", + "description" : "destination UDP address (remote)" + }, + "udpPort" : { + "type" : "integer", + "format" : "uint16", + "description" : "destination UDP port (remote)" + }, + "audioPort" : { + "type" : "integer", + "format" : "uint16", + "description" : "audio return UDP port (local)" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + } + }, + "description" : "UDPSink" }; defs.UDPSourceReport = { "properties" : { @@ -3810,106 +3910,6 @@ margin-bottom: 20px; } }, "description" : "UDPSource" -}; - defs.UDPSrcReport = { - "properties" : { - "outputPowerDB" : { - "type" : "number", - "format" : "float", - "description" : "power transmitted in channel (dB)" - }, - "channelPowerDB" : { - "type" : "number", - "format" : "float", - "description" : "power received in channel (dB)" - }, - "squelch" : { - "type" : "integer", - "description" : "squelch status (1 if open else 0)" - }, - "inputSampleRate" : { - "type" : "integer" - } - }, - "description" : "UDPSink" -}; - defs.UDPSrcSettings = { - "properties" : { - "outputSampleRate" : { - "type" : "number", - "format" : "float" - }, - "sampleFormat" : { - "type" : "integer" - }, - "inputFrequencyOffset" : { - "type" : "integer", - "format" : "int64" - }, - "rfBandwidth" : { - "type" : "number", - "format" : "float" - }, - "fmDeviation" : { - "type" : "integer" - }, - "channelMute" : { - "type" : "integer", - "description" : "channel mute (1 if muted else 0)" - }, - "gain" : { - "type" : "number", - "format" : "float" - }, - "squelchDB" : { - "type" : "integer", - "description" : "power dB" - }, - "squelchGate" : { - "type" : "integer", - "description" : "100ths seconds" - }, - "squelchEnabled" : { - "type" : "integer", - "description" : "squelch enable (1 if enabled else 0)" - }, - "agc" : { - "type" : "integer", - "description" : "AGC enable (1 if enabled else 0)" - }, - "audioActive" : { - "type" : "integer", - "description" : "Audio return enable (1 if enabled else 0)" - }, - "audioStereo" : { - "type" : "integer", - "description" : "Audio return stereo (1 if stereo else 0)" - }, - "volume" : { - "type" : "integer" - }, - "udpAddress" : { - "type" : "string", - "description" : "destination UDP address (remote)" - }, - "udpPort" : { - "type" : "integer", - "format" : "uint16", - "description" : "destination UDP port (remote)" - }, - "audioPort" : { - "type" : "integer", - "format" : "uint16", - "description" : "audio return UDP port (local)" - }, - "rgbColor" : { - "type" : "integer" - }, - "title" : { - "type" : "string" - } - }, - "description" : "UDPSrc" }; defs.WFMDemodReport = { "properties" : { @@ -23066,7 +23066,7 @@ except ApiException as e:
- Generated 2018-09-11T22:44:27.082+02:00 + Generated 2018-09-12T00:14:34.357+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index 8bf3a9d8a..2ae53f5e1 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -54,8 +54,8 @@ SWGChannelReport::SWGChannelReport() { m_ssb_mod_report_isSet = false; udp_source_report = nullptr; m_udp_source_report_isSet = false; - udp_src_report = nullptr; - m_udp_src_report_isSet = false; + udp_sink_report = nullptr; + m_udp_sink_report_isSet = false; wfm_demod_report = nullptr; m_wfm_demod_report_isSet = false; wfm_mod_report = nullptr; @@ -94,8 +94,8 @@ SWGChannelReport::init() { m_ssb_mod_report_isSet = false; udp_source_report = new SWGUDPSourceReport(); m_udp_source_report_isSet = false; - udp_src_report = new SWGUDPSrcReport(); - m_udp_src_report_isSet = false; + udp_sink_report = new SWGUDPSinkReport(); + m_udp_sink_report_isSet = false; wfm_demod_report = new SWGWFMDemodReport(); m_wfm_demod_report_isSet = false; wfm_mod_report = new SWGWFMModReport(); @@ -141,8 +141,8 @@ SWGChannelReport::cleanup() { if(udp_source_report != nullptr) { delete udp_source_report; } - if(udp_src_report != nullptr) { - delete udp_src_report; + if(udp_sink_report != nullptr) { + delete udp_sink_report; } if(wfm_demod_report != nullptr) { delete wfm_demod_report; @@ -189,7 +189,7 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&udp_source_report, pJson["UDPSourceReport"], "SWGUDPSourceReport", "SWGUDPSourceReport"); - ::SWGSDRangel::setValue(&udp_src_report, pJson["UDPSrcReport"], "SWGUDPSrcReport", "SWGUDPSrcReport"); + ::SWGSDRangel::setValue(&udp_sink_report, pJson["UDPSinkReport"], "SWGUDPSinkReport", "SWGUDPSinkReport"); ::SWGSDRangel::setValue(&wfm_demod_report, pJson["WFMDemodReport"], "SWGWFMDemodReport", "SWGWFMDemodReport"); @@ -250,8 +250,8 @@ SWGChannelReport::asJsonObject() { if((udp_source_report != nullptr) && (udp_source_report->isSet())){ toJsonValue(QString("UDPSourceReport"), udp_source_report, obj, QString("SWGUDPSourceReport")); } - if((udp_src_report != nullptr) && (udp_src_report->isSet())){ - toJsonValue(QString("UDPSrcReport"), udp_src_report, obj, QString("SWGUDPSrcReport")); + if((udp_sink_report != nullptr) && (udp_sink_report->isSet())){ + toJsonValue(QString("UDPSinkReport"), udp_sink_report, obj, QString("SWGUDPSinkReport")); } if((wfm_demod_report != nullptr) && (wfm_demod_report->isSet())){ toJsonValue(QString("WFMDemodReport"), wfm_demod_report, obj, QString("SWGWFMDemodReport")); @@ -393,14 +393,14 @@ SWGChannelReport::setUdpSourceReport(SWGUDPSourceReport* udp_source_report) { this->m_udp_source_report_isSet = true; } -SWGUDPSrcReport* -SWGChannelReport::getUdpSrcReport() { - return udp_src_report; +SWGUDPSinkReport* +SWGChannelReport::getUdpSinkReport() { + return udp_sink_report; } void -SWGChannelReport::setUdpSrcReport(SWGUDPSrcReport* udp_src_report) { - this->udp_src_report = udp_src_report; - this->m_udp_src_report_isSet = true; +SWGChannelReport::setUdpSinkReport(SWGUDPSinkReport* udp_sink_report) { + this->udp_sink_report = udp_sink_report; + this->m_udp_sink_report_isSet = true; } SWGWFMDemodReport* @@ -441,7 +441,7 @@ SWGChannelReport::isSet(){ if(daemon_source_report != nullptr && daemon_source_report->isSet()){ isObjectUpdated = true; break;} if(ssb_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;} if(udp_source_report != nullptr && udp_source_report->isSet()){ isObjectUpdated = true; break;} - if(udp_src_report != nullptr && udp_src_report->isSet()){ isObjectUpdated = true; break;} + if(udp_sink_report != nullptr && udp_sink_report->isSet()){ isObjectUpdated = true; break;} if(wfm_demod_report != nullptr && wfm_demod_report->isSet()){ isObjectUpdated = true; break;} if(wfm_mod_report != nullptr && wfm_mod_report->isSet()){ isObjectUpdated = true; break;} }while(false); diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index a4029c8b1..b7e529bbd 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -32,8 +32,8 @@ #include "SWGNFMModReport.h" #include "SWGSSBDemodReport.h" #include "SWGSSBModReport.h" +#include "SWGUDPSinkReport.h" #include "SWGUDPSourceReport.h" -#include "SWGUDPSrcReport.h" #include "SWGWFMDemodReport.h" #include "SWGWFMModReport.h" #include @@ -95,8 +95,8 @@ public: SWGUDPSourceReport* getUdpSourceReport(); void setUdpSourceReport(SWGUDPSourceReport* udp_source_report); - SWGUDPSrcReport* getUdpSrcReport(); - void setUdpSrcReport(SWGUDPSrcReport* udp_src_report); + SWGUDPSinkReport* getUdpSinkReport(); + void setUdpSinkReport(SWGUDPSinkReport* udp_sink_report); SWGWFMDemodReport* getWfmDemodReport(); void setWfmDemodReport(SWGWFMDemodReport* wfm_demod_report); @@ -147,8 +147,8 @@ private: SWGUDPSourceReport* udp_source_report; bool m_udp_source_report_isSet; - SWGUDPSrcReport* udp_src_report; - bool m_udp_src_report_isSet; + SWGUDPSinkReport* udp_sink_report; + bool m_udp_sink_report_isSet; SWGWFMDemodReport* wfm_demod_report; bool m_wfm_demod_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index e360c0fc5..48a85b40f 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -56,8 +56,8 @@ SWGChannelSettings::SWGChannelSettings() { m_ssb_demod_settings_isSet = false; udp_source_settings = nullptr; m_udp_source_settings_isSet = false; - udp_src_settings = nullptr; - m_udp_src_settings_isSet = false; + udp_sink_settings = nullptr; + m_udp_sink_settings_isSet = false; wfm_demod_settings = nullptr; m_wfm_demod_settings_isSet = false; wfm_mod_settings = nullptr; @@ -98,8 +98,8 @@ SWGChannelSettings::init() { m_ssb_demod_settings_isSet = false; udp_source_settings = new SWGUDPSourceSettings(); m_udp_source_settings_isSet = false; - udp_src_settings = new SWGUDPSrcSettings(); - m_udp_src_settings_isSet = false; + udp_sink_settings = new SWGUDPSinkSettings(); + m_udp_sink_settings_isSet = false; wfm_demod_settings = new SWGWFMDemodSettings(); m_wfm_demod_settings_isSet = false; wfm_mod_settings = new SWGWFMModSettings(); @@ -148,8 +148,8 @@ SWGChannelSettings::cleanup() { if(udp_source_settings != nullptr) { delete udp_source_settings; } - if(udp_src_settings != nullptr) { - delete udp_src_settings; + if(udp_sink_settings != nullptr) { + delete udp_sink_settings; } if(wfm_demod_settings != nullptr) { delete wfm_demod_settings; @@ -198,7 +198,7 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&udp_source_settings, pJson["UDPSourceSettings"], "SWGUDPSourceSettings", "SWGUDPSourceSettings"); - ::SWGSDRangel::setValue(&udp_src_settings, pJson["UDPSrcSettings"], "SWGUDPSrcSettings", "SWGUDPSrcSettings"); + ::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings"); ::SWGSDRangel::setValue(&wfm_demod_settings, pJson["WFMDemodSettings"], "SWGWFMDemodSettings", "SWGWFMDemodSettings"); @@ -262,8 +262,8 @@ SWGChannelSettings::asJsonObject() { if((udp_source_settings != nullptr) && (udp_source_settings->isSet())){ toJsonValue(QString("UDPSourceSettings"), udp_source_settings, obj, QString("SWGUDPSourceSettings")); } - if((udp_src_settings != nullptr) && (udp_src_settings->isSet())){ - toJsonValue(QString("UDPSrcSettings"), udp_src_settings, obj, QString("SWGUDPSrcSettings")); + if((udp_sink_settings != nullptr) && (udp_sink_settings->isSet())){ + toJsonValue(QString("UDPSinkSettings"), udp_sink_settings, obj, QString("SWGUDPSinkSettings")); } if((wfm_demod_settings != nullptr) && (wfm_demod_settings->isSet())){ toJsonValue(QString("WFMDemodSettings"), wfm_demod_settings, obj, QString("SWGWFMDemodSettings")); @@ -415,14 +415,14 @@ SWGChannelSettings::setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settin this->m_udp_source_settings_isSet = true; } -SWGUDPSrcSettings* -SWGChannelSettings::getUdpSrcSettings() { - return udp_src_settings; +SWGUDPSinkSettings* +SWGChannelSettings::getUdpSinkSettings() { + return udp_sink_settings; } void -SWGChannelSettings::setUdpSrcSettings(SWGUDPSrcSettings* udp_src_settings) { - this->udp_src_settings = udp_src_settings; - this->m_udp_src_settings_isSet = true; +SWGChannelSettings::setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings) { + this->udp_sink_settings = udp_sink_settings; + this->m_udp_sink_settings_isSet = true; } SWGWFMDemodSettings* @@ -464,7 +464,7 @@ SWGChannelSettings::isSet(){ if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;} if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;} if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;} - if(udp_src_settings != nullptr && udp_src_settings->isSet()){ isObjectUpdated = true; break;} + if(udp_sink_settings != nullptr && udp_sink_settings->isSet()){ isObjectUpdated = true; break;} if(wfm_demod_settings != nullptr && wfm_demod_settings->isSet()){ isObjectUpdated = true; break;} if(wfm_mod_settings != nullptr && wfm_mod_settings->isSet()){ isObjectUpdated = true; break;} }while(false); diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index ee2e3e92c..0c7a18dfc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -33,8 +33,8 @@ #include "SWGNFMModSettings.h" #include "SWGSSBDemodSettings.h" #include "SWGSSBModSettings.h" +#include "SWGUDPSinkSettings.h" #include "SWGUDPSourceSettings.h" -#include "SWGUDPSrcSettings.h" #include "SWGWFMDemodSettings.h" #include "SWGWFMModSettings.h" #include @@ -99,8 +99,8 @@ public: SWGUDPSourceSettings* getUdpSourceSettings(); void setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings); - SWGUDPSrcSettings* getUdpSrcSettings(); - void setUdpSrcSettings(SWGUDPSrcSettings* udp_src_settings); + SWGUDPSinkSettings* getUdpSinkSettings(); + void setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings); SWGWFMDemodSettings* getWfmDemodSettings(); void setWfmDemodSettings(SWGWFMDemodSettings* wfm_demod_settings); @@ -154,8 +154,8 @@ private: SWGUDPSourceSettings* udp_source_settings; bool m_udp_source_settings_isSet; - SWGUDPSrcSettings* udp_src_settings; - bool m_udp_src_settings_isSet; + SWGUDPSinkSettings* udp_sink_settings; + bool m_udp_sink_settings_isSet; SWGWFMDemodSettings* wfm_demod_settings; bool m_wfm_demod_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 6adb9b75a..b1d5e989f 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -105,10 +105,10 @@ #include "SWGSamplingDevice.h" #include "SWGSuccessResponse.h" #include "SWGTestSourceSettings.h" +#include "SWGUDPSinkReport.h" +#include "SWGUDPSinkSettings.h" #include "SWGUDPSourceReport.h" #include "SWGUDPSourceSettings.h" -#include "SWGUDPSrcReport.h" -#include "SWGUDPSrcSettings.h" #include "SWGWFMDemodReport.h" #include "SWGWFMDemodSettings.h" #include "SWGWFMModReport.h" @@ -390,18 +390,18 @@ namespace SWGSDRangel { if(QString("SWGTestSourceSettings").compare(type) == 0) { return new SWGTestSourceSettings(); } + if(QString("SWGUDPSinkReport").compare(type) == 0) { + return new SWGUDPSinkReport(); + } + if(QString("SWGUDPSinkSettings").compare(type) == 0) { + return new SWGUDPSinkSettings(); + } if(QString("SWGUDPSourceReport").compare(type) == 0) { return new SWGUDPSourceReport(); } if(QString("SWGUDPSourceSettings").compare(type) == 0) { return new SWGUDPSourceSettings(); } - if(QString("SWGUDPSrcReport").compare(type) == 0) { - return new SWGUDPSrcReport(); - } - if(QString("SWGUDPSrcSettings").compare(type) == 0) { - return new SWGUDPSrcSettings(); - } if(QString("SWGWFMDemodReport").compare(type) == 0) { return new SWGWFMDemodReport(); } diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.cpp b/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp similarity index 84% rename from swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.cpp rename to swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp index d05b9de59..5e96bd1a6 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp @@ -11,7 +11,7 @@ */ -#include "SWGUDPSrcReport.h" +#include "SWGUDPSinkReport.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGUDPSrcReport::SWGUDPSrcReport(QString* json) { +SWGUDPSinkReport::SWGUDPSinkReport(QString* json) { init(); this->fromJson(*json); } -SWGUDPSrcReport::SWGUDPSrcReport() { +SWGUDPSinkReport::SWGUDPSinkReport() { output_power_db = 0.0f; m_output_power_db_isSet = false; channel_power_db = 0.0f; @@ -38,12 +38,12 @@ SWGUDPSrcReport::SWGUDPSrcReport() { m_input_sample_rate_isSet = false; } -SWGUDPSrcReport::~SWGUDPSrcReport() { +SWGUDPSinkReport::~SWGUDPSinkReport() { this->cleanup(); } void -SWGUDPSrcReport::init() { +SWGUDPSinkReport::init() { output_power_db = 0.0f; m_output_power_db_isSet = false; channel_power_db = 0.0f; @@ -55,15 +55,15 @@ SWGUDPSrcReport::init() { } void -SWGUDPSrcReport::cleanup() { +SWGUDPSinkReport::cleanup() { } -SWGUDPSrcReport* -SWGUDPSrcReport::fromJson(QString &json) { +SWGUDPSinkReport* +SWGUDPSinkReport::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -72,7 +72,7 @@ SWGUDPSrcReport::fromJson(QString &json) { } void -SWGUDPSrcReport::fromJsonObject(QJsonObject &pJson) { +SWGUDPSinkReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&output_power_db, pJson["outputPowerDB"], "float", ""); ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); @@ -84,7 +84,7 @@ SWGUDPSrcReport::fromJsonObject(QJsonObject &pJson) { } QString -SWGUDPSrcReport::asJson () +SWGUDPSinkReport::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -95,7 +95,7 @@ SWGUDPSrcReport::asJson () } QJsonObject* -SWGUDPSrcReport::asJsonObject() { +SWGUDPSinkReport::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_output_power_db_isSet){ obj->insert("outputPowerDB", QJsonValue(output_power_db)); @@ -114,48 +114,48 @@ SWGUDPSrcReport::asJsonObject() { } float -SWGUDPSrcReport::getOutputPowerDb() { +SWGUDPSinkReport::getOutputPowerDb() { return output_power_db; } void -SWGUDPSrcReport::setOutputPowerDb(float output_power_db) { +SWGUDPSinkReport::setOutputPowerDb(float output_power_db) { this->output_power_db = output_power_db; this->m_output_power_db_isSet = true; } float -SWGUDPSrcReport::getChannelPowerDb() { +SWGUDPSinkReport::getChannelPowerDb() { return channel_power_db; } void -SWGUDPSrcReport::setChannelPowerDb(float channel_power_db) { +SWGUDPSinkReport::setChannelPowerDb(float channel_power_db) { this->channel_power_db = channel_power_db; this->m_channel_power_db_isSet = true; } qint32 -SWGUDPSrcReport::getSquelch() { +SWGUDPSinkReport::getSquelch() { return squelch; } void -SWGUDPSrcReport::setSquelch(qint32 squelch) { +SWGUDPSinkReport::setSquelch(qint32 squelch) { this->squelch = squelch; this->m_squelch_isSet = true; } qint32 -SWGUDPSrcReport::getInputSampleRate() { +SWGUDPSinkReport::getInputSampleRate() { return input_sample_rate; } void -SWGUDPSrcReport::setInputSampleRate(qint32 input_sample_rate) { +SWGUDPSinkReport::setInputSampleRate(qint32 input_sample_rate) { this->input_sample_rate = input_sample_rate; this->m_input_sample_rate_isSet = true; } bool -SWGUDPSrcReport::isSet(){ +SWGUDPSinkReport::isSet(){ bool isObjectUpdated = false; do{ if(m_output_power_db_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.h b/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h similarity index 88% rename from swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.h rename to swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h index 2891943e1..e9569bf37 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSrcReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h @@ -11,13 +11,13 @@ */ /* - * SWGUDPSrcReport.h + * SWGUDPSinkReport.h * * UDPSink */ -#ifndef SWGUDPSrcReport_H_ -#define SWGUDPSrcReport_H_ +#ifndef SWGUDPSinkReport_H_ +#define SWGUDPSinkReport_H_ #include @@ -28,18 +28,18 @@ namespace SWGSDRangel { -class SWG_API SWGUDPSrcReport: public SWGObject { +class SWG_API SWGUDPSinkReport: public SWGObject { public: - SWGUDPSrcReport(); - SWGUDPSrcReport(QString* json); - virtual ~SWGUDPSrcReport(); + SWGUDPSinkReport(); + SWGUDPSinkReport(QString* json); + virtual ~SWGUDPSinkReport(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGUDPSrcReport* fromJson(QString &jsonString) override; + virtual SWGUDPSinkReport* fromJson(QString &jsonString) override; float getOutputPowerDb(); void setOutputPowerDb(float output_power_db); @@ -73,4 +73,4 @@ private: } -#endif /* SWGUDPSrcReport_H_ */ +#endif /* SWGUDPSinkReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp similarity index 83% rename from swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.cpp rename to swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp index 4233698db..e12aafd90 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp @@ -11,7 +11,7 @@ */ -#include "SWGUDPSrcSettings.h" +#include "SWGUDPSinkSettings.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGUDPSrcSettings::SWGUDPSrcSettings(QString* json) { +SWGUDPSinkSettings::SWGUDPSinkSettings(QString* json) { init(); this->fromJson(*json); } -SWGUDPSrcSettings::SWGUDPSrcSettings() { +SWGUDPSinkSettings::SWGUDPSinkSettings() { output_sample_rate = 0.0f; m_output_sample_rate_isSet = false; sample_format = 0; @@ -68,12 +68,12 @@ SWGUDPSrcSettings::SWGUDPSrcSettings() { m_title_isSet = false; } -SWGUDPSrcSettings::~SWGUDPSrcSettings() { +SWGUDPSinkSettings::~SWGUDPSinkSettings() { this->cleanup(); } void -SWGUDPSrcSettings::init() { +SWGUDPSinkSettings::init() { output_sample_rate = 0.0f; m_output_sample_rate_isSet = false; sample_format = 0; @@ -115,7 +115,7 @@ SWGUDPSrcSettings::init() { } void -SWGUDPSrcSettings::cleanup() { +SWGUDPSinkSettings::cleanup() { @@ -141,8 +141,8 @@ SWGUDPSrcSettings::cleanup() { } } -SWGUDPSrcSettings* -SWGUDPSrcSettings::fromJson(QString &json) { +SWGUDPSinkSettings* +SWGUDPSinkSettings::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -151,7 +151,7 @@ SWGUDPSrcSettings::fromJson(QString &json) { } void -SWGUDPSrcSettings::fromJsonObject(QJsonObject &pJson) { +SWGUDPSinkSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&output_sample_rate, pJson["outputSampleRate"], "float", ""); ::SWGSDRangel::setValue(&sample_format, pJson["sampleFormat"], "qint32", ""); @@ -193,7 +193,7 @@ SWGUDPSrcSettings::fromJsonObject(QJsonObject &pJson) { } QString -SWGUDPSrcSettings::asJson () +SWGUDPSinkSettings::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -204,7 +204,7 @@ SWGUDPSrcSettings::asJson () } QJsonObject* -SWGUDPSrcSettings::asJsonObject() { +SWGUDPSinkSettings::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_output_sample_rate_isSet){ obj->insert("outputSampleRate", QJsonValue(output_sample_rate)); @@ -268,198 +268,198 @@ SWGUDPSrcSettings::asJsonObject() { } float -SWGUDPSrcSettings::getOutputSampleRate() { +SWGUDPSinkSettings::getOutputSampleRate() { return output_sample_rate; } void -SWGUDPSrcSettings::setOutputSampleRate(float output_sample_rate) { +SWGUDPSinkSettings::setOutputSampleRate(float output_sample_rate) { this->output_sample_rate = output_sample_rate; this->m_output_sample_rate_isSet = true; } qint32 -SWGUDPSrcSettings::getSampleFormat() { +SWGUDPSinkSettings::getSampleFormat() { return sample_format; } void -SWGUDPSrcSettings::setSampleFormat(qint32 sample_format) { +SWGUDPSinkSettings::setSampleFormat(qint32 sample_format) { this->sample_format = sample_format; this->m_sample_format_isSet = true; } qint64 -SWGUDPSrcSettings::getInputFrequencyOffset() { +SWGUDPSinkSettings::getInputFrequencyOffset() { return input_frequency_offset; } void -SWGUDPSrcSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { +SWGUDPSinkSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { this->input_frequency_offset = input_frequency_offset; this->m_input_frequency_offset_isSet = true; } float -SWGUDPSrcSettings::getRfBandwidth() { +SWGUDPSinkSettings::getRfBandwidth() { return rf_bandwidth; } void -SWGUDPSrcSettings::setRfBandwidth(float rf_bandwidth) { +SWGUDPSinkSettings::setRfBandwidth(float rf_bandwidth) { this->rf_bandwidth = rf_bandwidth; this->m_rf_bandwidth_isSet = true; } qint32 -SWGUDPSrcSettings::getFmDeviation() { +SWGUDPSinkSettings::getFmDeviation() { return fm_deviation; } void -SWGUDPSrcSettings::setFmDeviation(qint32 fm_deviation) { +SWGUDPSinkSettings::setFmDeviation(qint32 fm_deviation) { this->fm_deviation = fm_deviation; this->m_fm_deviation_isSet = true; } qint32 -SWGUDPSrcSettings::getChannelMute() { +SWGUDPSinkSettings::getChannelMute() { return channel_mute; } void -SWGUDPSrcSettings::setChannelMute(qint32 channel_mute) { +SWGUDPSinkSettings::setChannelMute(qint32 channel_mute) { this->channel_mute = channel_mute; this->m_channel_mute_isSet = true; } float -SWGUDPSrcSettings::getGain() { +SWGUDPSinkSettings::getGain() { return gain; } void -SWGUDPSrcSettings::setGain(float gain) { +SWGUDPSinkSettings::setGain(float gain) { this->gain = gain; this->m_gain_isSet = true; } qint32 -SWGUDPSrcSettings::getSquelchDb() { +SWGUDPSinkSettings::getSquelchDb() { return squelch_db; } void -SWGUDPSrcSettings::setSquelchDb(qint32 squelch_db) { +SWGUDPSinkSettings::setSquelchDb(qint32 squelch_db) { this->squelch_db = squelch_db; this->m_squelch_db_isSet = true; } qint32 -SWGUDPSrcSettings::getSquelchGate() { +SWGUDPSinkSettings::getSquelchGate() { return squelch_gate; } void -SWGUDPSrcSettings::setSquelchGate(qint32 squelch_gate) { +SWGUDPSinkSettings::setSquelchGate(qint32 squelch_gate) { this->squelch_gate = squelch_gate; this->m_squelch_gate_isSet = true; } qint32 -SWGUDPSrcSettings::getSquelchEnabled() { +SWGUDPSinkSettings::getSquelchEnabled() { return squelch_enabled; } void -SWGUDPSrcSettings::setSquelchEnabled(qint32 squelch_enabled) { +SWGUDPSinkSettings::setSquelchEnabled(qint32 squelch_enabled) { this->squelch_enabled = squelch_enabled; this->m_squelch_enabled_isSet = true; } qint32 -SWGUDPSrcSettings::getAgc() { +SWGUDPSinkSettings::getAgc() { return agc; } void -SWGUDPSrcSettings::setAgc(qint32 agc) { +SWGUDPSinkSettings::setAgc(qint32 agc) { this->agc = agc; this->m_agc_isSet = true; } qint32 -SWGUDPSrcSettings::getAudioActive() { +SWGUDPSinkSettings::getAudioActive() { return audio_active; } void -SWGUDPSrcSettings::setAudioActive(qint32 audio_active) { +SWGUDPSinkSettings::setAudioActive(qint32 audio_active) { this->audio_active = audio_active; this->m_audio_active_isSet = true; } qint32 -SWGUDPSrcSettings::getAudioStereo() { +SWGUDPSinkSettings::getAudioStereo() { return audio_stereo; } void -SWGUDPSrcSettings::setAudioStereo(qint32 audio_stereo) { +SWGUDPSinkSettings::setAudioStereo(qint32 audio_stereo) { this->audio_stereo = audio_stereo; this->m_audio_stereo_isSet = true; } qint32 -SWGUDPSrcSettings::getVolume() { +SWGUDPSinkSettings::getVolume() { return volume; } void -SWGUDPSrcSettings::setVolume(qint32 volume) { +SWGUDPSinkSettings::setVolume(qint32 volume) { this->volume = volume; this->m_volume_isSet = true; } QString* -SWGUDPSrcSettings::getUdpAddress() { +SWGUDPSinkSettings::getUdpAddress() { return udp_address; } void -SWGUDPSrcSettings::setUdpAddress(QString* udp_address) { +SWGUDPSinkSettings::setUdpAddress(QString* udp_address) { this->udp_address = udp_address; this->m_udp_address_isSet = true; } qint32 -SWGUDPSrcSettings::getUdpPort() { +SWGUDPSinkSettings::getUdpPort() { return udp_port; } void -SWGUDPSrcSettings::setUdpPort(qint32 udp_port) { +SWGUDPSinkSettings::setUdpPort(qint32 udp_port) { this->udp_port = udp_port; this->m_udp_port_isSet = true; } qint32 -SWGUDPSrcSettings::getAudioPort() { +SWGUDPSinkSettings::getAudioPort() { return audio_port; } void -SWGUDPSrcSettings::setAudioPort(qint32 audio_port) { +SWGUDPSinkSettings::setAudioPort(qint32 audio_port) { this->audio_port = audio_port; this->m_audio_port_isSet = true; } qint32 -SWGUDPSrcSettings::getRgbColor() { +SWGUDPSinkSettings::getRgbColor() { return rgb_color; } void -SWGUDPSrcSettings::setRgbColor(qint32 rgb_color) { +SWGUDPSinkSettings::setRgbColor(qint32 rgb_color) { this->rgb_color = rgb_color; this->m_rgb_color_isSet = true; } QString* -SWGUDPSrcSettings::getTitle() { +SWGUDPSinkSettings::getTitle() { return title; } void -SWGUDPSrcSettings::setTitle(QString* title) { +SWGUDPSinkSettings::setTitle(QString* title) { this->title = title; this->m_title_isSet = true; } bool -SWGUDPSrcSettings::isSet(){ +SWGUDPSinkSettings::isSet(){ bool isObjectUpdated = false; do{ if(m_output_sample_rate_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.h b/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h similarity index 92% rename from swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.h rename to swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h index 356465bc7..7f06915e2 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSrcSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h @@ -11,13 +11,13 @@ */ /* - * SWGUDPSrcSettings.h + * SWGUDPSinkSettings.h * - * UDPSrc + * UDPSink */ -#ifndef SWGUDPSrcSettings_H_ -#define SWGUDPSrcSettings_H_ +#ifndef SWGUDPSinkSettings_H_ +#define SWGUDPSinkSettings_H_ #include @@ -29,18 +29,18 @@ namespace SWGSDRangel { -class SWG_API SWGUDPSrcSettings: public SWGObject { +class SWG_API SWGUDPSinkSettings: public SWGObject { public: - SWGUDPSrcSettings(); - SWGUDPSrcSettings(QString* json); - virtual ~SWGUDPSrcSettings(); + SWGUDPSinkSettings(); + SWGUDPSinkSettings(QString* json); + virtual ~SWGUDPSinkSettings(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGUDPSrcSettings* fromJson(QString &jsonString) override; + virtual SWGUDPSinkSettings* fromJson(QString &jsonString) override; float getOutputSampleRate(); void setOutputSampleRate(float output_sample_rate); @@ -164,4 +164,4 @@ private: } -#endif /* SWGUDPSrcSettings_H_ */ +#endif /* SWGUDPSinkSettings_H_ */ diff --git a/swagger/sdrangel/examples/rx_test.py b/swagger/sdrangel/examples/rx_test.py index 5079fd5ec..10b149872 100755 --- a/swagger/sdrangel/examples/rx_test.py +++ b/swagger/sdrangel/examples/rx_test.py @@ -305,13 +305,13 @@ def setupChannel(deviceset_url, options): settings["DSDDemodSettings"]["enableCosineFiltering"] = 1 settings["DSDDemodSettings"]["pllLock"] = 1 settings["DSDDemodSettings"]["title"] = "Channel %d" % i - elif options.channel_id == "UDPSrc": - settings["UDPSrcSettings"]["inputFrequencyOffset"] = options.channel_freq - settings["UDPSrcSettings"]["rfBandwidth"] = options.rf_bw - settings["UDPSrcSettings"]["volume"] = options.volume - settings["UDPSrcSettings"]["squelchDB"] = options.squelch_db - settings["UDPSrcSettings"]["channelMute"] = 0 - settings["UDPSrcSettings"]["title"] = "Channel %d" % i + elif options.channel_id == "UDPSink": + settings["UDPSinkSettings"]["inputFrequencyOffset"] = options.channel_freq + settings["UDPSinkSettings"]["rfBandwidth"] = options.rf_bw + settings["UDPSinkSettings"]["volume"] = options.volume + settings["UDPSinkSettings"]["squelchDB"] = options.squelch_db + settings["UDPSinkSettings"]["channelMute"] = 0 + settings["UDPSinkSettings"]["title"] = "Channel %d" % i elif options.channel_id == "DaemonSink": settings["DaemonSinkSettings"]["title"] = "Channel %d" % i if options.daemon_address: