From c424ce10e491359015e0a6cbbb2267b9a4773caa Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 26 May 2018 15:53:22 +0200 Subject: [PATCH] SSB demod: implemeted WEB API --- plugins/channelrx/demodssb/CMakeLists.txt | 1 + plugins/channelrx/demodssb/ssbdemod.cpp | 155 ++++++ plugins/channelrx/demodssb/ssbdemod.h | 16 + plugins/channelrx/demodssb/ssbdemodgui.cpp | 12 +- sdrbase/resources/res.qrc | 1 + sdrbase/resources/webapi/doc/html2/index.html | 99 +++- .../webapi/doc/swagger/include/SSBDemod.yaml | 65 +++ .../webapi/doc/swagger/include/SSBMod.yaml | 2 +- .../resources/webapi/doc/swagger/swagger.yaml | 4 + sdrbase/webapi/webapirequestmapper.cpp | 14 + .../api/swagger/include/SSBDemod.yaml | 65 +++ .../sdrangel/api/swagger/include/SSBMod.yaml | 2 +- swagger/sdrangel/api/swagger/swagger.yaml | 4 + swagger/sdrangel/code/html2/index.html | 99 +++- .../code/qt5/client/SWGChannelReport.cpp | 23 + .../code/qt5/client/SWGChannelReport.h | 7 + .../code/qt5/client/SWGChannelSettings.cpp | 23 + .../code/qt5/client/SWGChannelSettings.h | 7 + .../code/qt5/client/SWGModelFactory.h | 8 + .../code/qt5/client/SWGSSBDemodReport.cpp | 169 +++++++ .../code/qt5/client/SWGSSBDemodReport.h | 76 +++ .../code/qt5/client/SWGSSBDemodSettings.cpp | 446 ++++++++++++++++++ .../code/qt5/client/SWGSSBDemodSettings.h | 155 ++++++ .../code/qt5/client/SWGSSBModReport.h | 2 +- swagger/sdrangel/examples/rx_test.py | 15 + 25 files changed, 1462 insertions(+), 8 deletions(-) create mode 100644 sdrbase/resources/webapi/doc/swagger/include/SSBDemod.yaml create mode 100644 swagger/sdrangel/api/swagger/include/SSBDemod.yaml create mode 100644 swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.h diff --git a/plugins/channelrx/demodssb/CMakeLists.txt b/plugins/channelrx/demodssb/CMakeLists.txt index 355098143..514f1e01b 100644 --- a/plugins/channelrx/demodssb/CMakeLists.txt +++ b/plugins/channelrx/demodssb/CMakeLists.txt @@ -23,6 +23,7 @@ set(ssb_FORMS include_directories( . ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ) #include(${QT_USE_FILE}) diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index e75b562a4..cf7a50ad4 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -21,6 +21,11 @@ #include #include +#include "SWGChannelSettings.h" +#include "SWGSSBDemodSettings.h" +#include "SWGChannelReport.h" +#include "SWGSSBDemodReport.h" + #include "audio/audiooutput.h" #include "dsp/dspengine.h" #include "dsp/downchannelizer.h" @@ -577,3 +582,153 @@ bool SSBDemod::deserialize(const QByteArray& data) return false; } } + +int SSBDemod::webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage __attribute__((unused))) +{ + response.setSsbDemodSettings(new SWGSDRangel::SWGSSBDemodSettings()); + response.getSsbDemodSettings()->init(); + webapiFormatChannelSettings(response, m_settings); + return 200; +} + +int SSBDemod::webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage __attribute__((unused))) +{ + SSBDemodSettings settings = m_settings; + bool frequencyOffsetChanged = false; + + if (channelSettingsKeys.contains("inputFrequencyOffset")) + { + settings.m_inputFrequencyOffset = response.getSsbDemodSettings()->getInputFrequencyOffset(); + frequencyOffsetChanged = true; + } + if (channelSettingsKeys.contains("rfBandwidth")) { + settings.m_rfBandwidth = response.getSsbDemodSettings()->getRfBandwidth(); + } + if (channelSettingsKeys.contains("lowCutoff")) { + settings.m_lowCutoff = response.getSsbDemodSettings()->getLowCutoff(); + } + if (channelSettingsKeys.contains("volume")) { + settings.m_volume = response.getSsbDemodSettings()->getVolume(); + } + if (channelSettingsKeys.contains("spanLog2")) { + settings.m_spanLog2 = response.getSsbDemodSettings()->getSpanLog2(); + } + if (channelSettingsKeys.contains("audioBinaural")) { + settings.m_audioBinaural = response.getSsbDemodSettings()->getAudioBinaural() != 0; + } + if (channelSettingsKeys.contains("audioFlipChannels")) { + settings.m_audioFlipChannels = response.getSsbDemodSettings()->getAudioFlipChannels() != 0; + } + if (channelSettingsKeys.contains("dsb")) { + settings.m_dsb = response.getSsbDemodSettings()->getDsb() != 0; + } + if (channelSettingsKeys.contains("audioMute")) { + settings.m_audioMute = response.getSsbDemodSettings()->getAudioMute() != 0; + } + if (channelSettingsKeys.contains("agc")) { + settings.m_agc = response.getSsbDemodSettings()->getAgc() != 0; + } + if (channelSettingsKeys.contains("agcClamping")) { + settings.m_agcClamping = response.getSsbDemodSettings()->getAgcClamping() != 0; + } + if (channelSettingsKeys.contains("agcTimeLog2")) { + settings.m_agcTimeLog2 = response.getSsbDemodSettings()->getAgcTimeLog2(); + } + if (channelSettingsKeys.contains("agcPowerThreshold")) { + settings.m_agcPowerThreshold = response.getSsbDemodSettings()->getAgcPowerThreshold(); + } + if (channelSettingsKeys.contains("agcThresholdGate")) { + settings.m_agcThresholdGate = response.getSsbDemodSettings()->getAgcThresholdGate(); + } + if (channelSettingsKeys.contains("rgbColor")) { + settings.m_rgbColor = response.getSsbDemodSettings()->getRgbColor(); + } + if (channelSettingsKeys.contains("title")) { + settings.m_title = *response.getSsbDemodSettings()->getTitle(); + } + if (channelSettingsKeys.contains("audioDeviceName")) { + settings.m_audioDeviceName = *response.getSsbDemodSettings()->getAudioDeviceName(); + } + + if (frequencyOffsetChanged) + { + MsgConfigureChannelizer* channelConfigMsg = MsgConfigureChannelizer::create( + m_audioSampleRate, settings.m_inputFrequencyOffset); + m_inputMessageQueue.push(channelConfigMsg); + } + + MsgConfigureSSBDemod *msg = MsgConfigureSSBDemod::create(settings, force); + m_inputMessageQueue.push(msg); + + qDebug("SSBDemod::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); + if (m_guiMessageQueue) // forward to GUI if any + { + MsgConfigureSSBDemod *msgToGUI = MsgConfigureSSBDemod::create(settings, force); + m_guiMessageQueue->push(msgToGUI); + } + + webapiFormatChannelSettings(response, settings); + + return 200; +} + +int SSBDemod::webapiReportGet( + SWGSDRangel::SWGChannelReport& response, + QString& errorMessage __attribute__((unused))) +{ + response.setSsbDemodReport(new SWGSDRangel::SWGSSBDemodReport()); + response.getSsbDemodReport()->init(); + webapiFormatChannelReport(response); + return 200; +} + +void SSBDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SSBDemodSettings& settings) +{ + response.getSsbDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0); + response.getSsbDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); + response.getSsbDemodSettings()->setRfBandwidth(settings.m_rfBandwidth); + response.getSsbDemodSettings()->setLowCutoff(settings.m_lowCutoff); + response.getSsbDemodSettings()->setVolume(settings.m_volume); + response.getSsbDemodSettings()->setSpanLog2(settings.m_spanLog2); + response.getSsbDemodSettings()->setAudioBinaural(settings.m_audioBinaural ? 1 : 0); + response.getSsbDemodSettings()->setAudioFlipChannels(settings.m_audioFlipChannels ? 1 : 0); + response.getSsbDemodSettings()->setDsb(settings.m_dsb ? 1 : 0); + response.getSsbDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0); + response.getSsbDemodSettings()->setAgc(settings.m_agc ? 1 : 0); + response.getSsbDemodSettings()->setAgcClamping(settings.m_agcClamping ? 1 : 0); + response.getSsbDemodSettings()->setAgcTimeLog2(settings.m_agcTimeLog2); + response.getSsbDemodSettings()->setAgcPowerThreshold(settings.m_agcPowerThreshold); + response.getSsbDemodSettings()->setAgcThresholdGate(settings.m_agcThresholdGate); + response.getSsbDemodSettings()->setRgbColor(settings.m_rgbColor); + + if (response.getSsbDemodSettings()->getTitle()) { + *response.getSsbDemodSettings()->getTitle() = settings.m_title; + } else { + response.getSsbDemodSettings()->setTitle(new QString(settings.m_title)); + } + + if (response.getSsbDemodSettings()->getAudioDeviceName()) { + *response.getSsbDemodSettings()->getAudioDeviceName() = settings.m_audioDeviceName; + } else { + response.getSsbDemodSettings()->setAudioDeviceName(new QString(settings.m_audioDeviceName)); + } +} + +void SSBDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) +{ + double magsqAvg, magsqPeak; + int nbMagsqSamples; + getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples); + + response.getSsbDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsqAvg)); + response.getSsbDemodReport()->setSquelch(m_audioActive ? 1 : 0); + response.getSsbDemodReport()->setAudioSampleRate(m_audioSampleRate); + response.getSsbDemodReport()->setChannelSampleRate(m_inputSampleRate); +} + diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 27e721e18..4dabab796 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -135,6 +135,20 @@ public: m_magsqCount = 0; } + virtual int webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage); + + virtual int webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage); + + virtual int webapiReportGet( + SWGSDRangel::SWGChannelReport& response, + QString& errorMessage); + static const QString m_channelIdURI; static const QString m_channelId; @@ -283,6 +297,8 @@ private: void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force = false); void applySettings(const SSBDemodSettings& settings, bool force = false); void applyAudioSampleRate(int sampleRate); + void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SSBDemodSettings& settings); + void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); }; #endif // INCLUDE_SSBDEMOD_H diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index 42a43237e..788b1d946 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -82,7 +82,17 @@ bool SSBDemodGUI::deserialize(const QByteArray& data) bool SSBDemodGUI::handleMessage(const Message& message) { - if (DSPConfigureAudio::match(message)) + if (SSBDemod::MsgConfigureSSBDemod::match(message)) + { + qDebug("SSBDemodGUI::handleMessage: SSBDemod::MsgConfigureSSBDemod"); + const SSBDemod::MsgConfigureSSBDemod& cfg = (SSBDemod::MsgConfigureSSBDemod&) message; + m_settings = cfg.getSettings(); + blockApplySettings(true); + displaySettings(); + blockApplySettings(false); + return true; + } + else if (DSPConfigureAudio::match(message)) { qDebug("SSBDemodGUI::handleMessage: DSPConfigureAudio: %d", m_ssbDemod->getAudioSampleRate()); applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 9a40ae94a..486d4d98b 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -20,6 +20,7 @@ webapi/doc/swagger/include/NFMMod.yaml webapi/doc/swagger/include/Perseus.yaml webapi/doc/swagger/include/RtlSdr.yaml + webapi/doc/swagger/include/SSBDemod.yaml webapi/doc/swagger/include/SSBMod.yaml webapi/doc/swagger/include/UDPSink.yaml webapi/doc/swagger/include/UDPSrc.yaml diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 58108848b..da3557fe4 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1405,6 +1405,9 @@ margin-bottom: 20px; "NFMModReport" : { "$ref" : "#/definitions/NFMModReport" }, + "SSBDemodReport" : { + "$ref" : "#/definitions/SSBDemodReport" + }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, @@ -1459,6 +1462,9 @@ margin-bottom: 20px; "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" }, + "SSBDemodSettings" : { + "$ref" : "#/definitions/SSBDemodSettings" + }, "UDPSinkSettings" : { "$ref" : "#/definitions/UDPSinkSettings" }, @@ -2788,6 +2794,95 @@ margin-bottom: 20px; } }, "description" : "RTLSDR" +}; + defs.SSBDemodReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power received in channel (dB)" + }, + "squelch" : { + "type" : "integer", + "description" : "Audio squelch status (1 if open else 0)" + }, + "audioSampleRate" : { + "type" : "integer" + }, + "channelSampleRate" : { + "type" : "integer" + } + }, + "description" : "SSBDemod" +}; + defs.SSBDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "rfBandwidth" : { + "type" : "number", + "format" : "float" + }, + "lowCutoff" : { + "type" : "number", + "format" : "float" + }, + "volume" : { + "type" : "number", + "format" : "float" + }, + "spanLog2" : { + "type" : "integer" + }, + "audioBinaural" : { + "type" : "integer", + "description" : "Audio binaural mode (1 if active else 0)" + }, + "audioFlipChannels" : { + "type" : "integer", + "description" : "Flip audio channels (1 if flipped else 0)" + }, + "dsb" : { + "type" : "integer", + "description" : "Double sidebands mode (1 if DSB else 0)" + }, + "audioMute" : { + "type" : "integer", + "description" : "Mute audio (1 if muted else 0)" + }, + "agc" : { + "type" : "integer", + "description" : "AGC (1 if AGC active else 0)" + }, + "agcClamping" : { + "type" : "integer", + "description" : "AGC clamping (1 if AGC clampingactive else 0)" + }, + "agcTimeLog2" : { + "type" : "integer", + "description" : "AGC averaging time log2 in milliseconds" + }, + "agcPowerThreshold" : { + "type" : "integer", + "description" : "Audio open RF threshold (dB)" + }, + "agcThresholdGate" : { + "type" : "integer", + "description" : "Audio squelch gate in ms" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "audioDeviceName" : { + "type" : "string" + } + }, + "description" : "SSBDemod" }; defs.SSBModReport = { "properties" : { @@ -2803,7 +2898,7 @@ margin-bottom: 20px; "type" : "integer" } }, - "description" : "AMMod" + "description" : "SSBMod" }; defs.SSBModSettings = { "properties" : { @@ -21944,7 +22039,7 @@ except ApiException as e:
- Generated 2018-05-26T14:09:06.509+02:00 + Generated 2018-05-26T14:52:58.621+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/SSBDemod.yaml b/sdrbase/resources/webapi/doc/swagger/include/SSBDemod.yaml new file mode 100644 index 000000000..b66eacda9 --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/SSBDemod.yaml @@ -0,0 +1,65 @@ +SSBDemodSettings: + description: SSBDemod + properties: + inputFrequencyOffset: + type: integer + format: int64 + rfBandwidth: + type: number + format: float + lowCutoff: + type: number + format: float + volume: + type: number + format: float + spanLog2: + type: integer + audioBinaural: + description: Audio binaural mode (1 if active else 0) + type: integer + audioFlipChannels: + description: Flip audio channels (1 if flipped else 0) + type: integer + dsb: + description: Double sidebands mode (1 if DSB else 0) + type: integer + audioMute: + description: Mute audio (1 if muted else 0) + type: integer + agc: + description: AGC (1 if AGC active else 0) + type: integer + agcClamping: + description: AGC clamping (1 if AGC clampingactive else 0) + type: integer + agcTimeLog2: + description: AGC averaging time log2 in milliseconds + type: integer + agcPowerThreshold: + description: Audio open RF threshold (dB) + type: integer + agcThresholdGate: + description: Audio squelch gate in ms + type: integer + rgbColor: + type: integer + title: + type: string + audioDeviceName: + type: string + +SSBDemodReport: + description: SSBDemod + properties: + channelPowerDB: + description: power received in channel (dB) + type: number + format: float + squelch: + description: Audio squelch status (1 if open else 0) + type: integer + audioSampleRate: + type: integer + channelSampleRate: + type: integer diff --git a/sdrbase/resources/webapi/doc/swagger/include/SSBMod.yaml b/sdrbase/resources/webapi/doc/swagger/include/SSBMod.yaml index 2692d04aa..a460bff62 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/SSBMod.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/SSBMod.yaml @@ -57,7 +57,7 @@ SSBModSettings: $ref: "/doc/swagger/include/CWKeyer.yaml#/CWKeyerSettings" SSBModReport: - description: AMMod + description: SSBMod 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 d2df88a99..7b5368635 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1825,6 +1825,8 @@ definitions: $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings" SSBModSettings: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings" + SSBDemodSettings: + $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodSettings" UDPSinkSettings: $ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkSettings" UDPSrcSettings: @@ -1858,6 +1860,8 @@ definitions: $ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodReport" NFMModReport: $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport" + SSBDemodReport: + $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport" SSBModReport: $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" UDPSinkReport: diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index ce331a84d..d3d2a7de8 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2038,6 +2038,20 @@ bool WebAPIRequestMapper::validateChannelSettings( return false; } } + else if (*channelType == "SSBDemod") + { + if (channelSettings.getTx() == 0) + { + QJsonObject ssbDemodSettingsJsonObject = jsonObject["SSBDemodSettings"].toObject(); + channelSettingsKeys = ssbDemodSettingsJsonObject.keys(); + channelSettings.setSsbDemodSettings(new SWGSDRangel::SWGSSBDemodSettings()); + channelSettings.getSsbDemodSettings()->fromJsonObject(ssbDemodSettingsJsonObject); + return true; + } + else { + return false; + } + } else if (*channelType == "SSBMod") { if (channelSettings.getTx() != 0) diff --git a/swagger/sdrangel/api/swagger/include/SSBDemod.yaml b/swagger/sdrangel/api/swagger/include/SSBDemod.yaml new file mode 100644 index 000000000..b66eacda9 --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/SSBDemod.yaml @@ -0,0 +1,65 @@ +SSBDemodSettings: + description: SSBDemod + properties: + inputFrequencyOffset: + type: integer + format: int64 + rfBandwidth: + type: number + format: float + lowCutoff: + type: number + format: float + volume: + type: number + format: float + spanLog2: + type: integer + audioBinaural: + description: Audio binaural mode (1 if active else 0) + type: integer + audioFlipChannels: + description: Flip audio channels (1 if flipped else 0) + type: integer + dsb: + description: Double sidebands mode (1 if DSB else 0) + type: integer + audioMute: + description: Mute audio (1 if muted else 0) + type: integer + agc: + description: AGC (1 if AGC active else 0) + type: integer + agcClamping: + description: AGC clamping (1 if AGC clampingactive else 0) + type: integer + agcTimeLog2: + description: AGC averaging time log2 in milliseconds + type: integer + agcPowerThreshold: + description: Audio open RF threshold (dB) + type: integer + agcThresholdGate: + description: Audio squelch gate in ms + type: integer + rgbColor: + type: integer + title: + type: string + audioDeviceName: + type: string + +SSBDemodReport: + description: SSBDemod + properties: + channelPowerDB: + description: power received in channel (dB) + type: number + format: float + squelch: + description: Audio squelch status (1 if open else 0) + type: integer + audioSampleRate: + type: integer + channelSampleRate: + type: integer diff --git a/swagger/sdrangel/api/swagger/include/SSBMod.yaml b/swagger/sdrangel/api/swagger/include/SSBMod.yaml index bf3d75099..d66cbc458 100644 --- a/swagger/sdrangel/api/swagger/include/SSBMod.yaml +++ b/swagger/sdrangel/api/swagger/include/SSBMod.yaml @@ -57,7 +57,7 @@ SSBModSettings: $ref: "http://localhost:8081/api/swagger/include/CWKeyer.yaml#/CWKeyerSettings" SSBModReport: - description: AMMod + description: SSBMod 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 0c67bad7c..307efde8e 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1825,6 +1825,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings" SSBModSettings: $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" UDPSrcSettings: @@ -1858,6 +1860,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodReport" NFMModReport: $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModReport" + SSBDemodReport: + $ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport" SSBModReport: $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport" UDPSinkReport: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 58108848b..da3557fe4 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1405,6 +1405,9 @@ margin-bottom: 20px; "NFMModReport" : { "$ref" : "#/definitions/NFMModReport" }, + "SSBDemodReport" : { + "$ref" : "#/definitions/SSBDemodReport" + }, "SSBModReport" : { "$ref" : "#/definitions/SSBModReport" }, @@ -1459,6 +1462,9 @@ margin-bottom: 20px; "SSBModSettings" : { "$ref" : "#/definitions/SSBModSettings" }, + "SSBDemodSettings" : { + "$ref" : "#/definitions/SSBDemodSettings" + }, "UDPSinkSettings" : { "$ref" : "#/definitions/UDPSinkSettings" }, @@ -2788,6 +2794,95 @@ margin-bottom: 20px; } }, "description" : "RTLSDR" +}; + defs.SSBDemodReport = { + "properties" : { + "channelPowerDB" : { + "type" : "number", + "format" : "float", + "description" : "power received in channel (dB)" + }, + "squelch" : { + "type" : "integer", + "description" : "Audio squelch status (1 if open else 0)" + }, + "audioSampleRate" : { + "type" : "integer" + }, + "channelSampleRate" : { + "type" : "integer" + } + }, + "description" : "SSBDemod" +}; + defs.SSBDemodSettings = { + "properties" : { + "inputFrequencyOffset" : { + "type" : "integer", + "format" : "int64" + }, + "rfBandwidth" : { + "type" : "number", + "format" : "float" + }, + "lowCutoff" : { + "type" : "number", + "format" : "float" + }, + "volume" : { + "type" : "number", + "format" : "float" + }, + "spanLog2" : { + "type" : "integer" + }, + "audioBinaural" : { + "type" : "integer", + "description" : "Audio binaural mode (1 if active else 0)" + }, + "audioFlipChannels" : { + "type" : "integer", + "description" : "Flip audio channels (1 if flipped else 0)" + }, + "dsb" : { + "type" : "integer", + "description" : "Double sidebands mode (1 if DSB else 0)" + }, + "audioMute" : { + "type" : "integer", + "description" : "Mute audio (1 if muted else 0)" + }, + "agc" : { + "type" : "integer", + "description" : "AGC (1 if AGC active else 0)" + }, + "agcClamping" : { + "type" : "integer", + "description" : "AGC clamping (1 if AGC clampingactive else 0)" + }, + "agcTimeLog2" : { + "type" : "integer", + "description" : "AGC averaging time log2 in milliseconds" + }, + "agcPowerThreshold" : { + "type" : "integer", + "description" : "Audio open RF threshold (dB)" + }, + "agcThresholdGate" : { + "type" : "integer", + "description" : "Audio squelch gate in ms" + }, + "rgbColor" : { + "type" : "integer" + }, + "title" : { + "type" : "string" + }, + "audioDeviceName" : { + "type" : "string" + } + }, + "description" : "SSBDemod" }; defs.SSBModReport = { "properties" : { @@ -2803,7 +2898,7 @@ margin-bottom: 20px; "type" : "integer" } }, - "description" : "AMMod" + "description" : "SSBMod" }; defs.SSBModSettings = { "properties" : { @@ -21944,7 +22039,7 @@ except ApiException as e:
- Generated 2018-05-26T14:09:06.509+02:00 + Generated 2018-05-26T14:52:58.621+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp index 943ce5f63..32de362f7 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.cpp @@ -46,6 +46,8 @@ SWGChannelReport::SWGChannelReport() { m_nfm_demod_report_isSet = false; nfm_mod_report = nullptr; m_nfm_mod_report_isSet = false; + ssb_demod_report = nullptr; + m_ssb_demod_report_isSet = false; ssb_mod_report = nullptr; m_ssb_mod_report_isSet = false; udp_sink_report = nullptr; @@ -82,6 +84,8 @@ SWGChannelReport::init() { m_nfm_demod_report_isSet = false; nfm_mod_report = new SWGNFMModReport(); m_nfm_mod_report_isSet = false; + ssb_demod_report = new SWGSSBDemodReport(); + m_ssb_demod_report_isSet = false; ssb_mod_report = new SWGSSBModReport(); m_ssb_mod_report_isSet = false; udp_sink_report = new SWGUDPSinkReport(); @@ -121,6 +125,9 @@ SWGChannelReport::cleanup() { if(nfm_mod_report != nullptr) { delete nfm_mod_report; } + if(ssb_demod_report != nullptr) { + delete ssb_demod_report; + } if(ssb_mod_report != nullptr) { delete ssb_mod_report; } @@ -167,6 +174,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&nfm_mod_report, pJson["NFMModReport"], "SWGNFMModReport", "SWGNFMModReport"); + ::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport"); + ::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport"); ::SWGSDRangel::setValue(&udp_sink_report, pJson["UDPSinkReport"], "SWGUDPSinkReport", "SWGUDPSinkReport"); @@ -220,6 +229,9 @@ SWGChannelReport::asJsonObject() { if((nfm_mod_report != nullptr) && (nfm_mod_report->isSet())){ toJsonValue(QString("NFMModReport"), nfm_mod_report, obj, QString("SWGNFMModReport")); } + if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){ + toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport")); + } if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){ toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport")); } @@ -329,6 +341,16 @@ SWGChannelReport::setNfmModReport(SWGNFMModReport* nfm_mod_report) { this->m_nfm_mod_report_isSet = true; } +SWGSSBDemodReport* +SWGChannelReport::getSsbDemodReport() { + return ssb_demod_report; +} +void +SWGChannelReport::setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report) { + this->ssb_demod_report = ssb_demod_report; + this->m_ssb_demod_report_isSet = true; +} + SWGSSBModReport* SWGChannelReport::getSsbModReport() { return ssb_mod_report; @@ -393,6 +415,7 @@ SWGChannelReport::isSet(){ if(dsd_demod_report != nullptr && dsd_demod_report->isSet()){ isObjectUpdated = true; break;} if(nfm_demod_report != nullptr && nfm_demod_report->isSet()){ isObjectUpdated = true; break;} if(nfm_mod_report != nullptr && nfm_mod_report->isSet()){ isObjectUpdated = true; break;} + if(ssb_demod_report != nullptr && ssb_demod_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_src_report != nullptr && udp_src_report->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h index d8c7f0aef..b865f5c63 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelReport.h @@ -29,6 +29,7 @@ #include "SWGDSDDemodReport.h" #include "SWGNFMDemodReport.h" #include "SWGNFMModReport.h" +#include "SWGSSBDemodReport.h" #include "SWGSSBModReport.h" #include "SWGUDPSinkReport.h" #include "SWGUDPSrcReport.h" @@ -81,6 +82,9 @@ public: SWGNFMModReport* getNfmModReport(); void setNfmModReport(SWGNFMModReport* nfm_mod_report); + SWGSSBDemodReport* getSsbDemodReport(); + void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report); + SWGSSBModReport* getSsbModReport(); void setSsbModReport(SWGSSBModReport* ssb_mod_report); @@ -127,6 +131,9 @@ private: SWGNFMModReport* nfm_mod_report; bool m_nfm_mod_report_isSet; + SWGSSBDemodReport* ssb_demod_report; + bool m_ssb_demod_report_isSet; + SWGSSBModReport* ssb_mod_report; bool m_ssb_mod_report_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp index 642a823c6..ec8c90ea3 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.cpp @@ -48,6 +48,8 @@ SWGChannelSettings::SWGChannelSettings() { m_nfm_mod_settings_isSet = false; ssb_mod_settings = nullptr; 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_src_settings = nullptr; @@ -84,6 +86,8 @@ SWGChannelSettings::init() { m_nfm_mod_settings_isSet = false; ssb_mod_settings = new SWGSSBModSettings(); 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_src_settings = new SWGUDPSrcSettings(); @@ -124,6 +128,9 @@ SWGChannelSettings::cleanup() { if(ssb_mod_settings != nullptr) { delete ssb_mod_settings; } + if(ssb_demod_settings != nullptr) { + delete ssb_demod_settings; + } if(udp_sink_settings != nullptr) { delete udp_sink_settings; } @@ -169,6 +176,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings"); + ::SWGSDRangel::setValue(&ssb_demod_settings, pJson["SSBDemodSettings"], "SWGSSBDemodSettings", "SWGSSBDemodSettings"); + ::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings"); ::SWGSDRangel::setValue(&udp_src_settings, pJson["UDPSrcSettings"], "SWGUDPSrcSettings", "SWGUDPSrcSettings"); @@ -223,6 +232,9 @@ SWGChannelSettings::asJsonObject() { if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){ toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings")); } + 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")); } @@ -339,6 +351,16 @@ SWGChannelSettings::setSsbModSettings(SWGSSBModSettings* ssb_mod_settings) { this->m_ssb_mod_settings_isSet = true; } +SWGSSBDemodSettings* +SWGChannelSettings::getSsbDemodSettings() { + return ssb_demod_settings; +} +void +SWGChannelSettings::setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings) { + this->ssb_demod_settings = ssb_demod_settings; + this->m_ssb_demod_settings_isSet = true; +} + SWGUDPSinkSettings* SWGChannelSettings::getUdpSinkSettings() { return udp_sink_settings; @@ -394,6 +416,7 @@ SWGChannelSettings::isSet(){ if(nfm_demod_settings != nullptr && nfm_demod_settings->isSet()){ isObjectUpdated = true; break;} if(nfm_mod_settings != nullptr && nfm_mod_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_src_settings != nullptr && udp_src_settings->isSet()){ isObjectUpdated = true; break;} if(wfm_demod_settings != nullptr && wfm_demod_settings->isSet()){ isObjectUpdated = true; break;} diff --git a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h index 59a38aead..a23ece475 100644 --- a/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGChannelSettings.h @@ -29,6 +29,7 @@ #include "SWGDSDDemodSettings.h" #include "SWGNFMDemodSettings.h" #include "SWGNFMModSettings.h" +#include "SWGSSBDemodSettings.h" #include "SWGSSBModSettings.h" #include "SWGUDPSinkSettings.h" #include "SWGUDPSrcSettings.h" @@ -84,6 +85,9 @@ public: SWGSSBModSettings* getSsbModSettings(); void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings); + SWGSSBDemodSettings* getSsbDemodSettings(); + void setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings); + SWGUDPSinkSettings* getUdpSinkSettings(); void setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings); @@ -130,6 +134,9 @@ private: SWGSSBModSettings* ssb_mod_settings; bool m_ssb_mod_settings_isSet; + SWGSSBDemodSettings* ssb_demod_settings; + bool m_ssb_demod_settings_isSet; + SWGUDPSinkSettings* udp_sink_settings; bool m_udp_sink_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 68b4ccfda..63916e9d8 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -80,6 +80,8 @@ #include "SWGRtlSdrReport.h" #include "SWGRtlSdrReport_gains.h" #include "SWGRtlSdrSettings.h" +#include "SWGSSBDemodReport.h" +#include "SWGSSBDemodSettings.h" #include "SWGSSBModReport.h" #include "SWGSSBModSettings.h" #include "SWGSamplingDevice.h" @@ -294,6 +296,12 @@ namespace SWGSDRangel { if(QString("SWGRtlSdrSettings").compare(type) == 0) { return new SWGRtlSdrSettings(); } + if(QString("SWGSSBDemodReport").compare(type) == 0) { + return new SWGSSBDemodReport(); + } + if(QString("SWGSSBDemodSettings").compare(type) == 0) { + return new SWGSSBDemodSettings(); + } if(QString("SWGSSBModReport").compare(type) == 0) { return new SWGSSBModReport(); } diff --git a/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.cpp b/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.cpp new file mode 100644 index 000000000..619710937 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.cpp @@ -0,0 +1,169 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGSSBDemodReport.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSSBDemodReport::SWGSSBDemodReport(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSSBDemodReport::SWGSSBDemodReport() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + squelch = 0; + m_squelch_isSet = false; + audio_sample_rate = 0; + m_audio_sample_rate_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; +} + +SWGSSBDemodReport::~SWGSSBDemodReport() { + this->cleanup(); +} + +void +SWGSSBDemodReport::init() { + channel_power_db = 0.0f; + m_channel_power_db_isSet = false; + squelch = 0; + m_squelch_isSet = false; + audio_sample_rate = 0; + m_audio_sample_rate_isSet = false; + channel_sample_rate = 0; + m_channel_sample_rate_isSet = false; +} + +void +SWGSSBDemodReport::cleanup() { + + + + +} + +SWGSSBDemodReport* +SWGSSBDemodReport::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSSBDemodReport::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); + + ::SWGSDRangel::setValue(&squelch, pJson["squelch"], "qint32", ""); + + ::SWGSDRangel::setValue(&audio_sample_rate, pJson["audioSampleRate"], "qint32", ""); + + ::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", ""); + +} + +QString +SWGSSBDemodReport::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSSBDemodReport::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_channel_power_db_isSet){ + obj->insert("channelPowerDB", QJsonValue(channel_power_db)); + } + if(m_squelch_isSet){ + obj->insert("squelch", QJsonValue(squelch)); + } + if(m_audio_sample_rate_isSet){ + obj->insert("audioSampleRate", QJsonValue(audio_sample_rate)); + } + if(m_channel_sample_rate_isSet){ + obj->insert("channelSampleRate", QJsonValue(channel_sample_rate)); + } + + return obj; +} + +float +SWGSSBDemodReport::getChannelPowerDb() { + return channel_power_db; +} +void +SWGSSBDemodReport::setChannelPowerDb(float channel_power_db) { + this->channel_power_db = channel_power_db; + this->m_channel_power_db_isSet = true; +} + +qint32 +SWGSSBDemodReport::getSquelch() { + return squelch; +} +void +SWGSSBDemodReport::setSquelch(qint32 squelch) { + this->squelch = squelch; + this->m_squelch_isSet = true; +} + +qint32 +SWGSSBDemodReport::getAudioSampleRate() { + return audio_sample_rate; +} +void +SWGSSBDemodReport::setAudioSampleRate(qint32 audio_sample_rate) { + this->audio_sample_rate = audio_sample_rate; + this->m_audio_sample_rate_isSet = true; +} + +qint32 +SWGSSBDemodReport::getChannelSampleRate() { + return channel_sample_rate; +} +void +SWGSSBDemodReport::setChannelSampleRate(qint32 channel_sample_rate) { + this->channel_sample_rate = channel_sample_rate; + this->m_channel_sample_rate_isSet = true; +} + + +bool +SWGSSBDemodReport::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_channel_power_db_isSet){ isObjectUpdated = true; break;} + if(m_squelch_isSet){ isObjectUpdated = true; break;} + if(m_audio_sample_rate_isSet){ isObjectUpdated = true; break;} + if(m_channel_sample_rate_isSet){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.h b/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.h new file mode 100644 index 000000000..de0f1a02b --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSSBDemodReport.h @@ -0,0 +1,76 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSSBDemodReport.h + * + * SSBDemod + */ + +#ifndef SWGSSBDemodReport_H_ +#define SWGSSBDemodReport_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSSBDemodReport: public SWGObject { +public: + SWGSSBDemodReport(); + SWGSSBDemodReport(QString* json); + virtual ~SWGSSBDemodReport(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSSBDemodReport* fromJson(QString &jsonString) override; + + float getChannelPowerDb(); + void setChannelPowerDb(float channel_power_db); + + qint32 getSquelch(); + void setSquelch(qint32 squelch); + + qint32 getAudioSampleRate(); + void setAudioSampleRate(qint32 audio_sample_rate); + + qint32 getChannelSampleRate(); + void setChannelSampleRate(qint32 channel_sample_rate); + + + virtual bool isSet() override; + +private: + float channel_power_db; + bool m_channel_power_db_isSet; + + qint32 squelch; + bool m_squelch_isSet; + + qint32 audio_sample_rate; + bool m_audio_sample_rate_isSet; + + qint32 channel_sample_rate; + bool m_channel_sample_rate_isSet; + +}; + +} + +#endif /* SWGSSBDemodReport_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.cpp new file mode 100644 index 000000000..3f06d1e98 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.cpp @@ -0,0 +1,446 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGSSBDemodSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSSBDemodSettings::SWGSSBDemodSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSSBDemodSettings::SWGSSBDemodSettings() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + rf_bandwidth = 0.0f; + m_rf_bandwidth_isSet = false; + low_cutoff = 0.0f; + m_low_cutoff_isSet = false; + volume = 0.0f; + m_volume_isSet = false; + span_log2 = 0; + m_span_log2_isSet = false; + audio_binaural = 0; + m_audio_binaural_isSet = false; + audio_flip_channels = 0; + m_audio_flip_channels_isSet = false; + dsb = 0; + m_dsb_isSet = false; + audio_mute = 0; + m_audio_mute_isSet = false; + agc = 0; + m_agc_isSet = false; + agc_clamping = 0; + m_agc_clamping_isSet = false; + agc_time_log2 = 0; + m_agc_time_log2_isSet = false; + agc_power_threshold = 0; + m_agc_power_threshold_isSet = false; + agc_threshold_gate = 0; + m_agc_threshold_gate_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = nullptr; + m_title_isSet = false; + audio_device_name = nullptr; + m_audio_device_name_isSet = false; +} + +SWGSSBDemodSettings::~SWGSSBDemodSettings() { + this->cleanup(); +} + +void +SWGSSBDemodSettings::init() { + input_frequency_offset = 0L; + m_input_frequency_offset_isSet = false; + rf_bandwidth = 0.0f; + m_rf_bandwidth_isSet = false; + low_cutoff = 0.0f; + m_low_cutoff_isSet = false; + volume = 0.0f; + m_volume_isSet = false; + span_log2 = 0; + m_span_log2_isSet = false; + audio_binaural = 0; + m_audio_binaural_isSet = false; + audio_flip_channels = 0; + m_audio_flip_channels_isSet = false; + dsb = 0; + m_dsb_isSet = false; + audio_mute = 0; + m_audio_mute_isSet = false; + agc = 0; + m_agc_isSet = false; + agc_clamping = 0; + m_agc_clamping_isSet = false; + agc_time_log2 = 0; + m_agc_time_log2_isSet = false; + agc_power_threshold = 0; + m_agc_power_threshold_isSet = false; + agc_threshold_gate = 0; + m_agc_threshold_gate_isSet = false; + rgb_color = 0; + m_rgb_color_isSet = false; + title = new QString(""); + m_title_isSet = false; + audio_device_name = new QString(""); + m_audio_device_name_isSet = false; +} + +void +SWGSSBDemodSettings::cleanup() { + + + + + + + + + + + + + + + + if(title != nullptr) { + delete title; + } + if(audio_device_name != nullptr) { + delete audio_device_name; + } +} + +SWGSSBDemodSettings* +SWGSSBDemodSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSSBDemodSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", ""); + + ::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", ""); + + ::SWGSDRangel::setValue(&low_cutoff, pJson["lowCutoff"], "float", ""); + + ::SWGSDRangel::setValue(&volume, pJson["volume"], "float", ""); + + ::SWGSDRangel::setValue(&span_log2, pJson["spanLog2"], "qint32", ""); + + ::SWGSDRangel::setValue(&audio_binaural, pJson["audioBinaural"], "qint32", ""); + + ::SWGSDRangel::setValue(&audio_flip_channels, pJson["audioFlipChannels"], "qint32", ""); + + ::SWGSDRangel::setValue(&dsb, pJson["dsb"], "qint32", ""); + + ::SWGSDRangel::setValue(&audio_mute, pJson["audioMute"], "qint32", ""); + + ::SWGSDRangel::setValue(&agc, pJson["agc"], "qint32", ""); + + ::SWGSDRangel::setValue(&agc_clamping, pJson["agcClamping"], "qint32", ""); + + ::SWGSDRangel::setValue(&agc_time_log2, pJson["agcTimeLog2"], "qint32", ""); + + ::SWGSDRangel::setValue(&agc_power_threshold, pJson["agcPowerThreshold"], "qint32", ""); + + ::SWGSDRangel::setValue(&agc_threshold_gate, pJson["agcThresholdGate"], "qint32", ""); + + ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); + + ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); + + ::SWGSDRangel::setValue(&audio_device_name, pJson["audioDeviceName"], "QString", "QString"); + +} + +QString +SWGSSBDemodSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSSBDemodSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_input_frequency_offset_isSet){ + obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset)); + } + if(m_rf_bandwidth_isSet){ + obj->insert("rfBandwidth", QJsonValue(rf_bandwidth)); + } + if(m_low_cutoff_isSet){ + obj->insert("lowCutoff", QJsonValue(low_cutoff)); + } + if(m_volume_isSet){ + obj->insert("volume", QJsonValue(volume)); + } + if(m_span_log2_isSet){ + obj->insert("spanLog2", QJsonValue(span_log2)); + } + if(m_audio_binaural_isSet){ + obj->insert("audioBinaural", QJsonValue(audio_binaural)); + } + if(m_audio_flip_channels_isSet){ + obj->insert("audioFlipChannels", QJsonValue(audio_flip_channels)); + } + if(m_dsb_isSet){ + obj->insert("dsb", QJsonValue(dsb)); + } + if(m_audio_mute_isSet){ + obj->insert("audioMute", QJsonValue(audio_mute)); + } + if(m_agc_isSet){ + obj->insert("agc", QJsonValue(agc)); + } + if(m_agc_clamping_isSet){ + obj->insert("agcClamping", QJsonValue(agc_clamping)); + } + if(m_agc_time_log2_isSet){ + obj->insert("agcTimeLog2", QJsonValue(agc_time_log2)); + } + if(m_agc_power_threshold_isSet){ + obj->insert("agcPowerThreshold", QJsonValue(agc_power_threshold)); + } + if(m_agc_threshold_gate_isSet){ + obj->insert("agcThresholdGate", QJsonValue(agc_threshold_gate)); + } + if(m_rgb_color_isSet){ + obj->insert("rgbColor", QJsonValue(rgb_color)); + } + if(title != nullptr && *title != QString("")){ + toJsonValue(QString("title"), title, obj, QString("QString")); + } + if(audio_device_name != nullptr && *audio_device_name != QString("")){ + toJsonValue(QString("audioDeviceName"), audio_device_name, obj, QString("QString")); + } + + return obj; +} + +qint64 +SWGSSBDemodSettings::getInputFrequencyOffset() { + return input_frequency_offset; +} +void +SWGSSBDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) { + this->input_frequency_offset = input_frequency_offset; + this->m_input_frequency_offset_isSet = true; +} + +float +SWGSSBDemodSettings::getRfBandwidth() { + return rf_bandwidth; +} +void +SWGSSBDemodSettings::setRfBandwidth(float rf_bandwidth) { + this->rf_bandwidth = rf_bandwidth; + this->m_rf_bandwidth_isSet = true; +} + +float +SWGSSBDemodSettings::getLowCutoff() { + return low_cutoff; +} +void +SWGSSBDemodSettings::setLowCutoff(float low_cutoff) { + this->low_cutoff = low_cutoff; + this->m_low_cutoff_isSet = true; +} + +float +SWGSSBDemodSettings::getVolume() { + return volume; +} +void +SWGSSBDemodSettings::setVolume(float volume) { + this->volume = volume; + this->m_volume_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getSpanLog2() { + return span_log2; +} +void +SWGSSBDemodSettings::setSpanLog2(qint32 span_log2) { + this->span_log2 = span_log2; + this->m_span_log2_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAudioBinaural() { + return audio_binaural; +} +void +SWGSSBDemodSettings::setAudioBinaural(qint32 audio_binaural) { + this->audio_binaural = audio_binaural; + this->m_audio_binaural_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAudioFlipChannels() { + return audio_flip_channels; +} +void +SWGSSBDemodSettings::setAudioFlipChannels(qint32 audio_flip_channels) { + this->audio_flip_channels = audio_flip_channels; + this->m_audio_flip_channels_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getDsb() { + return dsb; +} +void +SWGSSBDemodSettings::setDsb(qint32 dsb) { + this->dsb = dsb; + this->m_dsb_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAudioMute() { + return audio_mute; +} +void +SWGSSBDemodSettings::setAudioMute(qint32 audio_mute) { + this->audio_mute = audio_mute; + this->m_audio_mute_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAgc() { + return agc; +} +void +SWGSSBDemodSettings::setAgc(qint32 agc) { + this->agc = agc; + this->m_agc_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAgcClamping() { + return agc_clamping; +} +void +SWGSSBDemodSettings::setAgcClamping(qint32 agc_clamping) { + this->agc_clamping = agc_clamping; + this->m_agc_clamping_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAgcTimeLog2() { + return agc_time_log2; +} +void +SWGSSBDemodSettings::setAgcTimeLog2(qint32 agc_time_log2) { + this->agc_time_log2 = agc_time_log2; + this->m_agc_time_log2_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAgcPowerThreshold() { + return agc_power_threshold; +} +void +SWGSSBDemodSettings::setAgcPowerThreshold(qint32 agc_power_threshold) { + this->agc_power_threshold = agc_power_threshold; + this->m_agc_power_threshold_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getAgcThresholdGate() { + return agc_threshold_gate; +} +void +SWGSSBDemodSettings::setAgcThresholdGate(qint32 agc_threshold_gate) { + this->agc_threshold_gate = agc_threshold_gate; + this->m_agc_threshold_gate_isSet = true; +} + +qint32 +SWGSSBDemodSettings::getRgbColor() { + return rgb_color; +} +void +SWGSSBDemodSettings::setRgbColor(qint32 rgb_color) { + this->rgb_color = rgb_color; + this->m_rgb_color_isSet = true; +} + +QString* +SWGSSBDemodSettings::getTitle() { + return title; +} +void +SWGSSBDemodSettings::setTitle(QString* title) { + this->title = title; + this->m_title_isSet = true; +} + +QString* +SWGSSBDemodSettings::getAudioDeviceName() { + return audio_device_name; +} +void +SWGSSBDemodSettings::setAudioDeviceName(QString* audio_device_name) { + this->audio_device_name = audio_device_name; + this->m_audio_device_name_isSet = true; +} + + +bool +SWGSSBDemodSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_input_frequency_offset_isSet){ isObjectUpdated = true; break;} + if(m_rf_bandwidth_isSet){ isObjectUpdated = true; break;} + if(m_low_cutoff_isSet){ isObjectUpdated = true; break;} + if(m_volume_isSet){ isObjectUpdated = true; break;} + if(m_span_log2_isSet){ isObjectUpdated = true; break;} + if(m_audio_binaural_isSet){ isObjectUpdated = true; break;} + if(m_audio_flip_channels_isSet){ isObjectUpdated = true; break;} + if(m_dsb_isSet){ isObjectUpdated = true; break;} + if(m_audio_mute_isSet){ isObjectUpdated = true; break;} + if(m_agc_isSet){ isObjectUpdated = true; break;} + if(m_agc_clamping_isSet){ isObjectUpdated = true; break;} + if(m_agc_time_log2_isSet){ isObjectUpdated = true; break;} + if(m_agc_power_threshold_isSet){ isObjectUpdated = true; break;} + if(m_agc_threshold_gate_isSet){ isObjectUpdated = true; break;} + if(m_rgb_color_isSet){ isObjectUpdated = true; break;} + if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;} + if(audio_device_name != nullptr && *audio_device_name != QString("")){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.h b/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.h new file mode 100644 index 000000000..84bc8500c --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSSBDemodSettings.h @@ -0,0 +1,155 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSSBDemodSettings.h + * + * SSBDemod + */ + +#ifndef SWGSSBDemodSettings_H_ +#define SWGSSBDemodSettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSSBDemodSettings: public SWGObject { +public: + SWGSSBDemodSettings(); + SWGSSBDemodSettings(QString* json); + virtual ~SWGSSBDemodSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSSBDemodSettings* fromJson(QString &jsonString) override; + + qint64 getInputFrequencyOffset(); + void setInputFrequencyOffset(qint64 input_frequency_offset); + + float getRfBandwidth(); + void setRfBandwidth(float rf_bandwidth); + + float getLowCutoff(); + void setLowCutoff(float low_cutoff); + + float getVolume(); + void setVolume(float volume); + + qint32 getSpanLog2(); + void setSpanLog2(qint32 span_log2); + + qint32 getAudioBinaural(); + void setAudioBinaural(qint32 audio_binaural); + + qint32 getAudioFlipChannels(); + void setAudioFlipChannels(qint32 audio_flip_channels); + + qint32 getDsb(); + void setDsb(qint32 dsb); + + qint32 getAudioMute(); + void setAudioMute(qint32 audio_mute); + + qint32 getAgc(); + void setAgc(qint32 agc); + + qint32 getAgcClamping(); + void setAgcClamping(qint32 agc_clamping); + + qint32 getAgcTimeLog2(); + void setAgcTimeLog2(qint32 agc_time_log2); + + qint32 getAgcPowerThreshold(); + void setAgcPowerThreshold(qint32 agc_power_threshold); + + qint32 getAgcThresholdGate(); + void setAgcThresholdGate(qint32 agc_threshold_gate); + + qint32 getRgbColor(); + void setRgbColor(qint32 rgb_color); + + QString* getTitle(); + void setTitle(QString* title); + + QString* getAudioDeviceName(); + void setAudioDeviceName(QString* audio_device_name); + + + virtual bool isSet() override; + +private: + qint64 input_frequency_offset; + bool m_input_frequency_offset_isSet; + + float rf_bandwidth; + bool m_rf_bandwidth_isSet; + + float low_cutoff; + bool m_low_cutoff_isSet; + + float volume; + bool m_volume_isSet; + + qint32 span_log2; + bool m_span_log2_isSet; + + qint32 audio_binaural; + bool m_audio_binaural_isSet; + + qint32 audio_flip_channels; + bool m_audio_flip_channels_isSet; + + qint32 dsb; + bool m_dsb_isSet; + + qint32 audio_mute; + bool m_audio_mute_isSet; + + qint32 agc; + bool m_agc_isSet; + + qint32 agc_clamping; + bool m_agc_clamping_isSet; + + qint32 agc_time_log2; + bool m_agc_time_log2_isSet; + + qint32 agc_power_threshold; + bool m_agc_power_threshold_isSet; + + qint32 agc_threshold_gate; + bool m_agc_threshold_gate_isSet; + + qint32 rgb_color; + bool m_rgb_color_isSet; + + QString* title; + bool m_title_isSet; + + QString* audio_device_name; + bool m_audio_device_name_isSet; + +}; + +} + +#endif /* SWGSSBDemodSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSSBModReport.h b/swagger/sdrangel/code/qt5/client/SWGSSBModReport.h index 233980633..0a2faf32b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGSSBModReport.h +++ b/swagger/sdrangel/code/qt5/client/SWGSSBModReport.h @@ -13,7 +13,7 @@ /* * SWGSSBModReport.h * - * AMMod + * SSBMod */ #ifndef SWGSSBModReport_H_ diff --git a/swagger/sdrangel/examples/rx_test.py b/swagger/sdrangel/examples/rx_test.py index 5cc659704..799cfec20 100644 --- a/swagger/sdrangel/examples/rx_test.py +++ b/swagger/sdrangel/examples/rx_test.py @@ -211,6 +211,21 @@ def setupChannel(deviceset_url, options): settings["AMDemodSettings"]["squelch"] = options.squelch_db settings["AMDemodSettings"]["title"] = "Channel %d" % i settings["AMDemodSettings"]["bandpassEnable"] = 1 # bandpass filter + elif options.channel_id == "SSBDemod": + settings["SSBDemodSettings"]["inputFrequencyOffset"] = options.channel_freq + settings["SSBDemodSettings"]["rfBandwidth"] = options.rf_bw + settings["SSBDemodSettings"]["lowCutoff"] = -300 if options.rf_bw < 0 else 300 + settings["SSBDemodSettings"]["audioBinaural"] = 1 + settings["SSBDemodSettings"]["audioFlipChannels"] = 0 + settings["SSBDemodSettings"]["dsb"] = 0 + settings["SSBDemodSettings"]["audioMute"] = 0 + settings["SSBDemodSettings"]["agc"] = 1 + settings["SSBDemodSettings"]["agcClamping"] = 0 + settings["SSBDemodSettings"]["agcTimeLog2"] = 8 + settings["SSBDemodSettings"]["agcPowerThreshold"] = options.squelch_db + settings["SSBDemodSettings"]["agcThresholdGate"] = 4 + settings["SSBDemodSettings"]["volume"] = options.volume + settings["SSBDemodSettings"]["title"] = "Channel %d" % i elif options.channel_id == "DSDDemod": settings["DSDDemodSettings"]["inputFrequencyOffset"] = options.channel_freq settings["DSDDemodSettings"]["rfBandwidth"] = options.rf_bw