1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-03-22 12:18:32 -04:00

REST API: added /sdrangel/config GET and its associated classes

This commit is contained in:
f4exb 2019-07-31 18:45:13 +02:00
parent 11d12ab992
commit b300ac8264
36 changed files with 6850 additions and 6 deletions

View File

@ -10,6 +10,7 @@
<file>webapi/doc/swagger/include/BFMDemod.yaml</file>
<file>webapi/doc/swagger/include/BladeRF1.yaml</file>
<file>webapi/doc/swagger/include/BladeRF2.yaml</file>
<file>webapi/doc/swagger/include/Command.yaml</file>
<file>webapi/doc/swagger/include/CWKeyer.yaml</file>
<file>webapi/doc/swagger/include/DSDDemod.yaml</file>
<file>webapi/doc/swagger/include/FCDPro.yaml</file>
@ -19,6 +20,7 @@
<file>webapi/doc/swagger/include/FreeDVDemod.yaml</file>
<file>webapi/doc/swagger/include/FreeDVMod.yaml</file>
<file>webapi/doc/swagger/include/FreqTracker.yaml</file>
<file>webapi/doc/swagger/include/GLSpectrum.yaml</file>
<file>webapi/doc/swagger/include/HackRF.yaml</file>
<file>webapi/doc/swagger/include/LimeSdr.yaml</file>
<file>webapi/doc/swagger/include/KiwiSDR.yaml</file>
@ -28,6 +30,8 @@
<file>webapi/doc/swagger/include/NFMMod.yaml</file>
<file>webapi/doc/swagger/include/Perseus.yaml</file>
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
<file>webapi/doc/swagger/include/Preferences.yaml</file>
<file>webapi/doc/swagger/include/Preset.yaml</file>
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
<file>webapi/doc/swagger/include/LocalSink.yaml</file>
<file>webapi/doc/swagger/include/LocalSource.yaml</file>

View File

@ -1758,6 +1758,22 @@ margin-bottom: 20px;
}
},
"description" : "Channel summarized information"
};
defs.ChannelConfig = {
"properties" : {
"channelIdURI" : {
"type" : "string",
"description" : "Channel type ID in URI form"
},
"channelId" : {
"type" : "string",
"description" : "Channel type ID in short form from object name"
},
"config" : {
"$ref" : "#/definitions/ChannelSettings_2"
}
},
"description" : "Represents a Preset::ChannelConfig object"
};
defs.ChannelListItem = {
"required" : [ "id" ],
@ -1942,6 +1958,92 @@ margin-bottom: 20px;
}
},
"description" : "Base channel settings. Only the channel settings corresponding to the channel specified in the channelType field is or should be present."
};
defs.ChannelSettings_2 = {
"required" : [ "channelType", "direction" ],
"discriminator" : "channelType",
"properties" : {
"channelType" : {
"type" : "string",
"description" : "Channel type code"
},
"direction" : {
"type" : "integer",
"description" : "0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)"
},
"originatorDeviceSetIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the device set index from where the message comes from."
},
"originatorChannelIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the channel index from where the message comes from."
},
"AMDemodSettings" : {
"$ref" : "#/definitions/AMDemodSettings"
},
"AMModSettings" : {
"$ref" : "#/definitions/AMModSettings"
},
"ATVModSettings" : {
"$ref" : "#/definitions/ATVModSettings"
},
"BFMDemodSettings" : {
"$ref" : "#/definitions/BFMDemodSettings"
},
"DSDDemodSettings" : {
"$ref" : "#/definitions/DSDDemodSettings"
},
"FileSourceSettings" : {
"$ref" : "#/definitions/FileSourceSettings"
},
"FreeDVDemodSettings" : {
"$ref" : "#/definitions/FreeDVDemodSettings"
},
"FreeDVModSettings" : {
"$ref" : "#/definitions/FreeDVModSettings"
},
"FreqTrackerSettings" : {
"$ref" : "#/definitions/FreqTrackerSettings"
},
"NFMDemodSettings" : {
"$ref" : "#/definitions/NFMDemodSettings"
},
"NFMModSettings" : {
"$ref" : "#/definitions/NFMModSettings"
},
"LocalSinkSettings" : {
"$ref" : "#/definitions/LocalSinkSettings"
},
"LocalSourceSettings" : {
"$ref" : "#/definitions/LocalSourceSettings"
},
"RemoteSinkSettings" : {
"$ref" : "#/definitions/RemoteSinkSettings"
},
"RemoteSourceSettings" : {
"$ref" : "#/definitions/RemoteSourceSettings"
},
"SSBModSettings" : {
"$ref" : "#/definitions/SSBModSettings"
},
"SSBDemodSettings" : {
"$ref" : "#/definitions/SSBDemodSettings"
},
"UDPSourceSettings" : {
"$ref" : "#/definitions/UDPSourceSettings"
},
"UDPSinkSettings" : {
"$ref" : "#/definitions/UDPSinkSettings"
},
"WFMDemodSettings" : {
"$ref" : "#/definitions/WFMDemodSettings"
},
"WFMModSettings" : {
"$ref" : "#/definitions/WFMModSettings"
}
},
"description" : "Base channel settings. Only the channel settings corresponding to the channel specified in the channelType field is or should be present."
};
defs.ChannelsDetail = {
"required" : [ "channelcount" ],
@ -1959,6 +2061,38 @@ margin-bottom: 20px;
}
},
"description" : "All channels detailed information"
};
defs.Command = {
"properties" : {
"group" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"command" : {
"type" : "string"
},
"argString" : {
"type" : "string"
},
"key" : {
"type" : "integer",
"description" : "Qt::Key"
},
"keyModifiers" : {
"type" : "integer"
},
"associateKey" : {
"type" : "integer",
"description" : "boolean"
},
"release" : {
"type" : "integer",
"description" : "boolean"
}
},
"description" : "Represents a Command object"
};
defs.Complex = {
"properties" : {
@ -2150,6 +2284,23 @@ margin-bottom: 20px;
}
},
"description" : "List of DV serial devices available in the system"
};
defs.DeviceConfig = {
"properties" : {
"deviceId" : {
"type" : "string"
},
"deviceSerial" : {
"type" : "string"
},
"deviceSequence" : {
"type" : "integer"
},
"config" : {
"$ref" : "#/definitions/DeviceSettings_2"
}
},
"description" : "Represents a Preset::DeviceConfig object"
};
defs.DeviceListItem = {
"properties" : {
@ -2415,6 +2566,112 @@ margin-bottom: 20px;
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
};
defs.DeviceSettings_2 = {
"required" : [ "deviceHwType", "direction" ],
"discriminator" : "deviceHwType",
"properties" : {
"deviceHwType" : {
"type" : "string",
"description" : "Device hardware type code"
},
"direction" : {
"type" : "integer",
"description" : "0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)"
},
"originatorIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the device set index from where the message comes from."
},
"airspySettings" : {
"$ref" : "#/definitions/AirspySettings"
},
"airspyHFSettings" : {
"$ref" : "#/definitions/AirspyHFSettings"
},
"bladeRF1InputSettings" : {
"$ref" : "#/definitions/BladeRF1InputSettings"
},
"bladeRF2InputSettings" : {
"$ref" : "#/definitions/BladeRF2InputSettings"
},
"bladeRF1OutputSettings" : {
"$ref" : "#/definitions/BladeRF1OutputSettings"
},
"bladeRF2OutputSettings" : {
"$ref" : "#/definitions/BladeRF2OutputSettings"
},
"fcdProSettings" : {
"$ref" : "#/definitions/FCDProSettings"
},
"fcdProPlusSettings" : {
"$ref" : "#/definitions/FCDProPlusSettings"
},
"fileInputSettings" : {
"$ref" : "#/definitions/FileInputSettings"
},
"hackRFInputSettings" : {
"$ref" : "#/definitions/HackRFInputSettings"
},
"hackRFOutputSettings" : {
"$ref" : "#/definitions/HackRFOutputSettings"
},
"kiwiSDRSettings" : {
"$ref" : "#/definitions/KiwiSDRSettings"
},
"limeSdrInputSettings" : {
"$ref" : "#/definitions/LimeSdrInputSettings"
},
"limeSdrOutputSettings" : {
"$ref" : "#/definitions/LimeSdrOutputSettings"
},
"localInputSettings" : {
"$ref" : "#/definitions/LocalInputSettings"
},
"localOutputSettings" : {
"$ref" : "#/definitions/LocalOutputSettings"
},
"perseusSettings" : {
"$ref" : "#/definitions/PerseusSettings"
},
"plutoSdrInputSettings" : {
"$ref" : "#/definitions/PlutoSdrInputSettings"
},
"plutoSdrOutputSettings" : {
"$ref" : "#/definitions/PlutoSdrOutputSettings"
},
"rtlSdrSettings" : {
"$ref" : "#/definitions/RtlSdrSettings"
},
"remoteOutputSettings" : {
"$ref" : "#/definitions/RemoteOutputSettings"
},
"remoteInputSettings" : {
"$ref" : "#/definitions/RemoteInputSettings"
},
"sdrPlaySettings" : {
"$ref" : "#/definitions/SDRPlaySettings"
},
"soapySDRInputSettings" : {
"$ref" : "#/definitions/SoapySDRInputSettings"
},
"soapySDROutputSettings" : {
"$ref" : "#/definitions/SoapySDROutputSettings"
},
"testSourceSettings" : {
"$ref" : "#/definitions/TestSourceSettings"
},
"testMISettings" : {
"$ref" : "#/definitions/TestMISettings"
},
"xtrxInputSettings" : {
"$ref" : "#/definitions/XtrxInputSettings"
},
"xtrxOutputSettings" : {
"$ref" : "#/definitions/XtrxOutputSettings"
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
};
defs.DeviceState = {
"required" : [ "state" ],
@ -3029,6 +3286,87 @@ margin-bottom: 20px;
}
},
"description" : "An frequency range with 64 bit support for min and max"
};
defs.GLSpectrum = {
"properties" : {
"fftSize" : {
"type" : "integer"
},
"fftOverlap" : {
"type" : "integer"
},
"m_fftWindow" : {
"type" : "integer",
"description" : "See FFTWindow"
},
"refLevel" : {
"type" : "number",
"format" : "float"
},
"powerRange" : {
"type" : "number",
"format" : "float"
},
"displayWaterfall" : {
"type" : "integer",
"description" : "boolean"
},
"invertedWaterfall" : {
"type" : "integer",
"description" : "boolean"
},
"displayMaxHold" : {
"type" : "integer",
"description" : "boolean"
},
"displayHistogram" : {
"type" : "integer",
"description" : "boolean"
},
"decay" : {
"type" : "integer"
},
"displayGrid" : {
"type" : "integer",
"description" : "boolean"
},
"invert" : {
"type" : "integer",
"description" : "boolean"
},
"displayGridIntensity" : {
"type" : "integer"
},
"decayDivisor" : {
"type" : "integer"
},
"histogramStroke" : {
"type" : "integer"
},
"displayCurrent" : {
"type" : "integer",
"description" : "boolean"
},
"displayTraceIntensity" : {
"type" : "integer"
},
"waterfallShare" : {
"type" : "number",
"format" : "float"
},
"averagingMode" : {
"type" : "integer",
"description" : "See GLSpectrumGUI::AveragingMode"
},
"averagingValue" : {
"type" : "integer"
},
"linear" : {
"type" : "integer",
"description" : "boolean"
}
},
"description" : "GLSpectrumGUI settings"
};
defs.Gain = {
"properties" : {
@ -3159,6 +3497,29 @@ margin-bottom: 20px;
}
},
"description" : "Summarized information about channel plugins available in this SDRangel instance"
};
defs.InstanceConfigResponse = {
"properties" : {
"preferences" : {
"$ref" : "#/definitions/Preferences"
},
"workingPreset" : {
"$ref" : "#/definitions/Preset"
},
"presets" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Preset"
}
},
"commands" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Command"
}
}
},
"description" : "Preferences, Presets and Commands of the MainSettings saved by Qt"
};
defs.InstanceDevicesResponse = {
"required" : [ "devicecount" ],
@ -4168,6 +4529,104 @@ margin-bottom: 20px;
}
},
"description" : "PlutoSDR"
};
defs.Preferences = {
"properties" : {
"sourceType" : {
"type" : "string"
},
"sourceDevice" : {
"type" : "string"
},
"audioType" : {
"type" : "string"
},
"audioDevice" : {
"type" : "string"
},
"sourceIndex" : {
"type" : "integer"
},
"latitude" : {
"type" : "number",
"format" : "float"
},
"longitude" : {
"type" : "number",
"format" : "float"
},
"consoleMinLogLevel" : {
"type" : "integer",
"description" : "See QtMsgType"
},
"useLogFile" : {
"type" : "integer",
"description" : "boolean"
},
"logFileName" : {
"type" : "string"
},
"fileMinLogLevel" : {
"type" : "integer",
"description" : "See QtMsgType"
}
},
"description" : "Repreents a Prefernce object"
};
defs.Preset = {
"properties" : {
"sourcePreset" : {
"type" : "integer",
"description" : "boolean"
},
"group" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"centerFrequency" : {
"type" : "integer",
"format" : "int64"
},
"m_spectrumConfig" : {
"$ref" : "#/definitions/GLSpectrum"
},
"dcOffsetCorrection" : {
"type" : "integer",
"description" : "boolean"
},
"iqImbalanceCorrection" : {
"type" : "integer",
"description" : "boolean"
},
"sourceId" : {
"type" : "string"
},
"sourceSerial" : {
"type" : "string"
},
"sourceSequence" : {
"type" : "integer"
},
"channelConfigs" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/ChannelConfig"
}
},
"deviceConfigs" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/DeviceConfig"
}
},
"layout" : {
"type" : "string",
"description" : "screen and dock layout is a QByteArray handled by Qt::QMainWindow translated to base64"
}
},
"description" : "Represents a Preset object"
};
defs.PresetExport = {
"properties" : {
@ -6261,6 +6720,9 @@ margin-bottom: 20px;
<li data-group="Instance" data-name="instanceChannels" class="">
<a href="#api-Instance-instanceChannels">instanceChannels</a>
</li>
<li data-group="Instance" data-name="instanceConfig" class="">
<a href="#api-Instance-instanceConfig">instanceConfig</a>
</li>
<li data-group="Instance" data-name="instanceDelete" class="">
<a href="#api-Instance-instanceDelete">instanceDelete</a>
</li>
@ -20218,6 +20680,341 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-Instance-instanceConfig">
<article id="api-Instance-instanceConfig-0" data-group="User" data-name="instanceConfig" data-version="0">
<div class="pull-left">
<h1>instanceConfig</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Get the Preferences, Presets and Commands of the MainSettings saved by Qt</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/config</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-Instance-instanceConfig-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceConfig-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceConfig-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceConfig-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceConfig-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceConfig-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/config"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.InstanceApi;
import java.io.File;
import java.util.*;
public class InstanceApiExample {
public static void main(String[] args) {
InstanceApi apiInstance = new InstanceApi();
try {
InstanceConfigResponse result = apiInstance.instanceConfig();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceConfig");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.InstanceApi;
public class InstanceApiExample {
public static void main(String[] args) {
InstanceApi apiInstance = new InstanceApi();
try {
InstanceConfigResponse result = apiInstance.instanceConfig();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceConfig");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceConfig-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceConfig-0-objc">
<pre class="prettyprint"><code class="language-cpp">
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceConfigWithCompletionHandler:
^(InstanceConfigResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.InstanceApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceConfig(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceConfig-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceConfig-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceConfigExample
{
public void main()
{
var apiInstance = new InstanceApi();
try
{
InstanceConfigResponse result = apiInstance.instanceConfig();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceConfig: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\InstanceApi();
try {
$result = $api_instance->instanceConfig();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceConfig: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::InstanceApi;
my $api_instance = SWGSDRangel::InstanceApi->new();
eval {
my $result = $api_instance->instanceConfig();
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceConfig: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.InstanceApi()
try:
api_response = api_instance.instance_config()
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceConfig: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 200 - Success </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-200-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-200-schema">
<div id='responses-instanceConfig-200-schema-200' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Success",
"schema" : {
"$ref" : "#/definitions/InstanceConfigResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-200-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-200-schema-200');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-200-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-500-schema">
<div id='responses-instanceConfig-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-501-schema">
<div id='responses-instanceConfig-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceDelete">
<article id="api-Instance-instanceDelete-0" data-group="User" data-name="instanceDelete" data-version="0">
<div class="pull-left">
@ -26364,7 +27161,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-07-30T10:33:29.454+02:00
Generated 2019-07-31T18:41:04.524+02:00
</div>
</div>
</div>

View File

@ -0,0 +1,23 @@
Command:
description: Represents a Command object
properties:
group:
type: string
description:
type: string
command:
type: string
argString:
type: string
key:
description: Qt::Key
type: integer
keyModifiers:
sdescription: Qt::KeyboardModifiers
type: integer
associateKey:
description: boolean
type: integer
release:
description: boolean
type: integer

View File

@ -0,0 +1,58 @@
GLSpectrum:
description: GLSpectrumGUI settings
properties:
fftSize:
type: integer
fftOverlap:
type: integer
m_fftWindow:
description: See FFTWindow
type: integer
refLevel:
type: number
format: float
powerRange:
type: number
format: float
displayWaterfall:
description: boolean
type: integer
invertedWaterfall:
description: boolean
type: integer
displayMaxHold:
description: boolean
type: integer
displayHistogram:
description: boolean
type: integer
decay:
type: integer
displayGrid:
description: boolean
type: integer
invert:
description: boolean
type: integer
displayGridIntensity:
type: integer
decayDivisor:
type: integer
histogramStroke:
type: integer
displayCurrent:
description: boolean
type: integer
displayTraceIntensity:
type: integer
waterfallShare:
type: number
format: float
averagingMode:
description: See GLSpectrumGUI::AveragingMode
type: integer
averagingValue:
type: integer
linear:
description: boolean
type: integer

View File

@ -0,0 +1,30 @@
Preferences:
description: Repreents a Prefernce object
properties:
sourceType:
type: string
sourceDevice:
type: string
audioType:
type: string
audioDevice:
type: string
sourceIndex:
type: integer
latitude:
type: number
format: float
longitude:
type: number
format: float
consoleMinLogLevel:
description: See QtMsgType
type: integer
useLogFile:
description: boolean
type: integer
logFileName:
type: string
fileMinLogLevel:
description: See QtMsgType
type: integer

View File

@ -0,0 +1,62 @@
DeviceConfig:
description: Represents a Preset::DeviceConfig object
properties:
deviceId:
type: string
deviceSerial:
type: string
deviceSequence:
type: integer
config:
$ref: "http://localhost:8081/api/swagger/swagger.yaml#/definitions/DeviceSettings"
ChannelConfig:
description: Represents a Preset::ChannelConfig object
properties:
channelIdURI:
description: Channel type ID in URI form
type: string
channelId:
description: Channel type ID in short form from object name
type: string
config:
$ref: "http://localhost:8081/api/swagger/swagger.yaml#/definitions/ChannelSettings"
Preset:
description: Represents a Preset object
properties:
sourcePreset:
description: boolean
type: integer
group:
type: string
description:
type: string
centerFrequency:
type: integer
format: int64
m_spectrumConfig:
$ref: "/doc/swagger/include/GLSpectrum.yaml#/GLSpectrum"
dcOffsetCorrection:
description: boolean
type: integer
iqImbalanceCorrection:
description: boolean
type: integer
sourceId:
type: string
sourceSerial:
type: string
sourceSequence:
type: integer
channelConfigs:
type: array
items:
$ref: "/doc/swagger/include/Preset.yaml#/ChannelConfig"
deviceConfigs:
type: array
items:
$ref: "/doc/swagger/include/Preset.yaml#/DeviceConfig"
layout:
description: screen and dock layout is a QByteArray handled by Qt::QMainWindow translated to base64
type: string

View File

@ -75,6 +75,24 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/config:
x-swagger-router-controller: instance
get:
description: Get the Preferences, Presets and Commands of the MainSettings saved by Qt
operationId: instanceConfig
tags:
- Instance
responses:
"200":
description: Success
schema:
# a pointer to a definition
$ref: "#/definitions/InstanceConfigResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/devices:
x-swagger-router-controller: instance
get:
@ -1353,6 +1371,22 @@ definitions:
devicesetlist:
$ref: "#/definitions/DeviceSetList"
InstanceConfigResponse:
description: Preferences, Presets and Commands of the MainSettings saved by Qt
properties:
preferences:
$ref: "/doc/swagger/include/Preferences.yaml#/Preferences"
workingPreset:
$ref: "/doc/swagger/include/Preset.yaml#/Preset"
presets:
type: array
items:
$ref: "/doc/swagger/include/Preset.yaml#/Preset"
commands:
type: array
items:
$ref: "/doc/swagger/include/Command.yaml#/Command"
InstanceDevicesResponse:
description: "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
required:

View File

@ -16,10 +16,8 @@ void Preset::resetToDefaults()
m_centerFrequency = 0;
m_spectrumConfig.clear();
m_layout.clear();
m_spectrumConfig.clear();
m_channelConfigs.clear();
m_sourceId.clear();
m_sourceConfig.clear();
m_dcOffsetCorrection = false;
m_iqImbalanceCorrection = false;
m_sourceSequence = 0;

View File

@ -113,11 +113,10 @@ protected:
bool m_dcOffsetCorrection;
bool m_iqImbalanceCorrection;
// sample source and sample source configuration
// sample source and sample source configuration TODO: obsolete?
QString m_sourceId;
QString m_sourceSerial;
int m_sourceSequence;
QByteArray m_sourceConfig;
// channels and configurations
ChannelConfigs m_channelConfigs;

View File

@ -0,0 +1,23 @@
Command:
description: Represents a Command object
properties:
group:
type: string
description:
type: string
command:
type: string
argString:
type: string
key:
description: Qt::Key
type: integer
keyModifiers:
sdescription: Qt::KeyboardModifiers
type: integer
associateKey:
description: boolean
type: integer
release:
description: boolean
type: integer

View File

@ -0,0 +1,58 @@
GLSpectrum:
description: GLSpectrumGUI settings
properties:
fftSize:
type: integer
fftOverlap:
type: integer
m_fftWindow:
description: See FFTWindow
type: integer
refLevel:
type: number
format: float
powerRange:
type: number
format: float
displayWaterfall:
description: boolean
type: integer
invertedWaterfall:
description: boolean
type: integer
displayMaxHold:
description: boolean
type: integer
displayHistogram:
description: boolean
type: integer
decay:
type: integer
displayGrid:
description: boolean
type: integer
invert:
description: boolean
type: integer
displayGridIntensity:
type: integer
decayDivisor:
type: integer
histogramStroke:
type: integer
displayCurrent:
description: boolean
type: integer
displayTraceIntensity:
type: integer
waterfallShare:
type: number
format: float
averagingMode:
description: See GLSpectrumGUI::AveragingMode
type: integer
averagingValue:
type: integer
linear:
description: boolean
type: integer

View File

@ -0,0 +1,30 @@
Preferences:
description: Repreents a Prefernce object
properties:
sourceType:
type: string
sourceDevice:
type: string
audioType:
type: string
audioDevice:
type: string
sourceIndex:
type: integer
latitude:
type: number
format: float
longitude:
type: number
format: float
consoleMinLogLevel:
description: See QtMsgType
type: integer
useLogFile:
description: boolean
type: integer
logFileName:
type: string
fileMinLogLevel:
description: See QtMsgType
type: integer

View File

@ -0,0 +1,62 @@
DeviceConfig:
description: Represents a Preset::DeviceConfig object
properties:
deviceId:
type: string
deviceSerial:
type: string
deviceSequence:
type: integer
config:
$ref: "http://localhost:8081/api/swagger/swagger.yaml#/definitions/DeviceSettings"
ChannelConfig:
description: Represents a Preset::ChannelConfig object
properties:
channelIdURI:
description: Channel type ID in URI form
type: string
channelId:
description: Channel type ID in short form from object name
type: string
config:
$ref: "http://localhost:8081/api/swagger/swagger.yaml#/definitions/ChannelSettings"
Preset:
description: Represents a Preset object
properties:
sourcePreset:
description: boolean
type: integer
group:
type: string
description:
type: string
centerFrequency:
type: integer
format: int64
m_spectrumConfig:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
dcOffsetCorrection:
description: boolean
type: integer
iqImbalanceCorrection:
description: boolean
type: integer
sourceId:
type: string
sourceSerial:
type: string
sourceSequence:
type: integer
channelConfigs:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/Preset.yaml#/ChannelConfig"
deviceConfigs:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/Preset.yaml#/DeviceConfig"
layout:
description: screen and dock layout is a QByteArray handled by Qt::QMainWindow translated to base64
type: string

View File

@ -75,6 +75,24 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/config:
x-swagger-router-controller: instance
get:
description: Get the Preferences, Presets and Commands of the MainSettings saved by Qt
operationId: instanceConfig
tags:
- Instance
responses:
"200":
description: Success
schema:
# a pointer to a definition
$ref: "#/definitions/InstanceConfigResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/devices:
x-swagger-router-controller: instance
get:
@ -1353,6 +1371,22 @@ definitions:
devicesetlist:
$ref: "#/definitions/DeviceSetList"
InstanceConfigResponse:
description: Preferences, Presets and Commands of the MainSettings saved by Qt
properties:
preferences:
$ref: "http://localhost:8081/api/swagger/include/Preferences.yaml#/Preferences"
workingPreset:
$ref: "http://localhost:8081/api/swagger/include/Preset.yaml#/Preset"
presets:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/Preset.yaml#/Preset"
commands:
type: array
items:
$ref: "http://localhost:8081/api/swagger/include/Command.yaml#/Command"
InstanceDevicesResponse:
description: "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
required:

View File

@ -1758,6 +1758,22 @@ margin-bottom: 20px;
}
},
"description" : "Channel summarized information"
};
defs.ChannelConfig = {
"properties" : {
"channelIdURI" : {
"type" : "string",
"description" : "Channel type ID in URI form"
},
"channelId" : {
"type" : "string",
"description" : "Channel type ID in short form from object name"
},
"config" : {
"$ref" : "#/definitions/ChannelSettings_2"
}
},
"description" : "Represents a Preset::ChannelConfig object"
};
defs.ChannelListItem = {
"required" : [ "id" ],
@ -1942,6 +1958,92 @@ margin-bottom: 20px;
}
},
"description" : "Base channel settings. Only the channel settings corresponding to the channel specified in the channelType field is or should be present."
};
defs.ChannelSettings_2 = {
"required" : [ "channelType", "direction" ],
"discriminator" : "channelType",
"properties" : {
"channelType" : {
"type" : "string",
"description" : "Channel type code"
},
"direction" : {
"type" : "integer",
"description" : "0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)"
},
"originatorDeviceSetIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the device set index from where the message comes from."
},
"originatorChannelIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the channel index from where the message comes from."
},
"AMDemodSettings" : {
"$ref" : "#/definitions/AMDemodSettings"
},
"AMModSettings" : {
"$ref" : "#/definitions/AMModSettings"
},
"ATVModSettings" : {
"$ref" : "#/definitions/ATVModSettings"
},
"BFMDemodSettings" : {
"$ref" : "#/definitions/BFMDemodSettings"
},
"DSDDemodSettings" : {
"$ref" : "#/definitions/DSDDemodSettings"
},
"FileSourceSettings" : {
"$ref" : "#/definitions/FileSourceSettings"
},
"FreeDVDemodSettings" : {
"$ref" : "#/definitions/FreeDVDemodSettings"
},
"FreeDVModSettings" : {
"$ref" : "#/definitions/FreeDVModSettings"
},
"FreqTrackerSettings" : {
"$ref" : "#/definitions/FreqTrackerSettings"
},
"NFMDemodSettings" : {
"$ref" : "#/definitions/NFMDemodSettings"
},
"NFMModSettings" : {
"$ref" : "#/definitions/NFMModSettings"
},
"LocalSinkSettings" : {
"$ref" : "#/definitions/LocalSinkSettings"
},
"LocalSourceSettings" : {
"$ref" : "#/definitions/LocalSourceSettings"
},
"RemoteSinkSettings" : {
"$ref" : "#/definitions/RemoteSinkSettings"
},
"RemoteSourceSettings" : {
"$ref" : "#/definitions/RemoteSourceSettings"
},
"SSBModSettings" : {
"$ref" : "#/definitions/SSBModSettings"
},
"SSBDemodSettings" : {
"$ref" : "#/definitions/SSBDemodSettings"
},
"UDPSourceSettings" : {
"$ref" : "#/definitions/UDPSourceSettings"
},
"UDPSinkSettings" : {
"$ref" : "#/definitions/UDPSinkSettings"
},
"WFMDemodSettings" : {
"$ref" : "#/definitions/WFMDemodSettings"
},
"WFMModSettings" : {
"$ref" : "#/definitions/WFMModSettings"
}
},
"description" : "Base channel settings. Only the channel settings corresponding to the channel specified in the channelType field is or should be present."
};
defs.ChannelsDetail = {
"required" : [ "channelcount" ],
@ -1959,6 +2061,38 @@ margin-bottom: 20px;
}
},
"description" : "All channels detailed information"
};
defs.Command = {
"properties" : {
"group" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"command" : {
"type" : "string"
},
"argString" : {
"type" : "string"
},
"key" : {
"type" : "integer",
"description" : "Qt::Key"
},
"keyModifiers" : {
"type" : "integer"
},
"associateKey" : {
"type" : "integer",
"description" : "boolean"
},
"release" : {
"type" : "integer",
"description" : "boolean"
}
},
"description" : "Represents a Command object"
};
defs.Complex = {
"properties" : {
@ -2150,6 +2284,23 @@ margin-bottom: 20px;
}
},
"description" : "List of DV serial devices available in the system"
};
defs.DeviceConfig = {
"properties" : {
"deviceId" : {
"type" : "string"
},
"deviceSerial" : {
"type" : "string"
},
"deviceSequence" : {
"type" : "integer"
},
"config" : {
"$ref" : "#/definitions/DeviceSettings_2"
}
},
"description" : "Represents a Preset::DeviceConfig object"
};
defs.DeviceListItem = {
"properties" : {
@ -2415,6 +2566,112 @@ margin-bottom: 20px;
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
};
defs.DeviceSettings_2 = {
"required" : [ "deviceHwType", "direction" ],
"discriminator" : "deviceHwType",
"properties" : {
"deviceHwType" : {
"type" : "string",
"description" : "Device hardware type code"
},
"direction" : {
"type" : "integer",
"description" : "0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)"
},
"originatorIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the device set index from where the message comes from."
},
"airspySettings" : {
"$ref" : "#/definitions/AirspySettings"
},
"airspyHFSettings" : {
"$ref" : "#/definitions/AirspyHFSettings"
},
"bladeRF1InputSettings" : {
"$ref" : "#/definitions/BladeRF1InputSettings"
},
"bladeRF2InputSettings" : {
"$ref" : "#/definitions/BladeRF2InputSettings"
},
"bladeRF1OutputSettings" : {
"$ref" : "#/definitions/BladeRF1OutputSettings"
},
"bladeRF2OutputSettings" : {
"$ref" : "#/definitions/BladeRF2OutputSettings"
},
"fcdProSettings" : {
"$ref" : "#/definitions/FCDProSettings"
},
"fcdProPlusSettings" : {
"$ref" : "#/definitions/FCDProPlusSettings"
},
"fileInputSettings" : {
"$ref" : "#/definitions/FileInputSettings"
},
"hackRFInputSettings" : {
"$ref" : "#/definitions/HackRFInputSettings"
},
"hackRFOutputSettings" : {
"$ref" : "#/definitions/HackRFOutputSettings"
},
"kiwiSDRSettings" : {
"$ref" : "#/definitions/KiwiSDRSettings"
},
"limeSdrInputSettings" : {
"$ref" : "#/definitions/LimeSdrInputSettings"
},
"limeSdrOutputSettings" : {
"$ref" : "#/definitions/LimeSdrOutputSettings"
},
"localInputSettings" : {
"$ref" : "#/definitions/LocalInputSettings"
},
"localOutputSettings" : {
"$ref" : "#/definitions/LocalOutputSettings"
},
"perseusSettings" : {
"$ref" : "#/definitions/PerseusSettings"
},
"plutoSdrInputSettings" : {
"$ref" : "#/definitions/PlutoSdrInputSettings"
},
"plutoSdrOutputSettings" : {
"$ref" : "#/definitions/PlutoSdrOutputSettings"
},
"rtlSdrSettings" : {
"$ref" : "#/definitions/RtlSdrSettings"
},
"remoteOutputSettings" : {
"$ref" : "#/definitions/RemoteOutputSettings"
},
"remoteInputSettings" : {
"$ref" : "#/definitions/RemoteInputSettings"
},
"sdrPlaySettings" : {
"$ref" : "#/definitions/SDRPlaySettings"
},
"soapySDRInputSettings" : {
"$ref" : "#/definitions/SoapySDRInputSettings"
},
"soapySDROutputSettings" : {
"$ref" : "#/definitions/SoapySDROutputSettings"
},
"testSourceSettings" : {
"$ref" : "#/definitions/TestSourceSettings"
},
"testMISettings" : {
"$ref" : "#/definitions/TestMISettings"
},
"xtrxInputSettings" : {
"$ref" : "#/definitions/XtrxInputSettings"
},
"xtrxOutputSettings" : {
"$ref" : "#/definitions/XtrxOutputSettings"
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
};
defs.DeviceState = {
"required" : [ "state" ],
@ -3029,6 +3286,87 @@ margin-bottom: 20px;
}
},
"description" : "An frequency range with 64 bit support for min and max"
};
defs.GLSpectrum = {
"properties" : {
"fftSize" : {
"type" : "integer"
},
"fftOverlap" : {
"type" : "integer"
},
"m_fftWindow" : {
"type" : "integer",
"description" : "See FFTWindow"
},
"refLevel" : {
"type" : "number",
"format" : "float"
},
"powerRange" : {
"type" : "number",
"format" : "float"
},
"displayWaterfall" : {
"type" : "integer",
"description" : "boolean"
},
"invertedWaterfall" : {
"type" : "integer",
"description" : "boolean"
},
"displayMaxHold" : {
"type" : "integer",
"description" : "boolean"
},
"displayHistogram" : {
"type" : "integer",
"description" : "boolean"
},
"decay" : {
"type" : "integer"
},
"displayGrid" : {
"type" : "integer",
"description" : "boolean"
},
"invert" : {
"type" : "integer",
"description" : "boolean"
},
"displayGridIntensity" : {
"type" : "integer"
},
"decayDivisor" : {
"type" : "integer"
},
"histogramStroke" : {
"type" : "integer"
},
"displayCurrent" : {
"type" : "integer",
"description" : "boolean"
},
"displayTraceIntensity" : {
"type" : "integer"
},
"waterfallShare" : {
"type" : "number",
"format" : "float"
},
"averagingMode" : {
"type" : "integer",
"description" : "See GLSpectrumGUI::AveragingMode"
},
"averagingValue" : {
"type" : "integer"
},
"linear" : {
"type" : "integer",
"description" : "boolean"
}
},
"description" : "GLSpectrumGUI settings"
};
defs.Gain = {
"properties" : {
@ -3159,6 +3497,29 @@ margin-bottom: 20px;
}
},
"description" : "Summarized information about channel plugins available in this SDRangel instance"
};
defs.InstanceConfigResponse = {
"properties" : {
"preferences" : {
"$ref" : "#/definitions/Preferences"
},
"workingPreset" : {
"$ref" : "#/definitions/Preset"
},
"presets" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Preset"
}
},
"commands" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Command"
}
}
},
"description" : "Preferences, Presets and Commands of the MainSettings saved by Qt"
};
defs.InstanceDevicesResponse = {
"required" : [ "devicecount" ],
@ -4168,6 +4529,104 @@ margin-bottom: 20px;
}
},
"description" : "PlutoSDR"
};
defs.Preferences = {
"properties" : {
"sourceType" : {
"type" : "string"
},
"sourceDevice" : {
"type" : "string"
},
"audioType" : {
"type" : "string"
},
"audioDevice" : {
"type" : "string"
},
"sourceIndex" : {
"type" : "integer"
},
"latitude" : {
"type" : "number",
"format" : "float"
},
"longitude" : {
"type" : "number",
"format" : "float"
},
"consoleMinLogLevel" : {
"type" : "integer",
"description" : "See QtMsgType"
},
"useLogFile" : {
"type" : "integer",
"description" : "boolean"
},
"logFileName" : {
"type" : "string"
},
"fileMinLogLevel" : {
"type" : "integer",
"description" : "See QtMsgType"
}
},
"description" : "Repreents a Prefernce object"
};
defs.Preset = {
"properties" : {
"sourcePreset" : {
"type" : "integer",
"description" : "boolean"
},
"group" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"centerFrequency" : {
"type" : "integer",
"format" : "int64"
},
"m_spectrumConfig" : {
"$ref" : "#/definitions/GLSpectrum"
},
"dcOffsetCorrection" : {
"type" : "integer",
"description" : "boolean"
},
"iqImbalanceCorrection" : {
"type" : "integer",
"description" : "boolean"
},
"sourceId" : {
"type" : "string"
},
"sourceSerial" : {
"type" : "string"
},
"sourceSequence" : {
"type" : "integer"
},
"channelConfigs" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/ChannelConfig"
}
},
"deviceConfigs" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/DeviceConfig"
}
},
"layout" : {
"type" : "string",
"description" : "screen and dock layout is a QByteArray handled by Qt::QMainWindow translated to base64"
}
},
"description" : "Represents a Preset object"
};
defs.PresetExport = {
"properties" : {
@ -6261,6 +6720,9 @@ margin-bottom: 20px;
<li data-group="Instance" data-name="instanceChannels" class="">
<a href="#api-Instance-instanceChannels">instanceChannels</a>
</li>
<li data-group="Instance" data-name="instanceConfig" class="">
<a href="#api-Instance-instanceConfig">instanceConfig</a>
</li>
<li data-group="Instance" data-name="instanceDelete" class="">
<a href="#api-Instance-instanceDelete">instanceDelete</a>
</li>
@ -20218,6 +20680,341 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-Instance-instanceConfig">
<article id="api-Instance-instanceConfig-0" data-group="User" data-name="instanceConfig" data-version="0">
<div class="pull-left">
<h1>instanceConfig</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Get the Preferences, Presets and Commands of the MainSettings saved by Qt</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/config</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-Instance-instanceConfig-0-curl">Curl</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-java">Java</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-android">Android</a></li>
<!--<li class=""><a href="#examples-Instance-instanceConfig-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-Instance-instanceConfig-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-Instance-instanceConfig-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-Instance-instanceConfig-0-csharp">C#</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-php">PHP</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-perl">Perl</a></li>
<li class=""><a href="#examples-Instance-instanceConfig-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-Instance-instanceConfig-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/config"</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.InstanceApi;
import java.io.File;
import java.util.*;
public class InstanceApiExample {
public static void main(String[] args) {
InstanceApi apiInstance = new InstanceApi();
try {
InstanceConfigResponse result = apiInstance.instanceConfig();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceConfig");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.InstanceApi;
public class InstanceApiExample {
public static void main(String[] args) {
InstanceApi apiInstance = new InstanceApi();
try {
InstanceConfigResponse result = apiInstance.instanceConfig();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InstanceApi#instanceConfig");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-Instance-instanceConfig-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-Instance-instanceConfig-0-objc">
<pre class="prettyprint"><code class="language-cpp">
InstanceApi *apiInstance = [[InstanceApi alloc] init];
[apiInstance instanceConfigWithCompletionHandler:
^(InstanceConfigResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.InstanceApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceConfig(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-Instance-instanceConfig-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-Instance-instanceConfig-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceConfigExample
{
public void main()
{
var apiInstance = new InstanceApi();
try
{
InstanceConfigResponse result = apiInstance.instanceConfig();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InstanceApi.instanceConfig: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\InstanceApi();
try {
$result = $api_instance->instanceConfig();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InstanceApi->instanceConfig: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::InstanceApi;
my $api_instance = SWGSDRangel::InstanceApi->new();
eval {
my $result = $api_instance->instanceConfig();
print Dumper($result);
};
if ($@) {
warn "Exception when calling InstanceApi->instanceConfig: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-Instance-instanceConfig-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.InstanceApi()
try:
api_response = api_instance.instance_config()
pprint(api_response)
except ApiException as e:
print("Exception when calling InstanceApi->instanceConfig: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 200 - Success </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-200-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-200-schema">
<div id='responses-instanceConfig-200-schema-200' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Success",
"schema" : {
"$ref" : "#/definitions/InstanceConfigResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-200-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-200-schema-200');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-200-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-500-schema">
<div id='responses-instanceConfig-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceConfig-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceConfig-501-schema">
<div id='responses-instanceConfig-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceConfig-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceConfig-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceConfig-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-Instance-instanceDelete">
<article id="api-Instance-instanceDelete-0" data-group="User" data-name="instanceDelete" data-version="0">
<div class="pull-left">
@ -26364,7 +27161,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-07-30T10:33:29.454+02:00
Generated 2019-07-31T18:41:04.524+02:00
</div>
</div>
</div>

View File

@ -0,0 +1,154 @@
/**
* 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.11.3
* 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 "SWGChannelConfig.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGChannelConfig::SWGChannelConfig(QString* json) {
init();
this->fromJson(*json);
}
SWGChannelConfig::SWGChannelConfig() {
channel_id_uri = nullptr;
m_channel_id_uri_isSet = false;
channel_id = nullptr;
m_channel_id_isSet = false;
config = nullptr;
m_config_isSet = false;
}
SWGChannelConfig::~SWGChannelConfig() {
this->cleanup();
}
void
SWGChannelConfig::init() {
channel_id_uri = new QString("");
m_channel_id_uri_isSet = false;
channel_id = new QString("");
m_channel_id_isSet = false;
config = new SWGChannelSettings_2();
m_config_isSet = false;
}
void
SWGChannelConfig::cleanup() {
if(channel_id_uri != nullptr) {
delete channel_id_uri;
}
if(channel_id != nullptr) {
delete channel_id;
}
if(config != nullptr) {
delete config;
}
}
SWGChannelConfig*
SWGChannelConfig::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGChannelConfig::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&channel_id_uri, pJson["channelIdURI"], "QString", "QString");
::SWGSDRangel::setValue(&channel_id, pJson["channelId"], "QString", "QString");
::SWGSDRangel::setValue(&config, pJson["config"], "SWGChannelSettings_2", "SWGChannelSettings_2");
}
QString
SWGChannelConfig::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGChannelConfig::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(channel_id_uri != nullptr && *channel_id_uri != QString("")){
toJsonValue(QString("channelIdURI"), channel_id_uri, obj, QString("QString"));
}
if(channel_id != nullptr && *channel_id != QString("")){
toJsonValue(QString("channelId"), channel_id, obj, QString("QString"));
}
if((config != nullptr) && (config->isSet())){
toJsonValue(QString("config"), config, obj, QString("SWGChannelSettings_2"));
}
return obj;
}
QString*
SWGChannelConfig::getChannelIdUri() {
return channel_id_uri;
}
void
SWGChannelConfig::setChannelIdUri(QString* channel_id_uri) {
this->channel_id_uri = channel_id_uri;
this->m_channel_id_uri_isSet = true;
}
QString*
SWGChannelConfig::getChannelId() {
return channel_id;
}
void
SWGChannelConfig::setChannelId(QString* channel_id) {
this->channel_id = channel_id;
this->m_channel_id_isSet = true;
}
SWGChannelSettings_2*
SWGChannelConfig::getConfig() {
return config;
}
void
SWGChannelConfig::setConfig(SWGChannelSettings_2* config) {
this->config = config;
this->m_config_isSet = true;
}
bool
SWGChannelConfig::isSet(){
bool isObjectUpdated = false;
do{
if(channel_id_uri != nullptr && *channel_id_uri != QString("")){ isObjectUpdated = true; break;}
if(channel_id != nullptr && *channel_id != QString("")){ isObjectUpdated = true; break;}
if(config != nullptr && config->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,72 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGChannelConfig.h
*
* Represents a Preset::ChannelConfig object
*/
#ifndef SWGChannelConfig_H_
#define SWGChannelConfig_H_
#include <QJsonObject>
#include "SWGChannelSettings_2.h"
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGChannelConfig: public SWGObject {
public:
SWGChannelConfig();
SWGChannelConfig(QString* json);
virtual ~SWGChannelConfig();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGChannelConfig* fromJson(QString &jsonString) override;
QString* getChannelIdUri();
void setChannelIdUri(QString* channel_id_uri);
QString* getChannelId();
void setChannelId(QString* channel_id);
SWGChannelSettings_2* getConfig();
void setConfig(SWGChannelSettings_2* config);
virtual bool isSet() override;
private:
QString* channel_id_uri;
bool m_channel_id_uri_isSet;
QString* channel_id;
bool m_channel_id_isSet;
SWGChannelSettings_2* config;
bool m_config_isSet;
};
}
#endif /* SWGChannelConfig_H_ */

View File

@ -0,0 +1,654 @@
/**
* 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.11.3
* 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 "SWGChannelSettings_2.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGChannelSettings_2::SWGChannelSettings_2(QString* json) {
init();
this->fromJson(*json);
}
SWGChannelSettings_2::SWGChannelSettings_2() {
channel_type = nullptr;
m_channel_type_isSet = false;
direction = 0;
m_direction_isSet = false;
originator_device_set_index = 0;
m_originator_device_set_index_isSet = false;
originator_channel_index = 0;
m_originator_channel_index_isSet = false;
am_demod_settings = nullptr;
m_am_demod_settings_isSet = false;
am_mod_settings = nullptr;
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;
dsd_demod_settings = nullptr;
m_dsd_demod_settings_isSet = false;
file_source_settings = nullptr;
m_file_source_settings_isSet = false;
free_dv_demod_settings = nullptr;
m_free_dv_demod_settings_isSet = false;
free_dv_mod_settings = nullptr;
m_free_dv_mod_settings_isSet = false;
freq_tracker_settings = nullptr;
m_freq_tracker_settings_isSet = false;
nfm_demod_settings = nullptr;
m_nfm_demod_settings_isSet = false;
nfm_mod_settings = nullptr;
m_nfm_mod_settings_isSet = false;
local_sink_settings = nullptr;
m_local_sink_settings_isSet = false;
local_source_settings = nullptr;
m_local_source_settings_isSet = false;
remote_sink_settings = nullptr;
m_remote_sink_settings_isSet = false;
remote_source_settings = nullptr;
m_remote_source_settings_isSet = false;
ssb_mod_settings = nullptr;
m_ssb_mod_settings_isSet = false;
ssb_demod_settings = nullptr;
m_ssb_demod_settings_isSet = false;
udp_source_settings = nullptr;
m_udp_source_settings_isSet = false;
udp_sink_settings = nullptr;
m_udp_sink_settings_isSet = false;
wfm_demod_settings = nullptr;
m_wfm_demod_settings_isSet = false;
wfm_mod_settings = nullptr;
m_wfm_mod_settings_isSet = false;
}
SWGChannelSettings_2::~SWGChannelSettings_2() {
this->cleanup();
}
void
SWGChannelSettings_2::init() {
channel_type = new QString("");
m_channel_type_isSet = false;
direction = 0;
m_direction_isSet = false;
originator_device_set_index = 0;
m_originator_device_set_index_isSet = false;
originator_channel_index = 0;
m_originator_channel_index_isSet = false;
am_demod_settings = new SWGAMDemodSettings();
m_am_demod_settings_isSet = false;
am_mod_settings = new SWGAMModSettings();
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;
dsd_demod_settings = new SWGDSDDemodSettings();
m_dsd_demod_settings_isSet = false;
file_source_settings = new SWGFileSourceSettings();
m_file_source_settings_isSet = false;
free_dv_demod_settings = new SWGFreeDVDemodSettings();
m_free_dv_demod_settings_isSet = false;
free_dv_mod_settings = new SWGFreeDVModSettings();
m_free_dv_mod_settings_isSet = false;
freq_tracker_settings = new SWGFreqTrackerSettings();
m_freq_tracker_settings_isSet = false;
nfm_demod_settings = new SWGNFMDemodSettings();
m_nfm_demod_settings_isSet = false;
nfm_mod_settings = new SWGNFMModSettings();
m_nfm_mod_settings_isSet = false;
local_sink_settings = new SWGLocalSinkSettings();
m_local_sink_settings_isSet = false;
local_source_settings = new SWGLocalSourceSettings();
m_local_source_settings_isSet = false;
remote_sink_settings = new SWGRemoteSinkSettings();
m_remote_sink_settings_isSet = false;
remote_source_settings = new SWGRemoteSourceSettings();
m_remote_source_settings_isSet = false;
ssb_mod_settings = new SWGSSBModSettings();
m_ssb_mod_settings_isSet = false;
ssb_demod_settings = new SWGSSBDemodSettings();
m_ssb_demod_settings_isSet = false;
udp_source_settings = new SWGUDPSourceSettings();
m_udp_source_settings_isSet = false;
udp_sink_settings = new SWGUDPSinkSettings();
m_udp_sink_settings_isSet = false;
wfm_demod_settings = new SWGWFMDemodSettings();
m_wfm_demod_settings_isSet = false;
wfm_mod_settings = new SWGWFMModSettings();
m_wfm_mod_settings_isSet = false;
}
void
SWGChannelSettings_2::cleanup() {
if(channel_type != nullptr) {
delete channel_type;
}
if(am_demod_settings != nullptr) {
delete am_demod_settings;
}
if(am_mod_settings != nullptr) {
delete am_mod_settings;
}
if(atv_mod_settings != nullptr) {
delete atv_mod_settings;
}
if(bfm_demod_settings != nullptr) {
delete bfm_demod_settings;
}
if(dsd_demod_settings != nullptr) {
delete dsd_demod_settings;
}
if(file_source_settings != nullptr) {
delete file_source_settings;
}
if(free_dv_demod_settings != nullptr) {
delete free_dv_demod_settings;
}
if(free_dv_mod_settings != nullptr) {
delete free_dv_mod_settings;
}
if(freq_tracker_settings != nullptr) {
delete freq_tracker_settings;
}
if(nfm_demod_settings != nullptr) {
delete nfm_demod_settings;
}
if(nfm_mod_settings != nullptr) {
delete nfm_mod_settings;
}
if(local_sink_settings != nullptr) {
delete local_sink_settings;
}
if(local_source_settings != nullptr) {
delete local_source_settings;
}
if(remote_sink_settings != nullptr) {
delete remote_sink_settings;
}
if(remote_source_settings != nullptr) {
delete remote_source_settings;
}
if(ssb_mod_settings != nullptr) {
delete ssb_mod_settings;
}
if(ssb_demod_settings != nullptr) {
delete ssb_demod_settings;
}
if(udp_source_settings != nullptr) {
delete udp_source_settings;
}
if(udp_sink_settings != nullptr) {
delete udp_sink_settings;
}
if(wfm_demod_settings != nullptr) {
delete wfm_demod_settings;
}
if(wfm_mod_settings != nullptr) {
delete wfm_mod_settings;
}
}
SWGChannelSettings_2*
SWGChannelSettings_2::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGChannelSettings_2::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&channel_type, pJson["channelType"], "QString", "QString");
::SWGSDRangel::setValue(&direction, pJson["direction"], "qint32", "");
::SWGSDRangel::setValue(&originator_device_set_index, pJson["originatorDeviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&originator_channel_index, pJson["originatorChannelIndex"], "qint32", "");
::SWGSDRangel::setValue(&am_demod_settings, pJson["AMDemodSettings"], "SWGAMDemodSettings", "SWGAMDemodSettings");
::SWGSDRangel::setValue(&am_mod_settings, pJson["AMModSettings"], "SWGAMModSettings", "SWGAMModSettings");
::SWGSDRangel::setValue(&atv_mod_settings, pJson["ATVModSettings"], "SWGATVModSettings", "SWGATVModSettings");
::SWGSDRangel::setValue(&bfm_demod_settings, pJson["BFMDemodSettings"], "SWGBFMDemodSettings", "SWGBFMDemodSettings");
::SWGSDRangel::setValue(&dsd_demod_settings, pJson["DSDDemodSettings"], "SWGDSDDemodSettings", "SWGDSDDemodSettings");
::SWGSDRangel::setValue(&file_source_settings, pJson["FileSourceSettings"], "SWGFileSourceSettings", "SWGFileSourceSettings");
::SWGSDRangel::setValue(&free_dv_demod_settings, pJson["FreeDVDemodSettings"], "SWGFreeDVDemodSettings", "SWGFreeDVDemodSettings");
::SWGSDRangel::setValue(&free_dv_mod_settings, pJson["FreeDVModSettings"], "SWGFreeDVModSettings", "SWGFreeDVModSettings");
::SWGSDRangel::setValue(&freq_tracker_settings, pJson["FreqTrackerSettings"], "SWGFreqTrackerSettings", "SWGFreqTrackerSettings");
::SWGSDRangel::setValue(&nfm_demod_settings, pJson["NFMDemodSettings"], "SWGNFMDemodSettings", "SWGNFMDemodSettings");
::SWGSDRangel::setValue(&nfm_mod_settings, pJson["NFMModSettings"], "SWGNFMModSettings", "SWGNFMModSettings");
::SWGSDRangel::setValue(&local_sink_settings, pJson["LocalSinkSettings"], "SWGLocalSinkSettings", "SWGLocalSinkSettings");
::SWGSDRangel::setValue(&local_source_settings, pJson["LocalSourceSettings"], "SWGLocalSourceSettings", "SWGLocalSourceSettings");
::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings");
::SWGSDRangel::setValue(&remote_source_settings, pJson["RemoteSourceSettings"], "SWGRemoteSourceSettings", "SWGRemoteSourceSettings");
::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings");
::SWGSDRangel::setValue(&ssb_demod_settings, pJson["SSBDemodSettings"], "SWGSSBDemodSettings", "SWGSSBDemodSettings");
::SWGSDRangel::setValue(&udp_source_settings, pJson["UDPSourceSettings"], "SWGUDPSourceSettings", "SWGUDPSourceSettings");
::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings");
::SWGSDRangel::setValue(&wfm_demod_settings, pJson["WFMDemodSettings"], "SWGWFMDemodSettings", "SWGWFMDemodSettings");
::SWGSDRangel::setValue(&wfm_mod_settings, pJson["WFMModSettings"], "SWGWFMModSettings", "SWGWFMModSettings");
}
QString
SWGChannelSettings_2::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGChannelSettings_2::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(channel_type != nullptr && *channel_type != QString("")){
toJsonValue(QString("channelType"), channel_type, obj, QString("QString"));
}
if(m_direction_isSet){
obj->insert("direction", QJsonValue(direction));
}
if(m_originator_device_set_index_isSet){
obj->insert("originatorDeviceSetIndex", QJsonValue(originator_device_set_index));
}
if(m_originator_channel_index_isSet){
obj->insert("originatorChannelIndex", QJsonValue(originator_channel_index));
}
if((am_demod_settings != nullptr) && (am_demod_settings->isSet())){
toJsonValue(QString("AMDemodSettings"), am_demod_settings, obj, QString("SWGAMDemodSettings"));
}
if((am_mod_settings != nullptr) && (am_mod_settings->isSet())){
toJsonValue(QString("AMModSettings"), am_mod_settings, obj, QString("SWGAMModSettings"));
}
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((dsd_demod_settings != nullptr) && (dsd_demod_settings->isSet())){
toJsonValue(QString("DSDDemodSettings"), dsd_demod_settings, obj, QString("SWGDSDDemodSettings"));
}
if((file_source_settings != nullptr) && (file_source_settings->isSet())){
toJsonValue(QString("FileSourceSettings"), file_source_settings, obj, QString("SWGFileSourceSettings"));
}
if((free_dv_demod_settings != nullptr) && (free_dv_demod_settings->isSet())){
toJsonValue(QString("FreeDVDemodSettings"), free_dv_demod_settings, obj, QString("SWGFreeDVDemodSettings"));
}
if((free_dv_mod_settings != nullptr) && (free_dv_mod_settings->isSet())){
toJsonValue(QString("FreeDVModSettings"), free_dv_mod_settings, obj, QString("SWGFreeDVModSettings"));
}
if((freq_tracker_settings != nullptr) && (freq_tracker_settings->isSet())){
toJsonValue(QString("FreqTrackerSettings"), freq_tracker_settings, obj, QString("SWGFreqTrackerSettings"));
}
if((nfm_demod_settings != nullptr) && (nfm_demod_settings->isSet())){
toJsonValue(QString("NFMDemodSettings"), nfm_demod_settings, obj, QString("SWGNFMDemodSettings"));
}
if((nfm_mod_settings != nullptr) && (nfm_mod_settings->isSet())){
toJsonValue(QString("NFMModSettings"), nfm_mod_settings, obj, QString("SWGNFMModSettings"));
}
if((local_sink_settings != nullptr) && (local_sink_settings->isSet())){
toJsonValue(QString("LocalSinkSettings"), local_sink_settings, obj, QString("SWGLocalSinkSettings"));
}
if((local_source_settings != nullptr) && (local_source_settings->isSet())){
toJsonValue(QString("LocalSourceSettings"), local_source_settings, obj, QString("SWGLocalSourceSettings"));
}
if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){
toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings"));
}
if((remote_source_settings != nullptr) && (remote_source_settings->isSet())){
toJsonValue(QString("RemoteSourceSettings"), remote_source_settings, obj, QString("SWGRemoteSourceSettings"));
}
if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){
toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings"));
}
if((ssb_demod_settings != nullptr) && (ssb_demod_settings->isSet())){
toJsonValue(QString("SSBDemodSettings"), ssb_demod_settings, obj, QString("SWGSSBDemodSettings"));
}
if((udp_source_settings != nullptr) && (udp_source_settings->isSet())){
toJsonValue(QString("UDPSourceSettings"), udp_source_settings, obj, QString("SWGUDPSourceSettings"));
}
if((udp_sink_settings != nullptr) && (udp_sink_settings->isSet())){
toJsonValue(QString("UDPSinkSettings"), udp_sink_settings, obj, QString("SWGUDPSinkSettings"));
}
if((wfm_demod_settings != nullptr) && (wfm_demod_settings->isSet())){
toJsonValue(QString("WFMDemodSettings"), wfm_demod_settings, obj, QString("SWGWFMDemodSettings"));
}
if((wfm_mod_settings != nullptr) && (wfm_mod_settings->isSet())){
toJsonValue(QString("WFMModSettings"), wfm_mod_settings, obj, QString("SWGWFMModSettings"));
}
return obj;
}
QString*
SWGChannelSettings_2::getChannelType() {
return channel_type;
}
void
SWGChannelSettings_2::setChannelType(QString* channel_type) {
this->channel_type = channel_type;
this->m_channel_type_isSet = true;
}
qint32
SWGChannelSettings_2::getDirection() {
return direction;
}
void
SWGChannelSettings_2::setDirection(qint32 direction) {
this->direction = direction;
this->m_direction_isSet = true;
}
qint32
SWGChannelSettings_2::getOriginatorDeviceSetIndex() {
return originator_device_set_index;
}
void
SWGChannelSettings_2::setOriginatorDeviceSetIndex(qint32 originator_device_set_index) {
this->originator_device_set_index = originator_device_set_index;
this->m_originator_device_set_index_isSet = true;
}
qint32
SWGChannelSettings_2::getOriginatorChannelIndex() {
return originator_channel_index;
}
void
SWGChannelSettings_2::setOriginatorChannelIndex(qint32 originator_channel_index) {
this->originator_channel_index = originator_channel_index;
this->m_originator_channel_index_isSet = true;
}
SWGAMDemodSettings*
SWGChannelSettings_2::getAmDemodSettings() {
return am_demod_settings;
}
void
SWGChannelSettings_2::setAmDemodSettings(SWGAMDemodSettings* am_demod_settings) {
this->am_demod_settings = am_demod_settings;
this->m_am_demod_settings_isSet = true;
}
SWGAMModSettings*
SWGChannelSettings_2::getAmModSettings() {
return am_mod_settings;
}
void
SWGChannelSettings_2::setAmModSettings(SWGAMModSettings* am_mod_settings) {
this->am_mod_settings = am_mod_settings;
this->m_am_mod_settings_isSet = true;
}
SWGATVModSettings*
SWGChannelSettings_2::getAtvModSettings() {
return atv_mod_settings;
}
void
SWGChannelSettings_2::setAtvModSettings(SWGATVModSettings* atv_mod_settings) {
this->atv_mod_settings = atv_mod_settings;
this->m_atv_mod_settings_isSet = true;
}
SWGBFMDemodSettings*
SWGChannelSettings_2::getBfmDemodSettings() {
return bfm_demod_settings;
}
void
SWGChannelSettings_2::setBfmDemodSettings(SWGBFMDemodSettings* bfm_demod_settings) {
this->bfm_demod_settings = bfm_demod_settings;
this->m_bfm_demod_settings_isSet = true;
}
SWGDSDDemodSettings*
SWGChannelSettings_2::getDsdDemodSettings() {
return dsd_demod_settings;
}
void
SWGChannelSettings_2::setDsdDemodSettings(SWGDSDDemodSettings* dsd_demod_settings) {
this->dsd_demod_settings = dsd_demod_settings;
this->m_dsd_demod_settings_isSet = true;
}
SWGFileSourceSettings*
SWGChannelSettings_2::getFileSourceSettings() {
return file_source_settings;
}
void
SWGChannelSettings_2::setFileSourceSettings(SWGFileSourceSettings* file_source_settings) {
this->file_source_settings = file_source_settings;
this->m_file_source_settings_isSet = true;
}
SWGFreeDVDemodSettings*
SWGChannelSettings_2::getFreeDvDemodSettings() {
return free_dv_demod_settings;
}
void
SWGChannelSettings_2::setFreeDvDemodSettings(SWGFreeDVDemodSettings* free_dv_demod_settings) {
this->free_dv_demod_settings = free_dv_demod_settings;
this->m_free_dv_demod_settings_isSet = true;
}
SWGFreeDVModSettings*
SWGChannelSettings_2::getFreeDvModSettings() {
return free_dv_mod_settings;
}
void
SWGChannelSettings_2::setFreeDvModSettings(SWGFreeDVModSettings* free_dv_mod_settings) {
this->free_dv_mod_settings = free_dv_mod_settings;
this->m_free_dv_mod_settings_isSet = true;
}
SWGFreqTrackerSettings*
SWGChannelSettings_2::getFreqTrackerSettings() {
return freq_tracker_settings;
}
void
SWGChannelSettings_2::setFreqTrackerSettings(SWGFreqTrackerSettings* freq_tracker_settings) {
this->freq_tracker_settings = freq_tracker_settings;
this->m_freq_tracker_settings_isSet = true;
}
SWGNFMDemodSettings*
SWGChannelSettings_2::getNfmDemodSettings() {
return nfm_demod_settings;
}
void
SWGChannelSettings_2::setNfmDemodSettings(SWGNFMDemodSettings* nfm_demod_settings) {
this->nfm_demod_settings = nfm_demod_settings;
this->m_nfm_demod_settings_isSet = true;
}
SWGNFMModSettings*
SWGChannelSettings_2::getNfmModSettings() {
return nfm_mod_settings;
}
void
SWGChannelSettings_2::setNfmModSettings(SWGNFMModSettings* nfm_mod_settings) {
this->nfm_mod_settings = nfm_mod_settings;
this->m_nfm_mod_settings_isSet = true;
}
SWGLocalSinkSettings*
SWGChannelSettings_2::getLocalSinkSettings() {
return local_sink_settings;
}
void
SWGChannelSettings_2::setLocalSinkSettings(SWGLocalSinkSettings* local_sink_settings) {
this->local_sink_settings = local_sink_settings;
this->m_local_sink_settings_isSet = true;
}
SWGLocalSourceSettings*
SWGChannelSettings_2::getLocalSourceSettings() {
return local_source_settings;
}
void
SWGChannelSettings_2::setLocalSourceSettings(SWGLocalSourceSettings* local_source_settings) {
this->local_source_settings = local_source_settings;
this->m_local_source_settings_isSet = true;
}
SWGRemoteSinkSettings*
SWGChannelSettings_2::getRemoteSinkSettings() {
return remote_sink_settings;
}
void
SWGChannelSettings_2::setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings) {
this->remote_sink_settings = remote_sink_settings;
this->m_remote_sink_settings_isSet = true;
}
SWGRemoteSourceSettings*
SWGChannelSettings_2::getRemoteSourceSettings() {
return remote_source_settings;
}
void
SWGChannelSettings_2::setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings) {
this->remote_source_settings = remote_source_settings;
this->m_remote_source_settings_isSet = true;
}
SWGSSBModSettings*
SWGChannelSettings_2::getSsbModSettings() {
return ssb_mod_settings;
}
void
SWGChannelSettings_2::setSsbModSettings(SWGSSBModSettings* ssb_mod_settings) {
this->ssb_mod_settings = ssb_mod_settings;
this->m_ssb_mod_settings_isSet = true;
}
SWGSSBDemodSettings*
SWGChannelSettings_2::getSsbDemodSettings() {
return ssb_demod_settings;
}
void
SWGChannelSettings_2::setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings) {
this->ssb_demod_settings = ssb_demod_settings;
this->m_ssb_demod_settings_isSet = true;
}
SWGUDPSourceSettings*
SWGChannelSettings_2::getUdpSourceSettings() {
return udp_source_settings;
}
void
SWGChannelSettings_2::setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings) {
this->udp_source_settings = udp_source_settings;
this->m_udp_source_settings_isSet = true;
}
SWGUDPSinkSettings*
SWGChannelSettings_2::getUdpSinkSettings() {
return udp_sink_settings;
}
void
SWGChannelSettings_2::setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings) {
this->udp_sink_settings = udp_sink_settings;
this->m_udp_sink_settings_isSet = true;
}
SWGWFMDemodSettings*
SWGChannelSettings_2::getWfmDemodSettings() {
return wfm_demod_settings;
}
void
SWGChannelSettings_2::setWfmDemodSettings(SWGWFMDemodSettings* wfm_demod_settings) {
this->wfm_demod_settings = wfm_demod_settings;
this->m_wfm_demod_settings_isSet = true;
}
SWGWFMModSettings*
SWGChannelSettings_2::getWfmModSettings() {
return wfm_mod_settings;
}
void
SWGChannelSettings_2::setWfmModSettings(SWGWFMModSettings* wfm_mod_settings) {
this->wfm_mod_settings = wfm_mod_settings;
this->m_wfm_mod_settings_isSet = true;
}
bool
SWGChannelSettings_2::isSet(){
bool isObjectUpdated = false;
do{
if(channel_type != nullptr && *channel_type != QString("")){ isObjectUpdated = true; break;}
if(m_direction_isSet){ isObjectUpdated = true; break;}
if(m_originator_device_set_index_isSet){ isObjectUpdated = true; break;}
if(m_originator_channel_index_isSet){ isObjectUpdated = true; break;}
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(dsd_demod_settings != nullptr && dsd_demod_settings->isSet()){ isObjectUpdated = true; break;}
if(file_source_settings != nullptr && file_source_settings->isSet()){ isObjectUpdated = true; break;}
if(free_dv_demod_settings != nullptr && free_dv_demod_settings->isSet()){ isObjectUpdated = true; break;}
if(free_dv_mod_settings != nullptr && free_dv_mod_settings->isSet()){ isObjectUpdated = true; break;}
if(freq_tracker_settings != nullptr && freq_tracker_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(local_sink_settings != nullptr && local_sink_settings->isSet()){ isObjectUpdated = true; break;}
if(local_source_settings != nullptr && local_source_settings->isSet()){ isObjectUpdated = true; break;}
if(remote_sink_settings != nullptr && remote_sink_settings->isSet()){ isObjectUpdated = true; break;}
if(remote_source_settings != nullptr && remote_source_settings->isSet()){ isObjectUpdated = true; break;}
if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;}
if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;}
if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;}
if(udp_sink_settings != nullptr && udp_sink_settings->isSet()){ isObjectUpdated = true; break;}
if(wfm_demod_settings != nullptr && wfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
if(wfm_mod_settings != nullptr && wfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,224 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGChannelSettings_2.h
*
* Base channel settings. Only the channel settings corresponding to the channel specified in the channelType field is or should be present.
*/
#ifndef SWGChannelSettings_2_H_
#define SWGChannelSettings_2_H_
#include <QJsonObject>
#include "SWGAMDemodSettings.h"
#include "SWGAMModSettings.h"
#include "SWGATVModSettings.h"
#include "SWGBFMDemodSettings.h"
#include "SWGDSDDemodSettings.h"
#include "SWGFileSourceSettings.h"
#include "SWGFreeDVDemodSettings.h"
#include "SWGFreeDVModSettings.h"
#include "SWGFreqTrackerSettings.h"
#include "SWGLocalSinkSettings.h"
#include "SWGLocalSourceSettings.h"
#include "SWGNFMDemodSettings.h"
#include "SWGNFMModSettings.h"
#include "SWGRemoteSinkSettings.h"
#include "SWGRemoteSourceSettings.h"
#include "SWGSSBDemodSettings.h"
#include "SWGSSBModSettings.h"
#include "SWGUDPSinkSettings.h"
#include "SWGUDPSourceSettings.h"
#include "SWGWFMDemodSettings.h"
#include "SWGWFMModSettings.h"
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGChannelSettings_2: public SWGObject {
public:
SWGChannelSettings_2();
SWGChannelSettings_2(QString* json);
virtual ~SWGChannelSettings_2();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGChannelSettings_2* fromJson(QString &jsonString) override;
QString* getChannelType();
void setChannelType(QString* channel_type);
qint32 getDirection();
void setDirection(qint32 direction);
qint32 getOriginatorDeviceSetIndex();
void setOriginatorDeviceSetIndex(qint32 originator_device_set_index);
qint32 getOriginatorChannelIndex();
void setOriginatorChannelIndex(qint32 originator_channel_index);
SWGAMDemodSettings* getAmDemodSettings();
void setAmDemodSettings(SWGAMDemodSettings* am_demod_settings);
SWGAMModSettings* getAmModSettings();
void setAmModSettings(SWGAMModSettings* am_mod_settings);
SWGATVModSettings* getAtvModSettings();
void setAtvModSettings(SWGATVModSettings* atv_mod_settings);
SWGBFMDemodSettings* getBfmDemodSettings();
void setBfmDemodSettings(SWGBFMDemodSettings* bfm_demod_settings);
SWGDSDDemodSettings* getDsdDemodSettings();
void setDsdDemodSettings(SWGDSDDemodSettings* dsd_demod_settings);
SWGFileSourceSettings* getFileSourceSettings();
void setFileSourceSettings(SWGFileSourceSettings* file_source_settings);
SWGFreeDVDemodSettings* getFreeDvDemodSettings();
void setFreeDvDemodSettings(SWGFreeDVDemodSettings* free_dv_demod_settings);
SWGFreeDVModSettings* getFreeDvModSettings();
void setFreeDvModSettings(SWGFreeDVModSettings* free_dv_mod_settings);
SWGFreqTrackerSettings* getFreqTrackerSettings();
void setFreqTrackerSettings(SWGFreqTrackerSettings* freq_tracker_settings);
SWGNFMDemodSettings* getNfmDemodSettings();
void setNfmDemodSettings(SWGNFMDemodSettings* nfm_demod_settings);
SWGNFMModSettings* getNfmModSettings();
void setNfmModSettings(SWGNFMModSettings* nfm_mod_settings);
SWGLocalSinkSettings* getLocalSinkSettings();
void setLocalSinkSettings(SWGLocalSinkSettings* local_sink_settings);
SWGLocalSourceSettings* getLocalSourceSettings();
void setLocalSourceSettings(SWGLocalSourceSettings* local_source_settings);
SWGRemoteSinkSettings* getRemoteSinkSettings();
void setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings);
SWGRemoteSourceSettings* getRemoteSourceSettings();
void setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings);
SWGSSBModSettings* getSsbModSettings();
void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings);
SWGSSBDemodSettings* getSsbDemodSettings();
void setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings);
SWGUDPSourceSettings* getUdpSourceSettings();
void setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings);
SWGUDPSinkSettings* getUdpSinkSettings();
void setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings);
SWGWFMDemodSettings* getWfmDemodSettings();
void setWfmDemodSettings(SWGWFMDemodSettings* wfm_demod_settings);
SWGWFMModSettings* getWfmModSettings();
void setWfmModSettings(SWGWFMModSettings* wfm_mod_settings);
virtual bool isSet() override;
private:
QString* channel_type;
bool m_channel_type_isSet;
qint32 direction;
bool m_direction_isSet;
qint32 originator_device_set_index;
bool m_originator_device_set_index_isSet;
qint32 originator_channel_index;
bool m_originator_channel_index_isSet;
SWGAMDemodSettings* am_demod_settings;
bool m_am_demod_settings_isSet;
SWGAMModSettings* am_mod_settings;
bool m_am_mod_settings_isSet;
SWGATVModSettings* atv_mod_settings;
bool m_atv_mod_settings_isSet;
SWGBFMDemodSettings* bfm_demod_settings;
bool m_bfm_demod_settings_isSet;
SWGDSDDemodSettings* dsd_demod_settings;
bool m_dsd_demod_settings_isSet;
SWGFileSourceSettings* file_source_settings;
bool m_file_source_settings_isSet;
SWGFreeDVDemodSettings* free_dv_demod_settings;
bool m_free_dv_demod_settings_isSet;
SWGFreeDVModSettings* free_dv_mod_settings;
bool m_free_dv_mod_settings_isSet;
SWGFreqTrackerSettings* freq_tracker_settings;
bool m_freq_tracker_settings_isSet;
SWGNFMDemodSettings* nfm_demod_settings;
bool m_nfm_demod_settings_isSet;
SWGNFMModSettings* nfm_mod_settings;
bool m_nfm_mod_settings_isSet;
SWGLocalSinkSettings* local_sink_settings;
bool m_local_sink_settings_isSet;
SWGLocalSourceSettings* local_source_settings;
bool m_local_source_settings_isSet;
SWGRemoteSinkSettings* remote_sink_settings;
bool m_remote_sink_settings_isSet;
SWGRemoteSourceSettings* remote_source_settings;
bool m_remote_source_settings_isSet;
SWGSSBModSettings* ssb_mod_settings;
bool m_ssb_mod_settings_isSet;
SWGSSBDemodSettings* ssb_demod_settings;
bool m_ssb_demod_settings_isSet;
SWGUDPSourceSettings* udp_source_settings;
bool m_udp_source_settings_isSet;
SWGUDPSinkSettings* udp_sink_settings;
bool m_udp_sink_settings_isSet;
SWGWFMDemodSettings* wfm_demod_settings;
bool m_wfm_demod_settings_isSet;
SWGWFMModSettings* wfm_mod_settings;
bool m_wfm_mod_settings_isSet;
};
}
#endif /* SWGChannelSettings_2_H_ */

View File

@ -0,0 +1,261 @@
/**
* 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.11.3
* 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 "SWGCommand.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGCommand::SWGCommand(QString* json) {
init();
this->fromJson(*json);
}
SWGCommand::SWGCommand() {
group = nullptr;
m_group_isSet = false;
description = nullptr;
m_description_isSet = false;
command = nullptr;
m_command_isSet = false;
arg_string = nullptr;
m_arg_string_isSet = false;
key = 0;
m_key_isSet = false;
key_modifiers = 0;
m_key_modifiers_isSet = false;
associate_key = 0;
m_associate_key_isSet = false;
release = 0;
m_release_isSet = false;
}
SWGCommand::~SWGCommand() {
this->cleanup();
}
void
SWGCommand::init() {
group = new QString("");
m_group_isSet = false;
description = new QString("");
m_description_isSet = false;
command = new QString("");
m_command_isSet = false;
arg_string = new QString("");
m_arg_string_isSet = false;
key = 0;
m_key_isSet = false;
key_modifiers = 0;
m_key_modifiers_isSet = false;
associate_key = 0;
m_associate_key_isSet = false;
release = 0;
m_release_isSet = false;
}
void
SWGCommand::cleanup() {
if(group != nullptr) {
delete group;
}
if(description != nullptr) {
delete description;
}
if(command != nullptr) {
delete command;
}
if(arg_string != nullptr) {
delete arg_string;
}
}
SWGCommand*
SWGCommand::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGCommand::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&group, pJson["group"], "QString", "QString");
::SWGSDRangel::setValue(&description, pJson["description"], "QString", "QString");
::SWGSDRangel::setValue(&command, pJson["command"], "QString", "QString");
::SWGSDRangel::setValue(&arg_string, pJson["argString"], "QString", "QString");
::SWGSDRangel::setValue(&key, pJson["key"], "qint32", "");
::SWGSDRangel::setValue(&key_modifiers, pJson["keyModifiers"], "qint32", "");
::SWGSDRangel::setValue(&associate_key, pJson["associateKey"], "qint32", "");
::SWGSDRangel::setValue(&release, pJson["release"], "qint32", "");
}
QString
SWGCommand::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGCommand::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(group != nullptr && *group != QString("")){
toJsonValue(QString("group"), group, obj, QString("QString"));
}
if(description != nullptr && *description != QString("")){
toJsonValue(QString("description"), description, obj, QString("QString"));
}
if(command != nullptr && *command != QString("")){
toJsonValue(QString("command"), command, obj, QString("QString"));
}
if(arg_string != nullptr && *arg_string != QString("")){
toJsonValue(QString("argString"), arg_string, obj, QString("QString"));
}
if(m_key_isSet){
obj->insert("key", QJsonValue(key));
}
if(m_key_modifiers_isSet){
obj->insert("keyModifiers", QJsonValue(key_modifiers));
}
if(m_associate_key_isSet){
obj->insert("associateKey", QJsonValue(associate_key));
}
if(m_release_isSet){
obj->insert("release", QJsonValue(release));
}
return obj;
}
QString*
SWGCommand::getGroup() {
return group;
}
void
SWGCommand::setGroup(QString* group) {
this->group = group;
this->m_group_isSet = true;
}
QString*
SWGCommand::getDescription() {
return description;
}
void
SWGCommand::setDescription(QString* description) {
this->description = description;
this->m_description_isSet = true;
}
QString*
SWGCommand::getCommand() {
return command;
}
void
SWGCommand::setCommand(QString* command) {
this->command = command;
this->m_command_isSet = true;
}
QString*
SWGCommand::getArgString() {
return arg_string;
}
void
SWGCommand::setArgString(QString* arg_string) {
this->arg_string = arg_string;
this->m_arg_string_isSet = true;
}
qint32
SWGCommand::getKey() {
return key;
}
void
SWGCommand::setKey(qint32 key) {
this->key = key;
this->m_key_isSet = true;
}
qint32
SWGCommand::getKeyModifiers() {
return key_modifiers;
}
void
SWGCommand::setKeyModifiers(qint32 key_modifiers) {
this->key_modifiers = key_modifiers;
this->m_key_modifiers_isSet = true;
}
qint32
SWGCommand::getAssociateKey() {
return associate_key;
}
void
SWGCommand::setAssociateKey(qint32 associate_key) {
this->associate_key = associate_key;
this->m_associate_key_isSet = true;
}
qint32
SWGCommand::getRelease() {
return release;
}
void
SWGCommand::setRelease(qint32 release) {
this->release = release;
this->m_release_isSet = true;
}
bool
SWGCommand::isSet(){
bool isObjectUpdated = false;
do{
if(group != nullptr && *group != QString("")){ isObjectUpdated = true; break;}
if(description != nullptr && *description != QString("")){ isObjectUpdated = true; break;}
if(command != nullptr && *command != QString("")){ isObjectUpdated = true; break;}
if(arg_string != nullptr && *arg_string != QString("")){ isObjectUpdated = true; break;}
if(m_key_isSet){ isObjectUpdated = true; break;}
if(m_key_modifiers_isSet){ isObjectUpdated = true; break;}
if(m_associate_key_isSet){ isObjectUpdated = true; break;}
if(m_release_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,101 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGCommand.h
*
* Represents a Command object
*/
#ifndef SWGCommand_H_
#define SWGCommand_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGCommand: public SWGObject {
public:
SWGCommand();
SWGCommand(QString* json);
virtual ~SWGCommand();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGCommand* fromJson(QString &jsonString) override;
QString* getGroup();
void setGroup(QString* group);
QString* getDescription();
void setDescription(QString* description);
QString* getCommand();
void setCommand(QString* command);
QString* getArgString();
void setArgString(QString* arg_string);
qint32 getKey();
void setKey(qint32 key);
qint32 getKeyModifiers();
void setKeyModifiers(qint32 key_modifiers);
qint32 getAssociateKey();
void setAssociateKey(qint32 associate_key);
qint32 getRelease();
void setRelease(qint32 release);
virtual bool isSet() override;
private:
QString* group;
bool m_group_isSet;
QString* description;
bool m_description_isSet;
QString* command;
bool m_command_isSet;
QString* arg_string;
bool m_arg_string_isSet;
qint32 key;
bool m_key_isSet;
qint32 key_modifiers;
bool m_key_modifiers_isSet;
qint32 associate_key;
bool m_associate_key_isSet;
qint32 release;
bool m_release_isSet;
};
}
#endif /* SWGCommand_H_ */

View File

@ -0,0 +1,175 @@
/**
* 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.11.3
* 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 "SWGDeviceConfig.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGDeviceConfig::SWGDeviceConfig(QString* json) {
init();
this->fromJson(*json);
}
SWGDeviceConfig::SWGDeviceConfig() {
device_id = nullptr;
m_device_id_isSet = false;
device_serial = nullptr;
m_device_serial_isSet = false;
device_sequence = 0;
m_device_sequence_isSet = false;
config = nullptr;
m_config_isSet = false;
}
SWGDeviceConfig::~SWGDeviceConfig() {
this->cleanup();
}
void
SWGDeviceConfig::init() {
device_id = new QString("");
m_device_id_isSet = false;
device_serial = new QString("");
m_device_serial_isSet = false;
device_sequence = 0;
m_device_sequence_isSet = false;
config = new SWGDeviceSettings_2();
m_config_isSet = false;
}
void
SWGDeviceConfig::cleanup() {
if(device_id != nullptr) {
delete device_id;
}
if(device_serial != nullptr) {
delete device_serial;
}
if(config != nullptr) {
delete config;
}
}
SWGDeviceConfig*
SWGDeviceConfig::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGDeviceConfig::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&device_id, pJson["deviceId"], "QString", "QString");
::SWGSDRangel::setValue(&device_serial, pJson["deviceSerial"], "QString", "QString");
::SWGSDRangel::setValue(&device_sequence, pJson["deviceSequence"], "qint32", "");
::SWGSDRangel::setValue(&config, pJson["config"], "SWGDeviceSettings_2", "SWGDeviceSettings_2");
}
QString
SWGDeviceConfig::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGDeviceConfig::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(device_id != nullptr && *device_id != QString("")){
toJsonValue(QString("deviceId"), device_id, obj, QString("QString"));
}
if(device_serial != nullptr && *device_serial != QString("")){
toJsonValue(QString("deviceSerial"), device_serial, obj, QString("QString"));
}
if(m_device_sequence_isSet){
obj->insert("deviceSequence", QJsonValue(device_sequence));
}
if((config != nullptr) && (config->isSet())){
toJsonValue(QString("config"), config, obj, QString("SWGDeviceSettings_2"));
}
return obj;
}
QString*
SWGDeviceConfig::getDeviceId() {
return device_id;
}
void
SWGDeviceConfig::setDeviceId(QString* device_id) {
this->device_id = device_id;
this->m_device_id_isSet = true;
}
QString*
SWGDeviceConfig::getDeviceSerial() {
return device_serial;
}
void
SWGDeviceConfig::setDeviceSerial(QString* device_serial) {
this->device_serial = device_serial;
this->m_device_serial_isSet = true;
}
qint32
SWGDeviceConfig::getDeviceSequence() {
return device_sequence;
}
void
SWGDeviceConfig::setDeviceSequence(qint32 device_sequence) {
this->device_sequence = device_sequence;
this->m_device_sequence_isSet = true;
}
SWGDeviceSettings_2*
SWGDeviceConfig::getConfig() {
return config;
}
void
SWGDeviceConfig::setConfig(SWGDeviceSettings_2* config) {
this->config = config;
this->m_config_isSet = true;
}
bool
SWGDeviceConfig::isSet(){
bool isObjectUpdated = false;
do{
if(device_id != nullptr && *device_id != QString("")){ isObjectUpdated = true; break;}
if(device_serial != nullptr && *device_serial != QString("")){ isObjectUpdated = true; break;}
if(m_device_sequence_isSet){ isObjectUpdated = true; break;}
if(config != nullptr && config->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,78 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGDeviceConfig.h
*
* Represents a Preset::DeviceConfig object
*/
#ifndef SWGDeviceConfig_H_
#define SWGDeviceConfig_H_
#include <QJsonObject>
#include "SWGDeviceSettings_2.h"
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGDeviceConfig: public SWGObject {
public:
SWGDeviceConfig();
SWGDeviceConfig(QString* json);
virtual ~SWGDeviceConfig();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGDeviceConfig* fromJson(QString &jsonString) override;
QString* getDeviceId();
void setDeviceId(QString* device_id);
QString* getDeviceSerial();
void setDeviceSerial(QString* device_serial);
qint32 getDeviceSequence();
void setDeviceSequence(qint32 device_sequence);
SWGDeviceSettings_2* getConfig();
void setConfig(SWGDeviceSettings_2* config);
virtual bool isSet() override;
private:
QString* device_id;
bool m_device_id_isSet;
QString* device_serial;
bool m_device_serial_isSet;
qint32 device_sequence;
bool m_device_sequence_isSet;
SWGDeviceSettings_2* config;
bool m_config_isSet;
};
}
#endif /* SWGDeviceConfig_H_ */

View File

@ -0,0 +1,817 @@
/**
* 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.11.3
* 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 "SWGDeviceSettings_2.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGDeviceSettings_2::SWGDeviceSettings_2(QString* json) {
init();
this->fromJson(*json);
}
SWGDeviceSettings_2::SWGDeviceSettings_2() {
device_hw_type = nullptr;
m_device_hw_type_isSet = false;
direction = 0;
m_direction_isSet = false;
originator_index = 0;
m_originator_index_isSet = false;
airspy_settings = nullptr;
m_airspy_settings_isSet = false;
airspy_hf_settings = nullptr;
m_airspy_hf_settings_isSet = false;
blade_rf1_input_settings = nullptr;
m_blade_rf1_input_settings_isSet = false;
blade_rf2_input_settings = nullptr;
m_blade_rf2_input_settings_isSet = false;
blade_rf1_output_settings = nullptr;
m_blade_rf1_output_settings_isSet = false;
blade_rf2_output_settings = nullptr;
m_blade_rf2_output_settings_isSet = false;
fcd_pro_settings = nullptr;
m_fcd_pro_settings_isSet = false;
fcd_pro_plus_settings = nullptr;
m_fcd_pro_plus_settings_isSet = false;
file_input_settings = nullptr;
m_file_input_settings_isSet = false;
hack_rf_input_settings = nullptr;
m_hack_rf_input_settings_isSet = false;
hack_rf_output_settings = nullptr;
m_hack_rf_output_settings_isSet = false;
kiwi_sdr_settings = nullptr;
m_kiwi_sdr_settings_isSet = false;
lime_sdr_input_settings = nullptr;
m_lime_sdr_input_settings_isSet = false;
lime_sdr_output_settings = nullptr;
m_lime_sdr_output_settings_isSet = false;
local_input_settings = nullptr;
m_local_input_settings_isSet = false;
local_output_settings = nullptr;
m_local_output_settings_isSet = false;
perseus_settings = nullptr;
m_perseus_settings_isSet = false;
pluto_sdr_input_settings = nullptr;
m_pluto_sdr_input_settings_isSet = false;
pluto_sdr_output_settings = nullptr;
m_pluto_sdr_output_settings_isSet = false;
rtl_sdr_settings = nullptr;
m_rtl_sdr_settings_isSet = false;
remote_output_settings = nullptr;
m_remote_output_settings_isSet = false;
remote_input_settings = nullptr;
m_remote_input_settings_isSet = false;
sdr_play_settings = nullptr;
m_sdr_play_settings_isSet = false;
soapy_sdr_input_settings = nullptr;
m_soapy_sdr_input_settings_isSet = false;
soapy_sdr_output_settings = nullptr;
m_soapy_sdr_output_settings_isSet = false;
test_source_settings = nullptr;
m_test_source_settings_isSet = false;
test_mi_settings = nullptr;
m_test_mi_settings_isSet = false;
xtrx_input_settings = nullptr;
m_xtrx_input_settings_isSet = false;
xtrx_output_settings = nullptr;
m_xtrx_output_settings_isSet = false;
}
SWGDeviceSettings_2::~SWGDeviceSettings_2() {
this->cleanup();
}
void
SWGDeviceSettings_2::init() {
device_hw_type = new QString("");
m_device_hw_type_isSet = false;
direction = 0;
m_direction_isSet = false;
originator_index = 0;
m_originator_index_isSet = false;
airspy_settings = new SWGAirspySettings();
m_airspy_settings_isSet = false;
airspy_hf_settings = new SWGAirspyHFSettings();
m_airspy_hf_settings_isSet = false;
blade_rf1_input_settings = new SWGBladeRF1InputSettings();
m_blade_rf1_input_settings_isSet = false;
blade_rf2_input_settings = new SWGBladeRF2InputSettings();
m_blade_rf2_input_settings_isSet = false;
blade_rf1_output_settings = new SWGBladeRF1OutputSettings();
m_blade_rf1_output_settings_isSet = false;
blade_rf2_output_settings = new SWGBladeRF2OutputSettings();
m_blade_rf2_output_settings_isSet = false;
fcd_pro_settings = new SWGFCDProSettings();
m_fcd_pro_settings_isSet = false;
fcd_pro_plus_settings = new SWGFCDProPlusSettings();
m_fcd_pro_plus_settings_isSet = false;
file_input_settings = new SWGFileInputSettings();
m_file_input_settings_isSet = false;
hack_rf_input_settings = new SWGHackRFInputSettings();
m_hack_rf_input_settings_isSet = false;
hack_rf_output_settings = new SWGHackRFOutputSettings();
m_hack_rf_output_settings_isSet = false;
kiwi_sdr_settings = new SWGKiwiSDRSettings();
m_kiwi_sdr_settings_isSet = false;
lime_sdr_input_settings = new SWGLimeSdrInputSettings();
m_lime_sdr_input_settings_isSet = false;
lime_sdr_output_settings = new SWGLimeSdrOutputSettings();
m_lime_sdr_output_settings_isSet = false;
local_input_settings = new SWGLocalInputSettings();
m_local_input_settings_isSet = false;
local_output_settings = new SWGLocalOutputSettings();
m_local_output_settings_isSet = false;
perseus_settings = new SWGPerseusSettings();
m_perseus_settings_isSet = false;
pluto_sdr_input_settings = new SWGPlutoSdrInputSettings();
m_pluto_sdr_input_settings_isSet = false;
pluto_sdr_output_settings = new SWGPlutoSdrOutputSettings();
m_pluto_sdr_output_settings_isSet = false;
rtl_sdr_settings = new SWGRtlSdrSettings();
m_rtl_sdr_settings_isSet = false;
remote_output_settings = new SWGRemoteOutputSettings();
m_remote_output_settings_isSet = false;
remote_input_settings = new SWGRemoteInputSettings();
m_remote_input_settings_isSet = false;
sdr_play_settings = new SWGSDRPlaySettings();
m_sdr_play_settings_isSet = false;
soapy_sdr_input_settings = new SWGSoapySDRInputSettings();
m_soapy_sdr_input_settings_isSet = false;
soapy_sdr_output_settings = new SWGSoapySDROutputSettings();
m_soapy_sdr_output_settings_isSet = false;
test_source_settings = new SWGTestSourceSettings();
m_test_source_settings_isSet = false;
test_mi_settings = new SWGTestMISettings();
m_test_mi_settings_isSet = false;
xtrx_input_settings = new SWGXtrxInputSettings();
m_xtrx_input_settings_isSet = false;
xtrx_output_settings = new SWGXtrxOutputSettings();
m_xtrx_output_settings_isSet = false;
}
void
SWGDeviceSettings_2::cleanup() {
if(device_hw_type != nullptr) {
delete device_hw_type;
}
if(airspy_settings != nullptr) {
delete airspy_settings;
}
if(airspy_hf_settings != nullptr) {
delete airspy_hf_settings;
}
if(blade_rf1_input_settings != nullptr) {
delete blade_rf1_input_settings;
}
if(blade_rf2_input_settings != nullptr) {
delete blade_rf2_input_settings;
}
if(blade_rf1_output_settings != nullptr) {
delete blade_rf1_output_settings;
}
if(blade_rf2_output_settings != nullptr) {
delete blade_rf2_output_settings;
}
if(fcd_pro_settings != nullptr) {
delete fcd_pro_settings;
}
if(fcd_pro_plus_settings != nullptr) {
delete fcd_pro_plus_settings;
}
if(file_input_settings != nullptr) {
delete file_input_settings;
}
if(hack_rf_input_settings != nullptr) {
delete hack_rf_input_settings;
}
if(hack_rf_output_settings != nullptr) {
delete hack_rf_output_settings;
}
if(kiwi_sdr_settings != nullptr) {
delete kiwi_sdr_settings;
}
if(lime_sdr_input_settings != nullptr) {
delete lime_sdr_input_settings;
}
if(lime_sdr_output_settings != nullptr) {
delete lime_sdr_output_settings;
}
if(local_input_settings != nullptr) {
delete local_input_settings;
}
if(local_output_settings != nullptr) {
delete local_output_settings;
}
if(perseus_settings != nullptr) {
delete perseus_settings;
}
if(pluto_sdr_input_settings != nullptr) {
delete pluto_sdr_input_settings;
}
if(pluto_sdr_output_settings != nullptr) {
delete pluto_sdr_output_settings;
}
if(rtl_sdr_settings != nullptr) {
delete rtl_sdr_settings;
}
if(remote_output_settings != nullptr) {
delete remote_output_settings;
}
if(remote_input_settings != nullptr) {
delete remote_input_settings;
}
if(sdr_play_settings != nullptr) {
delete sdr_play_settings;
}
if(soapy_sdr_input_settings != nullptr) {
delete soapy_sdr_input_settings;
}
if(soapy_sdr_output_settings != nullptr) {
delete soapy_sdr_output_settings;
}
if(test_source_settings != nullptr) {
delete test_source_settings;
}
if(test_mi_settings != nullptr) {
delete test_mi_settings;
}
if(xtrx_input_settings != nullptr) {
delete xtrx_input_settings;
}
if(xtrx_output_settings != nullptr) {
delete xtrx_output_settings;
}
}
SWGDeviceSettings_2*
SWGDeviceSettings_2::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGDeviceSettings_2::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&device_hw_type, pJson["deviceHwType"], "QString", "QString");
::SWGSDRangel::setValue(&direction, pJson["direction"], "qint32", "");
::SWGSDRangel::setValue(&originator_index, pJson["originatorIndex"], "qint32", "");
::SWGSDRangel::setValue(&airspy_settings, pJson["airspySettings"], "SWGAirspySettings", "SWGAirspySettings");
::SWGSDRangel::setValue(&airspy_hf_settings, pJson["airspyHFSettings"], "SWGAirspyHFSettings", "SWGAirspyHFSettings");
::SWGSDRangel::setValue(&blade_rf1_input_settings, pJson["bladeRF1InputSettings"], "SWGBladeRF1InputSettings", "SWGBladeRF1InputSettings");
::SWGSDRangel::setValue(&blade_rf2_input_settings, pJson["bladeRF2InputSettings"], "SWGBladeRF2InputSettings", "SWGBladeRF2InputSettings");
::SWGSDRangel::setValue(&blade_rf1_output_settings, pJson["bladeRF1OutputSettings"], "SWGBladeRF1OutputSettings", "SWGBladeRF1OutputSettings");
::SWGSDRangel::setValue(&blade_rf2_output_settings, pJson["bladeRF2OutputSettings"], "SWGBladeRF2OutputSettings", "SWGBladeRF2OutputSettings");
::SWGSDRangel::setValue(&fcd_pro_settings, pJson["fcdProSettings"], "SWGFCDProSettings", "SWGFCDProSettings");
::SWGSDRangel::setValue(&fcd_pro_plus_settings, pJson["fcdProPlusSettings"], "SWGFCDProPlusSettings", "SWGFCDProPlusSettings");
::SWGSDRangel::setValue(&file_input_settings, pJson["fileInputSettings"], "SWGFileInputSettings", "SWGFileInputSettings");
::SWGSDRangel::setValue(&hack_rf_input_settings, pJson["hackRFInputSettings"], "SWGHackRFInputSettings", "SWGHackRFInputSettings");
::SWGSDRangel::setValue(&hack_rf_output_settings, pJson["hackRFOutputSettings"], "SWGHackRFOutputSettings", "SWGHackRFOutputSettings");
::SWGSDRangel::setValue(&kiwi_sdr_settings, pJson["kiwiSDRSettings"], "SWGKiwiSDRSettings", "SWGKiwiSDRSettings");
::SWGSDRangel::setValue(&lime_sdr_input_settings, pJson["limeSdrInputSettings"], "SWGLimeSdrInputSettings", "SWGLimeSdrInputSettings");
::SWGSDRangel::setValue(&lime_sdr_output_settings, pJson["limeSdrOutputSettings"], "SWGLimeSdrOutputSettings", "SWGLimeSdrOutputSettings");
::SWGSDRangel::setValue(&local_input_settings, pJson["localInputSettings"], "SWGLocalInputSettings", "SWGLocalInputSettings");
::SWGSDRangel::setValue(&local_output_settings, pJson["localOutputSettings"], "SWGLocalOutputSettings", "SWGLocalOutputSettings");
::SWGSDRangel::setValue(&perseus_settings, pJson["perseusSettings"], "SWGPerseusSettings", "SWGPerseusSettings");
::SWGSDRangel::setValue(&pluto_sdr_input_settings, pJson["plutoSdrInputSettings"], "SWGPlutoSdrInputSettings", "SWGPlutoSdrInputSettings");
::SWGSDRangel::setValue(&pluto_sdr_output_settings, pJson["plutoSdrOutputSettings"], "SWGPlutoSdrOutputSettings", "SWGPlutoSdrOutputSettings");
::SWGSDRangel::setValue(&rtl_sdr_settings, pJson["rtlSdrSettings"], "SWGRtlSdrSettings", "SWGRtlSdrSettings");
::SWGSDRangel::setValue(&remote_output_settings, pJson["remoteOutputSettings"], "SWGRemoteOutputSettings", "SWGRemoteOutputSettings");
::SWGSDRangel::setValue(&remote_input_settings, pJson["remoteInputSettings"], "SWGRemoteInputSettings", "SWGRemoteInputSettings");
::SWGSDRangel::setValue(&sdr_play_settings, pJson["sdrPlaySettings"], "SWGSDRPlaySettings", "SWGSDRPlaySettings");
::SWGSDRangel::setValue(&soapy_sdr_input_settings, pJson["soapySDRInputSettings"], "SWGSoapySDRInputSettings", "SWGSoapySDRInputSettings");
::SWGSDRangel::setValue(&soapy_sdr_output_settings, pJson["soapySDROutputSettings"], "SWGSoapySDROutputSettings", "SWGSoapySDROutputSettings");
::SWGSDRangel::setValue(&test_source_settings, pJson["testSourceSettings"], "SWGTestSourceSettings", "SWGTestSourceSettings");
::SWGSDRangel::setValue(&test_mi_settings, pJson["testMISettings"], "SWGTestMISettings", "SWGTestMISettings");
::SWGSDRangel::setValue(&xtrx_input_settings, pJson["xtrxInputSettings"], "SWGXtrxInputSettings", "SWGXtrxInputSettings");
::SWGSDRangel::setValue(&xtrx_output_settings, pJson["xtrxOutputSettings"], "SWGXtrxOutputSettings", "SWGXtrxOutputSettings");
}
QString
SWGDeviceSettings_2::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGDeviceSettings_2::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(device_hw_type != nullptr && *device_hw_type != QString("")){
toJsonValue(QString("deviceHwType"), device_hw_type, obj, QString("QString"));
}
if(m_direction_isSet){
obj->insert("direction", QJsonValue(direction));
}
if(m_originator_index_isSet){
obj->insert("originatorIndex", QJsonValue(originator_index));
}
if((airspy_settings != nullptr) && (airspy_settings->isSet())){
toJsonValue(QString("airspySettings"), airspy_settings, obj, QString("SWGAirspySettings"));
}
if((airspy_hf_settings != nullptr) && (airspy_hf_settings->isSet())){
toJsonValue(QString("airspyHFSettings"), airspy_hf_settings, obj, QString("SWGAirspyHFSettings"));
}
if((blade_rf1_input_settings != nullptr) && (blade_rf1_input_settings->isSet())){
toJsonValue(QString("bladeRF1InputSettings"), blade_rf1_input_settings, obj, QString("SWGBladeRF1InputSettings"));
}
if((blade_rf2_input_settings != nullptr) && (blade_rf2_input_settings->isSet())){
toJsonValue(QString("bladeRF2InputSettings"), blade_rf2_input_settings, obj, QString("SWGBladeRF2InputSettings"));
}
if((blade_rf1_output_settings != nullptr) && (blade_rf1_output_settings->isSet())){
toJsonValue(QString("bladeRF1OutputSettings"), blade_rf1_output_settings, obj, QString("SWGBladeRF1OutputSettings"));
}
if((blade_rf2_output_settings != nullptr) && (blade_rf2_output_settings->isSet())){
toJsonValue(QString("bladeRF2OutputSettings"), blade_rf2_output_settings, obj, QString("SWGBladeRF2OutputSettings"));
}
if((fcd_pro_settings != nullptr) && (fcd_pro_settings->isSet())){
toJsonValue(QString("fcdProSettings"), fcd_pro_settings, obj, QString("SWGFCDProSettings"));
}
if((fcd_pro_plus_settings != nullptr) && (fcd_pro_plus_settings->isSet())){
toJsonValue(QString("fcdProPlusSettings"), fcd_pro_plus_settings, obj, QString("SWGFCDProPlusSettings"));
}
if((file_input_settings != nullptr) && (file_input_settings->isSet())){
toJsonValue(QString("fileInputSettings"), file_input_settings, obj, QString("SWGFileInputSettings"));
}
if((hack_rf_input_settings != nullptr) && (hack_rf_input_settings->isSet())){
toJsonValue(QString("hackRFInputSettings"), hack_rf_input_settings, obj, QString("SWGHackRFInputSettings"));
}
if((hack_rf_output_settings != nullptr) && (hack_rf_output_settings->isSet())){
toJsonValue(QString("hackRFOutputSettings"), hack_rf_output_settings, obj, QString("SWGHackRFOutputSettings"));
}
if((kiwi_sdr_settings != nullptr) && (kiwi_sdr_settings->isSet())){
toJsonValue(QString("kiwiSDRSettings"), kiwi_sdr_settings, obj, QString("SWGKiwiSDRSettings"));
}
if((lime_sdr_input_settings != nullptr) && (lime_sdr_input_settings->isSet())){
toJsonValue(QString("limeSdrInputSettings"), lime_sdr_input_settings, obj, QString("SWGLimeSdrInputSettings"));
}
if((lime_sdr_output_settings != nullptr) && (lime_sdr_output_settings->isSet())){
toJsonValue(QString("limeSdrOutputSettings"), lime_sdr_output_settings, obj, QString("SWGLimeSdrOutputSettings"));
}
if((local_input_settings != nullptr) && (local_input_settings->isSet())){
toJsonValue(QString("localInputSettings"), local_input_settings, obj, QString("SWGLocalInputSettings"));
}
if((local_output_settings != nullptr) && (local_output_settings->isSet())){
toJsonValue(QString("localOutputSettings"), local_output_settings, obj, QString("SWGLocalOutputSettings"));
}
if((perseus_settings != nullptr) && (perseus_settings->isSet())){
toJsonValue(QString("perseusSettings"), perseus_settings, obj, QString("SWGPerseusSettings"));
}
if((pluto_sdr_input_settings != nullptr) && (pluto_sdr_input_settings->isSet())){
toJsonValue(QString("plutoSdrInputSettings"), pluto_sdr_input_settings, obj, QString("SWGPlutoSdrInputSettings"));
}
if((pluto_sdr_output_settings != nullptr) && (pluto_sdr_output_settings->isSet())){
toJsonValue(QString("plutoSdrOutputSettings"), pluto_sdr_output_settings, obj, QString("SWGPlutoSdrOutputSettings"));
}
if((rtl_sdr_settings != nullptr) && (rtl_sdr_settings->isSet())){
toJsonValue(QString("rtlSdrSettings"), rtl_sdr_settings, obj, QString("SWGRtlSdrSettings"));
}
if((remote_output_settings != nullptr) && (remote_output_settings->isSet())){
toJsonValue(QString("remoteOutputSettings"), remote_output_settings, obj, QString("SWGRemoteOutputSettings"));
}
if((remote_input_settings != nullptr) && (remote_input_settings->isSet())){
toJsonValue(QString("remoteInputSettings"), remote_input_settings, obj, QString("SWGRemoteInputSettings"));
}
if((sdr_play_settings != nullptr) && (sdr_play_settings->isSet())){
toJsonValue(QString("sdrPlaySettings"), sdr_play_settings, obj, QString("SWGSDRPlaySettings"));
}
if((soapy_sdr_input_settings != nullptr) && (soapy_sdr_input_settings->isSet())){
toJsonValue(QString("soapySDRInputSettings"), soapy_sdr_input_settings, obj, QString("SWGSoapySDRInputSettings"));
}
if((soapy_sdr_output_settings != nullptr) && (soapy_sdr_output_settings->isSet())){
toJsonValue(QString("soapySDROutputSettings"), soapy_sdr_output_settings, obj, QString("SWGSoapySDROutputSettings"));
}
if((test_source_settings != nullptr) && (test_source_settings->isSet())){
toJsonValue(QString("testSourceSettings"), test_source_settings, obj, QString("SWGTestSourceSettings"));
}
if((test_mi_settings != nullptr) && (test_mi_settings->isSet())){
toJsonValue(QString("testMISettings"), test_mi_settings, obj, QString("SWGTestMISettings"));
}
if((xtrx_input_settings != nullptr) && (xtrx_input_settings->isSet())){
toJsonValue(QString("xtrxInputSettings"), xtrx_input_settings, obj, QString("SWGXtrxInputSettings"));
}
if((xtrx_output_settings != nullptr) && (xtrx_output_settings->isSet())){
toJsonValue(QString("xtrxOutputSettings"), xtrx_output_settings, obj, QString("SWGXtrxOutputSettings"));
}
return obj;
}
QString*
SWGDeviceSettings_2::getDeviceHwType() {
return device_hw_type;
}
void
SWGDeviceSettings_2::setDeviceHwType(QString* device_hw_type) {
this->device_hw_type = device_hw_type;
this->m_device_hw_type_isSet = true;
}
qint32
SWGDeviceSettings_2::getDirection() {
return direction;
}
void
SWGDeviceSettings_2::setDirection(qint32 direction) {
this->direction = direction;
this->m_direction_isSet = true;
}
qint32
SWGDeviceSettings_2::getOriginatorIndex() {
return originator_index;
}
void
SWGDeviceSettings_2::setOriginatorIndex(qint32 originator_index) {
this->originator_index = originator_index;
this->m_originator_index_isSet = true;
}
SWGAirspySettings*
SWGDeviceSettings_2::getAirspySettings() {
return airspy_settings;
}
void
SWGDeviceSettings_2::setAirspySettings(SWGAirspySettings* airspy_settings) {
this->airspy_settings = airspy_settings;
this->m_airspy_settings_isSet = true;
}
SWGAirspyHFSettings*
SWGDeviceSettings_2::getAirspyHfSettings() {
return airspy_hf_settings;
}
void
SWGDeviceSettings_2::setAirspyHfSettings(SWGAirspyHFSettings* airspy_hf_settings) {
this->airspy_hf_settings = airspy_hf_settings;
this->m_airspy_hf_settings_isSet = true;
}
SWGBladeRF1InputSettings*
SWGDeviceSettings_2::getBladeRf1InputSettings() {
return blade_rf1_input_settings;
}
void
SWGDeviceSettings_2::setBladeRf1InputSettings(SWGBladeRF1InputSettings* blade_rf1_input_settings) {
this->blade_rf1_input_settings = blade_rf1_input_settings;
this->m_blade_rf1_input_settings_isSet = true;
}
SWGBladeRF2InputSettings*
SWGDeviceSettings_2::getBladeRf2InputSettings() {
return blade_rf2_input_settings;
}
void
SWGDeviceSettings_2::setBladeRf2InputSettings(SWGBladeRF2InputSettings* blade_rf2_input_settings) {
this->blade_rf2_input_settings = blade_rf2_input_settings;
this->m_blade_rf2_input_settings_isSet = true;
}
SWGBladeRF1OutputSettings*
SWGDeviceSettings_2::getBladeRf1OutputSettings() {
return blade_rf1_output_settings;
}
void
SWGDeviceSettings_2::setBladeRf1OutputSettings(SWGBladeRF1OutputSettings* blade_rf1_output_settings) {
this->blade_rf1_output_settings = blade_rf1_output_settings;
this->m_blade_rf1_output_settings_isSet = true;
}
SWGBladeRF2OutputSettings*
SWGDeviceSettings_2::getBladeRf2OutputSettings() {
return blade_rf2_output_settings;
}
void
SWGDeviceSettings_2::setBladeRf2OutputSettings(SWGBladeRF2OutputSettings* blade_rf2_output_settings) {
this->blade_rf2_output_settings = blade_rf2_output_settings;
this->m_blade_rf2_output_settings_isSet = true;
}
SWGFCDProSettings*
SWGDeviceSettings_2::getFcdProSettings() {
return fcd_pro_settings;
}
void
SWGDeviceSettings_2::setFcdProSettings(SWGFCDProSettings* fcd_pro_settings) {
this->fcd_pro_settings = fcd_pro_settings;
this->m_fcd_pro_settings_isSet = true;
}
SWGFCDProPlusSettings*
SWGDeviceSettings_2::getFcdProPlusSettings() {
return fcd_pro_plus_settings;
}
void
SWGDeviceSettings_2::setFcdProPlusSettings(SWGFCDProPlusSettings* fcd_pro_plus_settings) {
this->fcd_pro_plus_settings = fcd_pro_plus_settings;
this->m_fcd_pro_plus_settings_isSet = true;
}
SWGFileInputSettings*
SWGDeviceSettings_2::getFileInputSettings() {
return file_input_settings;
}
void
SWGDeviceSettings_2::setFileInputSettings(SWGFileInputSettings* file_input_settings) {
this->file_input_settings = file_input_settings;
this->m_file_input_settings_isSet = true;
}
SWGHackRFInputSettings*
SWGDeviceSettings_2::getHackRfInputSettings() {
return hack_rf_input_settings;
}
void
SWGDeviceSettings_2::setHackRfInputSettings(SWGHackRFInputSettings* hack_rf_input_settings) {
this->hack_rf_input_settings = hack_rf_input_settings;
this->m_hack_rf_input_settings_isSet = true;
}
SWGHackRFOutputSettings*
SWGDeviceSettings_2::getHackRfOutputSettings() {
return hack_rf_output_settings;
}
void
SWGDeviceSettings_2::setHackRfOutputSettings(SWGHackRFOutputSettings* hack_rf_output_settings) {
this->hack_rf_output_settings = hack_rf_output_settings;
this->m_hack_rf_output_settings_isSet = true;
}
SWGKiwiSDRSettings*
SWGDeviceSettings_2::getKiwiSdrSettings() {
return kiwi_sdr_settings;
}
void
SWGDeviceSettings_2::setKiwiSdrSettings(SWGKiwiSDRSettings* kiwi_sdr_settings) {
this->kiwi_sdr_settings = kiwi_sdr_settings;
this->m_kiwi_sdr_settings_isSet = true;
}
SWGLimeSdrInputSettings*
SWGDeviceSettings_2::getLimeSdrInputSettings() {
return lime_sdr_input_settings;
}
void
SWGDeviceSettings_2::setLimeSdrInputSettings(SWGLimeSdrInputSettings* lime_sdr_input_settings) {
this->lime_sdr_input_settings = lime_sdr_input_settings;
this->m_lime_sdr_input_settings_isSet = true;
}
SWGLimeSdrOutputSettings*
SWGDeviceSettings_2::getLimeSdrOutputSettings() {
return lime_sdr_output_settings;
}
void
SWGDeviceSettings_2::setLimeSdrOutputSettings(SWGLimeSdrOutputSettings* lime_sdr_output_settings) {
this->lime_sdr_output_settings = lime_sdr_output_settings;
this->m_lime_sdr_output_settings_isSet = true;
}
SWGLocalInputSettings*
SWGDeviceSettings_2::getLocalInputSettings() {
return local_input_settings;
}
void
SWGDeviceSettings_2::setLocalInputSettings(SWGLocalInputSettings* local_input_settings) {
this->local_input_settings = local_input_settings;
this->m_local_input_settings_isSet = true;
}
SWGLocalOutputSettings*
SWGDeviceSettings_2::getLocalOutputSettings() {
return local_output_settings;
}
void
SWGDeviceSettings_2::setLocalOutputSettings(SWGLocalOutputSettings* local_output_settings) {
this->local_output_settings = local_output_settings;
this->m_local_output_settings_isSet = true;
}
SWGPerseusSettings*
SWGDeviceSettings_2::getPerseusSettings() {
return perseus_settings;
}
void
SWGDeviceSettings_2::setPerseusSettings(SWGPerseusSettings* perseus_settings) {
this->perseus_settings = perseus_settings;
this->m_perseus_settings_isSet = true;
}
SWGPlutoSdrInputSettings*
SWGDeviceSettings_2::getPlutoSdrInputSettings() {
return pluto_sdr_input_settings;
}
void
SWGDeviceSettings_2::setPlutoSdrInputSettings(SWGPlutoSdrInputSettings* pluto_sdr_input_settings) {
this->pluto_sdr_input_settings = pluto_sdr_input_settings;
this->m_pluto_sdr_input_settings_isSet = true;
}
SWGPlutoSdrOutputSettings*
SWGDeviceSettings_2::getPlutoSdrOutputSettings() {
return pluto_sdr_output_settings;
}
void
SWGDeviceSettings_2::setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings* pluto_sdr_output_settings) {
this->pluto_sdr_output_settings = pluto_sdr_output_settings;
this->m_pluto_sdr_output_settings_isSet = true;
}
SWGRtlSdrSettings*
SWGDeviceSettings_2::getRtlSdrSettings() {
return rtl_sdr_settings;
}
void
SWGDeviceSettings_2::setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings) {
this->rtl_sdr_settings = rtl_sdr_settings;
this->m_rtl_sdr_settings_isSet = true;
}
SWGRemoteOutputSettings*
SWGDeviceSettings_2::getRemoteOutputSettings() {
return remote_output_settings;
}
void
SWGDeviceSettings_2::setRemoteOutputSettings(SWGRemoteOutputSettings* remote_output_settings) {
this->remote_output_settings = remote_output_settings;
this->m_remote_output_settings_isSet = true;
}
SWGRemoteInputSettings*
SWGDeviceSettings_2::getRemoteInputSettings() {
return remote_input_settings;
}
void
SWGDeviceSettings_2::setRemoteInputSettings(SWGRemoteInputSettings* remote_input_settings) {
this->remote_input_settings = remote_input_settings;
this->m_remote_input_settings_isSet = true;
}
SWGSDRPlaySettings*
SWGDeviceSettings_2::getSdrPlaySettings() {
return sdr_play_settings;
}
void
SWGDeviceSettings_2::setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings) {
this->sdr_play_settings = sdr_play_settings;
this->m_sdr_play_settings_isSet = true;
}
SWGSoapySDRInputSettings*
SWGDeviceSettings_2::getSoapySdrInputSettings() {
return soapy_sdr_input_settings;
}
void
SWGDeviceSettings_2::setSoapySdrInputSettings(SWGSoapySDRInputSettings* soapy_sdr_input_settings) {
this->soapy_sdr_input_settings = soapy_sdr_input_settings;
this->m_soapy_sdr_input_settings_isSet = true;
}
SWGSoapySDROutputSettings*
SWGDeviceSettings_2::getSoapySdrOutputSettings() {
return soapy_sdr_output_settings;
}
void
SWGDeviceSettings_2::setSoapySdrOutputSettings(SWGSoapySDROutputSettings* soapy_sdr_output_settings) {
this->soapy_sdr_output_settings = soapy_sdr_output_settings;
this->m_soapy_sdr_output_settings_isSet = true;
}
SWGTestSourceSettings*
SWGDeviceSettings_2::getTestSourceSettings() {
return test_source_settings;
}
void
SWGDeviceSettings_2::setTestSourceSettings(SWGTestSourceSettings* test_source_settings) {
this->test_source_settings = test_source_settings;
this->m_test_source_settings_isSet = true;
}
SWGTestMISettings*
SWGDeviceSettings_2::getTestMiSettings() {
return test_mi_settings;
}
void
SWGDeviceSettings_2::setTestMiSettings(SWGTestMISettings* test_mi_settings) {
this->test_mi_settings = test_mi_settings;
this->m_test_mi_settings_isSet = true;
}
SWGXtrxInputSettings*
SWGDeviceSettings_2::getXtrxInputSettings() {
return xtrx_input_settings;
}
void
SWGDeviceSettings_2::setXtrxInputSettings(SWGXtrxInputSettings* xtrx_input_settings) {
this->xtrx_input_settings = xtrx_input_settings;
this->m_xtrx_input_settings_isSet = true;
}
SWGXtrxOutputSettings*
SWGDeviceSettings_2::getXtrxOutputSettings() {
return xtrx_output_settings;
}
void
SWGDeviceSettings_2::setXtrxOutputSettings(SWGXtrxOutputSettings* xtrx_output_settings) {
this->xtrx_output_settings = xtrx_output_settings;
this->m_xtrx_output_settings_isSet = true;
}
bool
SWGDeviceSettings_2::isSet(){
bool isObjectUpdated = false;
do{
if(device_hw_type != nullptr && *device_hw_type != QString("")){ isObjectUpdated = true; break;}
if(m_direction_isSet){ isObjectUpdated = true; break;}
if(m_originator_index_isSet){ isObjectUpdated = true; break;}
if(airspy_settings != nullptr && airspy_settings->isSet()){ isObjectUpdated = true; break;}
if(airspy_hf_settings != nullptr && airspy_hf_settings->isSet()){ isObjectUpdated = true; break;}
if(blade_rf1_input_settings != nullptr && blade_rf1_input_settings->isSet()){ isObjectUpdated = true; break;}
if(blade_rf2_input_settings != nullptr && blade_rf2_input_settings->isSet()){ isObjectUpdated = true; break;}
if(blade_rf1_output_settings != nullptr && blade_rf1_output_settings->isSet()){ isObjectUpdated = true; break;}
if(blade_rf2_output_settings != nullptr && blade_rf2_output_settings->isSet()){ isObjectUpdated = true; break;}
if(fcd_pro_settings != nullptr && fcd_pro_settings->isSet()){ isObjectUpdated = true; break;}
if(fcd_pro_plus_settings != nullptr && fcd_pro_plus_settings->isSet()){ isObjectUpdated = true; break;}
if(file_input_settings != nullptr && file_input_settings->isSet()){ isObjectUpdated = true; break;}
if(hack_rf_input_settings != nullptr && hack_rf_input_settings->isSet()){ isObjectUpdated = true; break;}
if(hack_rf_output_settings != nullptr && hack_rf_output_settings->isSet()){ isObjectUpdated = true; break;}
if(kiwi_sdr_settings != nullptr && kiwi_sdr_settings->isSet()){ isObjectUpdated = true; break;}
if(lime_sdr_input_settings != nullptr && lime_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
if(lime_sdr_output_settings != nullptr && lime_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
if(local_input_settings != nullptr && local_input_settings->isSet()){ isObjectUpdated = true; break;}
if(local_output_settings != nullptr && local_output_settings->isSet()){ isObjectUpdated = true; break;}
if(perseus_settings != nullptr && perseus_settings->isSet()){ isObjectUpdated = true; break;}
if(pluto_sdr_input_settings != nullptr && pluto_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
if(pluto_sdr_output_settings != nullptr && pluto_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
if(rtl_sdr_settings != nullptr && rtl_sdr_settings->isSet()){ isObjectUpdated = true; break;}
if(remote_output_settings != nullptr && remote_output_settings->isSet()){ isObjectUpdated = true; break;}
if(remote_input_settings != nullptr && remote_input_settings->isSet()){ isObjectUpdated = true; break;}
if(sdr_play_settings != nullptr && sdr_play_settings->isSet()){ isObjectUpdated = true; break;}
if(soapy_sdr_input_settings != nullptr && soapy_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
if(soapy_sdr_output_settings != nullptr && soapy_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
if(test_source_settings != nullptr && test_source_settings->isSet()){ isObjectUpdated = true; break;}
if(test_mi_settings != nullptr && test_mi_settings->isSet()){ isObjectUpdated = true; break;}
if(xtrx_input_settings != nullptr && xtrx_input_settings->isSet()){ isObjectUpdated = true; break;}
if(xtrx_output_settings != nullptr && xtrx_output_settings->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,274 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGDeviceSettings_2.h
*
* Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present.
*/
#ifndef SWGDeviceSettings_2_H_
#define SWGDeviceSettings_2_H_
#include <QJsonObject>
#include "SWGAirspyHFSettings.h"
#include "SWGAirspySettings.h"
#include "SWGBladeRF1InputSettings.h"
#include "SWGBladeRF1OutputSettings.h"
#include "SWGBladeRF2InputSettings.h"
#include "SWGBladeRF2OutputSettings.h"
#include "SWGFCDProPlusSettings.h"
#include "SWGFCDProSettings.h"
#include "SWGFileInputSettings.h"
#include "SWGHackRFInputSettings.h"
#include "SWGHackRFOutputSettings.h"
#include "SWGKiwiSDRSettings.h"
#include "SWGLimeSdrInputSettings.h"
#include "SWGLimeSdrOutputSettings.h"
#include "SWGLocalInputSettings.h"
#include "SWGLocalOutputSettings.h"
#include "SWGPerseusSettings.h"
#include "SWGPlutoSdrInputSettings.h"
#include "SWGPlutoSdrOutputSettings.h"
#include "SWGRemoteInputSettings.h"
#include "SWGRemoteOutputSettings.h"
#include "SWGRtlSdrSettings.h"
#include "SWGSDRPlaySettings.h"
#include "SWGSoapySDRInputSettings.h"
#include "SWGSoapySDROutputSettings.h"
#include "SWGTestMISettings.h"
#include "SWGTestSourceSettings.h"
#include "SWGXtrxInputSettings.h"
#include "SWGXtrxOutputSettings.h"
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGDeviceSettings_2: public SWGObject {
public:
SWGDeviceSettings_2();
SWGDeviceSettings_2(QString* json);
virtual ~SWGDeviceSettings_2();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGDeviceSettings_2* fromJson(QString &jsonString) override;
QString* getDeviceHwType();
void setDeviceHwType(QString* device_hw_type);
qint32 getDirection();
void setDirection(qint32 direction);
qint32 getOriginatorIndex();
void setOriginatorIndex(qint32 originator_index);
SWGAirspySettings* getAirspySettings();
void setAirspySettings(SWGAirspySettings* airspy_settings);
SWGAirspyHFSettings* getAirspyHfSettings();
void setAirspyHfSettings(SWGAirspyHFSettings* airspy_hf_settings);
SWGBladeRF1InputSettings* getBladeRf1InputSettings();
void setBladeRf1InputSettings(SWGBladeRF1InputSettings* blade_rf1_input_settings);
SWGBladeRF2InputSettings* getBladeRf2InputSettings();
void setBladeRf2InputSettings(SWGBladeRF2InputSettings* blade_rf2_input_settings);
SWGBladeRF1OutputSettings* getBladeRf1OutputSettings();
void setBladeRf1OutputSettings(SWGBladeRF1OutputSettings* blade_rf1_output_settings);
SWGBladeRF2OutputSettings* getBladeRf2OutputSettings();
void setBladeRf2OutputSettings(SWGBladeRF2OutputSettings* blade_rf2_output_settings);
SWGFCDProSettings* getFcdProSettings();
void setFcdProSettings(SWGFCDProSettings* fcd_pro_settings);
SWGFCDProPlusSettings* getFcdProPlusSettings();
void setFcdProPlusSettings(SWGFCDProPlusSettings* fcd_pro_plus_settings);
SWGFileInputSettings* getFileInputSettings();
void setFileInputSettings(SWGFileInputSettings* file_input_settings);
SWGHackRFInputSettings* getHackRfInputSettings();
void setHackRfInputSettings(SWGHackRFInputSettings* hack_rf_input_settings);
SWGHackRFOutputSettings* getHackRfOutputSettings();
void setHackRfOutputSettings(SWGHackRFOutputSettings* hack_rf_output_settings);
SWGKiwiSDRSettings* getKiwiSdrSettings();
void setKiwiSdrSettings(SWGKiwiSDRSettings* kiwi_sdr_settings);
SWGLimeSdrInputSettings* getLimeSdrInputSettings();
void setLimeSdrInputSettings(SWGLimeSdrInputSettings* lime_sdr_input_settings);
SWGLimeSdrOutputSettings* getLimeSdrOutputSettings();
void setLimeSdrOutputSettings(SWGLimeSdrOutputSettings* lime_sdr_output_settings);
SWGLocalInputSettings* getLocalInputSettings();
void setLocalInputSettings(SWGLocalInputSettings* local_input_settings);
SWGLocalOutputSettings* getLocalOutputSettings();
void setLocalOutputSettings(SWGLocalOutputSettings* local_output_settings);
SWGPerseusSettings* getPerseusSettings();
void setPerseusSettings(SWGPerseusSettings* perseus_settings);
SWGPlutoSdrInputSettings* getPlutoSdrInputSettings();
void setPlutoSdrInputSettings(SWGPlutoSdrInputSettings* pluto_sdr_input_settings);
SWGPlutoSdrOutputSettings* getPlutoSdrOutputSettings();
void setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings* pluto_sdr_output_settings);
SWGRtlSdrSettings* getRtlSdrSettings();
void setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings);
SWGRemoteOutputSettings* getRemoteOutputSettings();
void setRemoteOutputSettings(SWGRemoteOutputSettings* remote_output_settings);
SWGRemoteInputSettings* getRemoteInputSettings();
void setRemoteInputSettings(SWGRemoteInputSettings* remote_input_settings);
SWGSDRPlaySettings* getSdrPlaySettings();
void setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings);
SWGSoapySDRInputSettings* getSoapySdrInputSettings();
void setSoapySdrInputSettings(SWGSoapySDRInputSettings* soapy_sdr_input_settings);
SWGSoapySDROutputSettings* getSoapySdrOutputSettings();
void setSoapySdrOutputSettings(SWGSoapySDROutputSettings* soapy_sdr_output_settings);
SWGTestSourceSettings* getTestSourceSettings();
void setTestSourceSettings(SWGTestSourceSettings* test_source_settings);
SWGTestMISettings* getTestMiSettings();
void setTestMiSettings(SWGTestMISettings* test_mi_settings);
SWGXtrxInputSettings* getXtrxInputSettings();
void setXtrxInputSettings(SWGXtrxInputSettings* xtrx_input_settings);
SWGXtrxOutputSettings* getXtrxOutputSettings();
void setXtrxOutputSettings(SWGXtrxOutputSettings* xtrx_output_settings);
virtual bool isSet() override;
private:
QString* device_hw_type;
bool m_device_hw_type_isSet;
qint32 direction;
bool m_direction_isSet;
qint32 originator_index;
bool m_originator_index_isSet;
SWGAirspySettings* airspy_settings;
bool m_airspy_settings_isSet;
SWGAirspyHFSettings* airspy_hf_settings;
bool m_airspy_hf_settings_isSet;
SWGBladeRF1InputSettings* blade_rf1_input_settings;
bool m_blade_rf1_input_settings_isSet;
SWGBladeRF2InputSettings* blade_rf2_input_settings;
bool m_blade_rf2_input_settings_isSet;
SWGBladeRF1OutputSettings* blade_rf1_output_settings;
bool m_blade_rf1_output_settings_isSet;
SWGBladeRF2OutputSettings* blade_rf2_output_settings;
bool m_blade_rf2_output_settings_isSet;
SWGFCDProSettings* fcd_pro_settings;
bool m_fcd_pro_settings_isSet;
SWGFCDProPlusSettings* fcd_pro_plus_settings;
bool m_fcd_pro_plus_settings_isSet;
SWGFileInputSettings* file_input_settings;
bool m_file_input_settings_isSet;
SWGHackRFInputSettings* hack_rf_input_settings;
bool m_hack_rf_input_settings_isSet;
SWGHackRFOutputSettings* hack_rf_output_settings;
bool m_hack_rf_output_settings_isSet;
SWGKiwiSDRSettings* kiwi_sdr_settings;
bool m_kiwi_sdr_settings_isSet;
SWGLimeSdrInputSettings* lime_sdr_input_settings;
bool m_lime_sdr_input_settings_isSet;
SWGLimeSdrOutputSettings* lime_sdr_output_settings;
bool m_lime_sdr_output_settings_isSet;
SWGLocalInputSettings* local_input_settings;
bool m_local_input_settings_isSet;
SWGLocalOutputSettings* local_output_settings;
bool m_local_output_settings_isSet;
SWGPerseusSettings* perseus_settings;
bool m_perseus_settings_isSet;
SWGPlutoSdrInputSettings* pluto_sdr_input_settings;
bool m_pluto_sdr_input_settings_isSet;
SWGPlutoSdrOutputSettings* pluto_sdr_output_settings;
bool m_pluto_sdr_output_settings_isSet;
SWGRtlSdrSettings* rtl_sdr_settings;
bool m_rtl_sdr_settings_isSet;
SWGRemoteOutputSettings* remote_output_settings;
bool m_remote_output_settings_isSet;
SWGRemoteInputSettings* remote_input_settings;
bool m_remote_input_settings_isSet;
SWGSDRPlaySettings* sdr_play_settings;
bool m_sdr_play_settings_isSet;
SWGSoapySDRInputSettings* soapy_sdr_input_settings;
bool m_soapy_sdr_input_settings_isSet;
SWGSoapySDROutputSettings* soapy_sdr_output_settings;
bool m_soapy_sdr_output_settings_isSet;
SWGTestSourceSettings* test_source_settings;
bool m_test_source_settings_isSet;
SWGTestMISettings* test_mi_settings;
bool m_test_mi_settings_isSet;
SWGXtrxInputSettings* xtrx_input_settings;
bool m_xtrx_input_settings_isSet;
SWGXtrxOutputSettings* xtrx_output_settings;
bool m_xtrx_output_settings_isSet;
};
}
#endif /* SWGDeviceSettings_2_H_ */

View File

@ -0,0 +1,526 @@
/**
* 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.11.3
* 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 "SWGGLSpectrum.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGGLSpectrum::SWGGLSpectrum(QString* json) {
init();
this->fromJson(*json);
}
SWGGLSpectrum::SWGGLSpectrum() {
fft_size = 0;
m_fft_size_isSet = false;
fft_overlap = 0;
m_fft_overlap_isSet = false;
m_fft_window = 0;
m_m_fft_window_isSet = false;
ref_level = 0.0f;
m_ref_level_isSet = false;
power_range = 0.0f;
m_power_range_isSet = false;
display_waterfall = 0;
m_display_waterfall_isSet = false;
inverted_waterfall = 0;
m_inverted_waterfall_isSet = false;
display_max_hold = 0;
m_display_max_hold_isSet = false;
display_histogram = 0;
m_display_histogram_isSet = false;
decay = 0;
m_decay_isSet = false;
display_grid = 0;
m_display_grid_isSet = false;
invert = 0;
m_invert_isSet = false;
display_grid_intensity = 0;
m_display_grid_intensity_isSet = false;
decay_divisor = 0;
m_decay_divisor_isSet = false;
histogram_stroke = 0;
m_histogram_stroke_isSet = false;
display_current = 0;
m_display_current_isSet = false;
display_trace_intensity = 0;
m_display_trace_intensity_isSet = false;
waterfall_share = 0.0f;
m_waterfall_share_isSet = false;
averaging_mode = 0;
m_averaging_mode_isSet = false;
averaging_value = 0;
m_averaging_value_isSet = false;
linear = 0;
m_linear_isSet = false;
}
SWGGLSpectrum::~SWGGLSpectrum() {
this->cleanup();
}
void
SWGGLSpectrum::init() {
fft_size = 0;
m_fft_size_isSet = false;
fft_overlap = 0;
m_fft_overlap_isSet = false;
m_fft_window = 0;
m_m_fft_window_isSet = false;
ref_level = 0.0f;
m_ref_level_isSet = false;
power_range = 0.0f;
m_power_range_isSet = false;
display_waterfall = 0;
m_display_waterfall_isSet = false;
inverted_waterfall = 0;
m_inverted_waterfall_isSet = false;
display_max_hold = 0;
m_display_max_hold_isSet = false;
display_histogram = 0;
m_display_histogram_isSet = false;
decay = 0;
m_decay_isSet = false;
display_grid = 0;
m_display_grid_isSet = false;
invert = 0;
m_invert_isSet = false;
display_grid_intensity = 0;
m_display_grid_intensity_isSet = false;
decay_divisor = 0;
m_decay_divisor_isSet = false;
histogram_stroke = 0;
m_histogram_stroke_isSet = false;
display_current = 0;
m_display_current_isSet = false;
display_trace_intensity = 0;
m_display_trace_intensity_isSet = false;
waterfall_share = 0.0f;
m_waterfall_share_isSet = false;
averaging_mode = 0;
m_averaging_mode_isSet = false;
averaging_value = 0;
m_averaging_value_isSet = false;
linear = 0;
m_linear_isSet = false;
}
void
SWGGLSpectrum::cleanup() {
}
SWGGLSpectrum*
SWGGLSpectrum::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGGLSpectrum::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&fft_size, pJson["fftSize"], "qint32", "");
::SWGSDRangel::setValue(&fft_overlap, pJson["fftOverlap"], "qint32", "");
::SWGSDRangel::setValue(&m_fft_window, pJson["m_fftWindow"], "qint32", "");
::SWGSDRangel::setValue(&ref_level, pJson["refLevel"], "float", "");
::SWGSDRangel::setValue(&power_range, pJson["powerRange"], "float", "");
::SWGSDRangel::setValue(&display_waterfall, pJson["displayWaterfall"], "qint32", "");
::SWGSDRangel::setValue(&inverted_waterfall, pJson["invertedWaterfall"], "qint32", "");
::SWGSDRangel::setValue(&display_max_hold, pJson["displayMaxHold"], "qint32", "");
::SWGSDRangel::setValue(&display_histogram, pJson["displayHistogram"], "qint32", "");
::SWGSDRangel::setValue(&decay, pJson["decay"], "qint32", "");
::SWGSDRangel::setValue(&display_grid, pJson["displayGrid"], "qint32", "");
::SWGSDRangel::setValue(&invert, pJson["invert"], "qint32", "");
::SWGSDRangel::setValue(&display_grid_intensity, pJson["displayGridIntensity"], "qint32", "");
::SWGSDRangel::setValue(&decay_divisor, pJson["decayDivisor"], "qint32", "");
::SWGSDRangel::setValue(&histogram_stroke, pJson["histogramStroke"], "qint32", "");
::SWGSDRangel::setValue(&display_current, pJson["displayCurrent"], "qint32", "");
::SWGSDRangel::setValue(&display_trace_intensity, pJson["displayTraceIntensity"], "qint32", "");
::SWGSDRangel::setValue(&waterfall_share, pJson["waterfallShare"], "float", "");
::SWGSDRangel::setValue(&averaging_mode, pJson["averagingMode"], "qint32", "");
::SWGSDRangel::setValue(&averaging_value, pJson["averagingValue"], "qint32", "");
::SWGSDRangel::setValue(&linear, pJson["linear"], "qint32", "");
}
QString
SWGGLSpectrum::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGGLSpectrum::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_fft_size_isSet){
obj->insert("fftSize", QJsonValue(fft_size));
}
if(m_fft_overlap_isSet){
obj->insert("fftOverlap", QJsonValue(fft_overlap));
}
if(m_m_fft_window_isSet){
obj->insert("m_fftWindow", QJsonValue(m_fft_window));
}
if(m_ref_level_isSet){
obj->insert("refLevel", QJsonValue(ref_level));
}
if(m_power_range_isSet){
obj->insert("powerRange", QJsonValue(power_range));
}
if(m_display_waterfall_isSet){
obj->insert("displayWaterfall", QJsonValue(display_waterfall));
}
if(m_inverted_waterfall_isSet){
obj->insert("invertedWaterfall", QJsonValue(inverted_waterfall));
}
if(m_display_max_hold_isSet){
obj->insert("displayMaxHold", QJsonValue(display_max_hold));
}
if(m_display_histogram_isSet){
obj->insert("displayHistogram", QJsonValue(display_histogram));
}
if(m_decay_isSet){
obj->insert("decay", QJsonValue(decay));
}
if(m_display_grid_isSet){
obj->insert("displayGrid", QJsonValue(display_grid));
}
if(m_invert_isSet){
obj->insert("invert", QJsonValue(invert));
}
if(m_display_grid_intensity_isSet){
obj->insert("displayGridIntensity", QJsonValue(display_grid_intensity));
}
if(m_decay_divisor_isSet){
obj->insert("decayDivisor", QJsonValue(decay_divisor));
}
if(m_histogram_stroke_isSet){
obj->insert("histogramStroke", QJsonValue(histogram_stroke));
}
if(m_display_current_isSet){
obj->insert("displayCurrent", QJsonValue(display_current));
}
if(m_display_trace_intensity_isSet){
obj->insert("displayTraceIntensity", QJsonValue(display_trace_intensity));
}
if(m_waterfall_share_isSet){
obj->insert("waterfallShare", QJsonValue(waterfall_share));
}
if(m_averaging_mode_isSet){
obj->insert("averagingMode", QJsonValue(averaging_mode));
}
if(m_averaging_value_isSet){
obj->insert("averagingValue", QJsonValue(averaging_value));
}
if(m_linear_isSet){
obj->insert("linear", QJsonValue(linear));
}
return obj;
}
qint32
SWGGLSpectrum::getFftSize() {
return fft_size;
}
void
SWGGLSpectrum::setFftSize(qint32 fft_size) {
this->fft_size = fft_size;
this->m_fft_size_isSet = true;
}
qint32
SWGGLSpectrum::getFftOverlap() {
return fft_overlap;
}
void
SWGGLSpectrum::setFftOverlap(qint32 fft_overlap) {
this->fft_overlap = fft_overlap;
this->m_fft_overlap_isSet = true;
}
qint32
SWGGLSpectrum::getMFftWindow() {
return m_fft_window;
}
void
SWGGLSpectrum::setMFftWindow(qint32 m_fft_window) {
this->m_fft_window = m_fft_window;
this->m_m_fft_window_isSet = true;
}
float
SWGGLSpectrum::getRefLevel() {
return ref_level;
}
void
SWGGLSpectrum::setRefLevel(float ref_level) {
this->ref_level = ref_level;
this->m_ref_level_isSet = true;
}
float
SWGGLSpectrum::getPowerRange() {
return power_range;
}
void
SWGGLSpectrum::setPowerRange(float power_range) {
this->power_range = power_range;
this->m_power_range_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayWaterfall() {
return display_waterfall;
}
void
SWGGLSpectrum::setDisplayWaterfall(qint32 display_waterfall) {
this->display_waterfall = display_waterfall;
this->m_display_waterfall_isSet = true;
}
qint32
SWGGLSpectrum::getInvertedWaterfall() {
return inverted_waterfall;
}
void
SWGGLSpectrum::setInvertedWaterfall(qint32 inverted_waterfall) {
this->inverted_waterfall = inverted_waterfall;
this->m_inverted_waterfall_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayMaxHold() {
return display_max_hold;
}
void
SWGGLSpectrum::setDisplayMaxHold(qint32 display_max_hold) {
this->display_max_hold = display_max_hold;
this->m_display_max_hold_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayHistogram() {
return display_histogram;
}
void
SWGGLSpectrum::setDisplayHistogram(qint32 display_histogram) {
this->display_histogram = display_histogram;
this->m_display_histogram_isSet = true;
}
qint32
SWGGLSpectrum::getDecay() {
return decay;
}
void
SWGGLSpectrum::setDecay(qint32 decay) {
this->decay = decay;
this->m_decay_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayGrid() {
return display_grid;
}
void
SWGGLSpectrum::setDisplayGrid(qint32 display_grid) {
this->display_grid = display_grid;
this->m_display_grid_isSet = true;
}
qint32
SWGGLSpectrum::getInvert() {
return invert;
}
void
SWGGLSpectrum::setInvert(qint32 invert) {
this->invert = invert;
this->m_invert_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayGridIntensity() {
return display_grid_intensity;
}
void
SWGGLSpectrum::setDisplayGridIntensity(qint32 display_grid_intensity) {
this->display_grid_intensity = display_grid_intensity;
this->m_display_grid_intensity_isSet = true;
}
qint32
SWGGLSpectrum::getDecayDivisor() {
return decay_divisor;
}
void
SWGGLSpectrum::setDecayDivisor(qint32 decay_divisor) {
this->decay_divisor = decay_divisor;
this->m_decay_divisor_isSet = true;
}
qint32
SWGGLSpectrum::getHistogramStroke() {
return histogram_stroke;
}
void
SWGGLSpectrum::setHistogramStroke(qint32 histogram_stroke) {
this->histogram_stroke = histogram_stroke;
this->m_histogram_stroke_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayCurrent() {
return display_current;
}
void
SWGGLSpectrum::setDisplayCurrent(qint32 display_current) {
this->display_current = display_current;
this->m_display_current_isSet = true;
}
qint32
SWGGLSpectrum::getDisplayTraceIntensity() {
return display_trace_intensity;
}
void
SWGGLSpectrum::setDisplayTraceIntensity(qint32 display_trace_intensity) {
this->display_trace_intensity = display_trace_intensity;
this->m_display_trace_intensity_isSet = true;
}
float
SWGGLSpectrum::getWaterfallShare() {
return waterfall_share;
}
void
SWGGLSpectrum::setWaterfallShare(float waterfall_share) {
this->waterfall_share = waterfall_share;
this->m_waterfall_share_isSet = true;
}
qint32
SWGGLSpectrum::getAveragingMode() {
return averaging_mode;
}
void
SWGGLSpectrum::setAveragingMode(qint32 averaging_mode) {
this->averaging_mode = averaging_mode;
this->m_averaging_mode_isSet = true;
}
qint32
SWGGLSpectrum::getAveragingValue() {
return averaging_value;
}
void
SWGGLSpectrum::setAveragingValue(qint32 averaging_value) {
this->averaging_value = averaging_value;
this->m_averaging_value_isSet = true;
}
qint32
SWGGLSpectrum::getLinear() {
return linear;
}
void
SWGGLSpectrum::setLinear(qint32 linear) {
this->linear = linear;
this->m_linear_isSet = true;
}
bool
SWGGLSpectrum::isSet(){
bool isObjectUpdated = false;
do{
if(m_fft_size_isSet){ isObjectUpdated = true; break;}
if(m_fft_overlap_isSet){ isObjectUpdated = true; break;}
if(m_m_fft_window_isSet){ isObjectUpdated = true; break;}
if(m_ref_level_isSet){ isObjectUpdated = true; break;}
if(m_power_range_isSet){ isObjectUpdated = true; break;}
if(m_display_waterfall_isSet){ isObjectUpdated = true; break;}
if(m_inverted_waterfall_isSet){ isObjectUpdated = true; break;}
if(m_display_max_hold_isSet){ isObjectUpdated = true; break;}
if(m_display_histogram_isSet){ isObjectUpdated = true; break;}
if(m_decay_isSet){ isObjectUpdated = true; break;}
if(m_display_grid_isSet){ isObjectUpdated = true; break;}
if(m_invert_isSet){ isObjectUpdated = true; break;}
if(m_display_grid_intensity_isSet){ isObjectUpdated = true; break;}
if(m_decay_divisor_isSet){ isObjectUpdated = true; break;}
if(m_histogram_stroke_isSet){ isObjectUpdated = true; break;}
if(m_display_current_isSet){ isObjectUpdated = true; break;}
if(m_display_trace_intensity_isSet){ isObjectUpdated = true; break;}
if(m_waterfall_share_isSet){ isObjectUpdated = true; break;}
if(m_averaging_mode_isSet){ isObjectUpdated = true; break;}
if(m_averaging_value_isSet){ isObjectUpdated = true; break;}
if(m_linear_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,178 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGGLSpectrum.h
*
* GLSpectrumGUI settings
*/
#ifndef SWGGLSpectrum_H_
#define SWGGLSpectrum_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGGLSpectrum: public SWGObject {
public:
SWGGLSpectrum();
SWGGLSpectrum(QString* json);
virtual ~SWGGLSpectrum();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGGLSpectrum* fromJson(QString &jsonString) override;
qint32 getFftSize();
void setFftSize(qint32 fft_size);
qint32 getFftOverlap();
void setFftOverlap(qint32 fft_overlap);
qint32 getMFftWindow();
void setMFftWindow(qint32 m_fft_window);
float getRefLevel();
void setRefLevel(float ref_level);
float getPowerRange();
void setPowerRange(float power_range);
qint32 getDisplayWaterfall();
void setDisplayWaterfall(qint32 display_waterfall);
qint32 getInvertedWaterfall();
void setInvertedWaterfall(qint32 inverted_waterfall);
qint32 getDisplayMaxHold();
void setDisplayMaxHold(qint32 display_max_hold);
qint32 getDisplayHistogram();
void setDisplayHistogram(qint32 display_histogram);
qint32 getDecay();
void setDecay(qint32 decay);
qint32 getDisplayGrid();
void setDisplayGrid(qint32 display_grid);
qint32 getInvert();
void setInvert(qint32 invert);
qint32 getDisplayGridIntensity();
void setDisplayGridIntensity(qint32 display_grid_intensity);
qint32 getDecayDivisor();
void setDecayDivisor(qint32 decay_divisor);
qint32 getHistogramStroke();
void setHistogramStroke(qint32 histogram_stroke);
qint32 getDisplayCurrent();
void setDisplayCurrent(qint32 display_current);
qint32 getDisplayTraceIntensity();
void setDisplayTraceIntensity(qint32 display_trace_intensity);
float getWaterfallShare();
void setWaterfallShare(float waterfall_share);
qint32 getAveragingMode();
void setAveragingMode(qint32 averaging_mode);
qint32 getAveragingValue();
void setAveragingValue(qint32 averaging_value);
qint32 getLinear();
void setLinear(qint32 linear);
virtual bool isSet() override;
private:
qint32 fft_size;
bool m_fft_size_isSet;
qint32 fft_overlap;
bool m_fft_overlap_isSet;
qint32 m_fft_window;
bool m_m_fft_window_isSet;
float ref_level;
bool m_ref_level_isSet;
float power_range;
bool m_power_range_isSet;
qint32 display_waterfall;
bool m_display_waterfall_isSet;
qint32 inverted_waterfall;
bool m_inverted_waterfall_isSet;
qint32 display_max_hold;
bool m_display_max_hold_isSet;
qint32 display_histogram;
bool m_display_histogram_isSet;
qint32 decay;
bool m_decay_isSet;
qint32 display_grid;
bool m_display_grid_isSet;
qint32 invert;
bool m_invert_isSet;
qint32 display_grid_intensity;
bool m_display_grid_intensity_isSet;
qint32 decay_divisor;
bool m_decay_divisor_isSet;
qint32 histogram_stroke;
bool m_histogram_stroke_isSet;
qint32 display_current;
bool m_display_current_isSet;
qint32 display_trace_intensity;
bool m_display_trace_intensity_isSet;
float waterfall_share;
bool m_waterfall_share_isSet;
qint32 averaging_mode;
bool m_averaging_mode_isSet;
qint32 averaging_value;
bool m_averaging_value_isSet;
qint32 linear;
bool m_linear_isSet;
};
}
#endif /* SWGGLSpectrum_H_ */

View File

@ -730,6 +730,58 @@ SWGInstanceApi::instanceChannelsCallback(SWGHttpRequestWorker * worker) {
}
}
void
SWGInstanceApi::instanceConfig() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/config");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGInstanceApi::instanceConfigCallback);
worker->execute(&input);
}
void
SWGInstanceApi::instanceConfigCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGInstanceConfigResponse* output = static_cast<SWGInstanceConfigResponse*>(create(json, QString("SWGInstanceConfigResponse")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceConfigSignal(output);
} else {
emit instanceConfigSignalE(output, error_type, error_str);
emit instanceConfigSignalEFull(worker, error_type, error_str);
}
}
void
SWGInstanceApi::instanceDelete() {
QString fullPath;

View File

@ -23,6 +23,7 @@
#include "SWGDeviceSetList.h"
#include "SWGErrorResponse.h"
#include "SWGInstanceChannelsResponse.h"
#include "SWGInstanceConfigResponse.h"
#include "SWGInstanceDevicesResponse.h"
#include "SWGInstanceSummaryResponse.h"
#include "SWGLocationInformation.h"
@ -63,6 +64,7 @@ public:
void instanceAudioOutputDelete(SWGAudioOutputDevice& body);
void instanceAudioOutputPatch(SWGAudioOutputDevice& body);
void instanceChannels(qint32 direction);
void instanceConfig();
void instanceDelete();
void instanceDeviceSetsGet();
void instanceDevices(qint32 direction);
@ -93,6 +95,7 @@ private:
void instanceAudioOutputDeleteCallback (SWGHttpRequestWorker * worker);
void instanceAudioOutputPatchCallback (SWGHttpRequestWorker * worker);
void instanceChannelsCallback (SWGHttpRequestWorker * worker);
void instanceConfigCallback (SWGHttpRequestWorker * worker);
void instanceDeleteCallback (SWGHttpRequestWorker * worker);
void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker);
void instanceDevicesCallback (SWGHttpRequestWorker * worker);
@ -123,6 +126,7 @@ signals:
void instanceAudioOutputDeleteSignal(SWGAudioOutputDevice* summary);
void instanceAudioOutputPatchSignal(SWGAudioOutputDevice* summary);
void instanceChannelsSignal(SWGInstanceChannelsResponse* summary);
void instanceConfigSignal(SWGInstanceConfigResponse* summary);
void instanceDeleteSignal(SWGInstanceSummaryResponse* summary);
void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary);
void instanceDevicesSignal(SWGInstanceDevicesResponse* summary);
@ -152,6 +156,7 @@ signals:
void instanceAudioOutputDeleteSignalE(SWGAudioOutputDevice* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceAudioOutputPatchSignalE(SWGAudioOutputDevice* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceChannelsSignalE(SWGInstanceChannelsResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceConfigSignalE(SWGInstanceConfigResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeleteSignalE(SWGInstanceSummaryResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeviceSetsGetSignalE(SWGDeviceSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDevicesSignalE(SWGInstanceDevicesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
@ -181,6 +186,7 @@ signals:
void instanceAudioOutputDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceAudioOutputPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceChannelsSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceConfigSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeviceSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDevicesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);

View File

@ -0,0 +1,185 @@
/**
* 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.11.3
* 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 "SWGInstanceConfigResponse.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGInstanceConfigResponse::SWGInstanceConfigResponse(QString* json) {
init();
this->fromJson(*json);
}
SWGInstanceConfigResponse::SWGInstanceConfigResponse() {
preferences = nullptr;
m_preferences_isSet = false;
working_preset = nullptr;
m_working_preset_isSet = false;
presets = nullptr;
m_presets_isSet = false;
commands = nullptr;
m_commands_isSet = false;
}
SWGInstanceConfigResponse::~SWGInstanceConfigResponse() {
this->cleanup();
}
void
SWGInstanceConfigResponse::init() {
preferences = new SWGPreferences();
m_preferences_isSet = false;
working_preset = new SWGPreset();
m_working_preset_isSet = false;
presets = new QList<SWGPreset*>();
m_presets_isSet = false;
commands = new QList<SWGCommand*>();
m_commands_isSet = false;
}
void
SWGInstanceConfigResponse::cleanup() {
if(preferences != nullptr) {
delete preferences;
}
if(working_preset != nullptr) {
delete working_preset;
}
if(presets != nullptr) {
auto arr = presets;
for(auto o: *arr) {
delete o;
}
delete presets;
}
if(commands != nullptr) {
auto arr = commands;
for(auto o: *arr) {
delete o;
}
delete commands;
}
}
SWGInstanceConfigResponse*
SWGInstanceConfigResponse::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGInstanceConfigResponse::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&preferences, pJson["preferences"], "SWGPreferences", "SWGPreferences");
::SWGSDRangel::setValue(&working_preset, pJson["workingPreset"], "SWGPreset", "SWGPreset");
::SWGSDRangel::setValue(&presets, pJson["presets"], "QList", "SWGPreset");
::SWGSDRangel::setValue(&commands, pJson["commands"], "QList", "SWGCommand");
}
QString
SWGInstanceConfigResponse::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGInstanceConfigResponse::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if((preferences != nullptr) && (preferences->isSet())){
toJsonValue(QString("preferences"), preferences, obj, QString("SWGPreferences"));
}
if((working_preset != nullptr) && (working_preset->isSet())){
toJsonValue(QString("workingPreset"), working_preset, obj, QString("SWGPreset"));
}
if(presets->size() > 0){
toJsonArray((QList<void*>*)presets, obj, "presets", "SWGPreset");
}
if(commands->size() > 0){
toJsonArray((QList<void*>*)commands, obj, "commands", "SWGCommand");
}
return obj;
}
SWGPreferences*
SWGInstanceConfigResponse::getPreferences() {
return preferences;
}
void
SWGInstanceConfigResponse::setPreferences(SWGPreferences* preferences) {
this->preferences = preferences;
this->m_preferences_isSet = true;
}
SWGPreset*
SWGInstanceConfigResponse::getWorkingPreset() {
return working_preset;
}
void
SWGInstanceConfigResponse::setWorkingPreset(SWGPreset* working_preset) {
this->working_preset = working_preset;
this->m_working_preset_isSet = true;
}
QList<SWGPreset*>*
SWGInstanceConfigResponse::getPresets() {
return presets;
}
void
SWGInstanceConfigResponse::setPresets(QList<SWGPreset*>* presets) {
this->presets = presets;
this->m_presets_isSet = true;
}
QList<SWGCommand*>*
SWGInstanceConfigResponse::getCommands() {
return commands;
}
void
SWGInstanceConfigResponse::setCommands(QList<SWGCommand*>* commands) {
this->commands = commands;
this->m_commands_isSet = true;
}
bool
SWGInstanceConfigResponse::isSet(){
bool isObjectUpdated = false;
do{
if(preferences != nullptr && preferences->isSet()){ isObjectUpdated = true; break;}
if(working_preset != nullptr && working_preset->isSet()){ isObjectUpdated = true; break;}
if(presets->size() > 0){ isObjectUpdated = true; break;}
if(commands->size() > 0){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,80 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGInstanceConfigResponse.h
*
* Preferences, Presets and Commands of the MainSettings saved by Qt
*/
#ifndef SWGInstanceConfigResponse_H_
#define SWGInstanceConfigResponse_H_
#include <QJsonObject>
#include "SWGCommand.h"
#include "SWGPreferences.h"
#include "SWGPreset.h"
#include <QList>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGInstanceConfigResponse: public SWGObject {
public:
SWGInstanceConfigResponse();
SWGInstanceConfigResponse(QString* json);
virtual ~SWGInstanceConfigResponse();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGInstanceConfigResponse* fromJson(QString &jsonString) override;
SWGPreferences* getPreferences();
void setPreferences(SWGPreferences* preferences);
SWGPreset* getWorkingPreset();
void setWorkingPreset(SWGPreset* working_preset);
QList<SWGPreset*>* getPresets();
void setPresets(QList<SWGPreset*>* presets);
QList<SWGCommand*>* getCommands();
void setCommands(QList<SWGCommand*>* commands);
virtual bool isSet() override;
private:
SWGPreferences* preferences;
bool m_preferences_isSet;
SWGPreset* working_preset;
bool m_working_preset_isSet;
QList<SWGPreset*>* presets;
bool m_presets_isSet;
QList<SWGCommand*>* commands;
bool m_commands_isSet;
};
}
#endif /* SWGInstanceConfigResponse_H_ */

View File

@ -42,20 +42,25 @@
#include "SWGBladeRF2OutputSettings.h"
#include "SWGCWKeyerSettings.h"
#include "SWGChannel.h"
#include "SWGChannelConfig.h"
#include "SWGChannelListItem.h"
#include "SWGChannelReport.h"
#include "SWGChannelSettings.h"
#include "SWGChannelSettings_2.h"
#include "SWGChannelsDetail.h"
#include "SWGCommand.h"
#include "SWGComplex.h"
#include "SWGDSDDemodReport.h"
#include "SWGDSDDemodSettings.h"
#include "SWGDVSerialDevice.h"
#include "SWGDVSerialDevices.h"
#include "SWGDeviceConfig.h"
#include "SWGDeviceListItem.h"
#include "SWGDeviceReport.h"
#include "SWGDeviceSet.h"
#include "SWGDeviceSetList.h"
#include "SWGDeviceSettings.h"
#include "SWGDeviceSettings_2.h"
#include "SWGDeviceState.h"
#include "SWGErrorResponse.h"
#include "SWGFCDProPlusSettings.h"
@ -73,10 +78,12 @@
#include "SWGFrequency.h"
#include "SWGFrequencyBand.h"
#include "SWGFrequencyRange.h"
#include "SWGGLSpectrum.h"
#include "SWGGain.h"
#include "SWGHackRFInputSettings.h"
#include "SWGHackRFOutputSettings.h"
#include "SWGInstanceChannelsResponse.h"
#include "SWGInstanceConfigResponse.h"
#include "SWGInstanceDevicesResponse.h"
#include "SWGInstanceSummaryResponse.h"
#include "SWGKiwiSDRReport.h"
@ -104,6 +111,8 @@
#include "SWGPlutoSdrInputSettings.h"
#include "SWGPlutoSdrOutputReport.h"
#include "SWGPlutoSdrOutputSettings.h"
#include "SWGPreferences.h"
#include "SWGPreset.h"
#include "SWGPresetExport.h"
#include "SWGPresetGroup.h"
#include "SWGPresetIdentifier.h"
@ -241,6 +250,9 @@ namespace SWGSDRangel {
if(QString("SWGChannel").compare(type) == 0) {
return new SWGChannel();
}
if(QString("SWGChannelConfig").compare(type) == 0) {
return new SWGChannelConfig();
}
if(QString("SWGChannelListItem").compare(type) == 0) {
return new SWGChannelListItem();
}
@ -250,9 +262,15 @@ namespace SWGSDRangel {
if(QString("SWGChannelSettings").compare(type) == 0) {
return new SWGChannelSettings();
}
if(QString("SWGChannelSettings_2").compare(type) == 0) {
return new SWGChannelSettings_2();
}
if(QString("SWGChannelsDetail").compare(type) == 0) {
return new SWGChannelsDetail();
}
if(QString("SWGCommand").compare(type) == 0) {
return new SWGCommand();
}
if(QString("SWGComplex").compare(type) == 0) {
return new SWGComplex();
}
@ -268,6 +286,9 @@ namespace SWGSDRangel {
if(QString("SWGDVSerialDevices").compare(type) == 0) {
return new SWGDVSerialDevices();
}
if(QString("SWGDeviceConfig").compare(type) == 0) {
return new SWGDeviceConfig();
}
if(QString("SWGDeviceListItem").compare(type) == 0) {
return new SWGDeviceListItem();
}
@ -283,6 +304,9 @@ namespace SWGSDRangel {
if(QString("SWGDeviceSettings").compare(type) == 0) {
return new SWGDeviceSettings();
}
if(QString("SWGDeviceSettings_2").compare(type) == 0) {
return new SWGDeviceSettings_2();
}
if(QString("SWGDeviceState").compare(type) == 0) {
return new SWGDeviceState();
}
@ -334,6 +358,9 @@ namespace SWGSDRangel {
if(QString("SWGFrequencyRange").compare(type) == 0) {
return new SWGFrequencyRange();
}
if(QString("SWGGLSpectrum").compare(type) == 0) {
return new SWGGLSpectrum();
}
if(QString("SWGGain").compare(type) == 0) {
return new SWGGain();
}
@ -346,6 +373,9 @@ namespace SWGSDRangel {
if(QString("SWGInstanceChannelsResponse").compare(type) == 0) {
return new SWGInstanceChannelsResponse();
}
if(QString("SWGInstanceConfigResponse").compare(type) == 0) {
return new SWGInstanceConfigResponse();
}
if(QString("SWGInstanceDevicesResponse").compare(type) == 0) {
return new SWGInstanceDevicesResponse();
}
@ -427,6 +457,12 @@ namespace SWGSDRangel {
if(QString("SWGPlutoSdrOutputSettings").compare(type) == 0) {
return new SWGPlutoSdrOutputSettings();
}
if(QString("SWGPreferences").compare(type) == 0) {
return new SWGPreferences();
}
if(QString("SWGPreset").compare(type) == 0) {
return new SWGPreset();
}
if(QString("SWGPresetExport").compare(type) == 0) {
return new SWGPresetExport();
}

View File

@ -0,0 +1,326 @@
/**
* 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.11.3
* 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 "SWGPreferences.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGPreferences::SWGPreferences(QString* json) {
init();
this->fromJson(*json);
}
SWGPreferences::SWGPreferences() {
source_type = nullptr;
m_source_type_isSet = false;
source_device = nullptr;
m_source_device_isSet = false;
audio_type = nullptr;
m_audio_type_isSet = false;
audio_device = nullptr;
m_audio_device_isSet = false;
source_index = 0;
m_source_index_isSet = false;
latitude = 0.0f;
m_latitude_isSet = false;
longitude = 0.0f;
m_longitude_isSet = false;
console_min_log_level = 0;
m_console_min_log_level_isSet = false;
use_log_file = 0;
m_use_log_file_isSet = false;
log_file_name = nullptr;
m_log_file_name_isSet = false;
file_min_log_level = 0;
m_file_min_log_level_isSet = false;
}
SWGPreferences::~SWGPreferences() {
this->cleanup();
}
void
SWGPreferences::init() {
source_type = new QString("");
m_source_type_isSet = false;
source_device = new QString("");
m_source_device_isSet = false;
audio_type = new QString("");
m_audio_type_isSet = false;
audio_device = new QString("");
m_audio_device_isSet = false;
source_index = 0;
m_source_index_isSet = false;
latitude = 0.0f;
m_latitude_isSet = false;
longitude = 0.0f;
m_longitude_isSet = false;
console_min_log_level = 0;
m_console_min_log_level_isSet = false;
use_log_file = 0;
m_use_log_file_isSet = false;
log_file_name = new QString("");
m_log_file_name_isSet = false;
file_min_log_level = 0;
m_file_min_log_level_isSet = false;
}
void
SWGPreferences::cleanup() {
if(source_type != nullptr) {
delete source_type;
}
if(source_device != nullptr) {
delete source_device;
}
if(audio_type != nullptr) {
delete audio_type;
}
if(audio_device != nullptr) {
delete audio_device;
}
if(log_file_name != nullptr) {
delete log_file_name;
}
}
SWGPreferences*
SWGPreferences::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGPreferences::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&source_type, pJson["sourceType"], "QString", "QString");
::SWGSDRangel::setValue(&source_device, pJson["sourceDevice"], "QString", "QString");
::SWGSDRangel::setValue(&audio_type, pJson["audioType"], "QString", "QString");
::SWGSDRangel::setValue(&audio_device, pJson["audioDevice"], "QString", "QString");
::SWGSDRangel::setValue(&source_index, pJson["sourceIndex"], "qint32", "");
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", "");
::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", "");
::SWGSDRangel::setValue(&console_min_log_level, pJson["consoleMinLogLevel"], "qint32", "");
::SWGSDRangel::setValue(&use_log_file, pJson["useLogFile"], "qint32", "");
::SWGSDRangel::setValue(&log_file_name, pJson["logFileName"], "QString", "QString");
::SWGSDRangel::setValue(&file_min_log_level, pJson["fileMinLogLevel"], "qint32", "");
}
QString
SWGPreferences::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGPreferences::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(source_type != nullptr && *source_type != QString("")){
toJsonValue(QString("sourceType"), source_type, obj, QString("QString"));
}
if(source_device != nullptr && *source_device != QString("")){
toJsonValue(QString("sourceDevice"), source_device, obj, QString("QString"));
}
if(audio_type != nullptr && *audio_type != QString("")){
toJsonValue(QString("audioType"), audio_type, obj, QString("QString"));
}
if(audio_device != nullptr && *audio_device != QString("")){
toJsonValue(QString("audioDevice"), audio_device, obj, QString("QString"));
}
if(m_source_index_isSet){
obj->insert("sourceIndex", QJsonValue(source_index));
}
if(m_latitude_isSet){
obj->insert("latitude", QJsonValue(latitude));
}
if(m_longitude_isSet){
obj->insert("longitude", QJsonValue(longitude));
}
if(m_console_min_log_level_isSet){
obj->insert("consoleMinLogLevel", QJsonValue(console_min_log_level));
}
if(m_use_log_file_isSet){
obj->insert("useLogFile", QJsonValue(use_log_file));
}
if(log_file_name != nullptr && *log_file_name != QString("")){
toJsonValue(QString("logFileName"), log_file_name, obj, QString("QString"));
}
if(m_file_min_log_level_isSet){
obj->insert("fileMinLogLevel", QJsonValue(file_min_log_level));
}
return obj;
}
QString*
SWGPreferences::getSourceType() {
return source_type;
}
void
SWGPreferences::setSourceType(QString* source_type) {
this->source_type = source_type;
this->m_source_type_isSet = true;
}
QString*
SWGPreferences::getSourceDevice() {
return source_device;
}
void
SWGPreferences::setSourceDevice(QString* source_device) {
this->source_device = source_device;
this->m_source_device_isSet = true;
}
QString*
SWGPreferences::getAudioType() {
return audio_type;
}
void
SWGPreferences::setAudioType(QString* audio_type) {
this->audio_type = audio_type;
this->m_audio_type_isSet = true;
}
QString*
SWGPreferences::getAudioDevice() {
return audio_device;
}
void
SWGPreferences::setAudioDevice(QString* audio_device) {
this->audio_device = audio_device;
this->m_audio_device_isSet = true;
}
qint32
SWGPreferences::getSourceIndex() {
return source_index;
}
void
SWGPreferences::setSourceIndex(qint32 source_index) {
this->source_index = source_index;
this->m_source_index_isSet = true;
}
float
SWGPreferences::getLatitude() {
return latitude;
}
void
SWGPreferences::setLatitude(float latitude) {
this->latitude = latitude;
this->m_latitude_isSet = true;
}
float
SWGPreferences::getLongitude() {
return longitude;
}
void
SWGPreferences::setLongitude(float longitude) {
this->longitude = longitude;
this->m_longitude_isSet = true;
}
qint32
SWGPreferences::getConsoleMinLogLevel() {
return console_min_log_level;
}
void
SWGPreferences::setConsoleMinLogLevel(qint32 console_min_log_level) {
this->console_min_log_level = console_min_log_level;
this->m_console_min_log_level_isSet = true;
}
qint32
SWGPreferences::getUseLogFile() {
return use_log_file;
}
void
SWGPreferences::setUseLogFile(qint32 use_log_file) {
this->use_log_file = use_log_file;
this->m_use_log_file_isSet = true;
}
QString*
SWGPreferences::getLogFileName() {
return log_file_name;
}
void
SWGPreferences::setLogFileName(QString* log_file_name) {
this->log_file_name = log_file_name;
this->m_log_file_name_isSet = true;
}
qint32
SWGPreferences::getFileMinLogLevel() {
return file_min_log_level;
}
void
SWGPreferences::setFileMinLogLevel(qint32 file_min_log_level) {
this->file_min_log_level = file_min_log_level;
this->m_file_min_log_level_isSet = true;
}
bool
SWGPreferences::isSet(){
bool isObjectUpdated = false;
do{
if(source_type != nullptr && *source_type != QString("")){ isObjectUpdated = true; break;}
if(source_device != nullptr && *source_device != QString("")){ isObjectUpdated = true; break;}
if(audio_type != nullptr && *audio_type != QString("")){ isObjectUpdated = true; break;}
if(audio_device != nullptr && *audio_device != QString("")){ isObjectUpdated = true; break;}
if(m_source_index_isSet){ isObjectUpdated = true; break;}
if(m_latitude_isSet){ isObjectUpdated = true; break;}
if(m_longitude_isSet){ isObjectUpdated = true; break;}
if(m_console_min_log_level_isSet){ isObjectUpdated = true; break;}
if(m_use_log_file_isSet){ isObjectUpdated = true; break;}
if(log_file_name != nullptr && *log_file_name != QString("")){ isObjectUpdated = true; break;}
if(m_file_min_log_level_isSet){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,119 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGPreferences.h
*
* Repreents a Prefernce object
*/
#ifndef SWGPreferences_H_
#define SWGPreferences_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGPreferences: public SWGObject {
public:
SWGPreferences();
SWGPreferences(QString* json);
virtual ~SWGPreferences();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGPreferences* fromJson(QString &jsonString) override;
QString* getSourceType();
void setSourceType(QString* source_type);
QString* getSourceDevice();
void setSourceDevice(QString* source_device);
QString* getAudioType();
void setAudioType(QString* audio_type);
QString* getAudioDevice();
void setAudioDevice(QString* audio_device);
qint32 getSourceIndex();
void setSourceIndex(qint32 source_index);
float getLatitude();
void setLatitude(float latitude);
float getLongitude();
void setLongitude(float longitude);
qint32 getConsoleMinLogLevel();
void setConsoleMinLogLevel(qint32 console_min_log_level);
qint32 getUseLogFile();
void setUseLogFile(qint32 use_log_file);
QString* getLogFileName();
void setLogFileName(QString* log_file_name);
qint32 getFileMinLogLevel();
void setFileMinLogLevel(qint32 file_min_log_level);
virtual bool isSet() override;
private:
QString* source_type;
bool m_source_type_isSet;
QString* source_device;
bool m_source_device_isSet;
QString* audio_type;
bool m_audio_type_isSet;
QString* audio_device;
bool m_audio_device_isSet;
qint32 source_index;
bool m_source_index_isSet;
float latitude;
bool m_latitude_isSet;
float longitude;
bool m_longitude_isSet;
qint32 console_min_log_level;
bool m_console_min_log_level_isSet;
qint32 use_log_file;
bool m_use_log_file_isSet;
QString* log_file_name;
bool m_log_file_name_isSet;
qint32 file_min_log_level;
bool m_file_min_log_level_isSet;
};
}
#endif /* SWGPreferences_H_ */

View File

@ -0,0 +1,382 @@
/**
* 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.11.3
* 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 "SWGPreset.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGPreset::SWGPreset(QString* json) {
init();
this->fromJson(*json);
}
SWGPreset::SWGPreset() {
source_preset = 0;
m_source_preset_isSet = false;
group = nullptr;
m_group_isSet = false;
description = nullptr;
m_description_isSet = false;
center_frequency = 0L;
m_center_frequency_isSet = false;
m_spectrum_config = nullptr;
m_m_spectrum_config_isSet = false;
dc_offset_correction = 0;
m_dc_offset_correction_isSet = false;
iq_imbalance_correction = 0;
m_iq_imbalance_correction_isSet = false;
source_id = nullptr;
m_source_id_isSet = false;
source_serial = nullptr;
m_source_serial_isSet = false;
source_sequence = 0;
m_source_sequence_isSet = false;
channel_configs = nullptr;
m_channel_configs_isSet = false;
device_configs = nullptr;
m_device_configs_isSet = false;
layout = nullptr;
m_layout_isSet = false;
}
SWGPreset::~SWGPreset() {
this->cleanup();
}
void
SWGPreset::init() {
source_preset = 0;
m_source_preset_isSet = false;
group = new QString("");
m_group_isSet = false;
description = new QString("");
m_description_isSet = false;
center_frequency = 0L;
m_center_frequency_isSet = false;
m_spectrum_config = new SWGGLSpectrum();
m_m_spectrum_config_isSet = false;
dc_offset_correction = 0;
m_dc_offset_correction_isSet = false;
iq_imbalance_correction = 0;
m_iq_imbalance_correction_isSet = false;
source_id = new QString("");
m_source_id_isSet = false;
source_serial = new QString("");
m_source_serial_isSet = false;
source_sequence = 0;
m_source_sequence_isSet = false;
channel_configs = new QList<SWGChannelConfig*>();
m_channel_configs_isSet = false;
device_configs = new QList<SWGDeviceConfig*>();
m_device_configs_isSet = false;
layout = new QString("");
m_layout_isSet = false;
}
void
SWGPreset::cleanup() {
if(group != nullptr) {
delete group;
}
if(description != nullptr) {
delete description;
}
if(m_spectrum_config != nullptr) {
delete m_spectrum_config;
}
if(source_id != nullptr) {
delete source_id;
}
if(source_serial != nullptr) {
delete source_serial;
}
if(channel_configs != nullptr) {
auto arr = channel_configs;
for(auto o: *arr) {
delete o;
}
delete channel_configs;
}
if(device_configs != nullptr) {
auto arr = device_configs;
for(auto o: *arr) {
delete o;
}
delete device_configs;
}
if(layout != nullptr) {
delete layout;
}
}
SWGPreset*
SWGPreset::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGPreset::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&source_preset, pJson["sourcePreset"], "qint32", "");
::SWGSDRangel::setValue(&group, pJson["group"], "QString", "QString");
::SWGSDRangel::setValue(&description, pJson["description"], "QString", "QString");
::SWGSDRangel::setValue(&center_frequency, pJson["centerFrequency"], "qint64", "");
::SWGSDRangel::setValue(&m_spectrum_config, pJson["m_spectrumConfig"], "SWGGLSpectrum", "SWGGLSpectrum");
::SWGSDRangel::setValue(&dc_offset_correction, pJson["dcOffsetCorrection"], "qint32", "");
::SWGSDRangel::setValue(&iq_imbalance_correction, pJson["iqImbalanceCorrection"], "qint32", "");
::SWGSDRangel::setValue(&source_id, pJson["sourceId"], "QString", "QString");
::SWGSDRangel::setValue(&source_serial, pJson["sourceSerial"], "QString", "QString");
::SWGSDRangel::setValue(&source_sequence, pJson["sourceSequence"], "qint32", "");
::SWGSDRangel::setValue(&channel_configs, pJson["channelConfigs"], "QList", "SWGChannelConfig");
::SWGSDRangel::setValue(&device_configs, pJson["deviceConfigs"], "QList", "SWGDeviceConfig");
::SWGSDRangel::setValue(&layout, pJson["layout"], "QString", "QString");
}
QString
SWGPreset::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGPreset::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_source_preset_isSet){
obj->insert("sourcePreset", QJsonValue(source_preset));
}
if(group != nullptr && *group != QString("")){
toJsonValue(QString("group"), group, obj, QString("QString"));
}
if(description != nullptr && *description != QString("")){
toJsonValue(QString("description"), description, obj, QString("QString"));
}
if(m_center_frequency_isSet){
obj->insert("centerFrequency", QJsonValue(center_frequency));
}
if((m_spectrum_config != nullptr) && (m_spectrum_config->isSet())){
toJsonValue(QString("m_spectrumConfig"), m_spectrum_config, obj, QString("SWGGLSpectrum"));
}
if(m_dc_offset_correction_isSet){
obj->insert("dcOffsetCorrection", QJsonValue(dc_offset_correction));
}
if(m_iq_imbalance_correction_isSet){
obj->insert("iqImbalanceCorrection", QJsonValue(iq_imbalance_correction));
}
if(source_id != nullptr && *source_id != QString("")){
toJsonValue(QString("sourceId"), source_id, obj, QString("QString"));
}
if(source_serial != nullptr && *source_serial != QString("")){
toJsonValue(QString("sourceSerial"), source_serial, obj, QString("QString"));
}
if(m_source_sequence_isSet){
obj->insert("sourceSequence", QJsonValue(source_sequence));
}
if(channel_configs->size() > 0){
toJsonArray((QList<void*>*)channel_configs, obj, "channelConfigs", "SWGChannelConfig");
}
if(device_configs->size() > 0){
toJsonArray((QList<void*>*)device_configs, obj, "deviceConfigs", "SWGDeviceConfig");
}
if(layout != nullptr && *layout != QString("")){
toJsonValue(QString("layout"), layout, obj, QString("QString"));
}
return obj;
}
qint32
SWGPreset::getSourcePreset() {
return source_preset;
}
void
SWGPreset::setSourcePreset(qint32 source_preset) {
this->source_preset = source_preset;
this->m_source_preset_isSet = true;
}
QString*
SWGPreset::getGroup() {
return group;
}
void
SWGPreset::setGroup(QString* group) {
this->group = group;
this->m_group_isSet = true;
}
QString*
SWGPreset::getDescription() {
return description;
}
void
SWGPreset::setDescription(QString* description) {
this->description = description;
this->m_description_isSet = true;
}
qint64
SWGPreset::getCenterFrequency() {
return center_frequency;
}
void
SWGPreset::setCenterFrequency(qint64 center_frequency) {
this->center_frequency = center_frequency;
this->m_center_frequency_isSet = true;
}
SWGGLSpectrum*
SWGPreset::getMSpectrumConfig() {
return m_spectrum_config;
}
void
SWGPreset::setMSpectrumConfig(SWGGLSpectrum* m_spectrum_config) {
this->m_spectrum_config = m_spectrum_config;
this->m_m_spectrum_config_isSet = true;
}
qint32
SWGPreset::getDcOffsetCorrection() {
return dc_offset_correction;
}
void
SWGPreset::setDcOffsetCorrection(qint32 dc_offset_correction) {
this->dc_offset_correction = dc_offset_correction;
this->m_dc_offset_correction_isSet = true;
}
qint32
SWGPreset::getIqImbalanceCorrection() {
return iq_imbalance_correction;
}
void
SWGPreset::setIqImbalanceCorrection(qint32 iq_imbalance_correction) {
this->iq_imbalance_correction = iq_imbalance_correction;
this->m_iq_imbalance_correction_isSet = true;
}
QString*
SWGPreset::getSourceId() {
return source_id;
}
void
SWGPreset::setSourceId(QString* source_id) {
this->source_id = source_id;
this->m_source_id_isSet = true;
}
QString*
SWGPreset::getSourceSerial() {
return source_serial;
}
void
SWGPreset::setSourceSerial(QString* source_serial) {
this->source_serial = source_serial;
this->m_source_serial_isSet = true;
}
qint32
SWGPreset::getSourceSequence() {
return source_sequence;
}
void
SWGPreset::setSourceSequence(qint32 source_sequence) {
this->source_sequence = source_sequence;
this->m_source_sequence_isSet = true;
}
QList<SWGChannelConfig*>*
SWGPreset::getChannelConfigs() {
return channel_configs;
}
void
SWGPreset::setChannelConfigs(QList<SWGChannelConfig*>* channel_configs) {
this->channel_configs = channel_configs;
this->m_channel_configs_isSet = true;
}
QList<SWGDeviceConfig*>*
SWGPreset::getDeviceConfigs() {
return device_configs;
}
void
SWGPreset::setDeviceConfigs(QList<SWGDeviceConfig*>* device_configs) {
this->device_configs = device_configs;
this->m_device_configs_isSet = true;
}
QString*
SWGPreset::getLayout() {
return layout;
}
void
SWGPreset::setLayout(QString* layout) {
this->layout = layout;
this->m_layout_isSet = true;
}
bool
SWGPreset::isSet(){
bool isObjectUpdated = false;
do{
if(m_source_preset_isSet){ isObjectUpdated = true; break;}
if(group != nullptr && *group != QString("")){ isObjectUpdated = true; break;}
if(description != nullptr && *description != QString("")){ isObjectUpdated = true; break;}
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
if(m_spectrum_config != nullptr && m_spectrum_config->isSet()){ isObjectUpdated = true; break;}
if(m_dc_offset_correction_isSet){ isObjectUpdated = true; break;}
if(m_iq_imbalance_correction_isSet){ isObjectUpdated = true; break;}
if(source_id != nullptr && *source_id != QString("")){ isObjectUpdated = true; break;}
if(source_serial != nullptr && *source_serial != QString("")){ isObjectUpdated = true; break;}
if(m_source_sequence_isSet){ isObjectUpdated = true; break;}
if(channel_configs->size() > 0){ isObjectUpdated = true; break;}
if(device_configs->size() > 0){ isObjectUpdated = true; break;}
if(layout != nullptr && *layout != QString("")){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,135 @@
/**
* 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.11.3
* 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.
*/
/*
* SWGPreset.h
*
* Represents a Preset object
*/
#ifndef SWGPreset_H_
#define SWGPreset_H_
#include <QJsonObject>
#include "SWGChannelConfig.h"
#include "SWGDeviceConfig.h"
#include "SWGGLSpectrum.h"
#include <QList>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGPreset: public SWGObject {
public:
SWGPreset();
SWGPreset(QString* json);
virtual ~SWGPreset();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGPreset* fromJson(QString &jsonString) override;
qint32 getSourcePreset();
void setSourcePreset(qint32 source_preset);
QString* getGroup();
void setGroup(QString* group);
QString* getDescription();
void setDescription(QString* description);
qint64 getCenterFrequency();
void setCenterFrequency(qint64 center_frequency);
SWGGLSpectrum* getMSpectrumConfig();
void setMSpectrumConfig(SWGGLSpectrum* m_spectrum_config);
qint32 getDcOffsetCorrection();
void setDcOffsetCorrection(qint32 dc_offset_correction);
qint32 getIqImbalanceCorrection();
void setIqImbalanceCorrection(qint32 iq_imbalance_correction);
QString* getSourceId();
void setSourceId(QString* source_id);
QString* getSourceSerial();
void setSourceSerial(QString* source_serial);
qint32 getSourceSequence();
void setSourceSequence(qint32 source_sequence);
QList<SWGChannelConfig*>* getChannelConfigs();
void setChannelConfigs(QList<SWGChannelConfig*>* channel_configs);
QList<SWGDeviceConfig*>* getDeviceConfigs();
void setDeviceConfigs(QList<SWGDeviceConfig*>* device_configs);
QString* getLayout();
void setLayout(QString* layout);
virtual bool isSet() override;
private:
qint32 source_preset;
bool m_source_preset_isSet;
QString* group;
bool m_group_isSet;
QString* description;
bool m_description_isSet;
qint64 center_frequency;
bool m_center_frequency_isSet;
SWGGLSpectrum* m_spectrum_config;
bool m_m_spectrum_config_isSet;
qint32 dc_offset_correction;
bool m_dc_offset_correction_isSet;
qint32 iq_imbalance_correction;
bool m_iq_imbalance_correction_isSet;
QString* source_id;
bool m_source_id_isSet;
QString* source_serial;
bool m_source_serial_isSet;
qint32 source_sequence;
bool m_source_sequence_isSet;
QList<SWGChannelConfig*>* channel_configs;
bool m_channel_configs_isSet;
QList<SWGDeviceConfig*>* device_configs;
bool m_device_configs_isSet;
QString* layout;
bool m_layout_isSet;
};
}
#endif /* SWGPreset_H_ */