1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

UDP source: implemeted WEB API (1)

This commit is contained in:
f4exb 2018-05-25 10:45:40 +02:00
parent 0c328546b0
commit 54019d7a06
18 changed files with 1346 additions and 3 deletions

View File

@ -21,6 +21,7 @@ set(udpsrc_FORMS
include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
)
#include(${QT_USE_FILE})

View File

@ -18,6 +18,11 @@
#include <QUdpSocket>
#include <QHostAddress>
#include "SWGChannelSettings.h"
#include "SWGUDPSrcSettings.h"
#include "SWGChannelReport.h"
#include "SWGUDPSrcReport.h"
#include "dsp/dspengine.h"
#include "util/db.h"
#include "dsp/downchannelizer.h"
@ -637,3 +642,44 @@ bool UDPSrc::deserialize(const QByteArray& data)
return false;
}
}
void UDPSrc::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const UDPSrcSettings& settings)
{
response.getUdpSrcSettings()->setOutputSampleRate(settings.m_outputSampleRate);
response.getUdpSrcSettings()->setSampleFormat((int) settings.m_sampleFormat);
response.getUdpSrcSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
response.getUdpSrcSettings()->setRfBandwidth(settings.m_rfBandwidth);
response.getUdpSrcSettings()->setFmDeviation(settings.m_fmDeviation);
response.getUdpSrcSettings()->setChannelMute(settings.m_channelMute ? 1 : 0);
response.getUdpSrcSettings()->setGain(settings.m_gain);
response.getUdpSrcSettings()->setSquelchDb(settings.m_squelchdB);
response.getUdpSrcSettings()->setSquelchGate(settings.m_squelchGate);
response.getUdpSrcSettings()->setSquelchEnabled(settings.m_squelchEnabled ? 1 : 0);
response.getUdpSrcSettings()->setAgc(settings.m_agc ? 1 : 0);
response.getUdpSrcSettings()->setAudioActive(settings.m_audioActive ? 1 : 0);
response.getUdpSrcSettings()->setAudioStereo(settings.m_audioStereo ? 1 : 0);
response.getUdpSrcSettings()->setVolume(settings.m_volume);
if (response.getUdpSrcSettings()->getUdpAddress()) {
*response.getUdpSrcSettings()->getUdpAddress() = settings.m_udpAddress;
} else {
response.getUdpSrcSettings()->setUdpAddress(new QString(settings.m_udpAddress));
}
response.getUdpSrcSettings()->setUdpPort(settings.m_udpPort);
response.getUdpSrcSettings()->setAudioPort(settings.m_audioPort);
response.getUdpSrcSettings()->setRgbColor(settings.m_rgbColor);
if (response.getUdpSrcSettings()->getTitle()) {
*response.getUdpSrcSettings()->getTitle() = settings.m_title;
} else {
response.getUdpSrcSettings()->setTitle(new QString(settings.m_title));
}
}
void UDPSrc::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
{
response.getUdpSrcReport()->setChannelPowerDb(CalcDb::dbPower(getMagSq()));
response.getUdpSrcReport()->setSquelch(m_squelchOpen ? 1 : 0);
response.getUdpSrcReport()->setInputSampleRate(m_inputSampleRate);
}

View File

@ -218,6 +218,9 @@ protected:
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force = true);
void applySettings(const UDPSrcSettings& settings, bool force = false);
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const UDPSrcSettings& settings);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
inline void calculateSquelch(double value)
{
if ((!m_settings.m_squelchEnabled) || (value > m_squelch))

View File

@ -1322,6 +1322,9 @@ margin-bottom: 20px;
"UDPSinkReport" : {
"$ref" : "#/definitions/UDPSinkReport"
},
"UDPSrcReport" : {
"$ref" : "#/definitions/UDPSrcReport"
},
"WFMDemodReport" : {
"$ref" : "#/definitions/WFMDemodReport"
},
@ -1370,6 +1373,9 @@ margin-bottom: 20px;
"UDPSinkSettings" : {
"$ref" : "#/definitions/UDPSinkSettings"
},
"UDPSrcSettings" : {
"$ref" : "#/definitions/UDPSrcSettings"
},
"WFMDemodSettings" : {
"$ref" : "#/definitions/WFMDemodSettings"
},
@ -2659,6 +2665,101 @@ margin-bottom: 20px;
}
},
"description" : "UDPSink"
};
defs.UDPSrcReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power transmitted in channel (dB)"
},
"squelch" : {
"type" : "integer",
"description" : "squelch status (1 if open else 0)"
},
"inputSampleRate" : {
"type" : "integer"
}
},
"description" : "UDPSink"
};
defs.UDPSrcSettings = {
"properties" : {
"outputSampleRate" : {
"type" : "number",
"format" : "float"
},
"sampleFormat" : {
"type" : "integer"
},
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"fmDeviation" : {
"type" : "integer"
},
"channelMute" : {
"type" : "integer",
"description" : "channel mute (1 if muted else 0)"
},
"gain" : {
"type" : "number",
"format" : "float"
},
"squelchDB" : {
"type" : "integer",
"description" : "power dB"
},
"squelchGate" : {
"type" : "integer",
"description" : "100ths seconds"
},
"squelchEnabled" : {
"type" : "integer",
"description" : "squelch enable (1 if enabled else 0)"
},
"agc" : {
"type" : "integer",
"description" : "AGC enable (1 if enabled else 0)"
},
"audioActive" : {
"type" : "integer",
"description" : "Audio return enable (1 if enabled else 0)"
},
"audioStereo" : {
"type" : "integer",
"description" : "Audio return stereo (1 if stereo else 0)"
},
"volume" : {
"type" : "integer"
},
"udpAddress" : {
"type" : "string",
"description" : "destination UDP address (remote)"
},
"udpPort" : {
"type" : "integer",
"format" : "uint16",
"description" : "destination UDP port (remote)"
},
"audioPort" : {
"type" : "integer",
"format" : "uint16",
"description" : "audio return UDP port (local)"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
}
},
"description" : "UDPSrc"
};
defs.WFMDemodReport = {
"properties" : {
@ -21017,7 +21118,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-05-25T09:35:58.275+02:00
Generated 2018-05-25T10:44:21.402+02:00
</div>
</div>
</div>

View File

@ -0,0 +1,71 @@
UDPSrcSettings:
description: UDPSrc
properties:
outputSampleRate:
type: number
format: float
sampleFormat:
type: integer
inputFrequencyOffset:
type: integer
format: int64
rfBandwidth:
type: number
format: float
fmDeviation:
type: integer
channelMute:
description: channel mute (1 if muted else 0)
type: integer
gain:
type: number
format: float
squelchDB:
description: power dB
type: integer
squelchGate:
description: 100ths seconds
type: integer
squelchEnabled:
description: squelch enable (1 if enabled else 0)
type: integer
agc:
description: AGC enable (1 if enabled else 0)
type: integer
audioActive:
description: Audio return enable (1 if enabled else 0)
type: integer
audioStereo:
description: Audio return stereo (1 if stereo else 0)
type: integer
volume:
type: integer
udpAddress:
description: destination UDP address (remote)
type: string
udpPort:
description: destination UDP port (remote)
type: integer
format: uint16
audioPort:
description: audio return UDP port (local)
type: integer
format: uint16
rgbColor:
type: integer
title:
type: string
UDPSrcReport:
description: UDPSink
properties:
channelPowerDB:
description: power transmitted in channel (dB)
type: number
format: float
squelch:
description: squelch status (1 if open else 0)
type: integer
inputSampleRate:
type: integer

View File

@ -1763,6 +1763,8 @@ definitions:
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings"
UDPSinkSettings:
$ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkSettings"
UDPSrcSettings:
$ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcSettings"
WFMDemodSettings:
$ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodSettings"
WFMModSettings:
@ -1796,6 +1798,8 @@ definitions:
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSinkReport:
$ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkReport"
UDPSrcReport:
$ref: "/doc/swagger/include/UDPSrc.yaml#/UDPSrcReport"
WFMDemodReport:
$ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:

View File

@ -0,0 +1,71 @@
UDPSrcSettings:
description: UDPSrc
properties:
outputSampleRate:
type: number
format: float
sampleFormat:
type: integer
inputFrequencyOffset:
type: integer
format: int64
rfBandwidth:
type: number
format: float
fmDeviation:
type: integer
channelMute:
description: channel mute (1 if muted else 0)
type: integer
gain:
type: number
format: float
squelchDB:
description: power dB
type: integer
squelchGate:
description: 100ths seconds
type: integer
squelchEnabled:
description: squelch enable (1 if enabled else 0)
type: integer
agc:
description: AGC enable (1 if enabled else 0)
type: integer
audioActive:
description: Audio return enable (1 if enabled else 0)
type: integer
audioStereo:
description: Audio return stereo (1 if stereo else 0)
type: integer
volume:
type: integer
udpAddress:
description: destination UDP address (remote)
type: string
udpPort:
description: destination UDP port (remote)
type: integer
format: uint16
audioPort:
description: audio return UDP port (local)
type: integer
format: uint16
rgbColor:
type: integer
title:
type: string
UDPSrcReport:
description: UDPSink
properties:
channelPowerDB:
description: power transmitted in channel (dB)
type: number
format: float
squelch:
description: squelch status (1 if open else 0)
type: integer
inputSampleRate:
type: integer

View File

@ -1763,6 +1763,8 @@ definitions:
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings"
UDPSinkSettings:
$ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkSettings"
UDPSrcSettings:
$ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcSettings"
WFMDemodSettings:
$ref: "http://localhost:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodSettings"
WFMModSettings:
@ -1796,6 +1798,8 @@ definitions:
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSinkReport:
$ref: "http://localhost:8081/api/swagger/include/UDPSink.yaml#/UDPSinkReport"
UDPSrcReport:
$ref: "http://localhost:8081/api/swagger/include/UDPSrc.yaml#/UDPSrcReport"
WFMDemodReport:
$ref: "http://localhost:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:

View File

@ -1322,6 +1322,9 @@ margin-bottom: 20px;
"UDPSinkReport" : {
"$ref" : "#/definitions/UDPSinkReport"
},
"UDPSrcReport" : {
"$ref" : "#/definitions/UDPSrcReport"
},
"WFMDemodReport" : {
"$ref" : "#/definitions/WFMDemodReport"
},
@ -1370,6 +1373,9 @@ margin-bottom: 20px;
"UDPSinkSettings" : {
"$ref" : "#/definitions/UDPSinkSettings"
},
"UDPSrcSettings" : {
"$ref" : "#/definitions/UDPSrcSettings"
},
"WFMDemodSettings" : {
"$ref" : "#/definitions/WFMDemodSettings"
},
@ -2659,6 +2665,101 @@ margin-bottom: 20px;
}
},
"description" : "UDPSink"
};
defs.UDPSrcReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power transmitted in channel (dB)"
},
"squelch" : {
"type" : "integer",
"description" : "squelch status (1 if open else 0)"
},
"inputSampleRate" : {
"type" : "integer"
}
},
"description" : "UDPSink"
};
defs.UDPSrcSettings = {
"properties" : {
"outputSampleRate" : {
"type" : "number",
"format" : "float"
},
"sampleFormat" : {
"type" : "integer"
},
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"fmDeviation" : {
"type" : "integer"
},
"channelMute" : {
"type" : "integer",
"description" : "channel mute (1 if muted else 0)"
},
"gain" : {
"type" : "number",
"format" : "float"
},
"squelchDB" : {
"type" : "integer",
"description" : "power dB"
},
"squelchGate" : {
"type" : "integer",
"description" : "100ths seconds"
},
"squelchEnabled" : {
"type" : "integer",
"description" : "squelch enable (1 if enabled else 0)"
},
"agc" : {
"type" : "integer",
"description" : "AGC enable (1 if enabled else 0)"
},
"audioActive" : {
"type" : "integer",
"description" : "Audio return enable (1 if enabled else 0)"
},
"audioStereo" : {
"type" : "integer",
"description" : "Audio return stereo (1 if stereo else 0)"
},
"volume" : {
"type" : "integer"
},
"udpAddress" : {
"type" : "string",
"description" : "destination UDP address (remote)"
},
"udpPort" : {
"type" : "integer",
"format" : "uint16",
"description" : "destination UDP port (remote)"
},
"audioPort" : {
"type" : "integer",
"format" : "uint16",
"description" : "audio return UDP port (local)"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
}
},
"description" : "UDPSrc"
};
defs.WFMDemodReport = {
"properties" : {
@ -21017,7 +21118,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-05-25T09:35:58.275+02:00
Generated 2018-05-25T10:44:21.402+02:00
</div>
</div>
</div>

View File

@ -50,6 +50,8 @@ SWGChannelReport::SWGChannelReport() {
m_ssb_mod_report_isSet = false;
udp_sink_report = nullptr;
m_udp_sink_report_isSet = false;
udp_src_report = nullptr;
m_udp_src_report_isSet = false;
wfm_demod_report = nullptr;
m_wfm_demod_report_isSet = false;
wfm_mod_report = nullptr;
@ -84,6 +86,8 @@ SWGChannelReport::init() {
m_ssb_mod_report_isSet = false;
udp_sink_report = new SWGUDPSinkReport();
m_udp_sink_report_isSet = false;
udp_src_report = new SWGUDPSrcReport();
m_udp_src_report_isSet = false;
wfm_demod_report = new SWGWFMDemodReport();
m_wfm_demod_report_isSet = false;
wfm_mod_report = new SWGWFMModReport();
@ -123,6 +127,9 @@ SWGChannelReport::cleanup() {
if(udp_sink_report != nullptr) {
delete udp_sink_report;
}
if(udp_src_report != nullptr) {
delete udp_src_report;
}
if(wfm_demod_report != nullptr) {
delete wfm_demod_report;
}
@ -164,6 +171,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&udp_sink_report, pJson["UDPSinkReport"], "SWGUDPSinkReport", "SWGUDPSinkReport");
::SWGSDRangel::setValue(&udp_src_report, pJson["UDPSrcReport"], "SWGUDPSrcReport", "SWGUDPSrcReport");
::SWGSDRangel::setValue(&wfm_demod_report, pJson["WFMDemodReport"], "SWGWFMDemodReport", "SWGWFMDemodReport");
::SWGSDRangel::setValue(&wfm_mod_report, pJson["WFMModReport"], "SWGWFMModReport", "SWGWFMModReport");
@ -217,6 +226,9 @@ SWGChannelReport::asJsonObject() {
if((udp_sink_report != nullptr) && (udp_sink_report->isSet())){
toJsonValue(QString("UDPSinkReport"), udp_sink_report, obj, QString("SWGUDPSinkReport"));
}
if((udp_src_report != nullptr) && (udp_src_report->isSet())){
toJsonValue(QString("UDPSrcReport"), udp_src_report, obj, QString("SWGUDPSrcReport"));
}
if((wfm_demod_report != nullptr) && (wfm_demod_report->isSet())){
toJsonValue(QString("WFMDemodReport"), wfm_demod_report, obj, QString("SWGWFMDemodReport"));
}
@ -337,6 +349,16 @@ SWGChannelReport::setUdpSinkReport(SWGUDPSinkReport* udp_sink_report) {
this->m_udp_sink_report_isSet = true;
}
SWGUDPSrcReport*
SWGChannelReport::getUdpSrcReport() {
return udp_src_report;
}
void
SWGChannelReport::setUdpSrcReport(SWGUDPSrcReport* udp_src_report) {
this->udp_src_report = udp_src_report;
this->m_udp_src_report_isSet = true;
}
SWGWFMDemodReport*
SWGChannelReport::getWfmDemodReport() {
return wfm_demod_report;
@ -373,6 +395,7 @@ SWGChannelReport::isSet(){
if(nfm_mod_report != nullptr && nfm_mod_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;}
if(wfm_demod_report != nullptr && wfm_demod_report->isSet()){ isObjectUpdated = true; break;}
if(wfm_mod_report != nullptr && wfm_mod_report->isSet()){ isObjectUpdated = true; break;}
}while(false);

View File

@ -31,6 +31,7 @@
#include "SWGNFMModReport.h"
#include "SWGSSBModReport.h"
#include "SWGUDPSinkReport.h"
#include "SWGUDPSrcReport.h"
#include "SWGWFMDemodReport.h"
#include "SWGWFMModReport.h"
#include <QString>
@ -86,6 +87,9 @@ public:
SWGUDPSinkReport* getUdpSinkReport();
void setUdpSinkReport(SWGUDPSinkReport* udp_sink_report);
SWGUDPSrcReport* getUdpSrcReport();
void setUdpSrcReport(SWGUDPSrcReport* udp_src_report);
SWGWFMDemodReport* getWfmDemodReport();
void setWfmDemodReport(SWGWFMDemodReport* wfm_demod_report);
@ -129,6 +133,9 @@ private:
SWGUDPSinkReport* udp_sink_report;
bool m_udp_sink_report_isSet;
SWGUDPSrcReport* udp_src_report;
bool m_udp_src_report_isSet;
SWGWFMDemodReport* wfm_demod_report;
bool m_wfm_demod_report_isSet;

View File

@ -50,6 +50,8 @@ SWGChannelSettings::SWGChannelSettings() {
m_ssb_mod_settings_isSet = false;
udp_sink_settings = nullptr;
m_udp_sink_settings_isSet = false;
udp_src_settings = nullptr;
m_udp_src_settings_isSet = false;
wfm_demod_settings = nullptr;
m_wfm_demod_settings_isSet = false;
wfm_mod_settings = nullptr;
@ -84,6 +86,8 @@ SWGChannelSettings::init() {
m_ssb_mod_settings_isSet = false;
udp_sink_settings = new SWGUDPSinkSettings();
m_udp_sink_settings_isSet = false;
udp_src_settings = new SWGUDPSrcSettings();
m_udp_src_settings_isSet = false;
wfm_demod_settings = new SWGWFMDemodSettings();
m_wfm_demod_settings_isSet = false;
wfm_mod_settings = new SWGWFMModSettings();
@ -123,6 +127,9 @@ SWGChannelSettings::cleanup() {
if(udp_sink_settings != nullptr) {
delete udp_sink_settings;
}
if(udp_src_settings != nullptr) {
delete udp_src_settings;
}
if(wfm_demod_settings != nullptr) {
delete wfm_demod_settings;
}
@ -164,6 +171,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings");
::SWGSDRangel::setValue(&udp_src_settings, pJson["UDPSrcSettings"], "SWGUDPSrcSettings", "SWGUDPSrcSettings");
::SWGSDRangel::setValue(&wfm_demod_settings, pJson["WFMDemodSettings"], "SWGWFMDemodSettings", "SWGWFMDemodSettings");
::SWGSDRangel::setValue(&wfm_mod_settings, pJson["WFMModSettings"], "SWGWFMModSettings", "SWGWFMModSettings");
@ -217,6 +226,9 @@ SWGChannelSettings::asJsonObject() {
if((udp_sink_settings != nullptr) && (udp_sink_settings->isSet())){
toJsonValue(QString("UDPSinkSettings"), udp_sink_settings, obj, QString("SWGUDPSinkSettings"));
}
if((udp_src_settings != nullptr) && (udp_src_settings->isSet())){
toJsonValue(QString("UDPSrcSettings"), udp_src_settings, obj, QString("SWGUDPSrcSettings"));
}
if((wfm_demod_settings != nullptr) && (wfm_demod_settings->isSet())){
toJsonValue(QString("WFMDemodSettings"), wfm_demod_settings, obj, QString("SWGWFMDemodSettings"));
}
@ -337,6 +349,16 @@ SWGChannelSettings::setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings) {
this->m_udp_sink_settings_isSet = true;
}
SWGUDPSrcSettings*
SWGChannelSettings::getUdpSrcSettings() {
return udp_src_settings;
}
void
SWGChannelSettings::setUdpSrcSettings(SWGUDPSrcSettings* udp_src_settings) {
this->udp_src_settings = udp_src_settings;
this->m_udp_src_settings_isSet = true;
}
SWGWFMDemodSettings*
SWGChannelSettings::getWfmDemodSettings() {
return wfm_demod_settings;
@ -373,6 +395,7 @@ SWGChannelSettings::isSet(){
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(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;}
if(wfm_mod_settings != nullptr && wfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
}while(false);

View File

@ -31,6 +31,7 @@
#include "SWGNFMModSettings.h"
#include "SWGSSBModSettings.h"
#include "SWGUDPSinkSettings.h"
#include "SWGUDPSrcSettings.h"
#include "SWGWFMDemodSettings.h"
#include "SWGWFMModSettings.h"
#include <QString>
@ -86,6 +87,9 @@ public:
SWGUDPSinkSettings* getUdpSinkSettings();
void setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings);
SWGUDPSrcSettings* getUdpSrcSettings();
void setUdpSrcSettings(SWGUDPSrcSettings* udp_src_settings);
SWGWFMDemodSettings* getWfmDemodSettings();
void setWfmDemodSettings(SWGWFMDemodSettings* wfm_demod_settings);
@ -129,6 +133,9 @@ private:
SWGUDPSinkSettings* udp_sink_settings;
bool m_udp_sink_settings_isSet;
SWGUDPSrcSettings* udp_src_settings;
bool m_udp_src_settings_isSet;
SWGWFMDemodSettings* wfm_demod_settings;
bool m_wfm_demod_settings_isSet;

View File

@ -74,6 +74,8 @@
#include "SWGSuccessResponse.h"
#include "SWGUDPSinkReport.h"
#include "SWGUDPSinkSettings.h"
#include "SWGUDPSrcReport.h"
#include "SWGUDPSrcSettings.h"
#include "SWGWFMDemodReport.h"
#include "SWGWFMDemodSettings.h"
#include "SWGWFMModReport.h"
@ -262,6 +264,12 @@ namespace SWGSDRangel {
if(QString("SWGUDPSinkSettings").compare(type) == 0) {
return new SWGUDPSinkSettings();
}
if(QString("SWGUDPSrcReport").compare(type) == 0) {
return new SWGUDPSrcReport();
}
if(QString("SWGUDPSrcSettings").compare(type) == 0) {
return new SWGUDPSrcSettings();
}
if(QString("SWGWFMDemodReport").compare(type) == 0) {
return new SWGWFMDemodReport();
}

View File

@ -0,0 +1,148 @@
/**
* 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 "SWGUDPSrcReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGUDPSrcReport::SWGUDPSrcReport(QString* json) {
init();
this->fromJson(*json);
}
SWGUDPSrcReport::SWGUDPSrcReport() {
channel_power_db = 0.0f;
m_channel_power_db_isSet = false;
squelch = 0;
m_squelch_isSet = false;
input_sample_rate = 0;
m_input_sample_rate_isSet = false;
}
SWGUDPSrcReport::~SWGUDPSrcReport() {
this->cleanup();
}
void
SWGUDPSrcReport::init() {
channel_power_db = 0.0f;
m_channel_power_db_isSet = false;
squelch = 0;
m_squelch_isSet = false;
input_sample_rate = 0;
m_input_sample_rate_isSet = false;
}
void
SWGUDPSrcReport::cleanup() {
}
SWGUDPSrcReport*
SWGUDPSrcReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGUDPSrcReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", "");
::SWGSDRangel::setValue(&squelch, pJson["squelch"], "qint32", "");
::SWGSDRangel::setValue(&input_sample_rate, pJson["inputSampleRate"], "qint32", "");
}
QString
SWGUDPSrcReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGUDPSrcReport::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_input_sample_rate_isSet){
obj->insert("inputSampleRate", QJsonValue(input_sample_rate));
}
return obj;
}
float
SWGUDPSrcReport::getChannelPowerDb() {
return channel_power_db;
}
void
SWGUDPSrcReport::setChannelPowerDb(float channel_power_db) {
this->channel_power_db = channel_power_db;
this->m_channel_power_db_isSet = true;
}
qint32
SWGUDPSrcReport::getSquelch() {
return squelch;
}
void
SWGUDPSrcReport::setSquelch(qint32 squelch) {
this->squelch = squelch;
this->m_squelch_isSet = true;
}
qint32
SWGUDPSrcReport::getInputSampleRate() {
return input_sample_rate;
}
void
SWGUDPSrcReport::setInputSampleRate(qint32 input_sample_rate) {
this->input_sample_rate = input_sample_rate;
this->m_input_sample_rate_isSet = true;
}
bool
SWGUDPSrcReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_channel_power_db_isSet){ isObjectUpdated = true; break;}
if(m_squelch_isSet){ isObjectUpdated = true; break;}
if(m_input_sample_rate_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,70 @@
/**
* 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.
*/
/*
* SWGUDPSrcReport.h
*
* UDPSink
*/
#ifndef SWGUDPSrcReport_H_
#define SWGUDPSrcReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGUDPSrcReport: public SWGObject {
public:
SWGUDPSrcReport();
SWGUDPSrcReport(QString* json);
virtual ~SWGUDPSrcReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGUDPSrcReport* fromJson(QString &jsonString) override;
float getChannelPowerDb();
void setChannelPowerDb(float channel_power_db);
qint32 getSquelch();
void setSquelch(qint32 squelch);
qint32 getInputSampleRate();
void setInputSampleRate(qint32 input_sample_rate);
virtual bool isSet() override;
private:
float channel_power_db;
bool m_channel_power_db_isSet;
qint32 squelch;
bool m_squelch_isSet;
qint32 input_sample_rate;
bool m_input_sample_rate_isSet;
};
}
#endif /* SWGUDPSrcReport_H_ */

View File

@ -0,0 +1,488 @@
/**
* 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 "SWGUDPSrcSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGUDPSrcSettings::SWGUDPSrcSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGUDPSrcSettings::SWGUDPSrcSettings() {
output_sample_rate = 0.0f;
m_output_sample_rate_isSet = false;
sample_format = 0;
m_sample_format_isSet = false;
input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false;
rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false;
fm_deviation = 0;
m_fm_deviation_isSet = false;
channel_mute = 0;
m_channel_mute_isSet = false;
gain = 0.0f;
m_gain_isSet = false;
squelch_db = 0;
m_squelch_db_isSet = false;
squelch_gate = 0;
m_squelch_gate_isSet = false;
squelch_enabled = 0;
m_squelch_enabled_isSet = false;
agc = 0;
m_agc_isSet = false;
audio_active = 0;
m_audio_active_isSet = false;
audio_stereo = 0;
m_audio_stereo_isSet = false;
volume = 0;
m_volume_isSet = false;
udp_address = nullptr;
m_udp_address_isSet = false;
udp_port = 0;
m_udp_port_isSet = false;
audio_port = 0;
m_audio_port_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = nullptr;
m_title_isSet = false;
}
SWGUDPSrcSettings::~SWGUDPSrcSettings() {
this->cleanup();
}
void
SWGUDPSrcSettings::init() {
output_sample_rate = 0.0f;
m_output_sample_rate_isSet = false;
sample_format = 0;
m_sample_format_isSet = false;
input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false;
rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false;
fm_deviation = 0;
m_fm_deviation_isSet = false;
channel_mute = 0;
m_channel_mute_isSet = false;
gain = 0.0f;
m_gain_isSet = false;
squelch_db = 0;
m_squelch_db_isSet = false;
squelch_gate = 0;
m_squelch_gate_isSet = false;
squelch_enabled = 0;
m_squelch_enabled_isSet = false;
agc = 0;
m_agc_isSet = false;
audio_active = 0;
m_audio_active_isSet = false;
audio_stereo = 0;
m_audio_stereo_isSet = false;
volume = 0;
m_volume_isSet = false;
udp_address = new QString("");
m_udp_address_isSet = false;
udp_port = 0;
m_udp_port_isSet = false;
audio_port = 0;
m_audio_port_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = new QString("");
m_title_isSet = false;
}
void
SWGUDPSrcSettings::cleanup() {
if(udp_address != nullptr) {
delete udp_address;
}
if(title != nullptr) {
delete title;
}
}
SWGUDPSrcSettings*
SWGUDPSrcSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGUDPSrcSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&output_sample_rate, pJson["outputSampleRate"], "float", "");
::SWGSDRangel::setValue(&sample_format, pJson["sampleFormat"], "qint32", "");
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
::SWGSDRangel::setValue(&fm_deviation, pJson["fmDeviation"], "qint32", "");
::SWGSDRangel::setValue(&channel_mute, pJson["channelMute"], "qint32", "");
::SWGSDRangel::setValue(&gain, pJson["gain"], "float", "");
::SWGSDRangel::setValue(&squelch_db, pJson["squelchDB"], "qint32", "");
::SWGSDRangel::setValue(&squelch_gate, pJson["squelchGate"], "qint32", "");
::SWGSDRangel::setValue(&squelch_enabled, pJson["squelchEnabled"], "qint32", "");
::SWGSDRangel::setValue(&agc, pJson["agc"], "qint32", "");
::SWGSDRangel::setValue(&audio_active, pJson["audioActive"], "qint32", "");
::SWGSDRangel::setValue(&audio_stereo, pJson["audioStereo"], "qint32", "");
::SWGSDRangel::setValue(&volume, pJson["volume"], "qint32", "");
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
::SWGSDRangel::setValue(&audio_port, pJson["audioPort"], "qint32", "");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
}
QString
SWGUDPSrcSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGUDPSrcSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_output_sample_rate_isSet){
obj->insert("outputSampleRate", QJsonValue(output_sample_rate));
}
if(m_sample_format_isSet){
obj->insert("sampleFormat", QJsonValue(sample_format));
}
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_fm_deviation_isSet){
obj->insert("fmDeviation", QJsonValue(fm_deviation));
}
if(m_channel_mute_isSet){
obj->insert("channelMute", QJsonValue(channel_mute));
}
if(m_gain_isSet){
obj->insert("gain", QJsonValue(gain));
}
if(m_squelch_db_isSet){
obj->insert("squelchDB", QJsonValue(squelch_db));
}
if(m_squelch_gate_isSet){
obj->insert("squelchGate", QJsonValue(squelch_gate));
}
if(m_squelch_enabled_isSet){
obj->insert("squelchEnabled", QJsonValue(squelch_enabled));
}
if(m_agc_isSet){
obj->insert("agc", QJsonValue(agc));
}
if(m_audio_active_isSet){
obj->insert("audioActive", QJsonValue(audio_active));
}
if(m_audio_stereo_isSet){
obj->insert("audioStereo", QJsonValue(audio_stereo));
}
if(m_volume_isSet){
obj->insert("volume", QJsonValue(volume));
}
if(udp_address != nullptr && *udp_address != QString("")){
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
}
if(m_udp_port_isSet){
obj->insert("udpPort", QJsonValue(udp_port));
}
if(m_audio_port_isSet){
obj->insert("audioPort", QJsonValue(audio_port));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
return obj;
}
float
SWGUDPSrcSettings::getOutputSampleRate() {
return output_sample_rate;
}
void
SWGUDPSrcSettings::setOutputSampleRate(float output_sample_rate) {
this->output_sample_rate = output_sample_rate;
this->m_output_sample_rate_isSet = true;
}
qint32
SWGUDPSrcSettings::getSampleFormat() {
return sample_format;
}
void
SWGUDPSrcSettings::setSampleFormat(qint32 sample_format) {
this->sample_format = sample_format;
this->m_sample_format_isSet = true;
}
qint64
SWGUDPSrcSettings::getInputFrequencyOffset() {
return input_frequency_offset;
}
void
SWGUDPSrcSettings::setInputFrequencyOffset(qint64 input_frequency_offset) {
this->input_frequency_offset = input_frequency_offset;
this->m_input_frequency_offset_isSet = true;
}
float
SWGUDPSrcSettings::getRfBandwidth() {
return rf_bandwidth;
}
void
SWGUDPSrcSettings::setRfBandwidth(float rf_bandwidth) {
this->rf_bandwidth = rf_bandwidth;
this->m_rf_bandwidth_isSet = true;
}
qint32
SWGUDPSrcSettings::getFmDeviation() {
return fm_deviation;
}
void
SWGUDPSrcSettings::setFmDeviation(qint32 fm_deviation) {
this->fm_deviation = fm_deviation;
this->m_fm_deviation_isSet = true;
}
qint32
SWGUDPSrcSettings::getChannelMute() {
return channel_mute;
}
void
SWGUDPSrcSettings::setChannelMute(qint32 channel_mute) {
this->channel_mute = channel_mute;
this->m_channel_mute_isSet = true;
}
float
SWGUDPSrcSettings::getGain() {
return gain;
}
void
SWGUDPSrcSettings::setGain(float gain) {
this->gain = gain;
this->m_gain_isSet = true;
}
qint32
SWGUDPSrcSettings::getSquelchDb() {
return squelch_db;
}
void
SWGUDPSrcSettings::setSquelchDb(qint32 squelch_db) {
this->squelch_db = squelch_db;
this->m_squelch_db_isSet = true;
}
qint32
SWGUDPSrcSettings::getSquelchGate() {
return squelch_gate;
}
void
SWGUDPSrcSettings::setSquelchGate(qint32 squelch_gate) {
this->squelch_gate = squelch_gate;
this->m_squelch_gate_isSet = true;
}
qint32
SWGUDPSrcSettings::getSquelchEnabled() {
return squelch_enabled;
}
void
SWGUDPSrcSettings::setSquelchEnabled(qint32 squelch_enabled) {
this->squelch_enabled = squelch_enabled;
this->m_squelch_enabled_isSet = true;
}
qint32
SWGUDPSrcSettings::getAgc() {
return agc;
}
void
SWGUDPSrcSettings::setAgc(qint32 agc) {
this->agc = agc;
this->m_agc_isSet = true;
}
qint32
SWGUDPSrcSettings::getAudioActive() {
return audio_active;
}
void
SWGUDPSrcSettings::setAudioActive(qint32 audio_active) {
this->audio_active = audio_active;
this->m_audio_active_isSet = true;
}
qint32
SWGUDPSrcSettings::getAudioStereo() {
return audio_stereo;
}
void
SWGUDPSrcSettings::setAudioStereo(qint32 audio_stereo) {
this->audio_stereo = audio_stereo;
this->m_audio_stereo_isSet = true;
}
qint32
SWGUDPSrcSettings::getVolume() {
return volume;
}
void
SWGUDPSrcSettings::setVolume(qint32 volume) {
this->volume = volume;
this->m_volume_isSet = true;
}
QString*
SWGUDPSrcSettings::getUdpAddress() {
return udp_address;
}
void
SWGUDPSrcSettings::setUdpAddress(QString* udp_address) {
this->udp_address = udp_address;
this->m_udp_address_isSet = true;
}
qint32
SWGUDPSrcSettings::getUdpPort() {
return udp_port;
}
void
SWGUDPSrcSettings::setUdpPort(qint32 udp_port) {
this->udp_port = udp_port;
this->m_udp_port_isSet = true;
}
qint32
SWGUDPSrcSettings::getAudioPort() {
return audio_port;
}
void
SWGUDPSrcSettings::setAudioPort(qint32 audio_port) {
this->audio_port = audio_port;
this->m_audio_port_isSet = true;
}
qint32
SWGUDPSrcSettings::getRgbColor() {
return rgb_color;
}
void
SWGUDPSrcSettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
QString*
SWGUDPSrcSettings::getTitle() {
return title;
}
void
SWGUDPSrcSettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
bool
SWGUDPSrcSettings::isSet(){
bool isObjectUpdated = false;
do{
if(m_output_sample_rate_isSet){ isObjectUpdated = true; break;}
if(m_sample_format_isSet){ isObjectUpdated = true; break;}
if(m_input_frequency_offset_isSet){ isObjectUpdated = true; break;}
if(m_rf_bandwidth_isSet){ isObjectUpdated = true; break;}
if(m_fm_deviation_isSet){ isObjectUpdated = true; break;}
if(m_channel_mute_isSet){ isObjectUpdated = true; break;}
if(m_gain_isSet){ isObjectUpdated = true; break;}
if(m_squelch_db_isSet){ isObjectUpdated = true; break;}
if(m_squelch_gate_isSet){ isObjectUpdated = true; break;}
if(m_squelch_enabled_isSet){ isObjectUpdated = true; break;}
if(m_agc_isSet){ isObjectUpdated = true; break;}
if(m_audio_active_isSet){ isObjectUpdated = true; break;}
if(m_audio_stereo_isSet){ isObjectUpdated = true; break;}
if(m_volume_isSet){ isObjectUpdated = true; break;}
if(udp_address != nullptr && *udp_address != QString("")){ isObjectUpdated = true; break;}
if(m_udp_port_isSet){ isObjectUpdated = true; break;}
if(m_audio_port_isSet){ isObjectUpdated = true; break;}
if(m_rgb_color_isSet){ isObjectUpdated = true; break;}
if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,167 @@
/**
* 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.
*/
/*
* SWGUDPSrcSettings.h
*
* UDPSrc
*/
#ifndef SWGUDPSrcSettings_H_
#define SWGUDPSrcSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGUDPSrcSettings: public SWGObject {
public:
SWGUDPSrcSettings();
SWGUDPSrcSettings(QString* json);
virtual ~SWGUDPSrcSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGUDPSrcSettings* fromJson(QString &jsonString) override;
float getOutputSampleRate();
void setOutputSampleRate(float output_sample_rate);
qint32 getSampleFormat();
void setSampleFormat(qint32 sample_format);
qint64 getInputFrequencyOffset();
void setInputFrequencyOffset(qint64 input_frequency_offset);
float getRfBandwidth();
void setRfBandwidth(float rf_bandwidth);
qint32 getFmDeviation();
void setFmDeviation(qint32 fm_deviation);
qint32 getChannelMute();
void setChannelMute(qint32 channel_mute);
float getGain();
void setGain(float gain);
qint32 getSquelchDb();
void setSquelchDb(qint32 squelch_db);
qint32 getSquelchGate();
void setSquelchGate(qint32 squelch_gate);
qint32 getSquelchEnabled();
void setSquelchEnabled(qint32 squelch_enabled);
qint32 getAgc();
void setAgc(qint32 agc);
qint32 getAudioActive();
void setAudioActive(qint32 audio_active);
qint32 getAudioStereo();
void setAudioStereo(qint32 audio_stereo);
qint32 getVolume();
void setVolume(qint32 volume);
QString* getUdpAddress();
void setUdpAddress(QString* udp_address);
qint32 getUdpPort();
void setUdpPort(qint32 udp_port);
qint32 getAudioPort();
void setAudioPort(qint32 audio_port);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
QString* getTitle();
void setTitle(QString* title);
virtual bool isSet() override;
private:
float output_sample_rate;
bool m_output_sample_rate_isSet;
qint32 sample_format;
bool m_sample_format_isSet;
qint64 input_frequency_offset;
bool m_input_frequency_offset_isSet;
float rf_bandwidth;
bool m_rf_bandwidth_isSet;
qint32 fm_deviation;
bool m_fm_deviation_isSet;
qint32 channel_mute;
bool m_channel_mute_isSet;
float gain;
bool m_gain_isSet;
qint32 squelch_db;
bool m_squelch_db_isSet;
qint32 squelch_gate;
bool m_squelch_gate_isSet;
qint32 squelch_enabled;
bool m_squelch_enabled_isSet;
qint32 agc;
bool m_agc_isSet;
qint32 audio_active;
bool m_audio_active_isSet;
qint32 audio_stereo;
bool m_audio_stereo_isSet;
qint32 volume;
bool m_volume_isSet;
QString* udp_address;
bool m_udp_address_isSet;
qint32 udp_port;
bool m_udp_port_isSet;
qint32 audio_port;
bool m_audio_port_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;
QString* title;
bool m_title_isSet;
};
}
#endif /* SWGUDPSrcSettings_H_ */