BFM demod: implemeted WEB API

pull/197/head
f4exb 2018-05-23 14:56:29 +02:00
rodzic ac041ca1ca
commit 8d7b581879
36 zmienionych plików z 2486 dodań i 6 usunięć

Wyświetl plik

@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
*/
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("3.14.7");
QCoreApplication::setApplicationVersion("4.0.0");
#if 1
qApp->setStyle(QStyleFactory::create("fusion"));

Wyświetl plik

@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelBench");
QCoreApplication::setApplicationVersion("3.14.7");
QCoreApplication::setApplicationVersion("4.0.0");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

Wyświetl plik

@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelSrv");
QCoreApplication::setApplicationVersion("3.14.7");
QCoreApplication::setApplicationVersion("4.0.0");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

Wyświetl plik

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

Wyświetl plik

@ -17,15 +17,23 @@
#include <QTime>
#include <QDebug>
#include "boost/format.hpp"
#include <stdio.h>
#include <complex.h>
#include "SWGChannelSettings.h"
#include "SWGBFMDemodSettings.h"
#include "SWGChannelReport.h"
#include "SWGBFMDemodReport.h"
#include "SWGRDSReport.h"
#include "audio/audiooutput.h"
#include "dsp/dspengine.h"
#include "dsp/downchannelizer.h"
#include "dsp/threadedbasebandsamplesink.h"
#include "dsp/dspcommands.h"
#include "device/devicesourceapi.h"
#include "util/db.h"
#include "rdsparser.h"
#include "bfmdemod.h"
@ -536,3 +544,166 @@ bool BFMDemod::deserialize(const QByteArray& data)
}
}
int BFMDemod::webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage __attribute__((unused)))
{
response.setBfmDemodSettings(new SWGSDRangel::SWGBFMDemodSettings());
response.getBfmDemodSettings()->init();
webapiFormatChannelSettings(response, m_settings);
return 200;
}
int BFMDemod::webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage __attribute__((unused)))
{
BFMDemodSettings settings = m_settings;
bool frequencyOffsetChanged = false;
if (channelSettingsKeys.contains("inputFrequencyOffset"))
{
settings.m_inputFrequencyOffset = response.getBfmDemodSettings()->getInputFrequencyOffset();
frequencyOffsetChanged = true;
}
if (channelSettingsKeys.contains("rfBandwidth")) {
settings.m_rfBandwidth = response.getBfmDemodSettings()->getRfBandwidth();
}
if (channelSettingsKeys.contains("afBandwidth")) {
settings.m_afBandwidth = response.getBfmDemodSettings()->getAfBandwidth();
}
if (channelSettingsKeys.contains("volume")) {
settings.m_volume = response.getBfmDemodSettings()->getVolume();
}
if (channelSettingsKeys.contains("squelch")) {
settings.m_squelch = response.getBfmDemodSettings()->getSquelch();
}
if (channelSettingsKeys.contains("audioStereo")) {
settings.m_audioStereo = response.getBfmDemodSettings()->getAudioStereo() != 0;
}
if (channelSettingsKeys.contains("lsbStereo")) {
settings.m_lsbStereo = response.getBfmDemodSettings()->getLsbStereo() != 0;
}
if (channelSettingsKeys.contains("showPilot")) {
settings.m_showPilot = response.getBfmDemodSettings()->getShowPilot() != 0;
}
if (channelSettingsKeys.contains("rdsActive")) {
settings.m_rdsActive = response.getBfmDemodSettings()->getRdsActive() != 0;
}
if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getAmDemodSettings()->getRgbColor();
}
if (channelSettingsKeys.contains("title")) {
settings.m_title = *response.getAmDemodSettings()->getTitle();
}
if (channelSettingsKeys.contains("audioDeviceName")) {
settings.m_audioDeviceName = *response.getAmDemodSettings()->getAudioDeviceName();
}
if (frequencyOffsetChanged)
{
MsgConfigureChannelizer* channelConfigMsg = MsgConfigureChannelizer::create(
m_audioSampleRate, settings.m_inputFrequencyOffset);
m_inputMessageQueue.push(channelConfigMsg);
}
MsgConfigureBFMDemod *msg = MsgConfigureBFMDemod::create(settings, force);
m_inputMessageQueue.push(msg);
qDebug("BFMDemod::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgConfigureBFMDemod *msgToGUI = MsgConfigureBFMDemod::create(settings, force);
m_guiMessageQueue->push(msgToGUI);
}
webapiFormatChannelSettings(response, settings);
return 200;
}
int BFMDemod::webapiReportGet(
SWGSDRangel::SWGChannelReport& response,
QString& errorMessage __attribute__((unused)))
{
response.setBfmDemodReport(new SWGSDRangel::SWGBFMDemodReport());
response.getBfmDemodReport()->init();
webapiFormatChannelReport(response);
return 200;
}
void BFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const BFMDemodSettings& settings)
{
response.getBfmDemodSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
response.getBfmDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
response.getBfmDemodSettings()->setAfBandwidth(settings.m_afBandwidth);
response.getBfmDemodSettings()->setVolume(settings.m_volume);
response.getBfmDemodSettings()->setSquelch(settings.m_squelch);
response.getBfmDemodSettings()->setAudioStereo(settings.m_audioStereo ? 1 : 0);
response.getBfmDemodSettings()->setLsbStereo(settings.m_lsbStereo ? 1 : 0);
response.getBfmDemodSettings()->setShowPilot(settings.m_showPilot ? 1 : 0);
response.getBfmDemodSettings()->setRdsActive(settings.m_rdsActive ? 1 : 0);
response.getBfmDemodSettings()->setRgbColor(settings.m_rgbColor);
if (response.getBfmDemodSettings()->getTitle()) {
*response.getBfmDemodSettings()->getTitle() = settings.m_title;
} else {
response.getBfmDemodSettings()->setTitle(new QString(settings.m_title));
}
if (response.getBfmDemodSettings()->getAudioDeviceName()) {
*response.getBfmDemodSettings()->getAudioDeviceName() = settings.m_audioDeviceName;
} else {
response.getBfmDemodSettings()->setAudioDeviceName(new QString(settings.m_audioDeviceName));
}
}
void BFMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
{
double magsqAvg, magsqPeak;
int nbMagsqSamples;
getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples);
response.getBfmDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsqAvg));
response.getBfmDemodReport()->setSquelch(m_squelchState > 0 ? 1 : 0);
response.getBfmDemodReport()->setAudioSampleRate(m_audioSampleRate);
response.getBfmDemodReport()->setChannelSampleRate(m_inputSampleRate);
response.getBfmDemodReport()->setPilotLocked(getPilotLock() ? 1 : 0);
response.getBfmDemodReport()->setPilotPowerDb(CalcDb::dbPower(getPilotLevel()));
if (m_settings.m_rdsActive)
{
response.getBfmDemodReport()->setRdsReport(new SWGSDRangel::SWGRDSReport());
webapiFormatRDSReport(response.getBfmDemodReport()->getRdsReport());
}
}
void BFMDemod::webapiFormatRDSReport(SWGSDRangel::SWGRDSReport *report)
{
report->setDemodStatus(round(getDemodQua()));
report->setDecodStatus(round(getDecoderQua()));
report->setRdsDemodAccumDb(CalcDb::dbPower(std::fabs(getDemodAcc())));
report->setRdsDemodFrequency(getDemodFclk());
report->setPid(new QString(str(boost::format("%04X") % getRDSParser().m_pi_program_identification).c_str()));
report->setPiType(new QString(getRDSParser().pty_table[getRDSParser().m_pi_program_type].c_str()));
report->setPiCoverage(new QString(getRDSParser().coverage_area_codes[getRDSParser().m_pi_area_coverage_index].c_str()));
report->setProgServiceName(new QString(getRDSParser().m_g0_program_service_name));
report->setMusicSpeech(new QString((getRDSParser().m_g0_music_speech ? "Music" : "Speech")));
report->setMonoStereo(new QString((getRDSParser().m_g0_mono_stereo ? "Mono" : "Stereo")));
report->setRadioText(new QString(getRDSParser().m_g2_radiotext));
std::string time = str(boost::format("%4i-%02i-%02i %02i:%02i (%+.1fh)")\
% (1900 + getRDSParser().m_g4_year) % getRDSParser().m_g4_month % getRDSParser().m_g4_day % getRDSParser().m_g4_hours % getRDSParser().m_g4_minutes % getRDSParser().m_g4_local_time_offset);
report->setTime(new QString(time.c_str()));
report->setAltFrequencies(new QList<SWGSDRangel::SWGRDSReport_altFrequencies*>);
for (std::set<double>::iterator it = getRDSParser().m_g0_alt_freq.begin(); it != getRDSParser().m_g0_alt_freq.end(); ++it)
{
if (*it > 76.0)
{
report->getAltFrequencies()->append(new SWGSDRangel::SWGRDSReport_altFrequencies);
report->getAltFrequencies()->back()->setFrequency(*it);
}
}
}

Wyświetl plik

@ -43,6 +43,10 @@ class DeviceSourceAPI;
class ThreadedBasebandSampleSink;
class DownChannelizer;
namespace SWGSDRangel {
class SWGRDSReport;
}
class BFMDemod : public BasebandSampleSink, public ChannelSinkAPI {
public:
class MsgConfigureBFMDemod : public Message {
@ -153,6 +157,20 @@ public:
RDSParser& getRDSParser() { return m_rdsParser; }
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;
@ -227,6 +245,10 @@ private:
void applyAudioSampleRate(int sampleRate);
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force = false);
void applySettings(const BFMDemodSettings& settings, bool force = false);
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const BFMDemodSettings& settings);
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
void webapiFormatRDSReport(SWGSDRangel::SWGRDSReport *report);
};
#endif // INCLUDE_BFMDEMOD_H

Wyświetl plik

@ -119,6 +119,16 @@ bool BFMDemodGUI::handleMessage(const Message& message)
ui->glSpectrum->setSampleRate(m_rate / 2);
return true;
}
else if (BFMDemod::MsgConfigureBFMDemod::match(message))
{
qDebug("BFMDemodGUI::handleMessage: BFMDemod::MsgConfigureBFMDemod");
const BFMDemod::MsgConfigureBFMDemod& cfg = (BFMDemod::MsgConfigureBFMDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
displaySettings();
blockApplySettings(false);
return true;
}
else
{
return false;

Wyświetl plik

@ -25,7 +25,7 @@
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
QString("Broadcast FM Demodulator"),
QString("3.14.5"),
QString("4.0.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -11,6 +11,7 @@
<file>webapi/doc/swagger/include/AMDemod.yaml</file>
<file>webapi/doc/swagger/include/AMMod.yaml</file>
<file>webapi/doc/swagger/include/ATVMod.yaml</file>
<file>webapi/doc/swagger/include/BFMDemod.yaml</file>
<file>webapi/doc/swagger/include/NFMDemod.yaml</file>
<file>webapi/doc/swagger/include/NFMMod.yaml</file>
<file>webapi/doc/swagger/include/SSBMod.yaml</file>

Wyświetl plik

@ -936,6 +936,9 @@ margin-bottom: 20px;
},
"bandIndex" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string"
}
},
"description" : "AirspyHF"
@ -1042,6 +1045,84 @@ margin-bottom: 20px;
}
},
"description" : "Audio output device"
};
defs.BFMDemodReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power transmitted in channel (dB)"
},
"squelch" : {
"type" : "integer",
"description" : "squelch status (1 if open else 0)"
},
"audioSampleRate" : {
"type" : "integer"
},
"channelSampleRate" : {
"type" : "integer"
},
"pilotLocked" : {
"type" : "integer",
"description" : "pilot locked status (1 if open else 0)"
},
"pilotPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power of stereo pilot (dB)"
},
"rdsReport" : {
"$ref" : "#/definitions/RDSReport"
}
},
"description" : "BFMDemod"
};
defs.BFMDemodSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"afBandwidth" : {
"type" : "number",
"format" : "float"
},
"volume" : {
"type" : "number",
"format" : "float"
},
"squelch" : {
"type" : "number",
"format" : "float"
},
"audioStereo" : {
"type" : "integer"
},
"lsbStereo" : {
"type" : "integer"
},
"showPilot" : {
"type" : "integer"
},
"rdsActive" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"audioDeviceName" : {
"type" : "string"
}
},
"description" : "BFMDemod"
};
defs.BladeRFInputSettings = {
"properties" : {
@ -1084,6 +1165,9 @@ margin-bottom: 20px;
},
"iqCorrection" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string"
}
},
"description" : "BladeRF"
@ -1220,6 +1304,9 @@ margin-bottom: 20px;
"ATVModReport" : {
"$ref" : "#/definitions/ATVModReport"
},
"BFMDemodReport" : {
"$ref" : "#/definitions/BFMDemodReport"
},
"NFMDemodReport" : {
"$ref" : "#/definitions/NFMDemodReport"
},
@ -1259,6 +1346,9 @@ margin-bottom: 20px;
"ATVModSettings" : {
"$ref" : "#/definitions/ATVModSettings"
},
"BFMDemodSettings" : {
"$ref" : "#/definitions/BFMDemodSettings"
},
"NFMDemodSettings" : {
"$ref" : "#/definitions/NFMDemodSettings"
},
@ -1512,6 +1602,9 @@ margin-bottom: 20px;
},
"linkTxFrequency" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string"
}
},
"description" : "HackRF"
@ -1688,6 +1781,9 @@ margin-bottom: 20px;
"transverterDeltaFrequency" : {
"type" : "integer",
"format" : "int64"
},
"fileRecordName" : {
"type" : "string"
}
},
"description" : "LimeSDR"
@ -2055,6 +2151,75 @@ margin-bottom: 20px;
}
},
"description" : "Settings presets"
};
defs.RDSReport = {
"properties" : {
"demodStatus" : {
"type" : "integer",
"description" : "Demodulation success (%)"
},
"decodStatus" : {
"type" : "integer",
"description" : "Decoding success (%)"
},
"rdsDemodAccumDB" : {
"type" : "number",
"format" : "float",
"description" : "RDS demodulator accumulator level (dB)"
},
"rdsDemodFrequency" : {
"type" : "number",
"format" : "float",
"description" : "RDS demodulator clock frequency"
},
"pid" : {
"type" : "string",
"description" : "Program information (PI) ID in string format (hex)"
},
"piType" : {
"type" : "string",
"description" : "Program information (PI) type information"
},
"piCoverage" : {
"type" : "string",
"description" : "Program information (PI) coverage information"
},
"progServiceName" : {
"type" : "string",
"description" : "Program service name"
},
"musicSpeech" : {
"type" : "string",
"description" : "Music or speech"
},
"monoStereo" : {
"type" : "string",
"description" : "Mono or stereo"
},
"radioText" : {
"type" : "string",
"description" : "Freeflow text"
},
"time" : {
"type" : "string",
"description" : "Timestamp in string format ~ISO"
},
"altFrequencies" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/RDSReport_altFrequencies"
}
}
},
"description" : "RDS information"
};
defs.RDSReport_altFrequencies = {
"properties" : {
"frequency" : {
"type" : "number",
"format" : "float"
}
}
};
defs.RtlSdrSettings = {
"properties" : {
@ -2101,6 +2266,9 @@ margin-bottom: 20px;
},
"rfBandwidth" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string"
}
},
"description" : "RTLSDR"
@ -20643,7 +20811,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-04-17T00:43:20.797+02:00
Generated 2018-05-23T14:44:33.513+02:00
</div>
</div>
</div>

Wyświetl plik

@ -17,4 +17,6 @@ AirspyHFSettings:
format: int64
bandIndex:
type: integer
fileRecordName:
type: string

Wyświetl plik

@ -0,0 +1,105 @@
BFMDemodSettings:
description: BFMDemod
properties:
inputFrequencyOffset:
type: integer
format: int64
rfBandwidth:
type: number
format: float
afBandwidth:
type: number
format: float
volume:
type: number
format: float
squelch:
type: number
format: float
audioStereo:
type: integer
lsbStereo:
type: integer
showPilot:
type: integer
rdsActive:
type: integer
rgbColor:
type: integer
title:
type: string
audioDeviceName:
type: string
BFMDemodReport:
description: BFMDemod
properties:
channelPowerDB:
description: power transmitted in channel (dB)
type: number
format: float
squelch:
description: squelch status (1 if open else 0)
type: integer
audioSampleRate:
type: integer
channelSampleRate:
type: integer
pilotLocked:
description: pilot locked status (1 if open else 0)
type: integer
pilotPowerDB:
description: power of stereo pilot (dB)
type: number
format: float
rdsReport:
$ref: "#/RDSReport"
RDSReport:
description: RDS information
properties:
demodStatus:
description: Demodulation success (%)
type: integer
decodStatus:
description: Decoding success (%)
type: integer
rdsDemodAccumDB:
description: RDS demodulator accumulator level (dB)
type: number
format: float
rdsDemodFrequency:
description: RDS demodulator clock frequency
type: number
format: float
pid:
description: Program information (PI) ID in string format (hex)
type: string
piType:
description: Program information (PI) type information
type: string
piCoverage:
description: Program information (PI) coverage information
type: string
progServiceName:
description: Program service name
type: string
musicSpeech:
description: Music or speech
type: string
monoStereo:
description: Mono or stereo
type: string
radioText:
description: Freeflow text
type: string
time:
description: Timestamp in string format ~ISO
type: string
altFrequencies:
type: array
items:
properties:
frequency:
type: number
format: float

Wyświetl plik

@ -28,6 +28,8 @@ BladeRFInputSettings:
type: integer
iqCorrection:
type: integer
fileRecordName:
type: string
BladeRFOutputSettings:
description: BladeRF

Wyświetl plik

@ -29,6 +29,8 @@ HackRFInputSettings:
type: integer
linkTxFrequency:
type: integer
fileRecordName:
type: string
HackRFOutputSettings:
description: HackRF

Wyświetl plik

@ -45,6 +45,8 @@ LimeSdrInputSettings:
transverterDeltaFrequency:
type: integer
format: int64
fileRecordName:
type: string
LimeSdrOutputSettings:
description: LimeSDR

Wyświetl plik

@ -31,4 +31,6 @@ RtlSdrSettings:
format: int64
rfBandwidth:
type: integer
fileRecordName:
type: string

Wyświetl plik

@ -1751,6 +1751,8 @@ definitions:
$ref: "/doc/swagger/include/AMMod.yaml#/AMModSettings"
ATVModSettings:
$ref: "/doc/swagger/include/ATVMod.yaml#/ATVModSettings"
BFMDemodSettings:
$ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodSettings"
NFMDemodSettings:
$ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodSettings"
NFMModSettings:
@ -1778,6 +1780,8 @@ definitions:
$ref: "/doc/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "/doc/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodReport"
NFMDemodReport:
$ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:

Wyświetl plik

@ -1875,6 +1875,20 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "BFMDemod")
{
if (channelSettings.getTx() == 0)
{
QJsonObject bfmDemodSettingsJsonObject = jsonObject["BFMDemodSettings"].toObject();
channelSettingsKeys = bfmDemodSettingsJsonObject.keys();
channelSettings.setBfmDemodSettings(new SWGSDRangel::SWGBFMDemodSettings());
channelSettings.getBfmDemodSettings()->fromJsonObject(bfmDemodSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "NFMDemod")
{
if (channelSettings.getTx() == 0)

Wyświetl plik

@ -0,0 +1,105 @@
BFMDemodSettings:
description: BFMDemod
properties:
inputFrequencyOffset:
type: integer
format: int64
rfBandwidth:
type: number
format: float
afBandwidth:
type: number
format: float
volume:
type: number
format: float
squelch:
type: number
format: float
audioStereo:
type: integer
lsbStereo:
type: integer
showPilot:
type: integer
rdsActive:
type: integer
rgbColor:
type: integer
title:
type: string
audioDeviceName:
type: string
BFMDemodReport:
description: BFMDemod
properties:
channelPowerDB:
description: power transmitted in channel (dB)
type: number
format: float
squelch:
description: squelch status (1 if open else 0)
type: integer
audioSampleRate:
type: integer
channelSampleRate:
type: integer
pilotLocked:
description: pilot locked status (1 if open else 0)
type: integer
pilotPowerDB:
description: power of stereo pilot (dB)
type: number
format: float
rdsReport:
$ref: "#/RDSReport"
RDSReport:
description: RDS information
properties:
demodStatus:
description: Demodulation success (%)
type: integer
decodStatus:
description: Decoding success (%)
type: integer
rdsDemodAccumDB:
description: RDS demodulator accumulator level (dB)
type: number
format: float
rdsDemodFrequency:
description: RDS demodulator clock frequency
type: number
format: float
pid:
description: Program information (PI) ID in string format (hex)
type: string
piType:
description: Program information (PI) type information
type: string
piCoverage:
description: Program information (PI) coverage information
type: string
progServiceName:
description: Program service name
type: string
musicSpeech:
description: Music or speech
type: string
monoStereo:
description: Mono or stereo
type: string
radioText:
description: Freeflow text
type: string
time:
description: Timestamp in string format ~ISO
type: string
altFrequencies:
type: array
items:
properties:
frequency:
type: number
format: float

Wyświetl plik

@ -1751,6 +1751,8 @@ definitions:
$ref: "http://localhost:8081/api/swagger/include/AMMod.yaml#/AMModSettings"
ATVModSettings:
$ref: "http://localhost:8081/api/swagger/include/ATVMod.yaml#/ATVModSettings"
BFMDemodSettings:
$ref: "http://localhost:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodSettings"
NFMDemodSettings:
$ref: "http://localhost:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodSettings"
NFMModSettings:
@ -1778,6 +1780,8 @@ definitions:
$ref: "http://localhost:8081/api/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "http://localhost:8081/api/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "http://localhost:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodReport"
NFMDemodReport:
$ref: "http://localhost:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:

Wyświetl plik

@ -1045,6 +1045,84 @@ margin-bottom: 20px;
}
},
"description" : "Audio output device"
};
defs.BFMDemodReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power transmitted in channel (dB)"
},
"squelch" : {
"type" : "integer",
"description" : "squelch status (1 if open else 0)"
},
"audioSampleRate" : {
"type" : "integer"
},
"channelSampleRate" : {
"type" : "integer"
},
"pilotLocked" : {
"type" : "integer",
"description" : "pilot locked status (1 if open else 0)"
},
"pilotPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power of stereo pilot (dB)"
},
"rdsReport" : {
"$ref" : "#/definitions/RDSReport"
}
},
"description" : "BFMDemod"
};
defs.BFMDemodSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"afBandwidth" : {
"type" : "number",
"format" : "float"
},
"volume" : {
"type" : "number",
"format" : "float"
},
"squelch" : {
"type" : "number",
"format" : "float"
},
"audioStereo" : {
"type" : "integer"
},
"lsbStereo" : {
"type" : "integer"
},
"showPilot" : {
"type" : "integer"
},
"rdsActive" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"audioDeviceName" : {
"type" : "string"
}
},
"description" : "BFMDemod"
};
defs.BladeRFInputSettings = {
"properties" : {
@ -1226,6 +1304,9 @@ margin-bottom: 20px;
"ATVModReport" : {
"$ref" : "#/definitions/ATVModReport"
},
"BFMDemodReport" : {
"$ref" : "#/definitions/BFMDemodReport"
},
"NFMDemodReport" : {
"$ref" : "#/definitions/NFMDemodReport"
},
@ -1265,6 +1346,9 @@ margin-bottom: 20px;
"ATVModSettings" : {
"$ref" : "#/definitions/ATVModSettings"
},
"BFMDemodSettings" : {
"$ref" : "#/definitions/BFMDemodSettings"
},
"NFMDemodSettings" : {
"$ref" : "#/definitions/NFMDemodSettings"
},
@ -2067,6 +2151,75 @@ margin-bottom: 20px;
}
},
"description" : "Settings presets"
};
defs.RDSReport = {
"properties" : {
"demodStatus" : {
"type" : "integer",
"description" : "Demodulation success (%)"
},
"decodStatus" : {
"type" : "integer",
"description" : "Decoding success (%)"
},
"rdsDemodAccumDB" : {
"type" : "number",
"format" : "float",
"description" : "RDS demodulator accumulator level (dB)"
},
"rdsDemodFrequency" : {
"type" : "number",
"format" : "float",
"description" : "RDS demodulator clock frequency"
},
"pid" : {
"type" : "string",
"description" : "Program information (PI) ID in string format (hex)"
},
"piType" : {
"type" : "string",
"description" : "Program information (PI) type information"
},
"piCoverage" : {
"type" : "string",
"description" : "Program information (PI) coverage information"
},
"progServiceName" : {
"type" : "string",
"description" : "Program service name"
},
"musicSpeech" : {
"type" : "string",
"description" : "Music or speech"
},
"monoStereo" : {
"type" : "string",
"description" : "Mono or stereo"
},
"radioText" : {
"type" : "string",
"description" : "Freeflow text"
},
"time" : {
"type" : "string",
"description" : "Timestamp in string format ~ISO"
},
"altFrequencies" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/RDSReport_altFrequencies"
}
}
},
"description" : "RDS information"
};
defs.RDSReport_altFrequencies = {
"properties" : {
"frequency" : {
"type" : "number",
"format" : "float"
}
}
};
defs.RtlSdrSettings = {
"properties" : {
@ -20658,7 +20811,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2018-05-09T18:07:27.088+02:00
Generated 2018-05-23T14:44:33.513+02:00
</div>
</div>
</div>

Wyświetl plik

@ -0,0 +1,234 @@
/**
* 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 "SWGBFMDemodReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGBFMDemodReport::SWGBFMDemodReport(QString* json) {
init();
this->fromJson(*json);
}
SWGBFMDemodReport::SWGBFMDemodReport() {
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;
pilot_locked = 0;
m_pilot_locked_isSet = false;
pilot_power_db = 0.0f;
m_pilot_power_db_isSet = false;
rds_report = nullptr;
m_rds_report_isSet = false;
}
SWGBFMDemodReport::~SWGBFMDemodReport() {
this->cleanup();
}
void
SWGBFMDemodReport::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;
pilot_locked = 0;
m_pilot_locked_isSet = false;
pilot_power_db = 0.0f;
m_pilot_power_db_isSet = false;
rds_report = new SWGRDSReport();
m_rds_report_isSet = false;
}
void
SWGBFMDemodReport::cleanup() {
if(rds_report != nullptr) {
delete rds_report;
}
}
SWGBFMDemodReport*
SWGBFMDemodReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGBFMDemodReport::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", "");
::SWGSDRangel::setValue(&pilot_locked, pJson["pilotLocked"], "qint32", "");
::SWGSDRangel::setValue(&pilot_power_db, pJson["pilotPowerDB"], "float", "");
::SWGSDRangel::setValue(&rds_report, pJson["rdsReport"], "SWGRDSReport", "SWGRDSReport");
}
QString
SWGBFMDemodReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGBFMDemodReport::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));
}
if(m_pilot_locked_isSet){
obj->insert("pilotLocked", QJsonValue(pilot_locked));
}
if(m_pilot_power_db_isSet){
obj->insert("pilotPowerDB", QJsonValue(pilot_power_db));
}
if((rds_report != nullptr) && (rds_report->isSet())){
toJsonValue(QString("rdsReport"), rds_report, obj, QString("SWGRDSReport"));
}
return obj;
}
float
SWGBFMDemodReport::getChannelPowerDb() {
return channel_power_db;
}
void
SWGBFMDemodReport::setChannelPowerDb(float channel_power_db) {
this->channel_power_db = channel_power_db;
this->m_channel_power_db_isSet = true;
}
qint32
SWGBFMDemodReport::getSquelch() {
return squelch;
}
void
SWGBFMDemodReport::setSquelch(qint32 squelch) {
this->squelch = squelch;
this->m_squelch_isSet = true;
}
qint32
SWGBFMDemodReport::getAudioSampleRate() {
return audio_sample_rate;
}
void
SWGBFMDemodReport::setAudioSampleRate(qint32 audio_sample_rate) {
this->audio_sample_rate = audio_sample_rate;
this->m_audio_sample_rate_isSet = true;
}
qint32
SWGBFMDemodReport::getChannelSampleRate() {
return channel_sample_rate;
}
void
SWGBFMDemodReport::setChannelSampleRate(qint32 channel_sample_rate) {
this->channel_sample_rate = channel_sample_rate;
this->m_channel_sample_rate_isSet = true;
}
qint32
SWGBFMDemodReport::getPilotLocked() {
return pilot_locked;
}
void
SWGBFMDemodReport::setPilotLocked(qint32 pilot_locked) {
this->pilot_locked = pilot_locked;
this->m_pilot_locked_isSet = true;
}
float
SWGBFMDemodReport::getPilotPowerDb() {
return pilot_power_db;
}
void
SWGBFMDemodReport::setPilotPowerDb(float pilot_power_db) {
this->pilot_power_db = pilot_power_db;
this->m_pilot_power_db_isSet = true;
}
SWGRDSReport*
SWGBFMDemodReport::getRdsReport() {
return rds_report;
}
void
SWGBFMDemodReport::setRdsReport(SWGRDSReport* rds_report) {
this->rds_report = rds_report;
this->m_rds_report_isSet = true;
}
bool
SWGBFMDemodReport::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;}
if(m_pilot_locked_isSet){ isObjectUpdated = true; break;}
if(m_pilot_power_db_isSet){ isObjectUpdated = true; break;}
if(rds_report != nullptr && rds_report->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,95 @@
/**
* 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.
*/
/*
* SWGBFMDemodReport.h
*
* BFMDemod
*/
#ifndef SWGBFMDemodReport_H_
#define SWGBFMDemodReport_H_
#include <QJsonObject>
#include "SWGRDSReport.h"
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGBFMDemodReport: public SWGObject {
public:
SWGBFMDemodReport();
SWGBFMDemodReport(QString* json);
virtual ~SWGBFMDemodReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGBFMDemodReport* 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);
qint32 getPilotLocked();
void setPilotLocked(qint32 pilot_locked);
float getPilotPowerDb();
void setPilotPowerDb(float pilot_power_db);
SWGRDSReport* getRdsReport();
void setRdsReport(SWGRDSReport* rds_report);
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;
qint32 pilot_locked;
bool m_pilot_locked_isSet;
float pilot_power_db;
bool m_pilot_power_db_isSet;
SWGRDSReport* rds_report;
bool m_rds_report_isSet;
};
}
#endif /* SWGBFMDemodReport_H_ */

Wyświetl plik

@ -0,0 +1,341 @@
/**
* 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 "SWGBFMDemodSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGBFMDemodSettings::SWGBFMDemodSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGBFMDemodSettings::SWGBFMDemodSettings() {
input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false;
rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false;
af_bandwidth = 0.0f;
m_af_bandwidth_isSet = false;
volume = 0.0f;
m_volume_isSet = false;
squelch = 0.0f;
m_squelch_isSet = false;
audio_stereo = 0;
m_audio_stereo_isSet = false;
lsb_stereo = 0;
m_lsb_stereo_isSet = false;
show_pilot = 0;
m_show_pilot_isSet = false;
rds_active = 0;
m_rds_active_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;
}
SWGBFMDemodSettings::~SWGBFMDemodSettings() {
this->cleanup();
}
void
SWGBFMDemodSettings::init() {
input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false;
rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false;
af_bandwidth = 0.0f;
m_af_bandwidth_isSet = false;
volume = 0.0f;
m_volume_isSet = false;
squelch = 0.0f;
m_squelch_isSet = false;
audio_stereo = 0;
m_audio_stereo_isSet = false;
lsb_stereo = 0;
m_lsb_stereo_isSet = false;
show_pilot = 0;
m_show_pilot_isSet = false;
rds_active = 0;
m_rds_active_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
SWGBFMDemodSettings::cleanup() {
if(title != nullptr) {
delete title;
}
if(audio_device_name != nullptr) {
delete audio_device_name;
}
}
SWGBFMDemodSettings*
SWGBFMDemodSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGBFMDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
::SWGSDRangel::setValue(&af_bandwidth, pJson["afBandwidth"], "float", "");
::SWGSDRangel::setValue(&volume, pJson["volume"], "float", "");
::SWGSDRangel::setValue(&squelch, pJson["squelch"], "float", "");
::SWGSDRangel::setValue(&audio_stereo, pJson["audioStereo"], "qint32", "");
::SWGSDRangel::setValue(&lsb_stereo, pJson["lsbStereo"], "qint32", "");
::SWGSDRangel::setValue(&show_pilot, pJson["showPilot"], "qint32", "");
::SWGSDRangel::setValue(&rds_active, pJson["rdsActive"], "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
SWGBFMDemodSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGBFMDemodSettings::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_af_bandwidth_isSet){
obj->insert("afBandwidth", QJsonValue(af_bandwidth));
}
if(m_volume_isSet){
obj->insert("volume", QJsonValue(volume));
}
if(m_squelch_isSet){
obj->insert("squelch", QJsonValue(squelch));
}
if(m_audio_stereo_isSet){
obj->insert("audioStereo", QJsonValue(audio_stereo));
}
if(m_lsb_stereo_isSet){
obj->insert("lsbStereo", QJsonValue(lsb_stereo));
}
if(m_show_pilot_isSet){
obj->insert("showPilot", QJsonValue(show_pilot));
}
if(m_rds_active_isSet){
obj->insert("rdsActive", QJsonValue(rds_active));
}
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
SWGBFMDemodSettings::getInputFrequencyOffset() {
return input_frequency_offset;
}
void
SWGBFMDemodSettings::setInputFrequencyOffset(qint64 input_frequency_offset) {
this->input_frequency_offset = input_frequency_offset;
this->m_input_frequency_offset_isSet = true;
}
float
SWGBFMDemodSettings::getRfBandwidth() {
return rf_bandwidth;
}
void
SWGBFMDemodSettings::setRfBandwidth(float rf_bandwidth) {
this->rf_bandwidth = rf_bandwidth;
this->m_rf_bandwidth_isSet = true;
}
float
SWGBFMDemodSettings::getAfBandwidth() {
return af_bandwidth;
}
void
SWGBFMDemodSettings::setAfBandwidth(float af_bandwidth) {
this->af_bandwidth = af_bandwidth;
this->m_af_bandwidth_isSet = true;
}
float
SWGBFMDemodSettings::getVolume() {
return volume;
}
void
SWGBFMDemodSettings::setVolume(float volume) {
this->volume = volume;
this->m_volume_isSet = true;
}
float
SWGBFMDemodSettings::getSquelch() {
return squelch;
}
void
SWGBFMDemodSettings::setSquelch(float squelch) {
this->squelch = squelch;
this->m_squelch_isSet = true;
}
qint32
SWGBFMDemodSettings::getAudioStereo() {
return audio_stereo;
}
void
SWGBFMDemodSettings::setAudioStereo(qint32 audio_stereo) {
this->audio_stereo = audio_stereo;
this->m_audio_stereo_isSet = true;
}
qint32
SWGBFMDemodSettings::getLsbStereo() {
return lsb_stereo;
}
void
SWGBFMDemodSettings::setLsbStereo(qint32 lsb_stereo) {
this->lsb_stereo = lsb_stereo;
this->m_lsb_stereo_isSet = true;
}
qint32
SWGBFMDemodSettings::getShowPilot() {
return show_pilot;
}
void
SWGBFMDemodSettings::setShowPilot(qint32 show_pilot) {
this->show_pilot = show_pilot;
this->m_show_pilot_isSet = true;
}
qint32
SWGBFMDemodSettings::getRdsActive() {
return rds_active;
}
void
SWGBFMDemodSettings::setRdsActive(qint32 rds_active) {
this->rds_active = rds_active;
this->m_rds_active_isSet = true;
}
qint32
SWGBFMDemodSettings::getRgbColor() {
return rgb_color;
}
void
SWGBFMDemodSettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
QString*
SWGBFMDemodSettings::getTitle() {
return title;
}
void
SWGBFMDemodSettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
QString*
SWGBFMDemodSettings::getAudioDeviceName() {
return audio_device_name;
}
void
SWGBFMDemodSettings::setAudioDeviceName(QString* audio_device_name) {
this->audio_device_name = audio_device_name;
this->m_audio_device_name_isSet = true;
}
bool
SWGBFMDemodSettings::isSet(){
bool isObjectUpdated = false;
do{
if(m_input_frequency_offset_isSet){ isObjectUpdated = true; break;}
if(m_rf_bandwidth_isSet){ isObjectUpdated = true; break;}
if(m_af_bandwidth_isSet){ isObjectUpdated = true; break;}
if(m_volume_isSet){ isObjectUpdated = true; break;}
if(m_squelch_isSet){ isObjectUpdated = true; break;}
if(m_audio_stereo_isSet){ isObjectUpdated = true; break;}
if(m_lsb_stereo_isSet){ isObjectUpdated = true; break;}
if(m_show_pilot_isSet){ isObjectUpdated = true; break;}
if(m_rds_active_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;
}
}

Wyświetl plik

@ -0,0 +1,125 @@
/**
* 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.
*/
/*
* SWGBFMDemodSettings.h
*
* BFMDemod
*/
#ifndef SWGBFMDemodSettings_H_
#define SWGBFMDemodSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGBFMDemodSettings: public SWGObject {
public:
SWGBFMDemodSettings();
SWGBFMDemodSettings(QString* json);
virtual ~SWGBFMDemodSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGBFMDemodSettings* fromJson(QString &jsonString) override;
qint64 getInputFrequencyOffset();
void setInputFrequencyOffset(qint64 input_frequency_offset);
float getRfBandwidth();
void setRfBandwidth(float rf_bandwidth);
float getAfBandwidth();
void setAfBandwidth(float af_bandwidth);
float getVolume();
void setVolume(float volume);
float getSquelch();
void setSquelch(float squelch);
qint32 getAudioStereo();
void setAudioStereo(qint32 audio_stereo);
qint32 getLsbStereo();
void setLsbStereo(qint32 lsb_stereo);
qint32 getShowPilot();
void setShowPilot(qint32 show_pilot);
qint32 getRdsActive();
void setRdsActive(qint32 rds_active);
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 af_bandwidth;
bool m_af_bandwidth_isSet;
float volume;
bool m_volume_isSet;
float squelch;
bool m_squelch_isSet;
qint32 audio_stereo;
bool m_audio_stereo_isSet;
qint32 lsb_stereo;
bool m_lsb_stereo_isSet;
qint32 show_pilot;
bool m_show_pilot_isSet;
qint32 rds_active;
bool m_rds_active_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 /* SWGBFMDemodSettings_H_ */

Wyświetl plik

@ -38,6 +38,8 @@ SWGChannelReport::SWGChannelReport() {
m_am_mod_report_isSet = false;
atv_mod_report = nullptr;
m_atv_mod_report_isSet = false;
bfm_demod_report = nullptr;
m_bfm_demod_report_isSet = false;
nfm_demod_report = nullptr;
m_nfm_demod_report_isSet = false;
nfm_mod_report = nullptr;
@ -66,6 +68,8 @@ SWGChannelReport::init() {
m_am_mod_report_isSet = false;
atv_mod_report = new SWGATVModReport();
m_atv_mod_report_isSet = false;
bfm_demod_report = new SWGBFMDemodReport();
m_bfm_demod_report_isSet = false;
nfm_demod_report = new SWGNFMDemodReport();
m_nfm_demod_report_isSet = false;
nfm_mod_report = new SWGNFMModReport();
@ -93,6 +97,9 @@ SWGChannelReport::cleanup() {
if(atv_mod_report != nullptr) {
delete atv_mod_report;
}
if(bfm_demod_report != nullptr) {
delete bfm_demod_report;
}
if(nfm_demod_report != nullptr) {
delete nfm_demod_report;
}
@ -131,6 +138,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&atv_mod_report, pJson["ATVModReport"], "SWGATVModReport", "SWGATVModReport");
::SWGSDRangel::setValue(&bfm_demod_report, pJson["BFMDemodReport"], "SWGBFMDemodReport", "SWGBFMDemodReport");
::SWGSDRangel::setValue(&nfm_demod_report, pJson["NFMDemodReport"], "SWGNFMDemodReport", "SWGNFMDemodReport");
::SWGSDRangel::setValue(&nfm_mod_report, pJson["NFMModReport"], "SWGNFMModReport", "SWGNFMModReport");
@ -172,6 +181,9 @@ SWGChannelReport::asJsonObject() {
if((atv_mod_report != nullptr) && (atv_mod_report->isSet())){
toJsonValue(QString("ATVModReport"), atv_mod_report, obj, QString("SWGATVModReport"));
}
if((bfm_demod_report != nullptr) && (bfm_demod_report->isSet())){
toJsonValue(QString("BFMDemodReport"), bfm_demod_report, obj, QString("SWGBFMDemodReport"));
}
if((nfm_demod_report != nullptr) && (nfm_demod_report->isSet())){
toJsonValue(QString("NFMDemodReport"), nfm_demod_report, obj, QString("SWGNFMDemodReport"));
}
@ -241,6 +253,16 @@ SWGChannelReport::setAtvModReport(SWGATVModReport* atv_mod_report) {
this->m_atv_mod_report_isSet = true;
}
SWGBFMDemodReport*
SWGChannelReport::getBfmDemodReport() {
return bfm_demod_report;
}
void
SWGChannelReport::setBfmDemodReport(SWGBFMDemodReport* bfm_demod_report) {
this->bfm_demod_report = bfm_demod_report;
this->m_bfm_demod_report_isSet = true;
}
SWGNFMDemodReport*
SWGChannelReport::getNfmDemodReport() {
return nfm_demod_report;
@ -301,6 +323,7 @@ SWGChannelReport::isSet(){
if(am_demod_report != nullptr && am_demod_report->isSet()){ isObjectUpdated = true; break;}
if(am_mod_report != nullptr && am_mod_report->isSet()){ isObjectUpdated = true; break;}
if(atv_mod_report != nullptr && atv_mod_report->isSet()){ isObjectUpdated = true; break;}
if(bfm_demod_report != nullptr && bfm_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_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;}

Wyświetl plik

@ -25,6 +25,7 @@
#include "SWGAMDemodReport.h"
#include "SWGAMModReport.h"
#include "SWGATVModReport.h"
#include "SWGBFMDemodReport.h"
#include "SWGNFMDemodReport.h"
#include "SWGNFMModReport.h"
#include "SWGSSBModReport.h"
@ -65,6 +66,9 @@ public:
SWGATVModReport* getAtvModReport();
void setAtvModReport(SWGATVModReport* atv_mod_report);
SWGBFMDemodReport* getBfmDemodReport();
void setBfmDemodReport(SWGBFMDemodReport* bfm_demod_report);
SWGNFMDemodReport* getNfmDemodReport();
void setNfmDemodReport(SWGNFMDemodReport* nfm_demod_report);
@ -99,6 +103,9 @@ private:
SWGATVModReport* atv_mod_report;
bool m_atv_mod_report_isSet;
SWGBFMDemodReport* bfm_demod_report;
bool m_bfm_demod_report_isSet;
SWGNFMDemodReport* nfm_demod_report;
bool m_nfm_demod_report_isSet;

Wyświetl plik

@ -38,6 +38,8 @@ SWGChannelSettings::SWGChannelSettings() {
m_am_mod_settings_isSet = false;
atv_mod_settings = nullptr;
m_atv_mod_settings_isSet = false;
bfm_demod_settings = nullptr;
m_bfm_demod_settings_isSet = false;
nfm_demod_settings = nullptr;
m_nfm_demod_settings_isSet = false;
nfm_mod_settings = nullptr;
@ -66,6 +68,8 @@ SWGChannelSettings::init() {
m_am_mod_settings_isSet = false;
atv_mod_settings = new SWGATVModSettings();
m_atv_mod_settings_isSet = false;
bfm_demod_settings = new SWGBFMDemodSettings();
m_bfm_demod_settings_isSet = false;
nfm_demod_settings = new SWGNFMDemodSettings();
m_nfm_demod_settings_isSet = false;
nfm_mod_settings = new SWGNFMModSettings();
@ -93,6 +97,9 @@ SWGChannelSettings::cleanup() {
if(atv_mod_settings != nullptr) {
delete atv_mod_settings;
}
if(bfm_demod_settings != nullptr) {
delete bfm_demod_settings;
}
if(nfm_demod_settings != nullptr) {
delete nfm_demod_settings;
}
@ -131,6 +138,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&atv_mod_settings, pJson["ATVModSettings"], "SWGATVModSettings", "SWGATVModSettings");
::SWGSDRangel::setValue(&bfm_demod_settings, pJson["BFMDemodSettings"], "SWGBFMDemodSettings", "SWGBFMDemodSettings");
::SWGSDRangel::setValue(&nfm_demod_settings, pJson["NFMDemodSettings"], "SWGNFMDemodSettings", "SWGNFMDemodSettings");
::SWGSDRangel::setValue(&nfm_mod_settings, pJson["NFMModSettings"], "SWGNFMModSettings", "SWGNFMModSettings");
@ -172,6 +181,9 @@ SWGChannelSettings::asJsonObject() {
if((atv_mod_settings != nullptr) && (atv_mod_settings->isSet())){
toJsonValue(QString("ATVModSettings"), atv_mod_settings, obj, QString("SWGATVModSettings"));
}
if((bfm_demod_settings != nullptr) && (bfm_demod_settings->isSet())){
toJsonValue(QString("BFMDemodSettings"), bfm_demod_settings, obj, QString("SWGBFMDemodSettings"));
}
if((nfm_demod_settings != nullptr) && (nfm_demod_settings->isSet())){
toJsonValue(QString("NFMDemodSettings"), nfm_demod_settings, obj, QString("SWGNFMDemodSettings"));
}
@ -241,6 +253,16 @@ SWGChannelSettings::setAtvModSettings(SWGATVModSettings* atv_mod_settings) {
this->m_atv_mod_settings_isSet = true;
}
SWGBFMDemodSettings*
SWGChannelSettings::getBfmDemodSettings() {
return bfm_demod_settings;
}
void
SWGChannelSettings::setBfmDemodSettings(SWGBFMDemodSettings* bfm_demod_settings) {
this->bfm_demod_settings = bfm_demod_settings;
this->m_bfm_demod_settings_isSet = true;
}
SWGNFMDemodSettings*
SWGChannelSettings::getNfmDemodSettings() {
return nfm_demod_settings;
@ -301,6 +323,7 @@ SWGChannelSettings::isSet(){
if(am_demod_settings != nullptr && am_demod_settings->isSet()){ isObjectUpdated = true; break;}
if(am_mod_settings != nullptr && am_mod_settings->isSet()){ isObjectUpdated = true; break;}
if(atv_mod_settings != nullptr && atv_mod_settings->isSet()){ isObjectUpdated = true; break;}
if(bfm_demod_settings != nullptr && bfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
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;}

Wyświetl plik

@ -25,6 +25,7 @@
#include "SWGAMDemodSettings.h"
#include "SWGAMModSettings.h"
#include "SWGATVModSettings.h"
#include "SWGBFMDemodSettings.h"
#include "SWGNFMDemodSettings.h"
#include "SWGNFMModSettings.h"
#include "SWGSSBModSettings.h"
@ -65,6 +66,9 @@ public:
SWGATVModSettings* getAtvModSettings();
void setAtvModSettings(SWGATVModSettings* atv_mod_settings);
SWGBFMDemodSettings* getBfmDemodSettings();
void setBfmDemodSettings(SWGBFMDemodSettings* bfm_demod_settings);
SWGNFMDemodSettings* getNfmDemodSettings();
void setNfmDemodSettings(SWGNFMDemodSettings* nfm_demod_settings);
@ -99,6 +103,9 @@ private:
SWGATVModSettings* atv_mod_settings;
bool m_atv_mod_settings_isSet;
SWGBFMDemodSettings* bfm_demod_settings;
bool m_bfm_demod_settings_isSet;
SWGNFMDemodSettings* nfm_demod_settings;
bool m_nfm_demod_settings_isSet;

Wyświetl plik

@ -24,6 +24,8 @@
#include "SWGAudioDevices.h"
#include "SWGAudioInputDevice.h"
#include "SWGAudioOutputDevice.h"
#include "SWGBFMDemodReport.h"
#include "SWGBFMDemodSettings.h"
#include "SWGBladeRFInputSettings.h"
#include "SWGBladeRFOutputSettings.h"
#include "SWGCWKeyerSettings.h"
@ -61,6 +63,8 @@
#include "SWGPresetItem.h"
#include "SWGPresetTransfer.h"
#include "SWGPresets.h"
#include "SWGRDSReport.h"
#include "SWGRDSReport_altFrequencies.h"
#include "SWGRtlSdrSettings.h"
#include "SWGSSBModReport.h"
#include "SWGSSBModSettings.h"
@ -104,6 +108,12 @@ namespace SWGSDRangel {
if(QString("SWGAudioOutputDevice").compare(type) == 0) {
return new SWGAudioOutputDevice();
}
if(QString("SWGBFMDemodReport").compare(type) == 0) {
return new SWGBFMDemodReport();
}
if(QString("SWGBFMDemodSettings").compare(type) == 0) {
return new SWGBFMDemodSettings();
}
if(QString("SWGBladeRFInputSettings").compare(type) == 0) {
return new SWGBladeRFInputSettings();
}
@ -215,6 +225,12 @@ namespace SWGSDRangel {
if(QString("SWGPresets").compare(type) == 0) {
return new SWGPresets();
}
if(QString("SWGRDSReport").compare(type) == 0) {
return new SWGRDSReport();
}
if(QString("SWGRDSReport_altFrequencies").compare(type) == 0) {
return new SWGRDSReport_altFrequencies();
}
if(QString("SWGRtlSdrSettings").compare(type) == 0) {
return new SWGRtlSdrSettings();
}

Wyświetl plik

@ -0,0 +1,106 @@
/**
* 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 "SWGRDSFrequency.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGRDSFrequency::SWGRDSFrequency(QString* json) {
init();
this->fromJson(*json);
}
SWGRDSFrequency::SWGRDSFrequency() {
frequency = 0.0f;
m_frequency_isSet = false;
}
SWGRDSFrequency::~SWGRDSFrequency() {
this->cleanup();
}
void
SWGRDSFrequency::init() {
frequency = 0.0f;
m_frequency_isSet = false;
}
void
SWGRDSFrequency::cleanup() {
}
SWGRDSFrequency*
SWGRDSFrequency::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGRDSFrequency::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&frequency, pJson["frequency"], "float", "");
}
QString
SWGRDSFrequency::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGRDSFrequency::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_frequency_isSet){
obj->insert("frequency", QJsonValue(frequency));
}
return obj;
}
float
SWGRDSFrequency::getFrequency() {
return frequency;
}
void
SWGRDSFrequency::setFrequency(float frequency) {
this->frequency = frequency;
this->m_frequency_isSet = true;
}
bool
SWGRDSFrequency::isSet(){
bool isObjectUpdated = false;
do{
if(m_frequency_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,58 @@
/**
* 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.
*/
/*
* SWGRDSFrequency.h
*
* Frequency information
*/
#ifndef SWGRDSFrequency_H_
#define SWGRDSFrequency_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGRDSFrequency: public SWGObject {
public:
SWGRDSFrequency();
SWGRDSFrequency(QString* json);
virtual ~SWGRDSFrequency();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGRDSFrequency* fromJson(QString &jsonString) override;
float getFrequency();
void setFrequency(float frequency);
virtual bool isSet() override;
private:
float frequency;
bool m_frequency_isSet;
};
}
#endif /* SWGRDSFrequency_H_ */

Wyświetl plik

@ -0,0 +1,380 @@
/**
* 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 "SWGRDSReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGRDSReport::SWGRDSReport(QString* json) {
init();
this->fromJson(*json);
}
SWGRDSReport::SWGRDSReport() {
demod_status = 0;
m_demod_status_isSet = false;
decod_status = 0;
m_decod_status_isSet = false;
rds_demod_accum_db = 0.0f;
m_rds_demod_accum_db_isSet = false;
rds_demod_frequency = 0.0f;
m_rds_demod_frequency_isSet = false;
pid = nullptr;
m_pid_isSet = false;
pi_type = nullptr;
m_pi_type_isSet = false;
pi_coverage = nullptr;
m_pi_coverage_isSet = false;
prog_service_name = nullptr;
m_prog_service_name_isSet = false;
music_speech = nullptr;
m_music_speech_isSet = false;
mono_stereo = nullptr;
m_mono_stereo_isSet = false;
radio_text = nullptr;
m_radio_text_isSet = false;
time = nullptr;
m_time_isSet = false;
alt_frequencies = nullptr;
m_alt_frequencies_isSet = false;
}
SWGRDSReport::~SWGRDSReport() {
this->cleanup();
}
void
SWGRDSReport::init() {
demod_status = 0;
m_demod_status_isSet = false;
decod_status = 0;
m_decod_status_isSet = false;
rds_demod_accum_db = 0.0f;
m_rds_demod_accum_db_isSet = false;
rds_demod_frequency = 0.0f;
m_rds_demod_frequency_isSet = false;
pid = new QString("");
m_pid_isSet = false;
pi_type = new QString("");
m_pi_type_isSet = false;
pi_coverage = new QString("");
m_pi_coverage_isSet = false;
prog_service_name = new QString("");
m_prog_service_name_isSet = false;
music_speech = new QString("");
m_music_speech_isSet = false;
mono_stereo = new QString("");
m_mono_stereo_isSet = false;
radio_text = new QString("");
m_radio_text_isSet = false;
time = new QString("");
m_time_isSet = false;
alt_frequencies = new QList<SWGRDSReport_altFrequencies*>();
m_alt_frequencies_isSet = false;
}
void
SWGRDSReport::cleanup() {
if(pid != nullptr) {
delete pid;
}
if(pi_type != nullptr) {
delete pi_type;
}
if(pi_coverage != nullptr) {
delete pi_coverage;
}
if(prog_service_name != nullptr) {
delete prog_service_name;
}
if(music_speech != nullptr) {
delete music_speech;
}
if(mono_stereo != nullptr) {
delete mono_stereo;
}
if(radio_text != nullptr) {
delete radio_text;
}
if(time != nullptr) {
delete time;
}
if(alt_frequencies != nullptr) {
auto arr = alt_frequencies;
for(auto o: *arr) {
delete o;
}
delete alt_frequencies;
}
}
SWGRDSReport*
SWGRDSReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGRDSReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&demod_status, pJson["demodStatus"], "qint32", "");
::SWGSDRangel::setValue(&decod_status, pJson["decodStatus"], "qint32", "");
::SWGSDRangel::setValue(&rds_demod_accum_db, pJson["rdsDemodAccumDB"], "float", "");
::SWGSDRangel::setValue(&rds_demod_frequency, pJson["rdsDemodFrequency"], "float", "");
::SWGSDRangel::setValue(&pid, pJson["pid"], "QString", "QString");
::SWGSDRangel::setValue(&pi_type, pJson["piType"], "QString", "QString");
::SWGSDRangel::setValue(&pi_coverage, pJson["piCoverage"], "QString", "QString");
::SWGSDRangel::setValue(&prog_service_name, pJson["progServiceName"], "QString", "QString");
::SWGSDRangel::setValue(&music_speech, pJson["musicSpeech"], "QString", "QString");
::SWGSDRangel::setValue(&mono_stereo, pJson["monoStereo"], "QString", "QString");
::SWGSDRangel::setValue(&radio_text, pJson["radioText"], "QString", "QString");
::SWGSDRangel::setValue(&time, pJson["time"], "QString", "QString");
::SWGSDRangel::setValue(&alt_frequencies, pJson["altFrequencies"], "QList", "SWGRDSReport_altFrequencies");
}
QString
SWGRDSReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGRDSReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_demod_status_isSet){
obj->insert("demodStatus", QJsonValue(demod_status));
}
if(m_decod_status_isSet){
obj->insert("decodStatus", QJsonValue(decod_status));
}
if(m_rds_demod_accum_db_isSet){
obj->insert("rdsDemodAccumDB", QJsonValue(rds_demod_accum_db));
}
if(m_rds_demod_frequency_isSet){
obj->insert("rdsDemodFrequency", QJsonValue(rds_demod_frequency));
}
if(pid != nullptr && *pid != QString("")){
toJsonValue(QString("pid"), pid, obj, QString("QString"));
}
if(pi_type != nullptr && *pi_type != QString("")){
toJsonValue(QString("piType"), pi_type, obj, QString("QString"));
}
if(pi_coverage != nullptr && *pi_coverage != QString("")){
toJsonValue(QString("piCoverage"), pi_coverage, obj, QString("QString"));
}
if(prog_service_name != nullptr && *prog_service_name != QString("")){
toJsonValue(QString("progServiceName"), prog_service_name, obj, QString("QString"));
}
if(music_speech != nullptr && *music_speech != QString("")){
toJsonValue(QString("musicSpeech"), music_speech, obj, QString("QString"));
}
if(mono_stereo != nullptr && *mono_stereo != QString("")){
toJsonValue(QString("monoStereo"), mono_stereo, obj, QString("QString"));
}
if(radio_text != nullptr && *radio_text != QString("")){
toJsonValue(QString("radioText"), radio_text, obj, QString("QString"));
}
if(time != nullptr && *time != QString("")){
toJsonValue(QString("time"), time, obj, QString("QString"));
}
if(alt_frequencies->size() > 0){
toJsonArray((QList<void*>*)alt_frequencies, obj, "altFrequencies", "SWGRDSReport_altFrequencies");
}
return obj;
}
qint32
SWGRDSReport::getDemodStatus() {
return demod_status;
}
void
SWGRDSReport::setDemodStatus(qint32 demod_status) {
this->demod_status = demod_status;
this->m_demod_status_isSet = true;
}
qint32
SWGRDSReport::getDecodStatus() {
return decod_status;
}
void
SWGRDSReport::setDecodStatus(qint32 decod_status) {
this->decod_status = decod_status;
this->m_decod_status_isSet = true;
}
float
SWGRDSReport::getRdsDemodAccumDb() {
return rds_demod_accum_db;
}
void
SWGRDSReport::setRdsDemodAccumDb(float rds_demod_accum_db) {
this->rds_demod_accum_db = rds_demod_accum_db;
this->m_rds_demod_accum_db_isSet = true;
}
float
SWGRDSReport::getRdsDemodFrequency() {
return rds_demod_frequency;
}
void
SWGRDSReport::setRdsDemodFrequency(float rds_demod_frequency) {
this->rds_demod_frequency = rds_demod_frequency;
this->m_rds_demod_frequency_isSet = true;
}
QString*
SWGRDSReport::getPid() {
return pid;
}
void
SWGRDSReport::setPid(QString* pid) {
this->pid = pid;
this->m_pid_isSet = true;
}
QString*
SWGRDSReport::getPiType() {
return pi_type;
}
void
SWGRDSReport::setPiType(QString* pi_type) {
this->pi_type = pi_type;
this->m_pi_type_isSet = true;
}
QString*
SWGRDSReport::getPiCoverage() {
return pi_coverage;
}
void
SWGRDSReport::setPiCoverage(QString* pi_coverage) {
this->pi_coverage = pi_coverage;
this->m_pi_coverage_isSet = true;
}
QString*
SWGRDSReport::getProgServiceName() {
return prog_service_name;
}
void
SWGRDSReport::setProgServiceName(QString* prog_service_name) {
this->prog_service_name = prog_service_name;
this->m_prog_service_name_isSet = true;
}
QString*
SWGRDSReport::getMusicSpeech() {
return music_speech;
}
void
SWGRDSReport::setMusicSpeech(QString* music_speech) {
this->music_speech = music_speech;
this->m_music_speech_isSet = true;
}
QString*
SWGRDSReport::getMonoStereo() {
return mono_stereo;
}
void
SWGRDSReport::setMonoStereo(QString* mono_stereo) {
this->mono_stereo = mono_stereo;
this->m_mono_stereo_isSet = true;
}
QString*
SWGRDSReport::getRadioText() {
return radio_text;
}
void
SWGRDSReport::setRadioText(QString* radio_text) {
this->radio_text = radio_text;
this->m_radio_text_isSet = true;
}
QString*
SWGRDSReport::getTime() {
return time;
}
void
SWGRDSReport::setTime(QString* time) {
this->time = time;
this->m_time_isSet = true;
}
QList<SWGRDSReport_altFrequencies*>*
SWGRDSReport::getAltFrequencies() {
return alt_frequencies;
}
void
SWGRDSReport::setAltFrequencies(QList<SWGRDSReport_altFrequencies*>* alt_frequencies) {
this->alt_frequencies = alt_frequencies;
this->m_alt_frequencies_isSet = true;
}
bool
SWGRDSReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_demod_status_isSet){ isObjectUpdated = true; break;}
if(m_decod_status_isSet){ isObjectUpdated = true; break;}
if(m_rds_demod_accum_db_isSet){ isObjectUpdated = true; break;}
if(m_rds_demod_frequency_isSet){ isObjectUpdated = true; break;}
if(pid != nullptr && *pid != QString("")){ isObjectUpdated = true; break;}
if(pi_type != nullptr && *pi_type != QString("")){ isObjectUpdated = true; break;}
if(pi_coverage != nullptr && *pi_coverage != QString("")){ isObjectUpdated = true; break;}
if(prog_service_name != nullptr && *prog_service_name != QString("")){ isObjectUpdated = true; break;}
if(music_speech != nullptr && *music_speech != QString("")){ isObjectUpdated = true; break;}
if(mono_stereo != nullptr && *mono_stereo != QString("")){ isObjectUpdated = true; break;}
if(radio_text != nullptr && *radio_text != QString("")){ isObjectUpdated = true; break;}
if(time != nullptr && *time != QString("")){ isObjectUpdated = true; break;}
if(alt_frequencies->size() > 0){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,133 @@
/**
* 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.
*/
/*
* SWGRDSReport.h
*
* RDS information
*/
#ifndef SWGRDSReport_H_
#define SWGRDSReport_H_
#include <QJsonObject>
#include "SWGRDSReport_altFrequencies.h"
#include <QList>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGRDSReport: public SWGObject {
public:
SWGRDSReport();
SWGRDSReport(QString* json);
virtual ~SWGRDSReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGRDSReport* fromJson(QString &jsonString) override;
qint32 getDemodStatus();
void setDemodStatus(qint32 demod_status);
qint32 getDecodStatus();
void setDecodStatus(qint32 decod_status);
float getRdsDemodAccumDb();
void setRdsDemodAccumDb(float rds_demod_accum_db);
float getRdsDemodFrequency();
void setRdsDemodFrequency(float rds_demod_frequency);
QString* getPid();
void setPid(QString* pid);
QString* getPiType();
void setPiType(QString* pi_type);
QString* getPiCoverage();
void setPiCoverage(QString* pi_coverage);
QString* getProgServiceName();
void setProgServiceName(QString* prog_service_name);
QString* getMusicSpeech();
void setMusicSpeech(QString* music_speech);
QString* getMonoStereo();
void setMonoStereo(QString* mono_stereo);
QString* getRadioText();
void setRadioText(QString* radio_text);
QString* getTime();
void setTime(QString* time);
QList<SWGRDSReport_altFrequencies*>* getAltFrequencies();
void setAltFrequencies(QList<SWGRDSReport_altFrequencies*>* alt_frequencies);
virtual bool isSet() override;
private:
qint32 demod_status;
bool m_demod_status_isSet;
qint32 decod_status;
bool m_decod_status_isSet;
float rds_demod_accum_db;
bool m_rds_demod_accum_db_isSet;
float rds_demod_frequency;
bool m_rds_demod_frequency_isSet;
QString* pid;
bool m_pid_isSet;
QString* pi_type;
bool m_pi_type_isSet;
QString* pi_coverage;
bool m_pi_coverage_isSet;
QString* prog_service_name;
bool m_prog_service_name_isSet;
QString* music_speech;
bool m_music_speech_isSet;
QString* mono_stereo;
bool m_mono_stereo_isSet;
QString* radio_text;
bool m_radio_text_isSet;
QString* time;
bool m_time_isSet;
QList<SWGRDSReport_altFrequencies*>* alt_frequencies;
bool m_alt_frequencies_isSet;
};
}
#endif /* SWGRDSReport_H_ */

Wyświetl plik

@ -0,0 +1,106 @@
/**
* 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 "SWGRDSReport_altFrequencies.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGRDSReport_altFrequencies::SWGRDSReport_altFrequencies(QString* json) {
init();
this->fromJson(*json);
}
SWGRDSReport_altFrequencies::SWGRDSReport_altFrequencies() {
frequency = 0.0f;
m_frequency_isSet = false;
}
SWGRDSReport_altFrequencies::~SWGRDSReport_altFrequencies() {
this->cleanup();
}
void
SWGRDSReport_altFrequencies::init() {
frequency = 0.0f;
m_frequency_isSet = false;
}
void
SWGRDSReport_altFrequencies::cleanup() {
}
SWGRDSReport_altFrequencies*
SWGRDSReport_altFrequencies::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGRDSReport_altFrequencies::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&frequency, pJson["frequency"], "float", "");
}
QString
SWGRDSReport_altFrequencies::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGRDSReport_altFrequencies::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_frequency_isSet){
obj->insert("frequency", QJsonValue(frequency));
}
return obj;
}
float
SWGRDSReport_altFrequencies::getFrequency() {
return frequency;
}
void
SWGRDSReport_altFrequencies::setFrequency(float frequency) {
this->frequency = frequency;
this->m_frequency_isSet = true;
}
bool
SWGRDSReport_altFrequencies::isSet(){
bool isObjectUpdated = false;
do{
if(m_frequency_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

Wyświetl plik

@ -0,0 +1,58 @@
/**
* 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.
*/
/*
* SWGRDSReport_altFrequencies.h
*
*
*/
#ifndef SWGRDSReport_altFrequencies_H_
#define SWGRDSReport_altFrequencies_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGRDSReport_altFrequencies: public SWGObject {
public:
SWGRDSReport_altFrequencies();
SWGRDSReport_altFrequencies(QString* json);
virtual ~SWGRDSReport_altFrequencies();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGRDSReport_altFrequencies* fromJson(QString &jsonString) override;
float getFrequency();
void setFrequency(float frequency);
virtual bool isSet() override;
private:
float frequency;
bool m_frequency_isSet;
};
}
#endif /* SWGRDSReport_altFrequencies_H_ */