diff --git a/plugins/channeltx/CMakeLists.txt b/plugins/channeltx/CMakeLists.txt index c1586843c..3b24dfce0 100644 --- a/plugins/channeltx/CMakeLists.txt +++ b/plugins/channeltx/CMakeLists.txt @@ -4,7 +4,7 @@ add_subdirectory(modam) add_subdirectory(modnfm) add_subdirectory(modssb) add_subdirectory(modwfm) -add_subdirectory(udpsink) +add_subdirectory(udpsource) find_package(CM256cc) if(CM256CC_FOUND) diff --git a/plugins/channeltx/udpsink/CMakeLists.txt b/plugins/channeltx/udpsource/CMakeLists.txt similarity index 100% rename from plugins/channeltx/udpsink/CMakeLists.txt rename to plugins/channeltx/udpsource/CMakeLists.txt diff --git a/plugins/channeltx/udpsink/readme.md b/plugins/channeltx/udpsource/readme.md similarity index 100% rename from plugins/channeltx/udpsink/readme.md rename to plugins/channeltx/udpsource/readme.md diff --git a/plugins/channeltx/udpsink/udpsink.pro b/plugins/channeltx/udpsource/udpsink.pro similarity index 100% rename from plugins/channeltx/udpsink/udpsink.pro rename to plugins/channeltx/udpsource/udpsink.pro diff --git a/plugins/channeltx/udpsink/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp similarity index 85% rename from plugins/channeltx/udpsink/udpsource.cpp rename to plugins/channeltx/udpsource/udpsource.cpp index 0f3a89bc9..9e887963b 100644 --- a/plugins/channeltx/udpsink/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -18,7 +18,7 @@ #include "SWGChannelSettings.h" #include "SWGChannelReport.h" -#include "SWGUDPSinkReport.h" +#include "SWGUDPSourceReport.h" #include "device/devicesinkapi.h" #include "dsp/upchannelizer.h" @@ -601,8 +601,8 @@ int UDPSource::webapiSettingsGet( SWGSDRangel::SWGChannelSettings& response, QString& errorMessage __attribute__((unused))) { - response.setUdpSinkSettings(new SWGSDRangel::SWGUDPSinkSettings()); - response.getUdpSinkSettings()->init(); + response.setUdpSourceSettings(new SWGSDRangel::SWGUDPSourceSettings()); + response.getUdpSourceSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } @@ -617,63 +617,63 @@ int UDPSource::webapiSettingsPutPatch( bool frequencyOffsetChanged = false; if (channelSettingsKeys.contains("sampleFormat")) { - settings.m_sampleFormat = (UDPSourceSettings::SampleFormat) response.getUdpSinkSettings()->getSampleFormat(); + settings.m_sampleFormat = (UDPSourceSettings::SampleFormat) response.getUdpSourceSettings()->getSampleFormat(); } if (channelSettingsKeys.contains("inputSampleRate")) { - settings.m_inputSampleRate = response.getUdpSinkSettings()->getInputSampleRate(); + settings.m_inputSampleRate = response.getUdpSourceSettings()->getInputSampleRate(); } if (channelSettingsKeys.contains("inputFrequencyOffset")) { - settings.m_inputFrequencyOffset = response.getUdpSinkSettings()->getInputFrequencyOffset(); + settings.m_inputFrequencyOffset = response.getUdpSourceSettings()->getInputFrequencyOffset(); frequencyOffsetChanged = true; } if (channelSettingsKeys.contains("rfBandwidth")) { - settings.m_rfBandwidth = response.getUdpSinkSettings()->getRfBandwidth(); + settings.m_rfBandwidth = response.getUdpSourceSettings()->getRfBandwidth(); } if (channelSettingsKeys.contains("lowCutoff")) { - settings.m_lowCutoff = response.getUdpSinkSettings()->getLowCutoff(); + settings.m_lowCutoff = response.getUdpSourceSettings()->getLowCutoff(); } if (channelSettingsKeys.contains("fmDeviation")) { - settings.m_fmDeviation = response.getUdpSinkSettings()->getFmDeviation(); + settings.m_fmDeviation = response.getUdpSourceSettings()->getFmDeviation(); } if (channelSettingsKeys.contains("amModFactor")) { - settings.m_amModFactor = response.getUdpSinkSettings()->getAmModFactor(); + settings.m_amModFactor = response.getUdpSourceSettings()->getAmModFactor(); } if (channelSettingsKeys.contains("channelMute")) { - settings.m_channelMute = response.getUdpSinkSettings()->getChannelMute() != 0; + settings.m_channelMute = response.getUdpSourceSettings()->getChannelMute() != 0; } if (channelSettingsKeys.contains("gainIn")) { - settings.m_gainIn = response.getUdpSinkSettings()->getGainIn(); + settings.m_gainIn = response.getUdpSourceSettings()->getGainIn(); } if (channelSettingsKeys.contains("gainOut")) { - settings.m_gainOut = response.getUdpSinkSettings()->getGainOut(); + settings.m_gainOut = response.getUdpSourceSettings()->getGainOut(); } if (channelSettingsKeys.contains("squelch")) { - settings.m_squelch = response.getUdpSinkSettings()->getSquelch(); + settings.m_squelch = response.getUdpSourceSettings()->getSquelch(); } if (channelSettingsKeys.contains("squelchGate")) { - settings.m_squelchGate = response.getUdpSinkSettings()->getSquelchGate(); + settings.m_squelchGate = response.getUdpSourceSettings()->getSquelchGate(); } if (channelSettingsKeys.contains("squelchEnabled")) { - settings.m_squelchEnabled = response.getUdpSinkSettings()->getSquelchEnabled() != 0; + settings.m_squelchEnabled = response.getUdpSourceSettings()->getSquelchEnabled() != 0; } if (channelSettingsKeys.contains("autoRWBalance")) { - settings.m_autoRWBalance = response.getUdpSinkSettings()->getAutoRwBalance() != 0; + settings.m_autoRWBalance = response.getUdpSourceSettings()->getAutoRwBalance() != 0; } if (channelSettingsKeys.contains("stereoInput")) { - settings.m_stereoInput = response.getUdpSinkSettings()->getStereoInput() != 0; + settings.m_stereoInput = response.getUdpSourceSettings()->getStereoInput() != 0; } if (channelSettingsKeys.contains("rgbColor")) { - settings.m_rgbColor = response.getUdpSinkSettings()->getRgbColor(); + settings.m_rgbColor = response.getUdpSourceSettings()->getRgbColor(); } if (channelSettingsKeys.contains("udpAddress")) { - settings.m_udpAddress = *response.getUdpSinkSettings()->getUdpAddress(); + settings.m_udpAddress = *response.getUdpSourceSettings()->getUdpAddress(); } if (channelSettingsKeys.contains("udpPort")) { - settings.m_udpPort = response.getUdpSinkSettings()->getUdpPort(); + settings.m_udpPort = response.getUdpSourceSettings()->getUdpPort(); } if (channelSettingsKeys.contains("title")) { - settings.m_title = *response.getUdpSinkSettings()->getTitle(); + settings.m_title = *response.getUdpSourceSettings()->getTitle(); } if (frequencyOffsetChanged) @@ -702,51 +702,51 @@ int UDPSource::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage __attribute__((unused))) { - response.setUdpSinkReport(new SWGSDRangel::SWGUDPSinkReport()); - response.getUdpSinkReport()->init(); + response.setUdpSourceReport(new SWGSDRangel::SWGUDPSourceReport()); + response.getUdpSourceReport()->init(); webapiFormatChannelReport(response); return 200; } void UDPSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const UDPSourceSettings& settings) { - response.getUdpSinkSettings()->setSampleFormat((int) settings.m_sampleFormat); - response.getUdpSinkSettings()->setInputSampleRate(settings.m_inputSampleRate); - response.getUdpSinkSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); - response.getUdpSinkSettings()->setRfBandwidth(settings.m_rfBandwidth); - response.getUdpSinkSettings()->setLowCutoff(settings.m_lowCutoff); - response.getUdpSinkSettings()->setFmDeviation(settings.m_fmDeviation); - response.getUdpSinkSettings()->setAmModFactor(settings.m_amModFactor); - response.getUdpSinkSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); - response.getUdpSinkSettings()->setGainIn(settings.m_gainIn); - response.getUdpSinkSettings()->setGainOut(settings.m_gainOut); - response.getUdpSinkSettings()->setSquelch(settings.m_squelch); - response.getUdpSinkSettings()->setSquelchGate(settings.m_squelchGate); - response.getUdpSinkSettings()->setSquelchEnabled(settings.m_squelchEnabled ? 1 : 0); - response.getUdpSinkSettings()->setAutoRwBalance(settings.m_autoRWBalance ? 1 : 0); - response.getUdpSinkSettings()->setStereoInput(settings.m_stereoInput ? 1 : 0); - response.getUdpSinkSettings()->setRgbColor(settings.m_rgbColor); + response.getUdpSourceSettings()->setSampleFormat((int) settings.m_sampleFormat); + response.getUdpSourceSettings()->setInputSampleRate(settings.m_inputSampleRate); + response.getUdpSourceSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + response.getUdpSourceSettings()->setRfBandwidth(settings.m_rfBandwidth); + response.getUdpSourceSettings()->setLowCutoff(settings.m_lowCutoff); + response.getUdpSourceSettings()->setFmDeviation(settings.m_fmDeviation); + response.getUdpSourceSettings()->setAmModFactor(settings.m_amModFactor); + response.getUdpSourceSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); + response.getUdpSourceSettings()->setGainIn(settings.m_gainIn); + response.getUdpSourceSettings()->setGainOut(settings.m_gainOut); + response.getUdpSourceSettings()->setSquelch(settings.m_squelch); + response.getUdpSourceSettings()->setSquelchGate(settings.m_squelchGate); + response.getUdpSourceSettings()->setSquelchEnabled(settings.m_squelchEnabled ? 1 : 0); + response.getUdpSourceSettings()->setAutoRwBalance(settings.m_autoRWBalance ? 1 : 0); + response.getUdpSourceSettings()->setStereoInput(settings.m_stereoInput ? 1 : 0); + response.getUdpSourceSettings()->setRgbColor(settings.m_rgbColor); - if (response.getUdpSinkSettings()->getUdpAddress()) { - *response.getUdpSinkSettings()->getUdpAddress() = settings.m_udpAddress; + if (response.getUdpSourceSettings()->getUdpAddress()) { + *response.getUdpSourceSettings()->getUdpAddress() = settings.m_udpAddress; } else { - response.getUdpSinkSettings()->setUdpAddress(new QString(settings.m_udpAddress)); + response.getUdpSourceSettings()->setUdpAddress(new QString(settings.m_udpAddress)); } - response.getUdpSinkSettings()->setUdpPort(settings.m_udpPort); + response.getUdpSourceSettings()->setUdpPort(settings.m_udpPort); - if (response.getUdpSinkSettings()->getTitle()) { - *response.getUdpSinkSettings()->getTitle() = settings.m_title; + if (response.getUdpSourceSettings()->getTitle()) { + *response.getUdpSourceSettings()->getTitle() = settings.m_title; } else { - response.getUdpSinkSettings()->setTitle(new QString(settings.m_title)); + response.getUdpSourceSettings()->setTitle(new QString(settings.m_title)); } } void UDPSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) { - response.getUdpSinkReport()->setInputPowerDb(CalcDb::dbPower(getInMagSq())); - response.getUdpSinkReport()->setChannelPowerDb(CalcDb::dbPower(getMagSq())); - response.getUdpSinkReport()->setSquelch(m_squelchOpen ? 1 : 0); - response.getUdpSinkReport()->setBufferGauge(getBufferGauge()); - response.getUdpSinkReport()->setChannelSampleRate(m_outputSampleRate); + response.getUdpSourceReport()->setInputPowerDb(CalcDb::dbPower(getInMagSq())); + response.getUdpSourceReport()->setChannelPowerDb(CalcDb::dbPower(getMagSq())); + response.getUdpSourceReport()->setSquelch(m_squelchOpen ? 1 : 0); + response.getUdpSourceReport()->setBufferGauge(getBufferGauge()); + response.getUdpSourceReport()->setChannelSampleRate(m_outputSampleRate); } diff --git a/plugins/channeltx/udpsink/udpsource.h b/plugins/channeltx/udpsource/udpsource.h similarity index 100% rename from plugins/channeltx/udpsink/udpsource.h rename to plugins/channeltx/udpsource/udpsource.h diff --git a/plugins/channeltx/udpsink/udpsourcegui.cpp b/plugins/channeltx/udpsource/udpsourcegui.cpp similarity index 100% rename from plugins/channeltx/udpsink/udpsourcegui.cpp rename to plugins/channeltx/udpsource/udpsourcegui.cpp diff --git a/plugins/channeltx/udpsink/udpsourcegui.h b/plugins/channeltx/udpsource/udpsourcegui.h similarity index 100% rename from plugins/channeltx/udpsink/udpsourcegui.h rename to plugins/channeltx/udpsource/udpsourcegui.h diff --git a/plugins/channeltx/udpsink/udpsourcegui.ui b/plugins/channeltx/udpsource/udpsourcegui.ui similarity index 100% rename from plugins/channeltx/udpsink/udpsourcegui.ui rename to plugins/channeltx/udpsource/udpsourcegui.ui diff --git a/plugins/channeltx/udpsink/udpsourcemsg.cpp b/plugins/channeltx/udpsource/udpsourcemsg.cpp similarity index 100% rename from plugins/channeltx/udpsink/udpsourcemsg.cpp rename to plugins/channeltx/udpsource/udpsourcemsg.cpp diff --git a/plugins/channeltx/udpsink/udpsourcemsg.h b/plugins/channeltx/udpsource/udpsourcemsg.h similarity index 100% rename from plugins/channeltx/udpsink/udpsourcemsg.h rename to plugins/channeltx/udpsource/udpsourcemsg.h diff --git a/plugins/channeltx/udpsink/udpsourceplugin.cpp b/plugins/channeltx/udpsource/udpsourceplugin.cpp similarity index 100% rename from plugins/channeltx/udpsink/udpsourceplugin.cpp rename to plugins/channeltx/udpsource/udpsourceplugin.cpp diff --git a/plugins/channeltx/udpsink/udpsourceplugin.h b/plugins/channeltx/udpsource/udpsourceplugin.h similarity index 100% rename from plugins/channeltx/udpsink/udpsourceplugin.h rename to plugins/channeltx/udpsource/udpsourceplugin.h diff --git a/plugins/channeltx/udpsink/udpsourcesettings.cpp b/plugins/channeltx/udpsource/udpsourcesettings.cpp similarity index 100% rename from plugins/channeltx/udpsink/udpsourcesettings.cpp rename to plugins/channeltx/udpsource/udpsourcesettings.cpp diff --git a/plugins/channeltx/udpsink/udpsourcesettings.h b/plugins/channeltx/udpsource/udpsourcesettings.h similarity index 100% rename from plugins/channeltx/udpsink/udpsourcesettings.h rename to plugins/channeltx/udpsource/udpsourcesettings.h diff --git a/plugins/channeltx/udpsink/udpsourceudphandler.cpp b/plugins/channeltx/udpsource/udpsourceudphandler.cpp similarity index 90% rename from plugins/channeltx/udpsink/udpsourceudphandler.cpp rename to plugins/channeltx/udpsource/udpsourceudphandler.cpp index 5422002ef..a341d8f9c 100644 --- a/plugins/channeltx/udpsink/udpsourceudphandler.cpp +++ b/plugins/channeltx/udpsource/udpsourceudphandler.cpp @@ -54,7 +54,7 @@ UDPSourceUDPHandler::~UDPSourceUDPHandler() void UDPSourceUDPHandler::start() { - qDebug("UDPSinkUDPHandler::start"); + qDebug("UDPSourceUDPHandler::start"); if (!m_dataSocket) { @@ -66,13 +66,13 @@ void UDPSourceUDPHandler::start() if (m_dataSocket->bind(m_dataAddress, m_dataPort)) { - qDebug("UDPSinkUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort); + qDebug("UDPSourceUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort); connect(m_dataSocket, SIGNAL(readyRead()), this, SLOT(dataReadyRead())); // , Qt::QueuedConnection gets stuck since Qt 5.8.0 m_dataConnected = true; } else { - qWarning("UDPSinkUDPHandler::start: cannot bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort); + qWarning("UDPSourceUDPHandler::start: cannot bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort); m_dataConnected = false; } } @@ -80,7 +80,7 @@ void UDPSourceUDPHandler::start() void UDPSourceUDPHandler::stop() { - qDebug("UDPSinkUDPHandler::stop"); + qDebug("UDPSourceUDPHandler::stop"); if (m_dataConnected) { @@ -104,7 +104,7 @@ void UDPSourceUDPHandler::dataReadyRead() if (bytesRead < 0) { - qWarning("UDPSinkUDPHandler::dataReadyRead: UDP read error"); + qWarning("UDPSourceUDPHandler::dataReadyRead: UDP read error"); } else { @@ -199,7 +199,7 @@ void UDPSourceUDPHandler::advanceReadPointer(int nbBytes) m_rwDelta = m_writeFrameIndex; // raw R/W delta estimate int nbUDPFrames2 = m_nbUDPFrames/2; float d = (m_rwDelta - nbUDPFrames2)/(float) m_nbUDPFrames; - //qDebug("UDPSinkUDPHandler::advanceReadPointer: w: %02d d: %f", m_writeIndex, d); + //qDebug("UDPSourceUDPHandler::advanceReadPointer: w: %02d d: %f", m_writeIndex, d); if ((d < -0.45) || (d > 0.45)) { @@ -231,12 +231,12 @@ void UDPSourceUDPHandler::configureUDPLink(const QString& address, quint16 port) void UDPSourceUDPHandler::applyUDPLink(const QString& address, quint16 port) { - qDebug("UDPSinkUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port); + qDebug("UDPSourceUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port); bool addressOK = m_dataAddress.setAddress(address); if (!addressOK) { - qWarning("UDPSinkUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str()); + qWarning("UDPSourceUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str()); m_dataAddress = QHostAddress::LocalHost; } @@ -257,7 +257,7 @@ void UDPSourceUDPHandler::resetReadIndex() void UDPSourceUDPHandler::resizeBuffer(float sampleRate) { int halfNbFrames = std::max((sampleRate / 375.0), (m_minNbUDPFrames / 2.0)); - qDebug("UDPSinkUDPHandler::resizeBuffer: nb_frames: %d", 2*halfNbFrames); + qDebug("UDPSourceUDPHandler::resizeBuffer: nb_frames: %d", 2*halfNbFrames); if (2*halfNbFrames > m_nbAllocatedUDPFrames) { diff --git a/plugins/channeltx/udpsink/udpsourceudphandler.h b/plugins/channeltx/udpsource/udpsourceudphandler.h similarity index 100% rename from plugins/channeltx/udpsink/udpsourceudphandler.h rename to plugins/channeltx/udpsource/udpsourceudphandler.h diff --git a/pluginssrv/channeltx/CMakeLists.txt b/pluginssrv/channeltx/CMakeLists.txt index 76c3291d2..b4541996d 100644 --- a/pluginssrv/channeltx/CMakeLists.txt +++ b/pluginssrv/channeltx/CMakeLists.txt @@ -4,7 +4,7 @@ add_subdirectory(modam) add_subdirectory(modnfm) add_subdirectory(modssb) add_subdirectory(modwfm) -add_subdirectory(udpsink) +add_subdirectory(udpsource) find_package(CM256cc) if(CM256CC_FOUND) diff --git a/pluginssrv/channeltx/udpsink/CMakeLists.txt b/pluginssrv/channeltx/udpsource/CMakeLists.txt similarity index 94% rename from pluginssrv/channeltx/udpsink/CMakeLists.txt rename to pluginssrv/channeltx/udpsource/CMakeLists.txt index be2cde116..767104379 100644 --- a/pluginssrv/channeltx/udpsink/CMakeLists.txt +++ b/pluginssrv/channeltx/udpsource/CMakeLists.txt @@ -1,7 +1,7 @@ project(udpsource) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -set(PLUGIN_PREFIX "../../../plugins/channeltx/udpsink") +set(PLUGIN_PREFIX "../../../plugins/channeltx/udpsource") set(udpsource_SOURCES ${PLUGIN_PREFIX}/udpsource.cpp diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 45afba2ea..a64c82c95 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -30,7 +30,7 @@ webapi/doc/swagger/include/SSBMod.yaml webapi/doc/swagger/include/Structs.yaml webapi/doc/swagger/include/TestSource.yaml - webapi/doc/swagger/include/UDPSink.yaml + webapi/doc/swagger/include/UDPSource.yaml webapi/doc/swagger/include/UDPSrc.yaml webapi/doc/swagger/include/WFMDemod.yaml webapi/doc/swagger/include/WFMMod.yaml diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index c18e79645..5fd2008f2 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1422,8 +1422,8 @@ margin-bottom: 20px; "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, - "UDPSinkReport" : { - "$ref" : "#/definitions/UDPSinkReport" + "UDPSourceReport" : { + "$ref" : "#/definitions/UDPSourceReport" }, "UDPSrcReport" : { "$ref" : "#/definitions/UDPSrcReport" @@ -1482,8 +1482,8 @@ margin-bottom: 20px; "SSBDemodSettings" : { "$ref" : "#/definitions/SSBDemodSettings" }, - "UDPSinkSettings" : { - "$ref" : "#/definitions/UDPSinkSettings" + "UDPSourceSettings" : { + "$ref" : "#/definitions/UDPSourceSettings" }, "UDPSrcSettings" : { "$ref" : "#/definitions/UDPSrcSettings" @@ -3713,7 +3713,7 @@ margin-bottom: 20px; }, "description" : "TestSource" }; - defs.UDPSinkReport = { + defs.UDPSourceReport = { "properties" : { "channelPowerDB" : { "type" : "number", @@ -3737,9 +3737,9 @@ margin-bottom: 20px; "type" : "integer" } }, - "description" : "UDPSink" + "description" : "UDPSource" }; - defs.UDPSinkSettings = { + defs.UDPSourceSettings = { "properties" : { "sampleFormat" : { "type" : "integer" @@ -3809,7 +3809,7 @@ margin-bottom: 20px; "type" : "string" } }, - "description" : "UDPSink" + "description" : "UDPSource" }; defs.UDPSrcReport = { "properties" : { @@ -23066,7 +23066,7 @@ except ApiException as e:
- Generated 2018-09-11T14:47:33.212+02:00 + Generated 2018-09-11T22:44:27.082+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml b/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml similarity index 94% rename from sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml rename to sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml index 16da1401d..46e8b680b 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/UDPSink.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml @@ -1,5 +1,5 @@ -UDPSinkSettings: - description: UDPSink +UDPSourceSettings: + description: UDPSource properties: sampleFormat: type: integer @@ -50,8 +50,8 @@ UDPSinkSettings: title: type: string -UDPSinkReport: - description: UDPSink +UDPSourceReport: + description: UDPSource properties: channelPowerDB: description: power transmitted in channel (dB) diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index a59d3def7..d659f35c1 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1872,8 +1872,8 @@ definitions: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodSettings" - UDPSinkSettings: - $ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkSettings" + UDPSourceSettings: + $ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceSettings" UDPSrcSettings: $ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcSettings" WFMDemodSettings: @@ -1911,8 +1911,8 @@ definitions: $ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceReport" SSBModReport: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" - UDPSinkReport: - $ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkReport" + UDPSourceReport: + $ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceReport" UDPSrcReport: $ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcReport" WFMDemodReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 82edc9cbf..6e38970c1 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2212,10 +2212,10 @@ bool WebAPIRequestMapper::validateChannelSettings( { if (channelSettings.getTx() != 0) { - QJsonObject udpSinkSettingsJsonObject = jsonObject["UDPSinkSettings"].toObject(); - channelSettingsKeys = udpSinkSettingsJsonObject.keys(); - channelSettings.setUdpSinkSettings(new SWGSDRangel::SWGUDPSinkSettings()); - channelSettings.getUdpSinkSettings()->fromJsonObject(udpSinkSettingsJsonObject); + QJsonObject udpSourceSettingsJsonObject = jsonObject["UDPSourceSettings"].toObject(); + channelSettingsKeys = udpSourceSettingsJsonObject.keys(); + channelSettings.setUdpSourceSettings(new SWGSDRangel::SWGUDPSourceSettings()); + channelSettings.getUdpSourceSettings()->fromJsonObject(udpSourceSettingsJsonObject); return true; } else { @@ -2415,7 +2415,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& channelSettings.setDaemonSourceSettings(0); channelSettings.setSsbDemodSettings(0); channelSettings.setSsbModSettings(0); - channelSettings.setUdpSinkSettings(0); + channelSettings.setUdpSourceSettings(0); channelSettings.setUdpSrcSettings(0); channelSettings.setWfmDemodSettings(0); channelSettings.setWfmModSettings(0); @@ -2435,7 +2435,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan channelReport.setDaemonSourceReport(0); channelReport.setSsbDemodReport(0); channelReport.setSsbModReport(0); - channelReport.setUdpSinkReport(0); + channelReport.setUdpSourceReport(0); channelReport.setUdpSrcReport(0); channelReport.setWfmDemodReport(0); channelReport.setWfmModReport(0); diff --git a/swagger/sdrangel/api/swagger/include/UDPSource.yaml b/swagger/sdrangel/api/swagger/include/UDPSource.yaml index 16da1401d..46e8b680b 100644 --- a/swagger/sdrangel/api/swagger/include/UDPSource.yaml +++ b/swagger/sdrangel/api/swagger/include/UDPSource.yaml @@ -1,5 +1,5 @@ -UDPSinkSettings: - description: UDPSink +UDPSourceSettings: + description: UDPSource properties: sampleFormat: type: integer @@ -50,8 +50,8 @@ UDPSinkSettings: title: type: string -UDPSinkReport: - description: UDPSink +UDPSourceReport: + description: UDPSource properties: channelPowerDB: description: power transmitted in channel (dB) diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index eb8269926..a126ae966 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1872,8 +1872,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings" SSBDemodSettings: $ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodSettings" - UDPSinkSettings: - $ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkSettings" + UDPSourceSettings: + $ref: "http://localhost:8081/api/swagger/include/UDPSource.yaml#/UDPSourceSettings" UDPSrcSettings: $ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcSettings" WFMDemodSettings: @@ -1911,8 +1911,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceReport" SSBModReport: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport" - UDPSinkReport: - $ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkReport" + UDPSourceReport: + $ref: "http://localhost:8081/api/swagger/include/UDPSource.yaml#/UDPSourceReport" UDPSrcReport: $ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcReport" WFMDemodReport: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index c18e79645..5fd2008f2 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1422,8 +1422,8 @@ margin-bottom: 20px; "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, - "UDPSinkReport" : { - "$ref" : "#/definitions/UDPSinkReport" + "UDPSourceReport" : { + "$ref" : "#/definitions/UDPSourceReport" }, "UDPSrcReport" : { "$ref" : "#/definitions/UDPSrcReport" @@ -1482,8 +1482,8 @@ margin-bottom: 20px; "SSBDemodSettings" : { "$ref" : "#/definitions/SSBDemodSettings" }, - "UDPSinkSettings" : { - "$ref" : "#/definitions/UDPSinkSettings" + "UDPSourceSettings" : { + "$ref" : "#/definitions/UDPSourceSettings" }, "UDPSrcSettings" : { "$ref" : "#/definitions/UDPSrcSettings" @@ -3713,7 +3713,7 @@ margin-bottom: 20px; }, "description" : "TestSource" }; - defs.UDPSinkReport = { + defs.UDPSourceReport = { "properties" : { "channelPowerDB" : { "type" : "number", @@ -3737,9 +3737,9 @@ margin-bottom: 20px; "type" : "integer" } }, - "description" : "UDPSink" + "description" : "UDPSource" }; - defs.UDPSinkSettings = { + defs.UDPSourceSettings = { "properties" : { "sampleFormat" : { "type" : "integer" @@ -3809,7 +3809,7 @@ margin-bottom: 20px; "type" : "string" } }, - "description" : "UDPSink" + "description" : "UDPSource" }; defs.UDPSrcReport = { "properties" : { @@ -23066,7 +23066,7 @@ except ApiException as e:
- Generated 2018-09-11T14:47:33.212+02:00 + Generated 2018-09-11T22:44:27.082+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index 451ed988b..8bf3a9d8a 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -52,8 +52,8 @@ SWGChannelReport::SWGChannelReport() { m_daemon_source_report_isSet = false; ssb_mod_report = nullptr; m_ssb_mod_report_isSet = false; - udp_sink_report = nullptr; - m_udp_sink_report_isSet = false; + udp_source_report = nullptr; + m_udp_source_report_isSet = false; udp_src_report = nullptr; m_udp_src_report_isSet = false; wfm_demod_report = nullptr; @@ -92,8 +92,8 @@ SWGChannelReport::init() { m_daemon_source_report_isSet = false; ssb_mod_report = new SWGSSBModReport(); m_ssb_mod_report_isSet = false; - udp_sink_report = new SWGUDPSinkReport(); - m_udp_sink_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; wfm_demod_report = new SWGWFMDemodReport(); @@ -138,8 +138,8 @@ SWGChannelReport::cleanup() { if(ssb_mod_report != nullptr) { delete ssb_mod_report; } - if(udp_sink_report != nullptr) { - delete udp_sink_report; + if(udp_source_report != nullptr) { + delete udp_source_report; } if(udp_src_report != nullptr) { delete udp_src_report; @@ -187,7 +187,7 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport"); - ::SWGSDRangel::setValue(&udp_sink_report, pJson["UDPSinkReport"], "SWGUDPSinkReport", "SWGUDPSinkReport"); + ::SWGSDRangel::setValue(&udp_source_report, pJson["UDPSourceReport"], "SWGUDPSourceReport", "SWGUDPSourceReport"); ::SWGSDRangel::setValue(&udp_src_report, pJson["UDPSrcReport"], "SWGUDPSrcReport", "SWGUDPSrcReport"); @@ -247,8 +247,8 @@ SWGChannelReport::asJsonObject() { if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){ toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport")); } - if((udp_sink_report != nullptr) && (udp_sink_report->isSet())){ - toJsonValue(QString("UDPSinkReport"), udp_sink_report, obj, QString("SWGUDPSinkReport")); + 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")); @@ -383,14 +383,14 @@ SWGChannelReport::setSsbModReport(SWGSSBModReport* ssb_mod_report) { this->m_ssb_mod_report_isSet = true; } -SWGUDPSinkReport* -SWGChannelReport::getUdpSinkReport() { - return udp_sink_report; +SWGUDPSourceReport* +SWGChannelReport::getUdpSourceReport() { + return udp_source_report; } void -SWGChannelReport::setUdpSinkReport(SWGUDPSinkReport* udp_sink_report) { - this->udp_sink_report = udp_sink_report; - this->m_udp_sink_report_isSet = true; +SWGChannelReport::setUdpSourceReport(SWGUDPSourceReport* udp_source_report) { + this->udp_source_report = udp_source_report; + this->m_udp_source_report_isSet = true; } SWGUDPSrcReport* @@ -440,7 +440,7 @@ SWGChannelReport::isSet(){ if(ssb_demod_report != nullptr && ssb_demod_report->isSet()){ isObjectUpdated = true; break;} 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_sink_report != nullptr && udp_sink_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(wfm_demod_report != nullptr && wfm_demod_report->isSet()){ isObjectUpdated = true; break;} if(wfm_mod_report != nullptr && wfm_mod_report->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index 6537329dc..a4029c8b1 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -32,7 +32,7 @@ #include "SWGNFMModReport.h" #include "SWGSSBDemodReport.h" #include "SWGSSBModReport.h" -#include "SWGUDPSinkReport.h" +#include "SWGUDPSourceReport.h" #include "SWGUDPSrcReport.h" #include "SWGWFMDemodReport.h" #include "SWGWFMModReport.h" @@ -92,8 +92,8 @@ public: SWGSSBModReport* getSsbModReport(); void setSsbModReport(SWGSSBModReport* ssb_mod_report); - SWGUDPSinkReport* getUdpSinkReport(); - void setUdpSinkReport(SWGUDPSinkReport* udp_sink_report); + SWGUDPSourceReport* getUdpSourceReport(); + void setUdpSourceReport(SWGUDPSourceReport* udp_source_report); SWGUDPSrcReport* getUdpSrcReport(); void setUdpSrcReport(SWGUDPSrcReport* udp_src_report); @@ -144,8 +144,8 @@ private: SWGSSBModReport* ssb_mod_report; bool m_ssb_mod_report_isSet; - SWGUDPSinkReport* udp_sink_report; - bool m_udp_sink_report_isSet; + SWGUDPSourceReport* udp_source_report; + bool m_udp_source_report_isSet; SWGUDPSrcReport* udp_src_report; bool m_udp_src_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index b9a8f0e4f..e360c0fc5 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -54,8 +54,8 @@ SWGChannelSettings::SWGChannelSettings() { m_ssb_mod_settings_isSet = false; ssb_demod_settings = nullptr; m_ssb_demod_settings_isSet = false; - udp_sink_settings = nullptr; - m_udp_sink_settings_isSet = false; + udp_source_settings = nullptr; + m_udp_source_settings_isSet = false; udp_src_settings = nullptr; m_udp_src_settings_isSet = false; wfm_demod_settings = nullptr; @@ -96,8 +96,8 @@ SWGChannelSettings::init() { m_ssb_mod_settings_isSet = false; ssb_demod_settings = new SWGSSBDemodSettings(); m_ssb_demod_settings_isSet = false; - udp_sink_settings = new SWGUDPSinkSettings(); - m_udp_sink_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; wfm_demod_settings = new SWGWFMDemodSettings(); @@ -145,8 +145,8 @@ SWGChannelSettings::cleanup() { if(ssb_demod_settings != nullptr) { delete ssb_demod_settings; } - if(udp_sink_settings != nullptr) { - delete udp_sink_settings; + if(udp_source_settings != nullptr) { + delete udp_source_settings; } if(udp_src_settings != nullptr) { delete udp_src_settings; @@ -196,7 +196,7 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&ssb_demod_settings, pJson["SSBDemodSettings"], "SWGSSBDemodSettings", "SWGSSBDemodSettings"); - ::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings"); + ::SWGSDRangel::setValue(&udp_source_settings, pJson["UDPSourceSettings"], "SWGUDPSourceSettings", "SWGUDPSourceSettings"); ::SWGSDRangel::setValue(&udp_src_settings, pJson["UDPSrcSettings"], "SWGUDPSrcSettings", "SWGUDPSrcSettings"); @@ -259,8 +259,8 @@ SWGChannelSettings::asJsonObject() { if((ssb_demod_settings != nullptr) && (ssb_demod_settings->isSet())){ toJsonValue(QString("SSBDemodSettings"), ssb_demod_settings, obj, QString("SWGSSBDemodSettings")); } - if((udp_sink_settings != nullptr) && (udp_sink_settings->isSet())){ - toJsonValue(QString("UDPSinkSettings"), udp_sink_settings, obj, QString("SWGUDPSinkSettings")); + 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")); @@ -405,14 +405,14 @@ SWGChannelSettings::setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings) this->m_ssb_demod_settings_isSet = true; } -SWGUDPSinkSettings* -SWGChannelSettings::getUdpSinkSettings() { - return udp_sink_settings; +SWGUDPSourceSettings* +SWGChannelSettings::getUdpSourceSettings() { + return udp_source_settings; } void -SWGChannelSettings::setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings) { - this->udp_sink_settings = udp_sink_settings; - this->m_udp_sink_settings_isSet = true; +SWGChannelSettings::setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings) { + this->udp_source_settings = udp_source_settings; + this->m_udp_source_settings_isSet = true; } SWGUDPSrcSettings* @@ -463,7 +463,7 @@ SWGChannelSettings::isSet(){ if(daemon_source_settings != nullptr && daemon_source_settings->isSet()){ isObjectUpdated = true; break;} 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_sink_settings != nullptr && udp_sink_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(wfm_demod_settings != nullptr && wfm_demod_settings->isSet()){ isObjectUpdated = true; break;} if(wfm_mod_settings != nullptr && wfm_mod_settings->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index 6d8a43592..ee2e3e92c 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -33,7 +33,7 @@ #include "SWGNFMModSettings.h" #include "SWGSSBDemodSettings.h" #include "SWGSSBModSettings.h" -#include "SWGUDPSinkSettings.h" +#include "SWGUDPSourceSettings.h" #include "SWGUDPSrcSettings.h" #include "SWGWFMDemodSettings.h" #include "SWGWFMModSettings.h" @@ -96,8 +96,8 @@ public: SWGSSBDemodSettings* getSsbDemodSettings(); void setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings); - SWGUDPSinkSettings* getUdpSinkSettings(); - void setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings); + SWGUDPSourceSettings* getUdpSourceSettings(); + void setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings); SWGUDPSrcSettings* getUdpSrcSettings(); void setUdpSrcSettings(SWGUDPSrcSettings* udp_src_settings); @@ -151,8 +151,8 @@ private: SWGSSBDemodSettings* ssb_demod_settings; bool m_ssb_demod_settings_isSet; - SWGUDPSinkSettings* udp_sink_settings; - bool m_udp_sink_settings_isSet; + SWGUDPSourceSettings* udp_source_settings; + bool m_udp_source_settings_isSet; SWGUDPSrcSettings* udp_src_settings; bool m_udp_src_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index b5fc18c1c..6adb9b75a 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -105,8 +105,8 @@ #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" @@ -390,11 +390,11 @@ namespace SWGSDRangel { if(QString("SWGTestSourceSettings").compare(type) == 0) { return new SWGTestSourceSettings(); } - if(QString("SWGUDPSinkReport").compare(type) == 0) { - return new SWGUDPSinkReport(); + if(QString("SWGUDPSourceReport").compare(type) == 0) { + return new SWGUDPSourceReport(); } - if(QString("SWGUDPSinkSettings").compare(type) == 0) { - return new SWGUDPSinkSettings(); + if(QString("SWGUDPSourceSettings").compare(type) == 0) { + return new SWGUDPSourceSettings(); } if(QString("SWGUDPSrcReport").compare(type) == 0) { return new SWGUDPSrcReport(); diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp b/swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.cpp similarity index 83% rename from swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp rename to swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.cpp index 89fd688b5..9cdeca802 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.cpp @@ -11,7 +11,7 @@ */ -#include "SWGUDPSinkReport.h" +#include "SWGUDPSourceReport.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGUDPSinkReport::SWGUDPSinkReport(QString* json) { +SWGUDPSourceReport::SWGUDPSourceReport(QString* json) { init(); this->fromJson(*json); } -SWGUDPSinkReport::SWGUDPSinkReport() { +SWGUDPSourceReport::SWGUDPSourceReport() { channel_power_db = 0.0f; m_channel_power_db_isSet = false; input_power_db = 0.0f; @@ -40,12 +40,12 @@ SWGUDPSinkReport::SWGUDPSinkReport() { m_channel_sample_rate_isSet = false; } -SWGUDPSinkReport::~SWGUDPSinkReport() { +SWGUDPSourceReport::~SWGUDPSourceReport() { this->cleanup(); } void -SWGUDPSinkReport::init() { +SWGUDPSourceReport::init() { channel_power_db = 0.0f; m_channel_power_db_isSet = false; input_power_db = 0.0f; @@ -59,7 +59,7 @@ SWGUDPSinkReport::init() { } void -SWGUDPSinkReport::cleanup() { +SWGUDPSourceReport::cleanup() { @@ -67,8 +67,8 @@ SWGUDPSinkReport::cleanup() { } -SWGUDPSinkReport* -SWGUDPSinkReport::fromJson(QString &json) { +SWGUDPSourceReport* +SWGUDPSourceReport::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -77,7 +77,7 @@ SWGUDPSinkReport::fromJson(QString &json) { } void -SWGUDPSinkReport::fromJsonObject(QJsonObject &pJson) { +SWGUDPSourceReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); ::SWGSDRangel::setValue(&input_power_db, pJson["inputPowerDB"], "float", ""); @@ -91,7 +91,7 @@ SWGUDPSinkReport::fromJsonObject(QJsonObject &pJson) { } QString -SWGUDPSinkReport::asJson () +SWGUDPSourceReport::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -102,7 +102,7 @@ SWGUDPSinkReport::asJson () } QJsonObject* -SWGUDPSinkReport::asJsonObject() { +SWGUDPSourceReport::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_channel_power_db_isSet){ obj->insert("channelPowerDB", QJsonValue(channel_power_db)); @@ -124,58 +124,58 @@ SWGUDPSinkReport::asJsonObject() { } float -SWGUDPSinkReport::getChannelPowerDb() { +SWGUDPSourceReport::getChannelPowerDb() { return channel_power_db; } void -SWGUDPSinkReport::setChannelPowerDb(float channel_power_db) { +SWGUDPSourceReport::setChannelPowerDb(float channel_power_db) { this->channel_power_db = channel_power_db; this->m_channel_power_db_isSet = true; } float -SWGUDPSinkReport::getInputPowerDb() { +SWGUDPSourceReport::getInputPowerDb() { return input_power_db; } void -SWGUDPSinkReport::setInputPowerDb(float input_power_db) { +SWGUDPSourceReport::setInputPowerDb(float input_power_db) { this->input_power_db = input_power_db; this->m_input_power_db_isSet = true; } qint32 -SWGUDPSinkReport::getSquelch() { +SWGUDPSourceReport::getSquelch() { return squelch; } void -SWGUDPSinkReport::setSquelch(qint32 squelch) { +SWGUDPSourceReport::setSquelch(qint32 squelch) { this->squelch = squelch; this->m_squelch_isSet = true; } qint32 -SWGUDPSinkReport::getBufferGauge() { +SWGUDPSourceReport::getBufferGauge() { return buffer_gauge; } void -SWGUDPSinkReport::setBufferGauge(qint32 buffer_gauge) { +SWGUDPSourceReport::setBufferGauge(qint32 buffer_gauge) { this->buffer_gauge = buffer_gauge; this->m_buffer_gauge_isSet = true; } qint32 -SWGUDPSinkReport::getChannelSampleRate() { +SWGUDPSourceReport::getChannelSampleRate() { return channel_sample_rate; } void -SWGUDPSinkReport::setChannelSampleRate(qint32 channel_sample_rate) { +SWGUDPSourceReport::setChannelSampleRate(qint32 channel_sample_rate) { this->channel_sample_rate = channel_sample_rate; this->m_channel_sample_rate_isSet = true; } bool -SWGUDPSinkReport::isSet(){ +SWGUDPSourceReport::isSet(){ bool isObjectUpdated = false; do{ if(m_channel_power_db_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h b/swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.h similarity index 88% rename from swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h rename to swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.h index 535c38ef1..45919d544 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSinkReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceReport.h @@ -11,13 +11,13 @@ */ /* - * SWGUDPSinkReport.h + * SWGUDPSourceReport.h * - * UDPSink + * UDPSource */ -#ifndef SWGUDPSinkReport_H_ -#define SWGUDPSinkReport_H_ +#ifndef SWGUDPSourceReport_H_ +#define SWGUDPSourceReport_H_ #include @@ -28,18 +28,18 @@ namespace SWGSDRangel { -class SWG_API SWGUDPSinkReport: public SWGObject { +class SWG_API SWGUDPSourceReport: public SWGObject { public: - SWGUDPSinkReport(); - SWGUDPSinkReport(QString* json); - virtual ~SWGUDPSinkReport(); + SWGUDPSourceReport(); + SWGUDPSourceReport(QString* json); + virtual ~SWGUDPSourceReport(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGUDPSinkReport* fromJson(QString &jsonString) override; + virtual SWGUDPSourceReport* fromJson(QString &jsonString) override; float getChannelPowerDb(); void setChannelPowerDb(float channel_power_db); @@ -79,4 +79,4 @@ private: } -#endif /* SWGUDPSinkReport_H_ */ +#endif /* SWGUDPSourceReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp similarity index 83% rename from swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp rename to swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp index b6af36abc..bd7a26122 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp @@ -11,7 +11,7 @@ */ -#include "SWGUDPSinkSettings.h" +#include "SWGUDPSourceSettings.h" #include "SWGHelpers.h" @@ -22,12 +22,12 @@ namespace SWGSDRangel { -SWGUDPSinkSettings::SWGUDPSinkSettings(QString* json) { +SWGUDPSourceSettings::SWGUDPSourceSettings(QString* json) { init(); this->fromJson(*json); } -SWGUDPSinkSettings::SWGUDPSinkSettings() { +SWGUDPSourceSettings::SWGUDPSourceSettings() { sample_format = 0; m_sample_format_isSet = false; input_sample_rate = 0.0f; @@ -68,12 +68,12 @@ SWGUDPSinkSettings::SWGUDPSinkSettings() { m_title_isSet = false; } -SWGUDPSinkSettings::~SWGUDPSinkSettings() { +SWGUDPSourceSettings::~SWGUDPSourceSettings() { this->cleanup(); } void -SWGUDPSinkSettings::init() { +SWGUDPSourceSettings::init() { sample_format = 0; m_sample_format_isSet = false; input_sample_rate = 0.0f; @@ -115,7 +115,7 @@ SWGUDPSinkSettings::init() { } void -SWGUDPSinkSettings::cleanup() { +SWGUDPSourceSettings::cleanup() { @@ -141,8 +141,8 @@ SWGUDPSinkSettings::cleanup() { } } -SWGUDPSinkSettings* -SWGUDPSinkSettings::fromJson(QString &json) { +SWGUDPSourceSettings* +SWGUDPSourceSettings::fromJson(QString &json) { QByteArray array (json.toStdString().c_str()); QJsonDocument doc = QJsonDocument::fromJson(array); QJsonObject jsonObject = doc.object(); @@ -151,7 +151,7 @@ SWGUDPSinkSettings::fromJson(QString &json) { } void -SWGUDPSinkSettings::fromJsonObject(QJsonObject &pJson) { +SWGUDPSourceSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&sample_format, pJson["sampleFormat"], "qint32", ""); ::SWGSDRangel::setValue(&input_sample_rate, pJson["inputSampleRate"], "float", ""); @@ -193,7 +193,7 @@ SWGUDPSinkSettings::fromJsonObject(QJsonObject &pJson) { } QString -SWGUDPSinkSettings::asJson () +SWGUDPSourceSettings::asJson () { QJsonObject* obj = this->asJsonObject(); @@ -204,7 +204,7 @@ SWGUDPSinkSettings::asJson () } QJsonObject* -SWGUDPSinkSettings::asJsonObject() { +SWGUDPSourceSettings::asJsonObject() { QJsonObject* obj = new QJsonObject(); if(m_sample_format_isSet){ obj->insert("sampleFormat", QJsonValue(sample_format)); @@ -268,198 +268,198 @@ SWGUDPSinkSettings::asJsonObject() { } qint32 -SWGUDPSinkSettings::getSampleFormat() { +SWGUDPSourceSettings::getSampleFormat() { return sample_format; } void -SWGUDPSinkSettings::setSampleFormat(qint32 sample_format) { +SWGUDPSourceSettings::setSampleFormat(qint32 sample_format) { this->sample_format = sample_format; this->m_sample_format_isSet = true; } float -SWGUDPSinkSettings::getInputSampleRate() { +SWGUDPSourceSettings::getInputSampleRate() { return input_sample_rate; } void -SWGUDPSinkSettings::setInputSampleRate(float input_sample_rate) { +SWGUDPSourceSettings::setInputSampleRate(float input_sample_rate) { this->input_sample_rate = input_sample_rate; this->m_input_sample_rate_isSet = true; } qint64 -SWGUDPSinkSettings::getInputFrequencyOffset() { +SWGUDPSourceSettings::getInputFrequencyOffset() { return input_frequency_offset; } void -SWGUDPSinkSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { +SWGUDPSourceSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { this->input_frequency_offset = input_frequency_offset; this->m_input_frequency_offset_isSet = true; } float -SWGUDPSinkSettings::getRfBandwidth() { +SWGUDPSourceSettings::getRfBandwidth() { return rf_bandwidth; } void -SWGUDPSinkSettings::setRfBandwidth(float rf_bandwidth) { +SWGUDPSourceSettings::setRfBandwidth(float rf_bandwidth) { this->rf_bandwidth = rf_bandwidth; this->m_rf_bandwidth_isSet = true; } float -SWGUDPSinkSettings::getLowCutoff() { +SWGUDPSourceSettings::getLowCutoff() { return low_cutoff; } void -SWGUDPSinkSettings::setLowCutoff(float low_cutoff) { +SWGUDPSourceSettings::setLowCutoff(float low_cutoff) { this->low_cutoff = low_cutoff; this->m_low_cutoff_isSet = true; } qint32 -SWGUDPSinkSettings::getFmDeviation() { +SWGUDPSourceSettings::getFmDeviation() { return fm_deviation; } void -SWGUDPSinkSettings::setFmDeviation(qint32 fm_deviation) { +SWGUDPSourceSettings::setFmDeviation(qint32 fm_deviation) { this->fm_deviation = fm_deviation; this->m_fm_deviation_isSet = true; } float -SWGUDPSinkSettings::getAmModFactor() { +SWGUDPSourceSettings::getAmModFactor() { return am_mod_factor; } void -SWGUDPSinkSettings::setAmModFactor(float am_mod_factor) { +SWGUDPSourceSettings::setAmModFactor(float am_mod_factor) { this->am_mod_factor = am_mod_factor; this->m_am_mod_factor_isSet = true; } qint32 -SWGUDPSinkSettings::getChannelMute() { +SWGUDPSourceSettings::getChannelMute() { return channel_mute; } void -SWGUDPSinkSettings::setChannelMute(qint32 channel_mute) { +SWGUDPSourceSettings::setChannelMute(qint32 channel_mute) { this->channel_mute = channel_mute; this->m_channel_mute_isSet = true; } float -SWGUDPSinkSettings::getGainIn() { +SWGUDPSourceSettings::getGainIn() { return gain_in; } void -SWGUDPSinkSettings::setGainIn(float gain_in) { +SWGUDPSourceSettings::setGainIn(float gain_in) { this->gain_in = gain_in; this->m_gain_in_isSet = true; } float -SWGUDPSinkSettings::getGainOut() { +SWGUDPSourceSettings::getGainOut() { return gain_out; } void -SWGUDPSinkSettings::setGainOut(float gain_out) { +SWGUDPSourceSettings::setGainOut(float gain_out) { this->gain_out = gain_out; this->m_gain_out_isSet = true; } float -SWGUDPSinkSettings::getSquelch() { +SWGUDPSourceSettings::getSquelch() { return squelch; } void -SWGUDPSinkSettings::setSquelch(float squelch) { +SWGUDPSourceSettings::setSquelch(float squelch) { this->squelch = squelch; this->m_squelch_isSet = true; } float -SWGUDPSinkSettings::getSquelchGate() { +SWGUDPSourceSettings::getSquelchGate() { return squelch_gate; } void -SWGUDPSinkSettings::setSquelchGate(float squelch_gate) { +SWGUDPSourceSettings::setSquelchGate(float squelch_gate) { this->squelch_gate = squelch_gate; this->m_squelch_gate_isSet = true; } qint32 -SWGUDPSinkSettings::getSquelchEnabled() { +SWGUDPSourceSettings::getSquelchEnabled() { return squelch_enabled; } void -SWGUDPSinkSettings::setSquelchEnabled(qint32 squelch_enabled) { +SWGUDPSourceSettings::setSquelchEnabled(qint32 squelch_enabled) { this->squelch_enabled = squelch_enabled; this->m_squelch_enabled_isSet = true; } qint32 -SWGUDPSinkSettings::getAutoRwBalance() { +SWGUDPSourceSettings::getAutoRwBalance() { return auto_rw_balance; } void -SWGUDPSinkSettings::setAutoRwBalance(qint32 auto_rw_balance) { +SWGUDPSourceSettings::setAutoRwBalance(qint32 auto_rw_balance) { this->auto_rw_balance = auto_rw_balance; this->m_auto_rw_balance_isSet = true; } qint32 -SWGUDPSinkSettings::getStereoInput() { +SWGUDPSourceSettings::getStereoInput() { return stereo_input; } void -SWGUDPSinkSettings::setStereoInput(qint32 stereo_input) { +SWGUDPSourceSettings::setStereoInput(qint32 stereo_input) { this->stereo_input = stereo_input; this->m_stereo_input_isSet = true; } qint32 -SWGUDPSinkSettings::getRgbColor() { +SWGUDPSourceSettings::getRgbColor() { return rgb_color; } void -SWGUDPSinkSettings::setRgbColor(qint32 rgb_color) { +SWGUDPSourceSettings::setRgbColor(qint32 rgb_color) { this->rgb_color = rgb_color; this->m_rgb_color_isSet = true; } QString* -SWGUDPSinkSettings::getUdpAddress() { +SWGUDPSourceSettings::getUdpAddress() { return udp_address; } void -SWGUDPSinkSettings::setUdpAddress(QString* udp_address) { +SWGUDPSourceSettings::setUdpAddress(QString* udp_address) { this->udp_address = udp_address; this->m_udp_address_isSet = true; } qint32 -SWGUDPSinkSettings::getUdpPort() { +SWGUDPSourceSettings::getUdpPort() { return udp_port; } void -SWGUDPSinkSettings::setUdpPort(qint32 udp_port) { +SWGUDPSourceSettings::setUdpPort(qint32 udp_port) { this->udp_port = udp_port; this->m_udp_port_isSet = true; } QString* -SWGUDPSinkSettings::getTitle() { +SWGUDPSourceSettings::getTitle() { return title; } void -SWGUDPSinkSettings::setTitle(QString* title) { +SWGUDPSourceSettings::setTitle(QString* title) { this->title = title; this->m_title_isSet = true; } bool -SWGUDPSinkSettings::isSet(){ +SWGUDPSourceSettings::isSet(){ bool isObjectUpdated = false; do{ if(m_sample_format_isSet){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h similarity index 92% rename from swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h rename to swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h index 07cc67639..98e56a9e1 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSinkSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h @@ -11,13 +11,13 @@ */ /* - * SWGUDPSinkSettings.h + * SWGUDPSourceSettings.h * - * UDPSink + * UDPSource */ -#ifndef SWGUDPSinkSettings_H_ -#define SWGUDPSinkSettings_H_ +#ifndef SWGUDPSourceSettings_H_ +#define SWGUDPSourceSettings_H_ #include @@ -29,18 +29,18 @@ namespace SWGSDRangel { -class SWG_API SWGUDPSinkSettings: public SWGObject { +class SWG_API SWGUDPSourceSettings: public SWGObject { public: - SWGUDPSinkSettings(); - SWGUDPSinkSettings(QString* json); - virtual ~SWGUDPSinkSettings(); + SWGUDPSourceSettings(); + SWGUDPSourceSettings(QString* json); + virtual ~SWGUDPSourceSettings(); void init(); void cleanup(); virtual QString asJson () override; virtual QJsonObject* asJsonObject() override; virtual void fromJsonObject(QJsonObject &json) override; - virtual SWGUDPSinkSettings* fromJson(QString &jsonString) override; + virtual SWGUDPSourceSettings* fromJson(QString &jsonString) override; qint32 getSampleFormat(); void setSampleFormat(qint32 sample_format); @@ -164,4 +164,4 @@ private: } -#endif /* SWGUDPSinkSettings_H_ */ +#endif /* SWGUDPSourceSettings_H_ */ diff --git a/swagger/sdrangel/examples/tx_test.py b/swagger/sdrangel/examples/tx_test.py index 37ef3b3b4..f8445a5c9 100755 --- a/swagger/sdrangel/examples/tx_test.py +++ b/swagger/sdrangel/examples/tx_test.py @@ -227,19 +227,19 @@ def setupChannel(options): settings["SSBModSettings"]["toneFrequency"] = 600 settings["SSBModSettings"]["bandwidth"] = 1000 settings["SSBModSettings"]["lowCut"] = 300 - elif options.channel_id == "UDPSink": - settings["UDPSinkSettings"]["title"] = "Test UDP Sink" - settings["UDPSinkSettings"]["inputFrequencyOffset"] = options.channel_freq - settings["UDPSinkSettings"]["rfBandwidth"] = 12500 - settings["UDPSinkSettings"]["fmDeviation"] = 6000 - settings["UDPSinkSettings"]["autoRWBalance"] = 1 - settings["UDPSinkSettings"]["stereoInput"] = 0 - settings["UDPSinkSettings"]["udpAddress"] = "127.0.0.1" - settings["UDPSinkSettings"]["udpPort"] = 9998 - settings["UDPSinkSettings"]["inputSampleRate"] = 48000 - settings["UDPSinkSettings"]["sampleFormat"] = 1 # FormatNFM - settings["UDPSinkSettings"]["gainIn"] = 2.5 - settings["UDPSinkSettings"]["gainOut"] = 2.8 + elif options.channel_id == "UDPSource": + settings["UDPSourceSettings"]["title"] = "Test UDP Source" + settings["UDPSourceSettings"]["inputFrequencyOffset"] = options.channel_freq + settings["UDPSourceSettings"]["rfBandwidth"] = 12500 + settings["UDPSourceSettings"]["fmDeviation"] = 6000 + settings["UDPSourceSettings"]["autoRWBalance"] = 1 + settings["UDPSourceSettings"]["stereoInput"] = 0 + settings["UDPSourceSettings"]["udpAddress"] = "127.0.0.1" + settings["UDPSourceSettings"]["udpPort"] = 9998 + settings["UDPSourceSettings"]["inputSampleRate"] = 48000 + settings["UDPSourceSettings"]["sampleFormat"] = 1 # FormatNFM + settings["UDPSourceSettings"]["gainIn"] = 2.5 + settings["UDPSourceSettings"]["gainOut"] = 2.8 elif options.channel_id == "WFMMod": settings["WFMModSettings"]["title"] = "Test WFM" settings["WFMModSettings"]["inputFrequencyOffset"] = options.channel_freq