1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

FileSink: REST API generated code

This commit is contained in:
f4exb 2020-08-08 23:42:36 +02:00
parent 7a46d6c079
commit 5a22072153
22 changed files with 1494 additions and 39 deletions

View File

@ -22,6 +22,7 @@
<file>webapi/doc/swagger/include/DeviceSettings.yaml</file>
<file>webapi/doc/swagger/include/FCDPro.yaml</file>
<file>webapi/doc/swagger/include/FCDProPlus.yaml</file>
<file>webapi/doc/swagger/include/FileSink.yaml</file>
<file>webapi/doc/swagger/include/FileSource.yaml</file>
<file>webapi/doc/swagger/include/FileInput.yaml</file>
<file>webapi/doc/swagger/include/FreeDVDemod.yaml</file>

View File

@ -2089,6 +2089,9 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "Optional for reverse API. This is the channel index from where the message comes from."
},
"FileSinkActions" : {
"$ref" : "#/definitions/FileSinkActions"
},
"FileSourceActions" : {
"$ref" : "#/definitions/FileSourceActions"
}
@ -2226,6 +2229,9 @@ margin-bottom: 20px;
"DSDDemodReport" : {
"$ref" : "#/definitions/DSDDemodReport"
},
"FileSinkReport" : {
"$ref" : "#/definitions/FileSinkReport"
},
"FileSourceReport" : {
"$ref" : "#/definitions/FileSourceReport"
},
@ -2312,6 +2318,9 @@ margin-bottom: 20px;
"DSDDemodSettings" : {
"$ref" : "#/definitions/DSDDemodSettings"
},
"FileSinkSettings" : {
"$ref" : "#/definitions/FileSinkSettings"
},
"FileSourceSettings" : {
"$ref" : "#/definitions/FileSourceSettings"
},
@ -2620,9 +2629,6 @@ margin-bottom: 20px;
"pllLock" : {
"type" : "integer"
},
"dmrBPKey" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
@ -3319,6 +3325,114 @@ margin-bottom: 20px;
}
},
"description" : "FileInput"
};
defs.FileSinkActions = {
"properties" : {
"record" : {
"type" : "integer",
"description" : "Record action\n * 0 - stop recording\n * 1 - start recording\n"
}
},
"description" : "FileSink"
};
defs.FileSinkReport = {
"properties" : {
"spectrumSquelch" : {
"type" : "integer",
"description" : "Spectrum squelch status * 0 - closed * 1 - open\n"
},
"spectrumMax" : {
"type" : "number",
"format" : "float",
"description" : "Current spectrum max in squared magnitude (power)"
},
"sinkSampleRate" : {
"type" : "integer"
},
"channelSampleRate" : {
"type" : "integer"
},
"recording" : {
"type" : "integer",
"description" : "Recording status * 0 - not recording * 1 - recording\n"
},
"recordTimeMs" : {
"type" : "integer",
"description" : "Total recording time in milliseconds"
},
"recordSize" : {
"type" : "integer",
"format" : "int64",
"description" : "Total recording data size in bytes"
},
"recordCaptures" : {
"type" : "integer",
"description" : "Number of record flles not including current if recording"
}
},
"description" : "FileSink"
};
defs.FileSinkSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string",
"description" : "full path of the reference file"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"log2Decim" : {
"type" : "integer"
},
"spectrumSquelchMode" : {
"type" : "integer",
"description" : "Spectrum squelch system * 0 - deactivated * 1 - activated\n"
},
"spectrumSquelch" : {
"type" : "number",
"format" : "float",
"description" : "Squelch level in power dB"
},
"preRecordTime" : {
"type" : "integer",
"description" : "Number of seconds to record before recording is triggered (manual or squelch)"
},
"squelchPostRecordTime" : {
"type" : "integer",
"description" : "Number of seconds to record after spectrum squelch cloeses"
},
"squelchRecordingEnable" : {
"type" : "integer",
"description" : "Automatic recording triggered by spectrum squalch * 0 - disabled * 1 - enabled\n"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "FileSink"
};
defs.FileSourceActions = {
"properties" : {
@ -33471,7 +33585,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-07-01T19:58:14.874+02:00
Generated 2020-08-08T23:29:13.057+02:00
</div>
</div>
</div>

View File

@ -17,5 +17,7 @@ ChannelActions:
originatorChannelIndex:
description: Optional for reverse API. This is the channel index from where the message comes from.
type: integer
FileSinkActions:
$ref: "/doc/swagger/include/FileSink.yaml#/FileSinkActions"
FileSourceActions:
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceActions"

View File

@ -33,6 +33,8 @@ ChannelSettings:
$ref: "/doc/swagger/include/DATVDemod.yaml#/DATVDemodSettings"
DSDDemodSettings:
$ref: "/doc/swagger/include/DSDDemod.yaml#/DSDDemodSettings"
FileSinkSettings:
$ref: "/doc/swagger/include/FileSink.yaml#/FileSinkSettings"
FileSourceSettings:
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceSettings"
FreeDVDemodSettings:

View File

@ -37,8 +37,6 @@ DSDDemodSettings:
type: integer
pllLock:
type: integer
dmrBPKey:
type: integer
rgbColor:
type: integer
title:

View File

@ -2342,6 +2342,8 @@ definitions:
$ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodReport"
DSDDemodReport:
$ref: "/doc/swagger/include/DSDDemod.yaml#/DSDDemodReport"
FileSinkReport:
$ref: "/doc/swagger/include/FileSink.yaml#/FileSinkReport"
FileSourceReport:
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceReport"
FreeDVDemodReport:

View File

@ -2089,6 +2089,9 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "Optional for reverse API. This is the channel index from where the message comes from."
},
"FileSinkActions" : {
"$ref" : "#/definitions/FileSinkActions"
},
"FileSourceActions" : {
"$ref" : "#/definitions/FileSourceActions"
}
@ -2226,6 +2229,9 @@ margin-bottom: 20px;
"DSDDemodReport" : {
"$ref" : "#/definitions/DSDDemodReport"
},
"FileSinkReport" : {
"$ref" : "#/definitions/FileSinkReport"
},
"FileSourceReport" : {
"$ref" : "#/definitions/FileSourceReport"
},
@ -2312,6 +2318,9 @@ margin-bottom: 20px;
"DSDDemodSettings" : {
"$ref" : "#/definitions/DSDDemodSettings"
},
"FileSinkSettings" : {
"$ref" : "#/definitions/FileSinkSettings"
},
"FileSourceSettings" : {
"$ref" : "#/definitions/FileSourceSettings"
},
@ -2620,9 +2629,6 @@ margin-bottom: 20px;
"pllLock" : {
"type" : "integer"
},
"dmrBPKey" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
@ -3319,6 +3325,114 @@ margin-bottom: 20px;
}
},
"description" : "FileInput"
};
defs.FileSinkActions = {
"properties" : {
"record" : {
"type" : "integer",
"description" : "Record action\n * 0 - stop recording\n * 1 - start recording\n"
}
},
"description" : "FileSink"
};
defs.FileSinkReport = {
"properties" : {
"spectrumSquelch" : {
"type" : "integer",
"description" : "Spectrum squelch status * 0 - closed * 1 - open\n"
},
"spectrumMax" : {
"type" : "number",
"format" : "float",
"description" : "Current spectrum max in squared magnitude (power)"
},
"sinkSampleRate" : {
"type" : "integer"
},
"channelSampleRate" : {
"type" : "integer"
},
"recording" : {
"type" : "integer",
"description" : "Recording status * 0 - not recording * 1 - recording\n"
},
"recordTimeMs" : {
"type" : "integer",
"description" : "Total recording time in milliseconds"
},
"recordSize" : {
"type" : "integer",
"format" : "int64",
"description" : "Total recording data size in bytes"
},
"recordCaptures" : {
"type" : "integer",
"description" : "Number of record flles not including current if recording"
}
},
"description" : "FileSink"
};
defs.FileSinkSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer"
},
"fileRecordName" : {
"type" : "string",
"description" : "full path of the reference file"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"log2Decim" : {
"type" : "integer"
},
"spectrumSquelchMode" : {
"type" : "integer",
"description" : "Spectrum squelch system * 0 - deactivated * 1 - activated\n"
},
"spectrumSquelch" : {
"type" : "number",
"format" : "float",
"description" : "Squelch level in power dB"
},
"preRecordTime" : {
"type" : "integer",
"description" : "Number of seconds to record before recording is triggered (manual or squelch)"
},
"squelchPostRecordTime" : {
"type" : "integer",
"description" : "Number of seconds to record after spectrum squelch cloeses"
},
"squelchRecordingEnable" : {
"type" : "integer",
"description" : "Automatic recording triggered by spectrum squalch * 0 - disabled * 1 - enabled\n"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "FileSink"
};
defs.FileSourceActions = {
"properties" : {
@ -33471,7 +33585,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-07-01T19:58:14.874+02:00
Generated 2020-08-08T23:29:13.057+02:00
</div>
</div>
</div>

View File

@ -36,6 +36,8 @@ SWGChannelActions::SWGChannelActions() {
m_originator_device_set_index_isSet = false;
originator_channel_index = 0;
m_originator_channel_index_isSet = false;
file_sink_actions = nullptr;
m_file_sink_actions_isSet = false;
file_source_actions = nullptr;
m_file_source_actions_isSet = false;
}
@ -54,6 +56,8 @@ SWGChannelActions::init() {
m_originator_device_set_index_isSet = false;
originator_channel_index = 0;
m_originator_channel_index_isSet = false;
file_sink_actions = new SWGFileSinkActions();
m_file_sink_actions_isSet = false;
file_source_actions = new SWGFileSourceActions();
m_file_source_actions_isSet = false;
}
@ -66,6 +70,9 @@ SWGChannelActions::cleanup() {
if(file_sink_actions != nullptr) {
delete file_sink_actions;
}
if(file_source_actions != nullptr) {
delete file_source_actions;
}
@ -90,6 +97,8 @@ SWGChannelActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&originator_channel_index, pJson["originatorChannelIndex"], "qint32", "");
::SWGSDRangel::setValue(&file_sink_actions, pJson["FileSinkActions"], "SWGFileSinkActions", "SWGFileSinkActions");
::SWGSDRangel::setValue(&file_source_actions, pJson["FileSourceActions"], "SWGFileSourceActions", "SWGFileSourceActions");
}
@ -120,6 +129,9 @@ SWGChannelActions::asJsonObject() {
if(m_originator_channel_index_isSet){
obj->insert("originatorChannelIndex", QJsonValue(originator_channel_index));
}
if((file_sink_actions != nullptr) && (file_sink_actions->isSet())){
toJsonValue(QString("FileSinkActions"), file_sink_actions, obj, QString("SWGFileSinkActions"));
}
if((file_source_actions != nullptr) && (file_source_actions->isSet())){
toJsonValue(QString("FileSourceActions"), file_source_actions, obj, QString("SWGFileSourceActions"));
}
@ -167,6 +179,16 @@ SWGChannelActions::setOriginatorChannelIndex(qint32 originator_channel_index) {
this->m_originator_channel_index_isSet = true;
}
SWGFileSinkActions*
SWGChannelActions::getFileSinkActions() {
return file_sink_actions;
}
void
SWGChannelActions::setFileSinkActions(SWGFileSinkActions* file_sink_actions) {
this->file_sink_actions = file_sink_actions;
this->m_file_sink_actions_isSet = true;
}
SWGFileSourceActions*
SWGChannelActions::getFileSourceActions() {
return file_source_actions;
@ -194,6 +216,9 @@ SWGChannelActions::isSet(){
if(m_originator_channel_index_isSet){
isObjectUpdated = true; break;
}
if(file_sink_actions && file_sink_actions->isSet()){
isObjectUpdated = true; break;
}
if(file_source_actions && file_source_actions->isSet()){
isObjectUpdated = true; break;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGFileSinkActions.h"
#include "SWGFileSourceActions.h"
#include <QString>
@ -55,6 +56,9 @@ public:
qint32 getOriginatorChannelIndex();
void setOriginatorChannelIndex(qint32 originator_channel_index);
SWGFileSinkActions* getFileSinkActions();
void setFileSinkActions(SWGFileSinkActions* file_sink_actions);
SWGFileSourceActions* getFileSourceActions();
void setFileSourceActions(SWGFileSourceActions* file_source_actions);
@ -74,6 +78,9 @@ private:
qint32 originator_channel_index;
bool m_originator_channel_index_isSet;
SWGFileSinkActions* file_sink_actions;
bool m_file_sink_actions_isSet;
SWGFileSourceActions* file_source_actions;
bool m_file_source_actions_isSet;

View File

@ -42,6 +42,8 @@ SWGChannelReport::SWGChannelReport() {
m_bfm_demod_report_isSet = false;
dsd_demod_report = nullptr;
m_dsd_demod_report_isSet = false;
file_sink_report = nullptr;
m_file_sink_report_isSet = false;
file_source_report = nullptr;
m_file_source_report_isSet = false;
free_dv_demod_report = nullptr;
@ -90,6 +92,8 @@ SWGChannelReport::init() {
m_bfm_demod_report_isSet = false;
dsd_demod_report = new SWGDSDDemodReport();
m_dsd_demod_report_isSet = false;
file_sink_report = new SWGFileSinkReport();
m_file_sink_report_isSet = false;
file_source_report = new SWGFileSourceReport();
m_file_source_report_isSet = false;
free_dv_demod_report = new SWGFreeDVDemodReport();
@ -139,6 +143,9 @@ SWGChannelReport::cleanup() {
if(dsd_demod_report != nullptr) {
delete dsd_demod_report;
}
if(file_sink_report != nullptr) {
delete file_sink_report;
}
if(file_source_report != nullptr) {
delete file_source_report;
}
@ -205,6 +212,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&dsd_demod_report, pJson["DSDDemodReport"], "SWGDSDDemodReport", "SWGDSDDemodReport");
::SWGSDRangel::setValue(&file_sink_report, pJson["FileSinkReport"], "SWGFileSinkReport", "SWGFileSinkReport");
::SWGSDRangel::setValue(&file_source_report, pJson["FileSourceReport"], "SWGFileSourceReport", "SWGFileSourceReport");
::SWGSDRangel::setValue(&free_dv_demod_report, pJson["FreeDVDemodReport"], "SWGFreeDVDemodReport", "SWGFreeDVDemodReport");
@ -268,6 +277,9 @@ SWGChannelReport::asJsonObject() {
if((dsd_demod_report != nullptr) && (dsd_demod_report->isSet())){
toJsonValue(QString("DSDDemodReport"), dsd_demod_report, obj, QString("SWGDSDDemodReport"));
}
if((file_sink_report != nullptr) && (file_sink_report->isSet())){
toJsonValue(QString("FileSinkReport"), file_sink_report, obj, QString("SWGFileSinkReport"));
}
if((file_source_report != nullptr) && (file_source_report->isSet())){
toJsonValue(QString("FileSourceReport"), file_source_report, obj, QString("SWGFileSourceReport"));
}
@ -381,6 +393,16 @@ SWGChannelReport::setDsdDemodReport(SWGDSDDemodReport* dsd_demod_report) {
this->m_dsd_demod_report_isSet = true;
}
SWGFileSinkReport*
SWGChannelReport::getFileSinkReport() {
return file_sink_report;
}
void
SWGChannelReport::setFileSinkReport(SWGFileSinkReport* file_sink_report) {
this->file_sink_report = file_sink_report;
this->m_file_sink_report_isSet = true;
}
SWGFileSourceReport*
SWGChannelReport::getFileSourceReport() {
return file_source_report;
@ -537,6 +559,9 @@ SWGChannelReport::isSet(){
if(dsd_demod_report && dsd_demod_report->isSet()){
isObjectUpdated = true; break;
}
if(file_sink_report && file_sink_report->isSet()){
isObjectUpdated = true; break;
}
if(file_source_report && file_source_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -27,6 +27,7 @@
#include "SWGATVModReport.h"
#include "SWGBFMDemodReport.h"
#include "SWGDSDDemodReport.h"
#include "SWGFileSinkReport.h"
#include "SWGFileSourceReport.h"
#include "SWGFreeDVDemodReport.h"
#include "SWGFreeDVModReport.h"
@ -81,6 +82,9 @@ public:
SWGDSDDemodReport* getDsdDemodReport();
void setDsdDemodReport(SWGDSDDemodReport* dsd_demod_report);
SWGFileSinkReport* getFileSinkReport();
void setFileSinkReport(SWGFileSinkReport* file_sink_report);
SWGFileSourceReport* getFileSourceReport();
void setFileSourceReport(SWGFileSourceReport* file_source_report);
@ -145,6 +149,9 @@ private:
SWGDSDDemodReport* dsd_demod_report;
bool m_dsd_demod_report_isSet;
SWGFileSinkReport* file_sink_report;
bool m_file_sink_report_isSet;
SWGFileSourceReport* file_source_report;
bool m_file_source_report_isSet;

View File

@ -52,6 +52,8 @@ SWGChannelSettings::SWGChannelSettings() {
m_datv_demod_settings_isSet = false;
dsd_demod_settings = nullptr;
m_dsd_demod_settings_isSet = false;
file_sink_settings = nullptr;
m_file_sink_settings_isSet = false;
file_source_settings = nullptr;
m_file_source_settings_isSet = false;
free_dv_demod_settings = nullptr;
@ -116,6 +118,8 @@ SWGChannelSettings::init() {
m_datv_demod_settings_isSet = false;
dsd_demod_settings = new SWGDSDDemodSettings();
m_dsd_demod_settings_isSet = false;
file_sink_settings = new SWGFileSinkSettings();
m_file_sink_settings_isSet = false;
file_source_settings = new SWGFileSourceSettings();
m_file_source_settings_isSet = false;
free_dv_demod_settings = new SWGFreeDVDemodSettings();
@ -182,6 +186,9 @@ SWGChannelSettings::cleanup() {
if(dsd_demod_settings != nullptr) {
delete dsd_demod_settings;
}
if(file_sink_settings != nullptr) {
delete file_sink_settings;
}
if(file_source_settings != nullptr) {
delete file_source_settings;
}
@ -267,6 +274,8 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&dsd_demod_settings, pJson["DSDDemodSettings"], "SWGDSDDemodSettings", "SWGDSDDemodSettings");
::SWGSDRangel::setValue(&file_sink_settings, pJson["FileSinkSettings"], "SWGFileSinkSettings", "SWGFileSinkSettings");
::SWGSDRangel::setValue(&file_source_settings, pJson["FileSourceSettings"], "SWGFileSourceSettings", "SWGFileSourceSettings");
::SWGSDRangel::setValue(&free_dv_demod_settings, pJson["FreeDVDemodSettings"], "SWGFreeDVDemodSettings", "SWGFreeDVDemodSettings");
@ -351,6 +360,9 @@ SWGChannelSettings::asJsonObject() {
if((dsd_demod_settings != nullptr) && (dsd_demod_settings->isSet())){
toJsonValue(QString("DSDDemodSettings"), dsd_demod_settings, obj, QString("SWGDSDDemodSettings"));
}
if((file_sink_settings != nullptr) && (file_sink_settings->isSet())){
toJsonValue(QString("FileSinkSettings"), file_sink_settings, obj, QString("SWGFileSinkSettings"));
}
if((file_source_settings != nullptr) && (file_source_settings->isSet())){
toJsonValue(QString("FileSourceSettings"), file_source_settings, obj, QString("SWGFileSourceSettings"));
}
@ -523,6 +535,16 @@ SWGChannelSettings::setDsdDemodSettings(SWGDSDDemodSettings* dsd_demod_settings)
this->m_dsd_demod_settings_isSet = true;
}
SWGFileSinkSettings*
SWGChannelSettings::getFileSinkSettings() {
return file_sink_settings;
}
void
SWGChannelSettings::setFileSinkSettings(SWGFileSinkSettings* file_sink_settings) {
this->file_sink_settings = file_sink_settings;
this->m_file_sink_settings_isSet = true;
}
SWGFileSourceSettings*
SWGChannelSettings::getFileSourceSettings() {
return file_source_settings;
@ -724,6 +746,9 @@ SWGChannelSettings::isSet(){
if(dsd_demod_settings && dsd_demod_settings->isSet()){
isObjectUpdated = true; break;
}
if(file_sink_settings && file_sink_settings->isSet()){
isObjectUpdated = true; break;
}
if(file_source_settings && file_source_settings->isSet()){
isObjectUpdated = true; break;
}

View File

@ -30,6 +30,7 @@
#include "SWGChannelAnalyzerSettings.h"
#include "SWGDATVDemodSettings.h"
#include "SWGDSDDemodSettings.h"
#include "SWGFileSinkSettings.h"
#include "SWGFileSourceSettings.h"
#include "SWGFreeDVDemodSettings.h"
#include "SWGFreeDVModSettings.h"
@ -102,6 +103,9 @@ public:
SWGDSDDemodSettings* getDsdDemodSettings();
void setDsdDemodSettings(SWGDSDDemodSettings* dsd_demod_settings);
SWGFileSinkSettings* getFileSinkSettings();
void setFileSinkSettings(SWGFileSinkSettings* file_sink_settings);
SWGFileSourceSettings* getFileSourceSettings();
void setFileSourceSettings(SWGFileSourceSettings* file_source_settings);
@ -190,6 +194,9 @@ private:
SWGDSDDemodSettings* dsd_demod_settings;
bool m_dsd_demod_settings_isSet;
SWGFileSinkSettings* file_sink_settings;
bool m_file_sink_settings_isSet;
SWGFileSourceSettings* file_source_settings;
bool m_file_source_settings_isSet;

View File

@ -58,8 +58,6 @@ SWGDSDDemodSettings::SWGDSDDemodSettings() {
m_tdma_stereo_isSet = false;
pll_lock = 0;
m_pll_lock_isSet = false;
dmr_bp_key = 0;
m_dmr_bp_key_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = nullptr;
@ -124,8 +122,6 @@ SWGDSDDemodSettings::init() {
m_tdma_stereo_isSet = false;
pll_lock = 0;
m_pll_lock_isSet = false;
dmr_bp_key = 0;
m_dmr_bp_key_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = new QString("");
@ -172,7 +168,6 @@ SWGDSDDemodSettings::cleanup() {
if(title != nullptr) {
delete title;
}
@ -234,8 +229,6 @@ SWGDSDDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&pll_lock, pJson["pllLock"], "qint32", "");
::SWGSDRangel::setValue(&dmr_bp_key, pJson["dmrBPKey"], "qint32", "");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
@ -323,9 +316,6 @@ SWGDSDDemodSettings::asJsonObject() {
if(m_pll_lock_isSet){
obj->insert("pllLock", QJsonValue(pll_lock));
}
if(m_dmr_bp_key_isSet){
obj->insert("dmrBPKey", QJsonValue(dmr_bp_key));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
@ -519,16 +509,6 @@ SWGDSDDemodSettings::setPllLock(qint32 pll_lock) {
this->m_pll_lock_isSet = true;
}
qint32
SWGDSDDemodSettings::getDmrBpKey() {
return dmr_bp_key;
}
void
SWGDSDDemodSettings::setDmrBpKey(qint32 dmr_bp_key) {
this->dmr_bp_key = dmr_bp_key;
this->m_dmr_bp_key_isSet = true;
}
qint32
SWGDSDDemodSettings::getRgbColor() {
return rgb_color;
@ -709,9 +689,6 @@ SWGDSDDemodSettings::isSet(){
if(m_pll_lock_isSet){
isObjectUpdated = true; break;
}
if(m_dmr_bp_key_isSet){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}

View File

@ -87,9 +87,6 @@ public:
qint32 getPllLock();
void setPllLock(qint32 pll_lock);
qint32 getDmrBpKey();
void setDmrBpKey(qint32 dmr_bp_key);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
@ -178,9 +175,6 @@ private:
qint32 pll_lock;
bool m_pll_lock_isSet;
qint32 dmr_bp_key;
bool m_dmr_bp_key_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;

View File

@ -0,0 +1,108 @@
/**
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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 "SWGFileSinkActions.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFileSinkActions::SWGFileSinkActions(QString* json) {
init();
this->fromJson(*json);
}
SWGFileSinkActions::SWGFileSinkActions() {
record = 0;
m_record_isSet = false;
}
SWGFileSinkActions::~SWGFileSinkActions() {
this->cleanup();
}
void
SWGFileSinkActions::init() {
record = 0;
m_record_isSet = false;
}
void
SWGFileSinkActions::cleanup() {
}
SWGFileSinkActions*
SWGFileSinkActions::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFileSinkActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&record, pJson["record"], "qint32", "");
}
QString
SWGFileSinkActions::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFileSinkActions::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_record_isSet){
obj->insert("record", QJsonValue(record));
}
return obj;
}
qint32
SWGFileSinkActions::getRecord() {
return record;
}
void
SWGFileSinkActions::setRecord(qint32 record) {
this->record = record;
this->m_record_isSet = true;
}
bool
SWGFileSinkActions::isSet(){
bool isObjectUpdated = false;
do{
if(m_record_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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.
*/
/*
* SWGFileSinkActions.h
*
* FileSink
*/
#ifndef SWGFileSinkActions_H_
#define SWGFileSinkActions_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFileSinkActions: public SWGObject {
public:
SWGFileSinkActions();
SWGFileSinkActions(QString* json);
virtual ~SWGFileSinkActions();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFileSinkActions* fromJson(QString &jsonString) override;
qint32 getRecord();
void setRecord(qint32 record);
virtual bool isSet() override;
private:
qint32 record;
bool m_record_isSet;
};
}
#endif /* SWGFileSinkActions_H_ */

View File

@ -0,0 +1,269 @@
/**
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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 "SWGFileSinkReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFileSinkReport::SWGFileSinkReport(QString* json) {
init();
this->fromJson(*json);
}
SWGFileSinkReport::SWGFileSinkReport() {
spectrum_squelch = 0;
m_spectrum_squelch_isSet = false;
spectrum_max = 0.0f;
m_spectrum_max_isSet = false;
sink_sample_rate = 0;
m_sink_sample_rate_isSet = false;
channel_sample_rate = 0;
m_channel_sample_rate_isSet = false;
recording = 0;
m_recording_isSet = false;
record_time_ms = 0;
m_record_time_ms_isSet = false;
record_size = 0L;
m_record_size_isSet = false;
record_captures = 0;
m_record_captures_isSet = false;
}
SWGFileSinkReport::~SWGFileSinkReport() {
this->cleanup();
}
void
SWGFileSinkReport::init() {
spectrum_squelch = 0;
m_spectrum_squelch_isSet = false;
spectrum_max = 0.0f;
m_spectrum_max_isSet = false;
sink_sample_rate = 0;
m_sink_sample_rate_isSet = false;
channel_sample_rate = 0;
m_channel_sample_rate_isSet = false;
recording = 0;
m_recording_isSet = false;
record_time_ms = 0;
m_record_time_ms_isSet = false;
record_size = 0L;
m_record_size_isSet = false;
record_captures = 0;
m_record_captures_isSet = false;
}
void
SWGFileSinkReport::cleanup() {
}
SWGFileSinkReport*
SWGFileSinkReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFileSinkReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&spectrum_squelch, pJson["spectrumSquelch"], "qint32", "");
::SWGSDRangel::setValue(&spectrum_max, pJson["spectrumMax"], "float", "");
::SWGSDRangel::setValue(&sink_sample_rate, pJson["sinkSampleRate"], "qint32", "");
::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
::SWGSDRangel::setValue(&recording, pJson["recording"], "qint32", "");
::SWGSDRangel::setValue(&record_time_ms, pJson["recordTimeMs"], "qint32", "");
::SWGSDRangel::setValue(&record_size, pJson["recordSize"], "qint64", "");
::SWGSDRangel::setValue(&record_captures, pJson["recordCaptures"], "qint32", "");
}
QString
SWGFileSinkReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFileSinkReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_spectrum_squelch_isSet){
obj->insert("spectrumSquelch", QJsonValue(spectrum_squelch));
}
if(m_spectrum_max_isSet){
obj->insert("spectrumMax", QJsonValue(spectrum_max));
}
if(m_sink_sample_rate_isSet){
obj->insert("sinkSampleRate", QJsonValue(sink_sample_rate));
}
if(m_channel_sample_rate_isSet){
obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
}
if(m_recording_isSet){
obj->insert("recording", QJsonValue(recording));
}
if(m_record_time_ms_isSet){
obj->insert("recordTimeMs", QJsonValue(record_time_ms));
}
if(m_record_size_isSet){
obj->insert("recordSize", QJsonValue(record_size));
}
if(m_record_captures_isSet){
obj->insert("recordCaptures", QJsonValue(record_captures));
}
return obj;
}
qint32
SWGFileSinkReport::getSpectrumSquelch() {
return spectrum_squelch;
}
void
SWGFileSinkReport::setSpectrumSquelch(qint32 spectrum_squelch) {
this->spectrum_squelch = spectrum_squelch;
this->m_spectrum_squelch_isSet = true;
}
float
SWGFileSinkReport::getSpectrumMax() {
return spectrum_max;
}
void
SWGFileSinkReport::setSpectrumMax(float spectrum_max) {
this->spectrum_max = spectrum_max;
this->m_spectrum_max_isSet = true;
}
qint32
SWGFileSinkReport::getSinkSampleRate() {
return sink_sample_rate;
}
void
SWGFileSinkReport::setSinkSampleRate(qint32 sink_sample_rate) {
this->sink_sample_rate = sink_sample_rate;
this->m_sink_sample_rate_isSet = true;
}
qint32
SWGFileSinkReport::getChannelSampleRate() {
return channel_sample_rate;
}
void
SWGFileSinkReport::setChannelSampleRate(qint32 channel_sample_rate) {
this->channel_sample_rate = channel_sample_rate;
this->m_channel_sample_rate_isSet = true;
}
qint32
SWGFileSinkReport::getRecording() {
return recording;
}
void
SWGFileSinkReport::setRecording(qint32 recording) {
this->recording = recording;
this->m_recording_isSet = true;
}
qint32
SWGFileSinkReport::getRecordTimeMs() {
return record_time_ms;
}
void
SWGFileSinkReport::setRecordTimeMs(qint32 record_time_ms) {
this->record_time_ms = record_time_ms;
this->m_record_time_ms_isSet = true;
}
qint64
SWGFileSinkReport::getRecordSize() {
return record_size;
}
void
SWGFileSinkReport::setRecordSize(qint64 record_size) {
this->record_size = record_size;
this->m_record_size_isSet = true;
}
qint32
SWGFileSinkReport::getRecordCaptures() {
return record_captures;
}
void
SWGFileSinkReport::setRecordCaptures(qint32 record_captures) {
this->record_captures = record_captures;
this->m_record_captures_isSet = true;
}
bool
SWGFileSinkReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_spectrum_squelch_isSet){
isObjectUpdated = true; break;
}
if(m_spectrum_max_isSet){
isObjectUpdated = true; break;
}
if(m_sink_sample_rate_isSet){
isObjectUpdated = true; break;
}
if(m_channel_sample_rate_isSet){
isObjectUpdated = true; break;
}
if(m_recording_isSet){
isObjectUpdated = true; break;
}
if(m_record_time_ms_isSet){
isObjectUpdated = true; break;
}
if(m_record_size_isSet){
isObjectUpdated = true; break;
}
if(m_record_captures_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,100 @@
/**
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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.
*/
/*
* SWGFileSinkReport.h
*
* FileSink
*/
#ifndef SWGFileSinkReport_H_
#define SWGFileSinkReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFileSinkReport: public SWGObject {
public:
SWGFileSinkReport();
SWGFileSinkReport(QString* json);
virtual ~SWGFileSinkReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFileSinkReport* fromJson(QString &jsonString) override;
qint32 getSpectrumSquelch();
void setSpectrumSquelch(qint32 spectrum_squelch);
float getSpectrumMax();
void setSpectrumMax(float spectrum_max);
qint32 getSinkSampleRate();
void setSinkSampleRate(qint32 sink_sample_rate);
qint32 getChannelSampleRate();
void setChannelSampleRate(qint32 channel_sample_rate);
qint32 getRecording();
void setRecording(qint32 recording);
qint32 getRecordTimeMs();
void setRecordTimeMs(qint32 record_time_ms);
qint64 getRecordSize();
void setRecordSize(qint64 record_size);
qint32 getRecordCaptures();
void setRecordCaptures(qint32 record_captures);
virtual bool isSet() override;
private:
qint32 spectrum_squelch;
bool m_spectrum_squelch_isSet;
float spectrum_max;
bool m_spectrum_max_isSet;
qint32 sink_sample_rate;
bool m_sink_sample_rate_isSet;
qint32 channel_sample_rate;
bool m_channel_sample_rate_isSet;
qint32 recording;
bool m_recording_isSet;
qint32 record_time_ms;
bool m_record_time_ms_isSet;
qint64 record_size;
bool m_record_size_isSet;
qint32 record_captures;
bool m_record_captures_isSet;
};
}
#endif /* SWGFileSinkReport_H_ */

View File

@ -0,0 +1,459 @@
/**
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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 "SWGFileSinkSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGFileSinkSettings::SWGFileSinkSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGFileSinkSettings::SWGFileSinkSettings() {
input_frequency_offset = 0;
m_input_frequency_offset_isSet = false;
file_record_name = nullptr;
m_file_record_name_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = nullptr;
m_title_isSet = false;
log2_decim = 0;
m_log2_decim_isSet = false;
spectrum_squelch_mode = 0;
m_spectrum_squelch_mode_isSet = false;
spectrum_squelch = 0.0f;
m_spectrum_squelch_isSet = false;
pre_record_time = 0;
m_pre_record_time_isSet = false;
squelch_post_record_time = 0;
m_squelch_post_record_time_isSet = false;
squelch_recording_enable = 0;
m_squelch_recording_enable_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
SWGFileSinkSettings::~SWGFileSinkSettings() {
this->cleanup();
}
void
SWGFileSinkSettings::init() {
input_frequency_offset = 0;
m_input_frequency_offset_isSet = false;
file_record_name = new QString("");
m_file_record_name_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
title = new QString("");
m_title_isSet = false;
log2_decim = 0;
m_log2_decim_isSet = false;
spectrum_squelch_mode = 0;
m_spectrum_squelch_mode_isSet = false;
spectrum_squelch = 0.0f;
m_spectrum_squelch_isSet = false;
pre_record_time = 0;
m_pre_record_time_isSet = false;
squelch_post_record_time = 0;
m_squelch_post_record_time_isSet = false;
squelch_recording_enable = 0;
m_squelch_recording_enable_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
void
SWGFileSinkSettings::cleanup() {
if(file_record_name != nullptr) {
delete file_record_name;
}
if(title != nullptr) {
delete title;
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGFileSinkSettings*
SWGFileSinkSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGFileSinkSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint32", "");
::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
::SWGSDRangel::setValue(&spectrum_squelch_mode, pJson["spectrumSquelchMode"], "qint32", "");
::SWGSDRangel::setValue(&spectrum_squelch, pJson["spectrumSquelch"], "float", "");
::SWGSDRangel::setValue(&pre_record_time, pJson["preRecordTime"], "qint32", "");
::SWGSDRangel::setValue(&squelch_post_record_time, pJson["squelchPostRecordTime"], "qint32", "");
::SWGSDRangel::setValue(&squelch_recording_enable, pJson["squelchRecordingEnable"], "qint32", "");
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
}
QString
SWGFileSinkSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGFileSinkSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_input_frequency_offset_isSet){
obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset));
}
if(file_record_name != nullptr && *file_record_name != QString("")){
toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(m_log2_decim_isSet){
obj->insert("log2Decim", QJsonValue(log2_decim));
}
if(m_spectrum_squelch_mode_isSet){
obj->insert("spectrumSquelchMode", QJsonValue(spectrum_squelch_mode));
}
if(m_spectrum_squelch_isSet){
obj->insert("spectrumSquelch", QJsonValue(spectrum_squelch));
}
if(m_pre_record_time_isSet){
obj->insert("preRecordTime", QJsonValue(pre_record_time));
}
if(m_squelch_post_record_time_isSet){
obj->insert("squelchPostRecordTime", QJsonValue(squelch_post_record_time));
}
if(m_squelch_recording_enable_isSet){
obj->insert("squelchRecordingEnable", QJsonValue(squelch_recording_enable));
}
if(m_stream_index_isSet){
obj->insert("streamIndex", QJsonValue(stream_index));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_device_index_isSet){
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
}
if(m_reverse_api_channel_index_isSet){
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
}
return obj;
}
qint32
SWGFileSinkSettings::getInputFrequencyOffset() {
return input_frequency_offset;
}
void
SWGFileSinkSettings::setInputFrequencyOffset(qint32 input_frequency_offset) {
this->input_frequency_offset = input_frequency_offset;
this->m_input_frequency_offset_isSet = true;
}
QString*
SWGFileSinkSettings::getFileRecordName() {
return file_record_name;
}
void
SWGFileSinkSettings::setFileRecordName(QString* file_record_name) {
this->file_record_name = file_record_name;
this->m_file_record_name_isSet = true;
}
qint32
SWGFileSinkSettings::getRgbColor() {
return rgb_color;
}
void
SWGFileSinkSettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
QString*
SWGFileSinkSettings::getTitle() {
return title;
}
void
SWGFileSinkSettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
qint32
SWGFileSinkSettings::getLog2Decim() {
return log2_decim;
}
void
SWGFileSinkSettings::setLog2Decim(qint32 log2_decim) {
this->log2_decim = log2_decim;
this->m_log2_decim_isSet = true;
}
qint32
SWGFileSinkSettings::getSpectrumSquelchMode() {
return spectrum_squelch_mode;
}
void
SWGFileSinkSettings::setSpectrumSquelchMode(qint32 spectrum_squelch_mode) {
this->spectrum_squelch_mode = spectrum_squelch_mode;
this->m_spectrum_squelch_mode_isSet = true;
}
float
SWGFileSinkSettings::getSpectrumSquelch() {
return spectrum_squelch;
}
void
SWGFileSinkSettings::setSpectrumSquelch(float spectrum_squelch) {
this->spectrum_squelch = spectrum_squelch;
this->m_spectrum_squelch_isSet = true;
}
qint32
SWGFileSinkSettings::getPreRecordTime() {
return pre_record_time;
}
void
SWGFileSinkSettings::setPreRecordTime(qint32 pre_record_time) {
this->pre_record_time = pre_record_time;
this->m_pre_record_time_isSet = true;
}
qint32
SWGFileSinkSettings::getSquelchPostRecordTime() {
return squelch_post_record_time;
}
void
SWGFileSinkSettings::setSquelchPostRecordTime(qint32 squelch_post_record_time) {
this->squelch_post_record_time = squelch_post_record_time;
this->m_squelch_post_record_time_isSet = true;
}
qint32
SWGFileSinkSettings::getSquelchRecordingEnable() {
return squelch_recording_enable;
}
void
SWGFileSinkSettings::setSquelchRecordingEnable(qint32 squelch_recording_enable) {
this->squelch_recording_enable = squelch_recording_enable;
this->m_squelch_recording_enable_isSet = true;
}
qint32
SWGFileSinkSettings::getStreamIndex() {
return stream_index;
}
void
SWGFileSinkSettings::setStreamIndex(qint32 stream_index) {
this->stream_index = stream_index;
this->m_stream_index_isSet = true;
}
qint32
SWGFileSinkSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGFileSinkSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGFileSinkSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGFileSinkSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGFileSinkSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGFileSinkSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGFileSinkSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGFileSinkSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
qint32
SWGFileSinkSettings::getReverseApiChannelIndex() {
return reverse_api_channel_index;
}
void
SWGFileSinkSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
this->reverse_api_channel_index = reverse_api_channel_index;
this->m_reverse_api_channel_index_isSet = true;
}
bool
SWGFileSinkSettings::isSet(){
bool isObjectUpdated = false;
do{
if(m_input_frequency_offset_isSet){
isObjectUpdated = true; break;
}
if(file_record_name && *file_record_name != QString("")){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}
if(title && *title != QString("")){
isObjectUpdated = true; break;
}
if(m_log2_decim_isSet){
isObjectUpdated = true; break;
}
if(m_spectrum_squelch_mode_isSet){
isObjectUpdated = true; break;
}
if(m_spectrum_squelch_isSet){
isObjectUpdated = true; break;
}
if(m_pre_record_time_isSet){
isObjectUpdated = true; break;
}
if(m_squelch_post_record_time_isSet){
isObjectUpdated = true; break;
}
if(m_squelch_recording_enable_isSet){
isObjectUpdated = true; break;
}
if(m_stream_index_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_device_index_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_channel_index_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,149 @@
/**
* 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. * 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 and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.14.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.
*/
/*
* SWGFileSinkSettings.h
*
* FileSink
*/
#ifndef SWGFileSinkSettings_H_
#define SWGFileSinkSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGFileSinkSettings: public SWGObject {
public:
SWGFileSinkSettings();
SWGFileSinkSettings(QString* json);
virtual ~SWGFileSinkSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGFileSinkSettings* fromJson(QString &jsonString) override;
qint32 getInputFrequencyOffset();
void setInputFrequencyOffset(qint32 input_frequency_offset);
QString* getFileRecordName();
void setFileRecordName(QString* file_record_name);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
QString* getTitle();
void setTitle(QString* title);
qint32 getLog2Decim();
void setLog2Decim(qint32 log2_decim);
qint32 getSpectrumSquelchMode();
void setSpectrumSquelchMode(qint32 spectrum_squelch_mode);
float getSpectrumSquelch();
void setSpectrumSquelch(float spectrum_squelch);
qint32 getPreRecordTime();
void setPreRecordTime(qint32 pre_record_time);
qint32 getSquelchPostRecordTime();
void setSquelchPostRecordTime(qint32 squelch_post_record_time);
qint32 getSquelchRecordingEnable();
void setSquelchRecordingEnable(qint32 squelch_recording_enable);
qint32 getStreamIndex();
void setStreamIndex(qint32 stream_index);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiDeviceIndex();
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
qint32 getReverseApiChannelIndex();
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
virtual bool isSet() override;
private:
qint32 input_frequency_offset;
bool m_input_frequency_offset_isSet;
QString* file_record_name;
bool m_file_record_name_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;
QString* title;
bool m_title_isSet;
qint32 log2_decim;
bool m_log2_decim_isSet;
qint32 spectrum_squelch_mode;
bool m_spectrum_squelch_mode_isSet;
float spectrum_squelch;
bool m_spectrum_squelch_isSet;
qint32 pre_record_time;
bool m_pre_record_time_isSet;
qint32 squelch_post_record_time;
bool m_squelch_post_record_time_isSet;
qint32 squelch_recording_enable;
bool m_squelch_recording_enable_isSet;
qint32 stream_index;
bool m_stream_index_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_device_index;
bool m_reverse_api_device_index_isSet;
qint32 reverse_api_channel_index;
bool m_reverse_api_channel_index_isSet;
};
}
#endif /* SWGFileSinkSettings_H_ */

View File

@ -77,6 +77,9 @@
#include "SWGFCDProSettings.h"
#include "SWGFileInputReport.h"
#include "SWGFileInputSettings.h"
#include "SWGFileSinkActions.h"
#include "SWGFileSinkReport.h"
#include "SWGFileSinkSettings.h"
#include "SWGFileSourceActions.h"
#include "SWGFileSourceReport.h"
#include "SWGFileSourceSettings.h"
@ -383,6 +386,15 @@ namespace SWGSDRangel {
if(QString("SWGFileInputSettings").compare(type) == 0) {
return new SWGFileInputSettings();
}
if(QString("SWGFileSinkActions").compare(type) == 0) {
return new SWGFileSinkActions();
}
if(QString("SWGFileSinkReport").compare(type) == 0) {
return new SWGFileSinkReport();
}
if(QString("SWGFileSinkSettings").compare(type) == 0) {
return new SWGFileSinkSettings();
}
if(QString("SWGFileSourceActions").compare(type) == 0) {
return new SWGFileSourceActions();
}